You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use the CLI to create a parser from my grammar, the resulting parser doesn't work properly, but if I use the API and the generate method myself to generate a parser, the parser works.
I'm posting this for posterity in case it's a real issue, but I'm moving forward with the working parser. Still, if there's something dumb I'm doing with the CLI, I'd like to know. I did verify that the JSON file read by the CLI, when parsed to an object, is identical to the grammar object being used by the "generate" approach.
"Generated" method (good):
const parser = new jison.Parser(grammar);
const source = parser.generate();
result is an *empty diff hence no difference between invoking the jison CLI and the generator code listed above.
Note: the -n parameter is to override the CLI's auto-naming of the parser object. Without it a few lines differ, but nothing in the parser core, like, say, a damaged rule.
No idea how this could be happening at your place. 🤔
When I use the CLI to create a parser from my grammar, the resulting parser doesn't work properly, but if I use the API and the
generate
method myself to generate a parser, the parser works.I'm posting this for posterity in case it's a real issue, but I'm moving forward with the working parser. Still, if there's something dumb I'm doing with the CLI, I'd like to know. I did verify that the JSON file read by the CLI, when parsed to an object, is identical to the grammar object being used by the "generate" approach.
"Generated" method (good):
CLI (bad):
Here is the diff between "generated" and CLI:
Grammar:
The text was updated successfully, but these errors were encountered: