Can anyone explain to me why tabs, spaces, and greater-thans at the
beginning of lines are ending up in TEXT tokens, rather than in INDENT
or QUOTE tokens, as I think they should?
fragment SPECIAL_CHARS
: ('\n' | '[' | ']' | '*' | '/' |'=' | '^' | '_' | '8' | '@' | '#' |
'$' | '!' | '(' | ')' | '{' | '}' );
INDENT : { getCharPositionInLine() == 0 }?=> (' '|'\t')+;
QUOTE : { getCharPositionInLine() == 0 }?=> '>';
TEXT : (~SPECIAL_CHARS)+;
This is in a lexer grammar and I've omitted some other rules that
shouldn't (I don't think) have any bearing on this question.
Todd
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en.