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

When I learned to use them, it was common advice for users of lexer generators to use a single-path and disambiguate later. If you use separate paths for each keyword, you get potentially very complex regular expressions that make a branchy mess and can't compete with [a-zA-Z_]+ and a hash table (even without perfect hashing).


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

Search: