add quoted idents

This commit is contained in:
Pascal Brisset
2009-10-20 11:23:22 +00:00
parent 155dac4e26
commit 22922aadd6
+1
View File
@@ -10,6 +10,7 @@ rule token = parse
| ['0'-'9']+ { INT (int_of_string (Lexing.lexeme lexbuf)) }
| ['0'-'9']+'.'['0'-'9']* { FLOAT (float_of_string (Lexing.lexeme lexbuf)) }
| '$'?['a'-'z' '_' 'A'-'Z'] (['a'-'z' 'A'-'Z' '_' '.' '0'-'9']*) { IDENT (Lexing.lexeme lexbuf) }
| '\''[^'\'']+'\'' { let s = Lexing.lexeme lexbuf in IDENT (String.sub s 1 (String.length s - 2)) }
| ',' { COMMA }
| ';' { SEMICOLON }
| ':' { COLON }