Writing a parser that is resilient to syntax errors, and why a parser should always return something: https://duriansoftware.com/joe/constructing-human-grade-parsers (The latter property is important in e.g. IDEs and it's rarely discussed!)