Re:Parsing Algorithms
by DmitrySoshnikov on Monday October 26, 2020 @06:15PM
(#24902154)
Yes, this is called "parse error recovery" and there are multiple techniques for this. In fact, most of the production parsers support this mode. E.g. when you try executing a C++ or Java file, it shows you all the errors at once instead of failing on first parse error. The way it's achieved is by constructing a "dummy" AST node (caught up to some delimiter, e.g. semicolon in statements) and continue the parsing process as there would be no any error.
[ Parent
| on HN ]
There are no comments on this comment yet.