Commit 6ae713f4 authored by Julien Lopez's avatar Julien Lopez
Browse files

Fix on parser

parent db537fe0
......@@ -575,14 +575,14 @@ EXTEND Gram
Elem (mk _loc (Constant ((ident a,c))))
| "/"; p = pat LEVEL "simple" -> Guard p
| IDENT "PCDATA" -> string_regexp
| `SQUOTE; i = LIST0 [ i = any -> i ]; `SQUOTE; "--";
`SQUOTE; j = LIST0 [ j = any -> j ]; `SQUOTE ->
| `SQUOTE; i = LIST0 any; `SQUOTE; "--";
`SQUOTE; j = LIST0 any; `SQUOTE ->
let i = List.fold_left (fun x y -> x ^ y) "" i in
let j = List.fold_left (fun x y -> x ^ y) "" j in
let i = Chars.V.mk_int (parse_char _loc i)
and j = Chars.V.mk_int (parse_char _loc j) in
Elem (mk _loc (Internal (Types.char (Chars.char_class i j))))
| `SQUOTE; s = LIST0 [ s = any -> s ]; `SQUOTE ->
| `SQUOTE; s = LIST0 any; `SQUOTE ->
let s = List.fold_left (fun x y -> x ^ y) "" s in
List.fold_right
(fun c accu ->
......@@ -701,7 +701,7 @@ EXTEND Gram
char:
[
[ `SQUOTE; c = LIST0 [ c = any -> c ]; `SQUOTE ->
[ `SQUOTE; c = LIST0 any; `SQUOTE ->
let c = List.fold_left (fun x y -> x ^ y) "" c in
Chars.V.mk_int (parse_char _loc c) ]
];
......
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