Does your grammar specify the output=AST; option? That is usually the problem. Also, complicate type definitions in rule parameters tend to come unstuck, it is usually better to create typedefs the mean the declaration is simple.
Jim > -----Original Message----- > From: [email protected] [mailto:antlr-interest- > [email protected]] On Behalf Of George Ruhlmann > Sent: Friday, October 22, 2010 7:17 AM > To: [email protected] > Subject: [antlr-interest] How to handle rule arguments in C > > I am using ANTLR Version 3.2 My target language is C using VC10 64- > bit. I > am creating a grammar called ASI. > > I have the rule: > > > tabledata[simData::ParserAdapter *adapter] > : 'DataTableRow' id=INT time[$adapter] values+=STRING* > { > > } > ; > ANTLRWorks 1.4 generates the necessary files with no errors. When I > compile the code it generates the error: > > 1>C:\people\feds\SIMDIS- > X\SDK\include\GeneratedCode/src/ASIParser.c(8449): > error C2039: 'vectors' : is not a member of 'ASIParser_Ctx_struct' > 1> > C:\people\feds\SIMDIS- > X\SDK\include\GeneratedCode\include\ASIParser.h(242) : > see declaration of 'ASIParser_Ctx_struct' > 1>C:\people\feds\SIMDIS- > X\SDK\include\GeneratedCode/src/ASIParser.c(8449): > error C2227: left of '->newVector' must point to > class/struct/union/generic type > 1>C:\people\feds\SIMDIS- > X\SDK\include\GeneratedCode/src/ASIParser.c(8449): > error C2039: 'vectors' : is not a member of 'ASIParser_Ctx_struct' > According to the book "The Definitive ANTLR Reference", the use of += > will place all the arguments in a list, but the C code does not know > how to make the list object. What am I doing wrong? > > Thanks, > > George > > List: http://www.antlr.org/mailman/listinfo/antlr-interest > Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your- > email-address List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/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.
