Commit Graph
4 Commits
Author SHA1 Message Date
lucio eeaffafd56 Rename the tool to lucisv (Language Utility for Coding In SystemVerilog) 2026-08-25 23:36:00 -07:00
lucioandClaude Fable 5 f52beff48f Add item-misc: spaced macro calls, line-aware macro items, `error, elab tasks
Macro invocations with whitespace before the argument list, a bare macro on its own line followed by a declaration, `error/`warning directives, and $error/$fatal/$warning/$info as module/generate items.

Coverage loop round 1, cluster 1: 636 -> 661 / 820 (77.6% -> 80.6%).
Feature README: docs/features/item-misc/README.md

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-20 22:54:47 -07:00
lucioandClaude Fable 5 54b0ca3896 Add class-semantics and lexer-cleanup (round 20)
class-semantics: classes are first-class in vlog_semantic -- class
scopes and symbols, member/method/prototype binding, this.x
(nearest-class-only), super.x, cls::x with lexical unit heads,
out-of-body cls::method bound into the class's scope with the extern
prototype as the definition (rule 10), and the honest
InheritedCandidate{base, paths} shape: a member miss in an extending
class records what the unknown base might supply (import paths
included) and is never chased, not even in-file -- the future
inheritance round's worklist, measured at 1303 candidates. Unit-name
misses stay ExternalCandidate (QA-found, lead-ruled: bases supply
members, not package names; +170 recovered navigations, pinned).
Workspace index gains classes as units (246) and their members
(11399). scan.rs migrated to parser name-spans: 26 call sites down
to the 2 documented consumers. 114044 spans, 0 unplaced, 0 panics;
UVM code now has hover/definition/references/outline.

lexer-cleanup: the three filed gaps -- @(* ) lexes via a
starts_attribute backoff (an attribute cannot begin with `)`; real
attributes pinned, no misfire on legal expressions), a leading BOM
is accepted as a named losslessness exception (mid-file BOM errors
clearly; 20k-case position fuzz clean), and non-ASCII lex errors now
decode the full character AND surface through vfmt check's error
slot (exit 2, matching format, text-rule findings still reported --
the silent-pass hole closed). The macro space-before-paren item is
parked with a QA-hardened analysis: the reading depends on a
definition vfmt cannot see, any fixed answer is provably wrong for
one population, and today's behavior fails safe.

827 workspace tests. Dev: 2 Fable agents; QA: 2 Opus agents; reviews
in docs/features/{class-semantics,lexer-cleanup}/README.md.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-20 00:56:32 -07:00
lucioandClaude Fable 5 3325905f21 Add macro-items: macro invocations at item/statement position
The corpus-measured #1 blocker (~60% of RTL parse errors). Macro
invocations (`NAME, `NAME(args), optional trailing ;) now parse
wherever a module item or statement can appear; the invocation is an
AST leaf (MacroCall{RawText, semi}) emitted verbatim with column-
aware re-indent, semicolon reproduced only if written. Disambiguation
is safe by construction: both readings emit identical token streams.
The lexer's balanced-arg scan is hardened (strings, comments, 256-cap
nesting counter, iterative). Corpus parse rate: 35.2% -> 57.1%
(179 files gained, 0 regressed).

Round 1 was rejected in review: QA proved the new verify.rs
normalization could mask real corruption -- a string literal spanning
lines inside a macro arg had its bytes changed by re-indent, with
exit 0. The rework widened the finding to `define bodies and
attributes (same pre-existing defect, same shared root) and fixed
both sides: line_starts_inside_string, a lexer-mirroring scanner, is
the single shared definition of "which line breaks are data" -- the
verifier trims only outside strings, and the formatter emits any
token with an in-string line break fully verbatim (idempotent by
construction). Re-QA attacked the scanner on ten edge shapes and
found no hole; corpus TSV byte-identical pre/post fix.

Process consequence, codified as CLAUDE.md hard-invariant #4: any
widening of verify.rs forgiveness ships with masked-corruption attack
tests, dev-written and QA-re-attacked.

Dev + rework: Opus agent; QA + re-QA: Sonnet agent; full history in
docs/features/macro-items/README.md.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-19 03:22:13 -07:00