Mercurial > urweb
comparison src/urweb.lex @ 2150:763ccca119bc
location literal _LOC_
author | Gabriel Riba Faura <griba2001@gmail.com> |
---|---|
date | Wed, 03 Jun 2015 08:34:23 +0200 |
parents | 854d7ba67a59 |
children | 9ea29c93246d |
comparison
equal
deleted
inserted
replaced
2149:854d7ba67a59 | 2150:763ccca119bc |
---|---|
535 <INITIAL> "CASCADE" => (Tokens.CASCADE (pos yypos, pos yypos + size yytext)); | 535 <INITIAL> "CASCADE" => (Tokens.CASCADE (pos yypos, pos yypos + size yytext)); |
536 <INITIAL> "REFERENCES"=> (Tokens.REFERENCES (pos yypos, pos yypos + size yytext)); | 536 <INITIAL> "REFERENCES"=> (Tokens.REFERENCES (pos yypos, pos yypos + size yytext)); |
537 | 537 |
538 <INITIAL> "CURRENT_TIMESTAMP" => (Tokens.CURRENT_TIMESTAMP (pos yypos, pos yypos + size yytext)); | 538 <INITIAL> "CURRENT_TIMESTAMP" => (Tokens.CURRENT_TIMESTAMP (pos yypos, pos yypos + size yytext)); |
539 | 539 |
540 <INITIAL> "_LOC_" => (let val strLoc = ErrorMsg.spanToString (ErrorMsg.spanOf | |
541 (pos yypos, pos yypos + size yytext)) | |
542 in | |
543 Tokens.STRING (strLoc, pos yypos, pos yypos + size yytext) | |
544 end); | |
545 | |
540 <INITIAL> {id} => (Tokens.SYMBOL (yytext, pos yypos, pos yypos + size yytext)); | 546 <INITIAL> {id} => (Tokens.SYMBOL (yytext, pos yypos, pos yypos + size yytext)); |
541 <INITIAL> {cid} => (Tokens.CSYMBOL (yytext, pos yypos, pos yypos + size yytext)); | 547 <INITIAL> {cid} => (Tokens.CSYMBOL (yytext, pos yypos, pos yypos + size yytext)); |
542 | 548 |
543 <INITIAL> {hexconst} => (let val digits = String.extract (yytext, 2, NONE) | 549 <INITIAL> {hexconst} => (let val digits = String.extract (yytext, 2, NONE) |
544 val v = (StringCvt.scanString (Int64.scan StringCvt.HEX) digits) | 550 val v = (StringCvt.scanString (Int64.scan StringCvt.HEX) digits) |