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 build and run the ansic example from the repository I get the following error:
var lexer = Object.create(this.lexer);
^
TypeError: Object prototype may only be an Object or null: undefined
at Function.create (<anonymous>)
at Parser.parse (C:\workspace\src\github.com\zaach\jison\ansic.js:106:24)
at Object.commonjsMain [as main] (C:\workspace\src\github.com\zaach\jison\ansic.js:259:27)
at Object.<anonymous> (C:\workspace\src\github.com\zaach\jison\ansic.js:262:11)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.runMain (module.js:605:10)
I used yarn run jison examples/ansic.jison to build the parser and tried to use the cli as well as to embed the parser in a program and I'm getting the same error.
The calculator example comes with both lexer (inside a %lex.../lex section) and a grammar (parser), while the ansic example does not include a lexer spec, hence jison does not produce a lexer to go with the parser. Hence this.lexer is not defined.
When I build and run the ansic example from the repository I get the following error:
I used
yarn run jison examples/ansic.jison
to build the parser and tried to use the cli as well as to embed the parser in a program and I'm getting the same error.The calculator example, however, works fine.
The text was updated successfully, but these errors were encountered: