-
Notifications
You must be signed in to change notification settings - Fork 452
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
Getting "this.performAction.call is not a function" when trying to parse text #348
Comments
Looks like you're using my jison fork. Looks like the 'code stripper' doesn't properly remove the |
Assuming of course that I guessed correct above and you are using my fork/clone, which version are you running? Latest = 0.4.18-174 |
…ection logic so that the Jison code itself delivers an 'empty call' to compare against. The bug in zaach#348 is most probably due to the replacements of comment start/end markers in `preprocessActionCode()` and `postprocessActionCode()` while the original comparison happens between these calls, screwing up the detection, which drives the code stripper which removes the `this.performAction.call` code. Still ho-hum, though, as I don't see this happen... Anyway, this bit of rework is necessary anyway as now we're better equipped to keep detecting empty performAction functions.
…st case for jison.
…repository and the added example for zaach#348
forget what I said Had a look while I was working on https://github.com/GerHobbelt/jison and found that the grammar you attached at least it not a viable jison grammar. First of all, the
After adding this option, several other things show up as faulty/unsupported and error out:
Overall it looks like a grammar in transition; a preliminary working version of the same is available at https://github.com/GerHobbelt/jison/blob/master/examples/issue-348.jison for your perusal, while your posted grammar is stored at https://github.com/GerHobbelt/jison/blob/master/examples/issue-348-grammar.txt for comparison. |
…of affairs, where the default grammar production value assignment code `$$ = $1` (default-action-mode=classic) is injected also when there actually **is** an action block present, **IFF** said action block does not assign a value to `$$` itself.
I have the grammar in the attached file and input the following text for parsing:
define mc with orientation=horizontal as
stem text is "this is a test"
option text = "option 1" and is correct
option text = "option 2"
option text = "option 3"
score 1 point for all correct
mcmsDeclarativeGrammar.txt
I am getting "this.performAction.call is not a function" when trying to parse the above text.
Does anyone know why this is happening?
Thanks in advance.
Joe
The text was updated successfully, but these errors were encountered: