Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the tree representation #14

Open
maetl opened this issue Apr 8, 2016 · 1 comment
Open

Improve the tree representation #14

maetl opened this issue Apr 8, 2016 · 1 comment

Comments

@maetl
Copy link
Owner

maetl commented Apr 8, 2016

Now that the evaluate method returns an unflattened tree structure with s-expression like data, I need to do some more work to determine what the tree representation should look like.

One particular question is whether the :choice and :concat nodes could be simplified in cases where there is only a single production rather than multiple choices.

The best way to resolve this is probably to try generating some interesting trees and seeing what is useful in practice.

@maetl
Copy link
Owner Author

maetl commented Aug 31, 2017

Based on the work done to deal with #13, I’ve seen a few places in the AST where the tree could be pruned. Is mostly to do with unnecessary levels of nesting where the simplified form is semantically equivalent so removing these extraneous nodes is a good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant