[antlr-interest] C++ Target - pANTLR3_BASE_TREE_ADAPTOR

kjam pohilets at gmail.com
Sun Aug 19 05:13:10 PDT 2012


Hi All,

I'm reading The Definitive ANTLR Reference and I've tried to write
AST-building parser as shown in Chapter 3.3. The grammar is here -
http://pastebin.com/Hd5rtTZk. I'm using ANTLR from Uber Jar
'antlr-3.4-with-cpp.jar' posted by Gokulakannan Somasundaram.

When ANTLR runs, it generates following error:

But parser and lexer are generated.

Parser header file contains these lines:

When compiling generated files, C++ compiler issues a compilation error on
those lines:

Seems that those lines are legacy from the plain C target. Is there any
solution to this problem? I'd like to use C++ target and avoid mixing C++
and plain C code.



--
View this message in context: http://antlr.1301665.n2.nabble.com/C-Target-pANTLR3-BASE-TREE-ADAPTOR-tp7578597.html
Sent from the ANTLR mailing list archive at Nabble.com.


More information about the antlr-interest mailing list