fix undefined start conditions error : https://github.com/zaach/jison-le...#10
Open
ichiriac wants to merge 2 commits into
Open
fix undefined start conditions error : https://github.com/zaach/jison-le...#10ichiriac wants to merge 2 commits into
ichiriac wants to merge 2 commits into
Conversation
Owner
|
Ah, thanks for the PR! A better error message is definitely needed here, though I think we should fail hard rather than create an implicit rule. As for the other bug, I'd like to understand what the issue is better– there might be a more general fix needed to handle windows line endings. |
Author
|
Glad to help you ! I'm agree with you, you can also fail hard. I've started to learn flex & bison syntax with your documentation first so, I did not knew that when you use a start condition, you MUST declare it as %x or %s. Anyway, an explicit message error would be better For the windows EOL I did not look everywhere, but seems that the bug is just only in input function because it eats one char at time. |
This file contains hidden or 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
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.
An attempt to fix this issue #9
Situation before the fix :
If a start condition is not defined in headers the lexer fails without any error message
Situation with this fix :
If there is a missing start condition, the lexer triggers a console warning explaining that a start condition is not declared, and the missing start condition is declared as not inclusive (fallback behaviour)