Mercurial > urweb
comparison src/lacweb.lex @ 204:241c9a0e3397
Parsing the simplest SQL query
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 14 Aug 2008 13:59:11 -0400 |
parents | dd82457fda82 |
children | 1487c712eb12 |
comparison
equal
deleted
inserted
replaced
203:dd82457fda82 | 204:241c9a0e3397 |
---|---|
283 | 283 |
284 <INITIAL> "Type" => (Tokens.TYPE (pos yypos, pos yypos + size yytext)); | 284 <INITIAL> "Type" => (Tokens.TYPE (pos yypos, pos yypos + size yytext)); |
285 <INITIAL> "Name" => (Tokens.NAME (pos yypos, pos yypos + size yytext)); | 285 <INITIAL> "Name" => (Tokens.NAME (pos yypos, pos yypos + size yytext)); |
286 <INITIAL> "Unit" => (Tokens.KUNIT (pos yypos, pos yypos + size yytext)); | 286 <INITIAL> "Unit" => (Tokens.KUNIT (pos yypos, pos yypos + size yytext)); |
287 | 287 |
288 <INITIAL> "SELECT" => (Tokens.SELECT (pos yypos, pos yypos + size yytext)); | |
289 <INITIAL> "FROM" => (Tokens.FROM (pos yypos, pos yypos + size yytext)); | |
290 <INITIAL> "AS" => (Tokens.AS (pos yypos, pos yypos + size yytext)); | |
291 | |
288 <INITIAL> {id} => (Tokens.SYMBOL (yytext, pos yypos, pos yypos + size yytext)); | 292 <INITIAL> {id} => (Tokens.SYMBOL (yytext, pos yypos, pos yypos + size yytext)); |
289 <INITIAL> {cid} => (Tokens.CSYMBOL (yytext, pos yypos, pos yypos + size yytext)); | 293 <INITIAL> {cid} => (Tokens.CSYMBOL (yytext, pos yypos, pos yypos + size yytext)); |
290 | 294 |
291 <INITIAL> {intconst} => (case Int64.fromString yytext of | 295 <INITIAL> {intconst} => (case Int64.fromString yytext of |
292 SOME x => Tokens.INT (x, pos yypos, pos yypos + size yytext) | 296 SOME x => Tokens.INT (x, pos yypos, pos yypos + size yytext) |