|
|
|
|
|
by klodolph
1058 days ago
|
|
The “IDE-grade” error resilience can be approached in many ways, and unbounded lookahead is often unnecessary. The main problem you want to solve is the problem of recovering from an error, and parsing more of the file correctly after you encounter an error. One way you can do this is by finding statement or declaration boundaries, which can be done in surprisingly simple ways. Depending on the language. |
|
You should definitely have bounds though, but the point is that if it's too low you might give up on the input too soon.