python - What do I do with a Concrete Syntax Tree? -


I am using a simple parsing tree for grammar. Here is an example: ('instructions', [('direction', [(('name', 'retrieve']), ('instructions', using tree lists and tuples. , My question is what ([name ',' committed ']]), (' filename ', [(' name ',' f30502 ')])]]

my What is the question at this point, what do I do with it? I know what I am trying to do, but a lot depends, but I would like to consume / use paras trees. Ray has not been able to find much, only making them

P> CST (Concrete Syntax Trees) are difficult to work with so they are usually converted into AST (Abstract Syntax Trees) for further processing (details in the same article). For example, (Component which changes the python source code in Python VM bytecode) CST as part of its function Changes in ST.

Now, it really depends on your ultimate goal. You're doing parsing? What do you want to do with it? If you are rebuilding the flow of a classical compilation, then possibly going to convert to AST is a good way to move, otherwise you can get enough CST - all depends on what you want.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -