[antlr-interest] Creating a main() for C++ code,
passing params on command line
Paul D Watson
pwatson at knightsbridge.com
Sat Apr 15 14:58:12 PDT 2006
It is clearly evident that I am new to antlr. I have searched quite a bit
through the ANTLR Reference Manual and with Google to find out about how a
main() is created for antlr generated programs. There are main.cpp and
Main*.cpp files around in the examples directory. But I am hoping to find
some reference documentation that will tell what must, or must not, go
into a main() for antlr generated programs.
Ultimately, I would like to pass parameters on the command line for the
parser and lexer to use. Things such as debug_level to indicate the
amount of debug output desired or language_dialect which would allow the
same processor to handle multiple dialects of a language. The only way I
see to do this now is to embed them into the grammar .g file.
Please point me in the right direction. Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20060415/4232cd6e/attachment.html
More information about the antlr-interest
mailing list