haskell / haskell/happy

Incremental parsing API and improved error handling

Open
#71 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
322
Forks
86
PR merge metrics
No merged PRs in 30d

Description

Happy currently gives pretty bad error messages. This is shown by GHC's error messages on invalid syntax, which usually aren't very good.

One solution is used by the [Menhir] parser generator. Menhir provides an incremental parser API, which allows for error handling based on what states an error can be detected in. Its [manual] provides more details.

[menhir]: http://gallium.inria.fr/~fpottier/menhir/
[manual]: http://gallium.inria.fr/~fpottier/menhir/manual.pdf

Contributor guide

Open the contributing guide

Research direction

Start by reading the Menhir manual, especially its incremental parser API and state-based error handling, then compare those ideas with Happy's current parser-generation behavior and the GHC error-message limitation described here. Done means a defined incremental parsing API and substantially improved syntax error handling, but the issue does not identify files or tests to guide implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.