Hi,
I'm writing a grammar which needs more than one lexer (token scope). I
just found a document from ANTLR 2 documents which explains using
"selector" for this purpose.
Is this approach still valid for ANTLR 3? and should I make different
files for different lexers?
When there are more than one parser, what happens to the AST? how can I
use rewrite rules?
For example, in the following example, how can I add this rewrite rule ->
^('javadoc' content)
javadoc
: JAVADOC_OPEN
{
// create a parser to handle the javadoc comment
JavaDocParser jdocparser =
new JavaDocParser(getInputState());
jdocparser.content(); // go parse the comment
}
JAVADOC_CLOSE ;
Regards
- Salmir
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address