[antlr-interest] Problem with addASTChild method
Vaphel
vaphel at op.pl
Tue Sep 13 00:38:13 PDT 2005
Hello,
I try to implement a tree parser which after every appearance of some token type (e.g. 25) add SEMIcolon. I did it in this way like on example below, but it not work. What may be wrong?
start_rule: #("top" (q:.
{
if (#q.getType() == 25 )
{
AST plus_AST = #[SEMI];
astFactory.addASTChild(currentAST, plus_AST);
}
}
)*
);
Thank for helping me.
Regards,
Vaphel
Wiadomość wysłana przez program DRACO ORGANIZER http://www.dshome.pl
More information about the antlr-interest
mailing list