Commit 3f812175 authored by Julien Lopez's avatar Julien Lopez
Browse files

Change priority so that 'a' is first seen as a string before as a variable.

Last problem (hopefully) is that characters inside simple quotes are not stored
properly by the lexer.
parent e0ce2cd4
......@@ -613,6 +613,7 @@ EXTEND Gram
| "no_arrow" [ x = pat; "|"; y = pat -> mk _loc (Or (x,y)) ]
| "simple" [ x = pat; "&"; y = pat -> mk _loc (And (x,y))
| x = pat; "\\"; y = pat -> mk _loc (Diff (x,y)) ]
| "var_typ" [ `SQUOTE; x = IDENT -> mk _loc (TVar x) ]
|
[ "{"; r = record_spec; "}" -> r
| "ref"; p = pat ->
......@@ -647,7 +648,6 @@ EXTEND Gram
| i = char ; "--"; j = char ->
mk _loc (Internal (Types.char (Chars.char_class i j)))
| "`"; c = tag_type -> c
| `SQUOTE; x = IDENT -> mk _loc (TVar x)
| "("; l = LIST1 pat SEP ","; ")" -> multi_prod _loc l
| "["; r = [ r = regexp -> r | -> Epsilon ];
q = [ ";"; q = pat -> Some q
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment