At 09:51 16/10/2008, LdK ^^ wrote:
>i don't know if there are some difference but i work with the
>version 2.7.6 of antlr (my school version)
>and i'm sur that i can put the parser and treeparser in the same
>grammar file
Oh, right. You didn't say that before :) The default now is to
assume ANTLR v3 unless otherwise specified, and you can't do that
in v3.
>NEXT FILE :
>
>{import java.util.*;}
>class XHTMLNewTreeParser extends TreeParser;
>
>options {
> buildAST = true;
>
> }
When you have a tree parser in a separate file like this, you need
to specify the importVocab option, so that it knows how to find
the token definitions.
// in the parser
options {
exportVocab = XHTML;
}
// in the tree parser
options {
importVocab = XHTML;
}
List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org:8080/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
-~----------~----~----~----~------~----~------~--~---