[antlr-interest] C Runtime - Duplicate symbols defined in parser and lexer

Kay Roepke kroepke at classdump.org
Tue Aug 7 01:05:24 PDT 2007


On Aug 6, 2007, at 10:58 PM, Cameron Esfahani wrote:

> Specifically, the symbol is named cdfa14.  And sure enough, when I  
> open TParser.c and TLexer.c, there is a symbol named that in both.
>
> Anyone have any ideas?

Those are global arrays, right? Maybe the C target should use  
different prefixes for DFAs in lexers and parsers. That's what I did  
with ObjC.
I simply prefix all generated global symbols with the recognizer's  
name (arrays CLexer_DFA42, @class CParser_program_return, etc.) to  
work around
this issue.

You might get away with changing the C.stg template file and sticking  
that in front of the classpath, until this issue is resolved.

cheers,
-k
-- 
Kay Röpke
http://classdump.org/






More information about the antlr-interest mailing list