[antlr-interest] Skipping thru text looking for keywords to parse ...
Ben Gillis
wbgillis at gmail.com
Tue Jan 6 17:07:27 PST 2009
The ANTLR book and other examples I have demonstrate explicitly delineated comments.
Are there any examples or email archive discussion where the bulk of text being parsed is, implicitly, comments that should be ignored (i.e. there is no metacharacter(s) indicating what is a comment)...and, the parser is only concerned with various keywords?
For example, ...
--------------------------------------- Begin Example ---------------------------------------
This is a bunch of text we don't care anything about, it is comments and we want to scan
text until we come to a keyword(s) that indicate we have something to parse such as this...
KEYWORD=value1
This is a bunch of text discussion that we do not want parsed, but rather to skip over it until we find yet
another keyword ... blah blah blah ...
KEYWORD2=value2 MODIFIER1=modValueA
A bunch more text we don't care anything about until we find yet another keyword blah blah blah ...
KEYWORD=valueX MODIFIER2=modValueB
blah blah blah etc. etc. ad nausea...
--------------------------------------- End Example ---------------------------------------
Thanks in advance,
Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090106/79a60d89/attachment.html
More information about the antlr-interest
mailing list