[antlr-interest] Match anything until a specific phrase
fridi70 at gmx.de
Fri Jan 8 07:14:35 PST 2010
maybe someone can help me to get this done with ANTLR 3.2
My file has a header starting with 'test', some comments and then
several blocks named 'Page 1', 'Page 2' etc. with integers, i.e.
test This is a comment and
we are not interested in.
Today is friday.
I want to have a rule that consumes everything of the header until the
'Page' should not be consumed by the header, it be consumed by another rule.
So I tried the following:
language = Java;
header PAGE INT ':' INT+ EOF;
Any idea? Thanks in advance.
More information about the antlr-interest