Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(off topic) Modern parser generator for Haskell #1909

Closed
deemp opened this issue Jan 15, 2024 · 4 comments
Closed

(off topic) Modern parser generator for Haskell #1909

deemp opened this issue Jan 15, 2024 · 4 comments

Comments

@deemp
Copy link

deemp commented Jan 15, 2024

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 (haskellfoundation/tech-proposals#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).

  • a tool written in Haskell
  • that produces an SGLL parser for a DDCFG
    • the tool generates purely Haskell code
    • or, the tool reads a grammar and generates a parser in memory (nice for prototyping)
  • and the produced parser is
    • fault-tolerant
    • optionally incremental

Now, I have a couple of questions.

@jurgenvinju
Copy link
Member

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
Copy link
Author

deemp commented Jan 15, 2024

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
Copy link
Member

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
Copy link
Author

deemp commented Jan 16, 2024

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants