Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Having recovery points in a grammar is a really nice thing. I was writing a parser for a lisp-like language and turns out it's surprisingly difficult to come up with robust heuristics for parser recovery. People indent lisp code in various ways but eventually I got something that works most of the time. My approach was indentation based, seeking to the next location with compatible number of spaces/tabs at start of line.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: