What do I do with a Concrete Syntax Tree?

Posted by Cap on Stack Overflow See other posts from Stack Overflow or by Cap
Published on 2010-02-03T02:50:21Z Indexed on 2010/03/13 13:45 UTC
Read the original article Hit count: 153

I'm using pyPEG to create a parse tree for a simple grammar. The tree is represented using lists and tuples. Here's an example:

[('command',
  [('directives',
    [('directive',
      [('name', 'retrieve')]),
     ('directive',
      [('name', 'commit')])]),
   ('filename',
    [('name', 'f30502')])])]

My question is what do I do with it at this point? I know a lot depends on what I am trying to do, but I haven't been able to find much about consuming/using parse trees, only creating them. Does anyone have any pointers to references I might use?

Thanks for your help.

© Stack Overflow or respective owner

Related posts about python

Related posts about parser