In my combined lexer/parser grammar, I have the following token rule:
FILE_DELIMITER : '|||||' (PRINTABLE ~ '|')+ '|||||' {$channel = HIDDEN;};
In a separate file, I have a tree parser grammar.
In one of these two files, I need to perform a specific action when this
token is found. I tried to add an action in my lexer/parser grammar, but it
wouldn't let me perform any actions on the token itself. (I need the text of
it.) Also, because the token can appear any number of times, at any point in
my grammar, it cannot easily be added to my tree grammar rules.
Is there any way for me to perform an action when this token appears in my
token stream? For various reasons, I wouldn't at all mind overriding some
part of the tokenization process if need be.
Tyler Distad
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.