Skip to content

Finish parser for Jack grammar #1

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

Merged
merged 12 commits into from
Jun 16, 2015
Merged

Conversation

Ryman
Copy link
Member

@Ryman Ryman commented Jun 5, 2015

This is the updates to our current parser that I mentioned in email. It parses all files as expected and adds another smaller test for a few other untested grammar rules.

First commit makes a potentially controversial revert, so that might be worth glancing over. I feel there's less to mentally track without the 'do I need to peek or move here?' decisions which kept leading us to infinite loops.

Smaller unit tests would still be useful if anyone feels the urge, or wrapping an executable, I have skipped on both 😞

As an aside, a potential refactor that I haven't touched is that we don't really need to specify Tokenizer::FOO for consume as our grammar has a unique token_type per token_text, i.e. this can never be an identifier (or our tokenizer is wrong), so we could just consume('blah') or consume_identifier etc which would remove a lot of the noise while still failing if unexpected things pop up.

@leocassarani
Copy link
Member

Discussed at Meeting 11.

leocassarani added a commit that referenced this pull request Jun 16, 2015
Finish parser for Jack grammar
@leocassarani leocassarani merged commit 66e42c1 into computationclub:master Jun 16, 2015
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