GerHobbelt / jison

bison / YACC / LEX in JavaScript (LALR(1), SLR(1), etc. lexer/parser generator)
https://gerhobbelt.github.io/jison/
MIT License
118 stars 20 forks source link

use @roman-spiridorov's coolc grammar and test files for regression testing #24

Open GerHobbelt opened 6 years ago

GerHobbelt commented 6 years ago

There are a few hairy features (and bugs) that are observable directly or indirectly when running the examples in @roman-spiridorov's coolc project: series of errors in a 'coolc' source file being fed to a 'coolc' parser which doesn't handle all of them in an intuitive error recovery way (as these errors are close together and coding error recovery in a grammar is no sine cure either...)

Plus at least one example in there exhibits a bug which is now fixed (see also #21), but took at least three attempts before my brain caught on and fixed it right -- or so I believe. Anyway: regression of that problem is a high probability and should be regression tested in the jison test set to ensure we're not silently failing in the future.