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

[WIP] Syntax Recovery #34

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

[WIP] Syntax Recovery #34

wants to merge 16 commits into from

Conversation

jdpage
Copy link
Collaborator

@jdpage jdpage commented Jun 18, 2018

Resurrecting @woodrowbarlow's #23 because I was going back over it and realized that it had a bunch of new tests which never made it into master.

When #24 was merged, we lost a bunch of syntax-to-AST transformations which we were previously able to do. As of now, the entire syntax can be parsed as a concrete syntax tree, but... not all the way into the AST, which is what the tests check for.

  • Triage tests that just need to be updated to the new AstNode vs. tests that require work on the AstBuilder
  • Merge in the code for IL Checker #47
  • Update the AstBuilder to make all tests pass

Jonathan Page and others added 11 commits December 12, 2017 14:21
The increment and decrement operations get converted into equivalent
assignment statements during the first parse pass.
Bringing this branch up-to-date so that we can recover some of the tests
inside it. This commit is super broken; a lot of the tests don't work,
either because we don't handle that piece of syntax again yet (!) or
because they need to be updated.
README.md Outdated
* Stage 1 Parsing (AST Generation): 75% finished.
* Stage 2 Parsing (AST validation and traversal): 15% finished.
* Stage 3 Parsing (AST optimization): not planned (for now).
* 6502 ASM Code Generation: not yet begun.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pretty sure this is no longer accurate

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is there no react for "oops that's what I get for 2am commits"

Tests which test for syntax that the AstBuilder supports have been
fixed. Tests which test for syntax that it does not support have been
set up to fail and print the current AST.

Failing tests almost all ALSO need to be rewritten to use the new AST
structure.
@jdpage
Copy link
Collaborator Author

jdpage commented Jun 18, 2018

@woodrowbarlow do you want to take this branch back over? Working on it won't get you into the translation pass system, but it will get you into the AstBuilder. a8fa0f9 provides an example of modifying it to handle an expression, and your own 87ebfb9 provides an example of modifying it to handle a statement.

(It might help that both the AstBuilder and the translation pass system are based around the Visitor pattern, so getting comfortable with one will help with learning to work with the other.)

@jdpage jdpage added this to the Hello world! milestone Jun 18, 2018
@jdpage
Copy link
Collaborator Author

jdpage commented Aug 9, 2018

Because the AstBuilder is now based on the translation pass system, working on this will absolutely get you into the translation pass system.

@jdpage jdpage self-assigned this Aug 10, 2018
@jdpage
Copy link
Collaborator Author

jdpage commented Aug 10, 2018

Self-assigning this until #47 is done.

@jdpage jdpage mentioned this pull request Aug 10, 2018
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants