[antlr-interest] Folding Text
offline314159
offline at shaw.ca
Sun Feb 29 20:25:40 PST 2004
The only snag with this is, i don't want to get the token split there.
Basically, if i have the text
NAME:value part 1 is
extended onto line 2
i want to see two tokens:
one with type NAME text "NAME"
and another with type VALUE text "value part 1 is extended onto line 2"
Is this possible?
--- In antlr-interest at yahoogroups.com, "lgcraymer" <lgc at m...> wrote:
> This one's easy--note the use of "SKIP" for whitespace in the
> examples. Basically you want something like
>
> ENDL :
> '\n'
> ( (' ' | '\t')+ { _ttype = SKIP; } | )
> ;
>
> which looks for whitespace after a newline; if present, mark the token
> as one to be skipped (you might need Token.SKIP instead of SKIP) so
> that the parser does not see it.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list