[antlr-interest] Need help getting the Antlr C runtime to link into test app.

Jeffrey Newman jeffn at photorepo.com
Thu Dec 9 06:33:30 PST 2010


I think I figured things out.
Please disregard this plea for help...

On Thu, 2010-12-09 at 04:15 -0800, Jeffrey Newman wrote:
> Hi,
> 
> I'm trying to bring up a C++/C development environment for Antlr.
> 
> I have this same problem with 3.2 and the 3.3 snapshot.
> 
> The error is expected unqualified-id before ')' token in antlr3l3xer.h
> 105 (the line below).
> 
> /** Pointer to a function that constructs a new token from the lexer stored information */
> pANTLR3_COMMON_TOKEN	(*emit)		    (struct ANTLR3_LEXER_struct * lexer);
> 
> 
> I build the source with ./configure --enable-64bit.
> Then installed (as root). This seemed to go fine.
> 
> I didn't see a test in the install.
> 
> I built a "treeparser.h" from all of the h files. (attached)
> 
> Here is the source file with the extern "C"...
> 
> #include <iostream>
> #include "AntlrApp.h"
> extern "C" {
> #include "treeparser.h"
> }
> AntlrApp::AntlrApp(int & argc, char ** argv)
> : QCoreApplication(argc, argv)
> {
> }
> int AntlrApp::exec()
> {
> std::cout << "Hello World";
> antlrCTest();
> exit();
> }
> void AntlrApp::antlrCTest()
> {
> }
> 
> When I comment out the offending line, the source complies.
> I really don't expect it to work.
> 
> Any help getting this resolved would appreciated.
> 
> thanks
> 
> Jeffrey
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address




More information about the antlr-interest mailing list