Skip to content

Resolve parser shift/reduce conflicts before v1.0 #98

@gregwinn

Description

@gregwinn

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/compilerLexer, parser, transform, codegen, semanticenhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions