[antlr-interest] Antlr Parser

Murat Atalay atalay at udel.edu
Tue Jun 26 09:26:54 PDT 2012


Hello,

I am currently working on a project requires parsing a structure as such;

Group x
     {
          var1 = "abc"
          Group y
               {
                     var2 = "def"
               }
     }

I want it to print out a structure for CPP language using the tree walkers.
But also I would like it to allocate memory for the groups and the
variables and give me an header node that I can access everything from it,
when walker is done. Such as;

struct Group{
   string var1;
   Group* pchild;
}          //looking for the header node for such list.

I have already written a parser and tree grammar for it. I've been using
Visual Studio but I had some problems putting C code inside my tree
grammar. Now i'm using Eclipse to do it and my parser and tree grammar
works fine. But I still need to put them in a big list.

I was wondering what would you suggest me. At the end I will need CPP code
that I can compile or put in to my project.

Please find my .g files in attach. Please note that, it's outputting JAVA
code since I am using Eclipse at the moment. I would like it to be work on
Visual Studio.

Thank you for your time.
Murat Atalay
-------------- next part --------------
A non-text attachment was scrubbed...
Name: APAWalker.g
Type: application/octet-stream
Size: 607 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20120626/ad36cd9f/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: APA.g
Type: application/octet-stream
Size: 2057 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20120626/ad36cd9f/attachment-0001.obj 


More information about the antlr-interest mailing list