[antlr-interest] Why no children in tree generated by C++ parser?

Maurice van der Pot griffon26 at kfk4ever.com
Fri Oct 8 12:21:29 PDT 2004


On Fri, Oct 08, 2004 at 07:01:11PM +0200, Ric Klaren wrote:
> 
> AFAIK that grammar has no treebuilding embedded, so if you only turned on
> the buildAST option then the generated tree might not be usefull at all.

Like the first reply to my post said, it's more like a forest... that burnt down.
This was the only C++ grammar for ANTLR I could find though. Does this mean
that nobody is actually using this grammar or even ANTLR for C++? Or maybe
nobody is advertising their modified version of the grammar.

> You should modify the grammar for treebuilding actions. But it depends on
> what you'll want to do in the subsequent tree parsers how you'll strucutre
> the tree.

I was considering making a static code checker, so I'm looking to do some 
pattern matching on the tree.

Thanks,
Maurice.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20041008/4a0aee98/attachment.bin


More information about the antlr-interest mailing list