One of the most important requirements for mode switching
is that the language have clear lexical sentinels that can trigger switching
back and forth, such as left and right angle brackets. To be clear, modes rely
on the fact that the lexer doesn’t need syntactic context to distinguish between
different regions in the input
Hi Ramon,
You can call pushMode any time, but be aware that it will only affect the next token, not the current token (unless you override nextToken and place the call to pushMode before you call super.nextToken).
Thank you,
Sam Harwell
--
You received this message because you are subscribed to the Google Groups "antlr-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
antlr-discussi...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.