haskell / haskell/happy

Happy should error out on duplicate productions

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

Description

1. Consider the following short grammar:

```
foo :: { Int }
: int { $1 }

foo :: { Int }
: int { $1 + 4 }
```

Happy should not accept this - it should complain that I've defined `foo` twice. Right now, it just silently picks one of the two.

2. Consider the following shorter grammar:

```
foo :: { Int }
foob
: int { $1 }
```

Happy should not accept this - it should complain that the name `foob` does not match the expected name `foo`. Right now, it just uses `foo` and ignores `foob` completely.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.