|
|
|
|
|
by mrkeen
325 days ago
|
|
> parse with the lalr generated parser, then if that rejects your string because the program was ill formed, call the hand rolled one for guesswork/diagnostics This feels like a recipe for disaster. If the hand-rolled parser won't match a formal grammar, why would it match the generated parser? The poor programmer will be debugging the wrong thing. It reminds me of my short stint writing C++ where I'd read undefined memory in release mode, but when I ran it under debug mode it just worked. |
|
I assume it’s far too late at this point, but that almost always means that you’re invoking UB. Your next step should be enabling UBSan.