When running nearley-unparse grammar.js the output is a string of brackets, however, this is not a valid string in my grammar and nearley-test grammar.js --input <bracket-string> confirms this by throwing an error.
> npx nearley-test .\src\grammar.js --input "()()()()()()()"
C:\Home\node_modules\nearley\lib\nearley.js:346
throw err;
^
Error: Syntax error at line 1 col 2:
()
^
Unexpected right_para token: ")". Instead, I was expecting to see one of the following:
... (list of all the rules it expected omitted)
When running
nearley-unparse grammar.js
the output is a string of brackets, however, this is not a valid string in my grammar andnearley-test grammar.js --input <bracket-string>
confirms this by throwing an error.Grammar: https://pastebin.com/BW5fFChR
Expected: nearley-unparse returns a valid string of the grammar Actual: Returns a string of brackets which is invalid in the grammar
Example run:
Node v12.19.0 nearleyc 2.20.1 nearley-unparse 2.20.1 nearley-test 2.20.1