[antlr-interest] ASTLabelType C# Problem

DJB MASTER DJBall05 at hotmail.co.uk
Sun Jul 10 16:04:43 PDT 2011


Ok, I downloaded the preview release and it has seemed to fix those errors. I
was using the stable release because I didn't want to use a library that was
'temperamental'.

Just one more thing, now when using my ASTNode I get an invalid cast from
CommonTree to ASTNode in my rules. On these lines...

'Number16_tree = (ASTNode)adaptor.Create(Number16);'

I've set the adaptor using...

'ASTAdaptor treeAdaptor = new ASTAdaptor();
parser.TreeAdaptor = treeAdaptor;'

Do I have to set the adaptor somewhere else? I've seen people talking about
invalid casts from CommonTree, not sure what's required.

Thanks again.

--
View this message in context: http://antlr.1301665.n2.nabble.com/ASTLabelType-C-Problem-tp6567453p6568868.html
Sent from the ANTLR mailing list archive at Nabble.com.


More information about the antlr-interest mailing list