[antlr-interest] Looking for examples to walk parser tree or AST with C runtime

George J. Shannon George.Shannon at raphaelanalytics.com
Tue Dec 16 12:34:53 PST 2008


I need to extract C++ objects from tree that will result from C runtime.

Would anyone mind sharing examples of walking the AST information extracted
by the C runtime?  I'm just looking for something to give me a jumpstart.

I have the grammar/lexicon working just fine in Java.  I don't know if it
has value or not, but I'm attaching the ANTLR .g file.

The examples that Jim so kindly put together for the C runtime don't appear
to apply to my case in that I do not need to verify the language - I'm
parsing code that is extracted from another IDE that has already verified
the text as being compliant against the ENBF rules.  What I need to do is
determine which rules apply for a particular sequence of text, and extract
different C++ objects depending upon which ENBF rules were fired.  Hence
what I need is more like a parse tree than an AST tree.

In the early summer/late spring someone was kind enough to provide such an
example, but Outlook ate my archival files and I was unable to recover it
(yes teacher, the dog really did eat my homework).

And, as always, it would be really nice to know when the promised C++
version of the C runtime will be made available to see if the C++ version
helps simplify things.

Thanks so much for the assistance,

Regards,

George

 

George Shannon

President, Raphael Analytics, Inc.

16 Spur Drive

Fenton, MO 63026

(314) 550-5589 (cell)

 <mailto:George.Shannon at raphaelanalytics.com>
George.Shannon at raphaelanalytics.com

 <http://www.raphaelanalytics.com> www.raphaelanalytics.com

 

The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.  Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited.   If you received
this in error, please contact the sender and delete the material from any
computer.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20081216/c0874d5b/attachment.html 


More information about the antlr-interest mailing list