Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Splitting Grammar and Lexer file #125

robar opened this Issue · 2 comments

3 participants


I want to put the lexer part in its own file. As described in it should work if i specify the lexer file as the second parameter of the jison command.

I've tried it with my own lexer file and ClassyLang grammar, but it didn't worked.

I get the following error (c.jison == classy.jison and c.jisonlex == classy.jisonlex):

E:\xxx\xxx\xxx\Global>jison c.jison c.jisonlex --debug

throw new Error(str);
Error: Parse error on line 19:
Expecting '%%', 'EOF', 'ACTION', '{', '<', '|', '(', 'SPECIAL_GROUP', '/', '/!', '.', '^', '$', 'NAME_BRACE', 'ANY_GROUP_REGEX', 'ESCAPE_CHAR', 'STRIN
G_LIT', 'CHARACTER_LIT', got '+'
at Object.parseError (C:\Users\xxx\AppData\Roaming\npm\node_modules\jison\lib\jison\util\lex-parser.js:133:11)
at Object.parse (C:\Users\xxx\AppData\Roaming\npm\node_modules\jison\lib\jison\util\lex-parser.js:185:22)
at Object.parse (C:\Users\xxx\AppData\Roaming\npm\node_modules\jison\lib\jison\jisonlex.js:6:19)
at processGrammar (C:\Users\xxx\AppData\Roaming\npm\node_modules\jison\lib\jison\cli-wrapper.js:86:50)
at Object.exports.main (C:\Users\xxx\AppData\Roaming\npm\node_modules\jison\lib\jison\cli-wrapper.js:54:46)
at Object. (C:\Users\xxx\AppData\Roaming\npm\node_modules\jison\lib\jison\cli-wrapper.js:96:13)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)

I've used the classy files from and JISON v 0.3.12.

Is this a bug or are the classy grammar files out of date or is there another way to split the lexer part from the grammar?

@zaach zaach was assigned

Looks like I have the same issue.


Reopen if this is still a problem as of >= v0.4.5.

@zaach zaach closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.