Skip to content

Fix start&top implementation in typechecker#2551

Draft
DavyLandman wants to merge 6 commits intomainfrom
fix/start-symbol-issue-2496
Draft

Fix start&top implementation in typechecker#2551
DavyLandman wants to merge 6 commits intomainfrom
fix/start-symbol-issue-2496

Conversation

@DavyLandman
Copy link
Copy Markdown
Member

@DavyLandman DavyLandman commented Dec 3, 2025

This PR continues the work in #2499 (that was merged to main a bit too soon) to fix #2496

  • removes subtype relation between start[X] and X (in asubtype, alub, aglb)
  • removes subtype relation between start symbols and regular symbols (lists)
  • removes special cases for field selection and field update on .top
  • removes special cases for \start non-terminal whereever the contextFreeSyntax role is expected by adding a role field to the start AType
  • adds an implicit/automatic declaration, for every syntax rule for X that has a start modifier:
    • start production rule start[X] = X;
    • top field start[X] = X top;
    • layout wrapping start[X] = L X L;
  • removes more special cases in the back-end
  • removes missed special cases in the collector for pattern matching
  • removed API functions isStart* and getStart* that were used for detecting the old special cases

Together these changes solve a small number of known issues with start symbols, and a larger number of previously undetected issues.

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 46%. Comparing base (53d2faa) to head (70daf1d).

Additional details and impacted files
@@           Coverage Diff           @@
##              main   #2551   +/-   ##
=======================================
- Coverage       46%     46%   -1%     
+ Complexity    6737    6727   -10     
=======================================
  Files          794     794           
  Lines        65923   65923           
  Branches      9888    9888           
=======================================
- Hits         30858   30836   -22     
- Misses       32684   32697   +13     
- Partials      2381    2390    +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Feb 6, 2026

Copy link
Copy Markdown
Member

@jurgenvinju jurgenvinju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Needs an integration test.

@jurgenvinju jurgenvinju self-assigned this Apr 7, 2026
@jurgenvinju jurgenvinju added the bug label Apr 7, 2026
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 7, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tree of start[A] declared as A

2 participants