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

I think humans have an easy time because it's easy for them to look ahead (literally!) to see if there's a <- token. So if I were going to tackle this problem I would do it in two passes. In the first pass I'd just tokenize everything, and set a flag if I saw "<-". Then I'd use the value of that flag to inform the second pass about what it was parsing.


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

Search: