Summary
The parser currently has ~52 shift/reduce conflicts. While yacc resolves these by defaulting to shift (which is often correct), they compound as new syntax is added and can cause ambiguous or surprising parses.
Proposed Work
- Audit all 52 shift/reduce conflicts in
winn_parser.yrl
- Categorize each as benign (yacc's default shift is correct) vs risky (could cause ambiguous parses)
- Resolve the risky ones by refactoring grammar rules (precedence declarations, factoring out common prefixes, etc.)
- Document any intentionally accepted conflicts with comments in the
.yrl file
- Target: 0 risky conflicts, with remaining benign ones explicitly documented
Why Now
Every new syntactic form added (v0.8 web framework DSLs, v0.9 formatter needs unambiguous grammar) makes this harder. Better to clean up the foundation before building more on top.
Target Version
v0.10.0 (Hardening)
Summary
The parser currently has ~52 shift/reduce conflicts. While yacc resolves these by defaulting to shift (which is often correct), they compound as new syntax is added and can cause ambiguous or surprising parses.
Proposed Work
winn_parser.yrl.yrlfileWhy Now
Every new syntactic form added (v0.8 web framework DSLs, v0.9 formatter needs unambiguous grammar) makes this harder. Better to clean up the foundation before building more on top.
Target Version
v0.10.0 (Hardening)