[antlr-interest] C# Question: cannot convert from 'method group' to
'antlr.collections.AST
Vladimir S.
vs667 at nyu.edu
Wed Mar 1 18:47:27 PST 2006
Dear Group,
I am generating C# code and I am using C#.NET 2005 express.
ANTLR does NOT complain about the syntax, but C# seems to when I compile
the code:
The grammar in question is:
*variable : ID
(componentSelection )?
{ #variable=
#(
[VARIABLE,"VARIABLE"],
ID,
componentSelection
);
}
;*
In this case componentSelection is another rule in the grammar; From
this rule I wanted to generate a node with root node being "VARIABLE"
first child being the ID, and the second child being the tree of the
result of expanding the componentSelection rule. It seems like when I am
using a NON terminals in this context, I get this error:
I keep getting this error:
*Error 4 Argument '3': cannot convert from 'method group'
to 'antlr.collections.AST'
C:\=PROGRAMMING=\=Compilers=\ParserFormV03\Parser\ParserCore.cs
1801 79 ParseFormV02
*
This is the C# code that was generated from that grammar:
*variable_AST=
(AST)
astFactory.make(astFactory.create(VARIABLE,"VARIABLE"), tmp93_AST,
componentSelection);*
Thanks for all your help,
Vladimir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20060301/f8d322f8/attachment.html
More information about the antlr-interest
mailing list