[antlr-interest] lexing tips needed... (or, could I use predicate in lexer rule?)
Richard Clark
rdclark at gmail.com
Sun Jul 15 11:15:39 PDT 2007
If you're designing this language, you're better off changing the
design to be unambiguous. Seriously.
For example, what do you do with "2.1.toString()"? Or the "2.e3"
example (which, in every other language I've seen is "2.0e3").
Otherwise, be prepared to break things apart a little too much in the
lexer and have the parser stitch them back together again, as in "2.1"
becomes INT DOT INT and it's the parser's job to recognize the float.
...Richard
More information about the antlr-interest
mailing list