Skip to content
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

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ichiriac
Copy link

@ichiriac ichiriac commented Aug 5, 2014

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
Copy link
Owner

zaach commented Aug 22, 2014

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
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.

None yet

2 participants