Skip to content

(off topic) Modern parser generator for Haskell #1909

Closed

Description

@deemp

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.

Activity

  1. jurgenvinju commented on Jan 15, 2024

    @jurgenvinju
    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!

  2. deemp commented on Jan 15, 2024

    @deemp
    Author

    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).

  3. jurgenvinju commented on Jan 16, 2024

    @jurgenvinju
    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.

  4. deemp commented on Jan 16, 2024

    @deemp
    Author

    Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions