-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add lexer #2
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Owner
tjysdsg
commented
Apr 13, 2019
•
edited
Loading
edited
- Implement Reader
- Add test for Reader
- Implement Lexer
- Add test for Lexer
Implement class Reader in src/reader/reader.cpp. Add src/test/test_program.tan, add test for Reader (src/test/reader_test.h).
Add read_string function to Reader for better testing. Add functions to Lexer for parsing integer literal. Add test for Lexer. Modify test for Reader, because for some reason Boost::filesystem cause infinite recusive when current working directory is not in src/test.
This comment has been minimized.
This comment has been minimized.
Implement advance_for_identifier and related things.
error handlingLines 216 to 221 in 5dd3518
This comment was generated by todo based on a
|
Repository owner
deleted a comment
Apr 20, 2019
Repository owner
deleted a comment
Apr 20, 2019
Test code now directly access struct token_info, otherwise it's hard to test using string representation of floating numbers.
Add more test cases for string literals, character, and symbols in src/test/lexer_test.h.
Fix some minor warnings.
Fix the bug that Lexer stuck in infinite loop when "0" is in the middle of a string. Fix the bug that Reader doesn't reset the value of _curr_line when read_string is called more than once. Fix the bug that Reader doesn't clear _lines (std::vector<line_info*>) when read_string is called more than once.
Fix the bug that some type in enum TOKEN_TYPE have the same value.
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.