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

> a successful parse consumes at least one rune

This avoids infinite loops?



Yes, there would be two outcomes for an attempted parsing. Either it succeeds and makes progress (and eventually terminates) or it fails and consumes nothing (and terminates because eventually you run out of parsers to try).




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

Search: