[parsing, without sugar (2007-02-27)
kragen@pobox.com**20070412102931] {
hunk ./bicicleta.ml 192
+
+    (* parsing *)
+    assert((parse "x") = Name "x");
+    assert((parse "'()'") = Name "'()'");
+    assert((parse "foo.bar.baz") = Call(Call(Name "foo", "bar"), "baz"));
+    assert((parse "\"foo\".length") = Call(StringConstant "\"foo\"", "length"));
+    assert((parse "{x:y=x}") = Literal("x", Definition("y", Name "x", NoDefs)));
+    assert((parse "{x:}") = Literal("x", NoDefs));
+    assert((parse "{xx:y=xx,z=xx}") = Literal("xx", Definition("y", Name "xx",
+                  Definition("z", Name "xx", NoDefs))));
+    assert((parse "{x: x = \"x\", y = \"y\", z = \"z\"}") = Literal("x",
+                  Definition("x", StringConstant("\"x\""),
+                  Definition("y", StringConstant("\"y\""),
+                  Definition("z", StringConstant("\"z\""), NoDefs)))));
+    assert((parse "point {p: x = \"x\", y = \"y\"}") = Derivation(Name "point",
+        "p", Definition("x", StringConstant("\"x\""),
+             Definition("y", StringConstant("\"y\""), NoDefs))));
+    (* still to do: unquoting, newlines, and various kinds of syntactic sugar *)
+
+    (* showing *)
+    (* assert((parse (show_bicexpr booleans)) = booleans) *)
hunk ./bicicleta_parser.mly 19
+  | expr Lbrace NameTok Colon methods Rbrace { Derivation($1, $3, $5) }
hunk ./bicicleta_parser.mly 22
+  | { NoDefs }
+  | NameTok Equals expr Comma methods { Definition($1, $3, $5) }
}
