[antlr-interest] how to write a rule that eats everything until a specific KEYWORD?

Reynold Xin reynoldx at gmail.com
Mon Mar 16 12:25:07 PDT 2009


I am writing a shallow SQL select parser that should parse

SELECT (eats everything until keyword LINK or semicolon) LINK ...

I have been reading the wiki and the Definitive ANTLR Reference but
still haven't got any clue how to do this. Can anyone shed some light?

Thanks a lot.


--
Reynold Xin


More information about the antlr-interest mailing list