Skip to content

[Parser] Reduce expression/postfix grammar conflicts (phase 1) #7

@jbatte47

Description

@jbatte47

Problem

The current grammar reports multiple parser conflicts, with a significant portion tied to expression/postfix parsing interactions (member access, call application, and precedence layering).

We need an incremental first pass focused on expression structure to reduce ambiguity without changing language behavior.

Scope

  • Refactor expression grammar into explicit precedence tiers, e.g.:
    • primary
    • postfix (member access + call)
    • multiplicative/additive
    • flow pipeline (->)
  • Remove ambiguous empty productions in expression-related paths where possible.
  • Keep accepted syntax behavior compatible with current examples.

Deliverables

  • Updated expression productions in sigil.y with clearer precedence.
  • Reduced parser conflicts versus current baseline.
  • Notes in PR describing which conflicts were targeted in this phase.

Acceptance Criteria

  • Bison conflict count is lower than baseline for this phase.
  • No regressions in current example parsing/execution.
  • Member access and call chaining still behave as before.

Validation Checklist

  • Capture baseline conflict report before change.
  • Capture after-change conflict report and compare.
  • Run all current examples/*.sigil.
  • Add focused parser fixtures for nested call/member/flow combinations.

Non-goals

  • Full elimination of all parser conflicts (handled in follow-up issue).
  • New syntax features.
  • Runtime semantics overhaul.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions