[antlr-interest] Problems with using the C++ grammar provided at
antlr.org.
Gordon Prieur
Gordon.Prieur at Sun.COM
Wed Jul 20 07:25:24 PDT 2005
Min Deng wrote:
>Hello all,
>
>I am looking at the C++ grammar at
>http://www.antlr.org/grammar/cpp. As indicated in the
>MyReadMe.txt, this grammar for ANTLR will produce a
>lexer and a parser written in C++ for C++ files. I am
>wondering if there is a C++ grammar for ANTLR that
>produces a lexer and a parser written in Java (instead
>of C++) for C++ files.
>
>
I researched this and could not find one. I'm about to hook the
C++ output up to a Java program using JNI. If this is sucessfull,
its likely I'll rewrite the current C++ grammar to generate Java.
But if that happens, it wouldn't be until this next winter.
I have a strong requirement for a C/C++ parser for an IDE written
in Java (based on NetBeans). I must have a parser, although it
doesn't have to be antlr based. But so far, I haven't found anything
better to base my parser on so at least for a prototype I'm currently
working on, our parser is based on antlr's C++ parser.
Gordon
>For the above C++ grammar, the author mentioned the
>use of MSVC 6.0 and ANTLR for MSVC. Is MSVC required
>for compiling the lexer and parser, that is, is it
>possible to compile them successfully on cygwin?
>
>I used the command "java antlr.Tool CPP_parser.g" to
>generate a lexer and a parser on cygwin. After using
>the command "g++ CPPLexer.cpp", a real long list of
>output was produced on screen, and I could not stop or
>redirect the output. Is it possible to turn off/down
>the output so that I can know what is the wrong with
>the compilation process?
>
>Thanks in advance and best regards,
>Min
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam? Yahoo! Mail has the best spam protection around
>http://mail.yahoo.com
>
>
More information about the antlr-interest
mailing list