Skip to content

[WIP] Syntax Recovery - #34

Open
jdpage wants to merge 16 commits into
masterfrom
support-loops
Open

[WIP] Syntax Recovery#34
jdpage wants to merge 16 commits into
masterfrom
support-loops

Conversation

@jdpage

@jdpage jdpage commented Jun 18, 2018

Copy link
Copy Markdown
Collaborator

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.
Comment thread 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
Copy Markdown
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
Copy Markdown
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"

jdpage added 2 commits June 18, 2018 19:12
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

jdpage commented Jun 18, 2018

Copy link
Copy Markdown
Collaborator Author

@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

jdpage commented Aug 9, 2018

Copy link
Copy Markdown
Collaborator Author

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

jdpage commented Aug 10, 2018

Copy link
Copy Markdown
Collaborator Author

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants