Parsing Ansi-C grammar



Hi All,
I need to parse a plain-C grammar from Java (to implement a code
generator).

For my purposes JTB would be perfect: I could modify the "pretty
print" visitor to do what I need with minimal effort.

Catch: JTB seems to dislike code in the input grammar itself (could
interfere with its own additions), while I need it to maintain (at
least) typedef information (see JavaCC C-grammar).

Using plain JavaCC is much more cumbersome; jjtree seems almost
useless (or I can't devise an easy way to induce it to produce a tree
including token info).

Any other suggestions?

Side Issues: JTB (and, to a lesser extent, JavaCC) does not seem very
lively. Are they just "mature" or are they on the way to the grave?
Should I use them for new development or should I look somewhere else?
Reason why I insist on JTB is it seems to produce exactly what I need.

Thanks in Advance
Mauro

.



Relevant Pages