-
Notifications
You must be signed in to change notification settings - Fork 448
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
Implementing own parser.yy.parseError function throws error #218
Comments
👍 |
No one ever got around to this one then? |
Anything new on this? |
Since jison doesn't have yyerror support anyway I just ended up catching the error somewhere in my wrapper code and working with the error object from there. |
:-/ |
Have you tried to define a
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When using the generated javascript parser file, and implementing my own parseError function like:
gives the following error every time I parse something:
TypeError: Cannot read property '0' of undefined
You can find a working example here: http://jsfiddle.net/fLknW/
It seems to me that the algorithm should stop after it calls
parseError(errStr, {...})
sinceaction
will always be undefined. The error is not thrown when not overriding the default implementation of parseError since by default it doesthrow new Error(str);
which stops the algorithmThe text was updated successfully, but these errors were encountered: