usethesource / rascal

The implementation of the Rascal meta-programming language (including interpreter, type checker, parser generator, compiler and JVM based run-time system)
http://www.rascal-mpl.org
Other
404 stars 77 forks source link

(off topic) Modern parser generator for Haskell #1909

Closed deemp closed 9 months ago

deemp commented 9 months ago

Sorry for off topic here.

Recently, I asked the Haskell community (link) whether there was a modern parser generator. It turned out, there are some attempts that aren't production-ready. At least they're not mature enough to be used in GHC (https://github.com/haskellfoundation/tech-proposals/pull/63, https://gitlab.haskell.org/ghc/ghc/-/merge_requests/4711).

After some discussion and superficial studying of the works, I came to the following high-level requirements (link).

Now, I have a couple of questions.

jurgenvinju commented 9 months ago

Always nice to meet a fellow parser generator. A really good parser generator can cost more than a man year to construct and test. Especially if you go and invent new algorithms. The expert on GLL and Haskell is Thomas van Binsbergen at universiteit van Amsterdam.

The requirements: for that I'd read the PhD thesis of Afroozeh and Izmaylova, Economopoulos, Eelco Visser and Jan Rekers. The treesitter community is also a valuable resource on context free general parsing.

Have fun!

deemp commented 9 months ago

Thanks! Could you please recommend specific literature on error recovery in (S)GLL?

Afroozeh and Izmaylova left error recovery for future work:

Currently, Iguana reports the parse error location, but does not provide any error recovery features. Providing error recovery should be the highest priority feature, especially for using Iguana in language workbenches and development tools.

I only found a paper about another formalism (LLR-system).

jurgenvinju commented 8 months ago

Error recovery in GLR: Maartje de Jong (TU Delft), and some chapters in Jan Rekers' thesis. Error recovery in GLL: Iguana's implementation has error recovery built in by Ali Afroozeh.

deemp commented 8 months ago

Thank you!