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

Turn Oil's expression grammar into an AST #387

Closed
2 tasks done
andychu opened this issue Jul 2, 2019 · 2 comments
Closed
2 tasks done

Turn Oil's expression grammar into an AST #387

andychu opened this issue Jul 2, 2019 · 2 comments

Comments

@andychu
Copy link
Contributor

andychu commented Jul 2, 2019

Two parts to this:

  • Copy Python's AST from Python.asdl into our frontend/syntax.asdl.
  • Write the "transformer" from pgen2's parse tree to the Python AST. (This code replaces semantic actions in most parsing systems.)

Not part of this task:

  • Write a dirt simple tree evaluator for the AST. (Copying Python's AST gives me some confidence that it's "right" without actually writing the evaluator.)
andychu pushed a commit that referenced this issue Jul 3, 2019
I lightly modified it, and it will need further modifications.

Addresses issue #387.
@andychu
Copy link
Contributor Author

andychu commented Jul 5, 2019

Example: 49b0649

@andychu
Copy link
Contributor Author

andychu commented Feb 2, 2020

Done awhile ago with oil_lang/expr_to_ast.py

@andychu andychu closed this as completed Feb 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant