Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Now You Have Three Problems – A Story about Parsing (github.com/dabeaz)
49 points by tim_sw on March 28, 2023 | hide | past | favorite | 7 comments


A parser for Things

is a function from Strings

to lists of pairs of Strings and Things.


It is refreshing to read something not LLM. And in such high quality.


Agreed. In the beginning I was worried I was reading something written by a LLM, but then halfway through I realized it was still coherent and really enjoyed it.


I found this to be a very accessible way to think about parsing a language that back-tracks naturally.

I wonder how this technique would interact with an Earley parsing approach that gives all possible parses in parallel.

I’m trying to imagine this with a set of rules or with dynamic runtime evaluation of what is being parsed.


Here's a fun, related paper by Okasaki:

Even higher-order functions for parsing or Why would anyone ever want to use a sixth-order function? [1]

[1]: https://www.cambridge.org/core/services/aop-cambridge-core/c...


This person was teaching compiler courses and didn’t know what a parser combinator is?


Interesting. I wish it covered error handling.




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

Search: