Skip to content

fix undefined start conditions error : https://github.com/zaach/jison-le...#10

Open
ichiriac wants to merge 2 commits into
zaach:masterfrom
glayzzle:master
Open

fix undefined start conditions error : https://github.com/zaach/jison-le...#10
ichiriac wants to merge 2 commits into
zaach:masterfrom
glayzzle:master

Conversation

@ichiriac

@ichiriac ichiriac commented Aug 5, 2014

Copy link
Copy Markdown

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)

@zaach

zaach commented Aug 22, 2014

Copy link
Copy Markdown
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.

@ichiriac

Copy link
Copy Markdown
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.

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