On 23/09/2014 11:48, Victor Cuteanu wrote:
> Dear Team / Members,
>
> Since I would like to generate an c++ parser, I was searching in internet about tools and corresponding grammar files.
> So I have found the CppNcss project , which uses the JJTree and JavaCC to generate a java parser for c++ files.
> After trying to obtain the parser based on the jjt file, I got some problems: a) the generated files are a little bit different, and the parsing seems to not fetch all information ( tokes ) for larger file. However this problem seems to not be present within the CppNcss tool.
> Therefore I would like to ask You, which JavaCC and JJTree (version) you have used, and which option you gave. Also I have observed that there ar more versions of the c++ grammar file.
> con some one support me in solving this issue ?
>
> Thank You Very Much
> Best Regards
> Victor Cuteanu
>
Hi Victor,
Sorry I don't have much recollection of how the project was built as
it's been years the last time I had a look.
The parser is very incomplete and does not support all valid C++03 (not
even speaking of C++1x's).
I would suggest you instead take a look at CLang and LLVM for the task
you're aiming at.
I hope this helps,
MAT.
|