Commit b9452c22 authored by Julien Lopez's avatar Julien Lopez
Browse files

[FIX] Bug #31 fixed

parent f49dc4b9
...@@ -226,7 +226,7 @@ let rec token = lexer ...@@ -226,7 +226,7 @@ let rec token = lexer
string (L.lexeme_start lexbuf) '"' lexbuf; string (L.lexeme_start lexbuf) '"' lexbuf;
let s = get_stored_string () in let s = get_stored_string () in
return_loc start (L.lexeme_end lexbuf) (STRING s) return_loc start (L.lexeme_end lexbuf) (STRING s)
| "'" "\\"? _ "'" -> | "'" [^ "'"]+ "'" ->
L.rollback lexbuf; L.rollback lexbuf;
(fun _ -> lexer (fun _ -> lexer
| "'" -> let start = L.lexeme_start lexbuf in | "'" -> let start = L.lexeme_start lexbuf in
...@@ -280,7 +280,7 @@ and token2 = lexer ...@@ -280,7 +280,7 @@ and token2 = lexer
string (L.lexeme_start lexbuf) '"' lexbuf; string (L.lexeme_start lexbuf) '"' lexbuf;
let s = get_stored_string () in let s = get_stored_string () in
return_loc start (L.lexeme_end lexbuf) (STRING s) return_loc start (L.lexeme_end lexbuf) (STRING s)
| "'" "\\"? _ "'--'" "\\"? _ "'" | "'" [^ "'"]+ "'--'" [^ "'"]+ "'"
| "'" [^ '\'']+ "'" not_xml_letter -> | "'" [^ '\'']+ "'" not_xml_letter ->
L.rollback lexbuf; L.rollback lexbuf;
(fun _ -> lexer (fun _ -> lexer
...@@ -345,7 +345,7 @@ and token2toplevel = lexer ...@@ -345,7 +345,7 @@ and token2toplevel = lexer
string (L.lexeme_start lexbuf) '"' lexbuf; string (L.lexeme_start lexbuf) '"' lexbuf;
let s = get_stored_string () in let s = get_stored_string () in
return_loc start (L.lexeme_end lexbuf) (STRING s) return_loc start (L.lexeme_end lexbuf) (STRING s)
| "'" "\\"? _ "'--'" "\\"? _ "'" | "'" [^ "'"]+ "'--'" [^ "'"]+ "'"
| "'" ((";"[^ ";'"]) | [^ ";'"])* ";"? "'" not_xml_letter -> | "'" ((";"[^ ";'"]) | [^ ";'"])* ";"? "'" not_xml_letter ->
L.rollback lexbuf; L.rollback lexbuf;
(fun _ -> lexer (fun _ -> lexer
......
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