Open vihanb opened 7 years ago
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 generator, so that this type of error is easier to diagnose for everyone.
Oh my god how did I miss this. (This is not first time I have made such mistake)
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 coming up to help catch this type of mistake at runtime at least as it happens quite easily during grammar development. Should surface in about a week in the GerHobbelt/jison fork + a pull req here: https://github.com/GerHobbelt/jison
I have this line which causes an error:
where
MULTILINE_COMMENT
is successfully defined with%x MULTILINE_COMMENT