Skip to content

Assignment Complete - #4

Open
ghostgator wants to merge 3 commits into
nau-comp3320:masterfrom
ghostgator:master
Open

Assignment Complete#4
ghostgator wants to merge 3 commits into
nau-comp3320:masterfrom
ghostgator:master

Conversation

@ghostgator

Copy link
Copy Markdown

All lexer and parser tests pass successfully at this time.

Comment thread lib/calculator/parser.rb

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

While this loop seems to work for the tests I have created, I am not sure it's absolutely correct. I think it's probably best to check for an exponent token and then call both the shift_tokens and parse_factor. It should be up to the parse_base call to check for integer, decimal, or the left parenthesis.

@sattvik

sattvik commented Mar 10, 2015

Copy link
Copy Markdown

Overall, a very good job. You managed to pass the test suite, but it is incomplete. If you write tests that find the errors in your code (and you correct the code), I'd be happy to give you a bit of extra credit for the parser bit.

Lexer: 40/40
Parser: 38/40

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