[antlr-interest] C target, C grammar + AST = missing *_SymbolsPop()

Gary R. Van Sickle g.r.vansickle at att.net
Tue Jan 20 20:56:01 PST 2009


> > Doesn't for me. Can you submit your grammar or is this completely 
> > unchanged from the example?
> > 
> 
> The above was from marginally changed grammar, but I can 
> replicate it by simply adding 
> 
> "	output = AST;
>     ASTLabelType = pANTLR3_BASE_TREE;"
> 
> to the options of the bog-standard example.  Untar the 
> attached into a folder somewhere and do a:
> 
> $ antlr C.g  ## or however you invoke ANTLR, this is my shell 
> script that does "java org.antlr.Tool C.g"
> $ gcc -I. CParser.c CLexer.c main.c -lantlr3c
> 
> I get this:
> 
> "/cygdrive/c/DOCUME~1/GaryV/LOCALS~1/Temp/ccwDPkR8.o:CParser.c
:(.text+0xbc2c
> ): undefined reference to `_ptranslation_unit_SymbolsPop'
> /cygdrive/c/DOCUME~1/GaryV/LOCALS~1/Temp/ccwDPkR8.o:CParser.c:
(.text+0xc6a2)
> : undefined reference to `_pfunction_definition_SymbolsPop'
> /cygdrive/c/DOCUME~1/GaryV/LOCALS~1/Temp/ccwDPkR8.o:CParser.c:
(.text+0xd189)
> : undefined reference to `_pdeclaration_declarationPop'
> /cygdrive/c/DOCUME~1/GaryV/LOCALS~1/Temp/ccwDPkR8.o:CParser.c:
(.text+0x107df
> ): undefined reference to `_pstruct_or_union_specifier_SymbolsPop'
> /cygdrive/c/DOCUME~1/GaryV/LOCALS~1/Temp/ccwDPkR8.o:CParser.c:
(.text+0x27dc1
> ): undefined reference to `_pcompound_statement_SymbolsPop'
> collect2: ld returned 1 exit status"
> 
> Comment out the AST lines and it builds fine.
> 
> ???
> 
> > Jim
> > 

Replicated this with "ANTLR Parser Generator  Version 3.1.2-2008-10-21"
and... I'm not sure which version of runtime, Makefile.am is dated 10/1/08.

-- 
Gary R. Van Sickle
 



More information about the antlr-interest mailing list