[antlr-interest] How to tell the lexer to stop?(C runtime target )

chain one chainone at gmail.com
Thu Jan 15 00:35:46 PST 2009


I want to only parse the beginning of a file. And I don't want the
recognizer to beak the whole file into huge number of tokens which will make
the memory consuming very high.So after the lexer having recognized one
specified TOKEN such as ";", I want to tell the lexer to stop, and pass the
tokens to the parser.
Is it possible in C runtime target? If it is, could you tell me how?


SEMI: ';'  { // throw the EOF token?}
;


Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090115/2107da34/attachment.html 


More information about the antlr-interest mailing list