0

I am tring to build a parser (in C language) with antlrIDE on Windows 7 platform. I finished the grammar (.g of combined grammar), which automatically generates lexer and parser for me. However, I don't know how to compile the .c and .h file. I tried but get error because the header include (the antlrIDE auto generates the header #include "antlr.h" in the parser dot c file). I have read this article Using ANTLR3 C Target

But it does not help me, could you guys please show me how to do that? Thank you in advanced.

0

1 Answer 1

1

You need to add the ANTLR runtime to your project/solution. Here is the link to download the runtime library ANTLR C runtime (from the article you put the link in your question).

Add the runtime to your build and also set the additional include directories to the include folder of the runtime lib (where the compiler can find the antlr.h header).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.