Commit b4bfdfd
fix(parser): remove dead precedence declarations [#215 family F]
Menhir emitted 16 "precedence level / %prec ... never useful"
warnings — declarations that never resolve any conflict because the
expression cascade disambiguates structurally. They are pure noise
that, alongside the conflict warnings, make a healthy build look
broken.
Removed (all certified "never useful" by Menhir itself):
- precedence level: `%right EQ PLUSEQ MINUSEQ STAREQ SLASHEQ`
(assignment ops — handled at statement level, never in the
expr operator cascade)
- precedence level: `%right BANG TILDE UMINUS UREF UDEREF`
(unary level — `expr_unary` is right-recursive and already
unambiguous)
- precedence level: `%left DOT LBRACKET LPAREN`
(postfix level — `expr_postfix` disambiguates structurally)
- the three now-orphaned `%prec UMINUS/UREF/UDEREF` on the unary
rules (UMINUS/UREF/UDEREF were pseudo-tokens used only there)
Provably parse-behaviour-neutral — removing a declaration Menhir
certifies resolves nothing cannot change any resolution. Verified:
- 16 "never useful" warnings: gone (0 remain)
- conflict counts UNCHANGED: 72 S/R, 10 R/R, 23 S/R states,
4 R/R states (identical resolution profile)
- `dune test --force` green at 257/257
The retained `LOWEST_TYPE_ARROW`/`ARROW` levels (#216, family A) are
*not* flagged — they do real work.
Refs #215
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent c640cc5 commit b4bfdfd
1 file changed
Lines changed: 12 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
101 | 100 | | |
102 | 101 | | |
103 | 102 | | |
| |||
108 | 107 | | |
109 | 108 | | |
110 | 109 | | |
111 | | - | |
112 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
113 | 119 | | |
114 | 120 | | |
115 | 121 | | |
| |||
707 | 713 | | |
708 | 714 | | |
709 | 715 | | |
710 | | - | |
| 716 | + | |
711 | 717 | | |
712 | 718 | | |
713 | | - | |
714 | | - | |
| 719 | + | |
| 720 | + | |
715 | 721 | | |
716 | 722 | | |
717 | 723 | | |
| |||
0 commit comments