3 ms·
I wonder if it might have something to do with error reporting. The usual way to handle error messages in a CFG is to make a superset of the grammar that conta
by nostrademons 11y ago
I wonder if it might have something to do with error reporting. The usual way to handle error messages in a CFG is to make a superset of the grammar that contains all likely mistakes, along with custom error messages for each one. As you can imagine, the resulting grammars get pretty hairy. You also have more information available for reporting & recovery with a hand-written parser: think, for example, of how Clang can spell-correct mistyped keywords, something that's not possible without the ability to interpret an identifier as a keyword if it happens to be a certain edit-distance off.