3 ms·
> how else are you going to ever resynchronize after an error? An error-cost-minimizing dynamic programming parser could do this.
by pfdietz 1y ago
> how else are you going to ever resynchronize after an error?
An error-cost-minimizing dynamic programming parser could do this.
- o11c 1y agoThat fundamentally misunderstands the problem in multiple ways: * this is still during lexing, not yet to parsing * there are multiple valid token sequences that vary only with a single character at the start of the file. This is very common with Python multi-line strings in particular, since they are widely used as docstrings.
- pfdietz 1y agoOne could fold lexing into the parsing and do error cost minimization on both.