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

Parsing declaratively (by e.g. declaring EBNF) is really interesting.

It sort of mushes together the two steps ("lexing" and "parsing"), which, as far as I can tell, are traditionally distinguished from one another.

I guess that the "token" definitions really just reside within the EBNF rules..



Separating "lexing" and "parsing" can still be good for performance, since "lexing" needs no auxiliary storage (not even a stack) and cannot backtrack. The author points this out in the performance documentation: https://github.com/Engelberg/instaparse/blob/master/docs/Per...




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

Search: