Ger Hobbelt

Results 98 comments of Ger Hobbelt

Compare with moo lexer: https://github.com/no-context/moo

2 typos in your code: ``` this.begin("MUTLILINE_COMMMENT"); ``` should be ``` this.begin("MULTILINE_COMMENT"); ``` Thought: For improved robustness, jison should maybe check/test for this type of user-coder error in the lexer...

No sweat; as said, the current lexer engine doesn't exactly help to catch this type of mistake when using the jison tool. > A stop-gap change in the engine is...

The lexer generator (jison-lex) specifically looks for the `return 'LABEL'` pattern in the lexer rule action code blocks to replace the returned *string* with a *token* (number) when the lexer...

Upon further diagnosis this turns up: the code generator specifically looks for the `function () {...}` pattern if the rule action is defined as a **function** instead of a **string**...

FYI: this issue is now fixed in jison-gho (https://www.npmjs.com/package/jison-gho) since NPM build 0.6.1-211 i.e. 'build 211'. (Your examples have been included as `/examples/issue-lex-23*.js` and altered versions for jison-lex specifically: '/packages/jison-lex/tests/spec/issue-23*.js`)

This is an error report from bleeding edge GerHobbelt/jison, which gives a hint what's wrong: ``` JisonLexerError: Lexical error on line 7: unsupported lexer input: ":" while lexing rules (i.e....

You can extend the `parse()` interface using the `%parse-param arg1, arg2, arg3...` option in your jison grammar top section. `arg1...` is a list of 1..n arguments which are added to...

Invoke yyerror(...) from within the action. Similar to bison. If this doesnt work for jison as is, check out jison-gho fork (mine) which is also on npm: there yyerror works...

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...