adding reserved words

This commit is contained in:
Simon Petit 2024-12-09 20:57:09 +01:00
parent aa4028fcf0
commit 2e00eb4e86

View File

@ -16,12 +16,16 @@ rule read_token = parse
| "COUNT" { COUNT }
| "DISTINCT" { DISTINCT }
| "FROM" { FROM }
| "INNER" { INNER }
| "LEFT" { LEFT }
| "RIGHT" { RIGHT }
| "CROSS" { CROSS }
| "UNION" { UNION }
| "NATURAL" { NATURAL }
| "JOIN" { JOIN }
| "ON" { ON }
| "OR" { OR }
| "AND" { AND }
| "WHERE" { WHERE }
| "HAVING" { HAVING }
| "BETWEEN" { BETWEEN }
@ -36,6 +40,12 @@ rule read_token = parse
| ")" { RIGHT_PAREN }
| "," { COMMA }
| "|" { PIPE }
| "'" { QUOTE }
| "+" { PLUS_SIGN }
| "-" { MINUS_SIGN }
| whitespace { read_token lexbuf }
| digit+ { INTEGER }
| digit+"."digit+ { FLOAT }
| '.'digit+ { FLOAT }
| alpha alphanumeric* as ident { IDENT ident }
| eof { EOF }