Skip to content

parser: .N tuple index reaches the AST; gen-c long-tail batch (66/68) - #1927

Merged
gHashTag merged 1 commit into
masterfrom
fix/c-tails
Aug 8, 2026
Merged

parser: .N tuple index reaches the AST; gen-c long-tail batch (66/68)#1927
gHashTag merged 1 commit into
masterfrom
fix/c-tails

Conversation

@gHashTag

@gHashTag gHashTag commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Two-part fix. Parser: the dot of expr.0 was consumed and the numeric index silently DROPPED -- two().0 parsed as two() (wrong value, no diagnostic; the third silent-drop class the validity campaigns have caught). Number-after-Dot now builds ExprFieldAccess; Rust emits .0, Zig .@"0", C .fN (Verilog TB emission of .N stays a documented long-tail with its unsized-concat defect). gen-c batch: _ tuple elements skipped; StmtLocal Rust-style [T;N] arrays lower to T name[N]; StmtLocal tuple destructure binds via __auto_type (element-wise for tuple-literal inits); ExprArrayLiteral interprets its extra_size element text -- the old emitter produced an EMPTY (int[]){ } that compiled silently wrong.

tri-net C validity: 6 remaining tails -> 2 (auto_config's array-returning fn and olsr_routing's u256-scale table -- both spec redesigns, tracked in #1919). Exactly ONE committed gen drifts (mesh_protocol_stack, both backends -- regenerated tri-net-side in the follow-up). Unit suite 1537/1537; FROZEN_HASH resealed; NOW files updated.

Refs #1919

🤖 Generated with Claude Code

The parser consumed the dot of 'expr.0' and silently DROPPED the numeric
index -- 'two().0' parsed as 'two()' (wrong value, no diagnostic; the
third silent-parser-drop class found by the validity campaigns).
Number-after-Dot now builds ExprFieldAccess; Rust emits '.0', Zig '.@"0"',
C '.fN'. gen-c batch: '_' tuple elements are skipped (no redefinition);
StmtLocal Rust-style [T; N] arrays lower to 'T name[N]'; StmtLocal tuple
destructure binds via __auto_type with element-wise binding for
tuple-LITERAL inits; and ExprArrayLiteral interprets its extra_size
element text ('{ e1, e2 }' / GNU '{ [0 ... N-1] = v }') -- the old
emitter produced an EMPTY '(int[]){ }' that compiled silently wrong.
tri-net C validity: 6 tails -> 2 (both spec redesigns, tracked in the
issue). Unit suite 1537/1537; FROZEN_HASH resealed.

Refs #1919

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gHashTag
gHashTag enabled auto-merge (squash) August 8, 2026 09:18
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-08 09:18:28 UTC

Summary

Status Count
Total Open PRs 14
PRs with Failing Checks 1
PRs with All Checks Green 13
READY 5
FAILING 1
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=dc0be6f9f3b7 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag
gHashTag merged commit 6710335 into master Aug 8, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant