Skip to content

Accessing information from the pure ParseTrees #1362

Answered by wumpz
ghbakir asked this question in Q&A
Discussion options

You must be logged in to vote

As @manticore-projects mentioned, the access to the parse tree is done using the visitor pattern. @ghbakir Your test uses the more basic AST tree of the parser. Maybe there is a bit of a confusion (https://stackoverflow.com/questions/5026517/whats-the-difference-between-parse-trees-and-abstract-syntax-trees-asts).

However, since the nodes returned for this AST are not complete due to performance issues you see no difference in your output. For instance, the AndExpression has no representing node in the returned AST tree, while it has a representation in the parse tree as an AndExpression object.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@ghbakir
Comment options

Comment options

You must be logged in to vote
1 reply
@ghbakir
Comment options

Answer selected by ghbakir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants