[antlr-interest] C# targets problem with custom tree nodes

Liviu U liviu.u at gmail.com
Wed Feb 25 03:13:41 PST 2009


Hi, I noticed very strange behaviour with custom nodes specified in the parser:

A) if constructor parameters are specified, the node is never added to
the final tree structure, only the subnodes
B) if the token is an imaginary one, the same behaviour, the custom
node is missing from the tree.


For example:

 CLASS IDENT -> ^(CLASS<NodeIndentifier> IDENT) is OK

 CLASS IDENT -> ^(VIRTUAL_CLASS<NodeIndentifier> IDENT) is NOT OK no
node of type NodeIndentifier is added to the tree

 CLASS id=IDENT -> ^(CLASS<NodeIndentifer>[$id.Text] is NOT OK, no
node of type NodeIndentifier is added to the tree


Are any other people having issues with this?


More information about the antlr-interest mailing list