[antlr-interest] OOM error from lexer (ANTLR 2.7.5)
Richard Clark
rdclark at nextquestion.net
Wed Jul 27 09:43:02 PDT 2005
Here's a puzzler: I'm getting Out of Memory errors from the lexer
when my input files don't end in a newline. The offending rule seems
to be:
LINE
: ':'! (~('{'|'\\'|'\n'|'\r') | ESC)*
;
(starts with a colon, ends at a \\ comment, { to denote a metadata
block, or newline. All other characters gleefully accepted.)
Is there something special I should be doing to catch an EOF,
possibly splicing in one final newline?
...Richard
More information about the antlr-interest
mailing list