diff --git a/README.md b/README.md
index bf7b130..38bc61d 100644
--- a/README.md
+++ b/README.md
@@ -128,6 +128,10 @@ line-length = 100 # 40..400, same as --line-length
indent = 2 # 1..8, same as --indent
exclude = [ "*_gen.sv", "build" ] # added to --exclude patterns
filelist = "rtl/files.f" # an EDA `.f` filelist, relative to this file
+
+[lint]
+select = ["no-tabs", "unused-signal"] # optional replacement for defaults
+ignore = ["module-filename"] # removed after selection
```
`filelist` names the project's sources the way the rest of the EDA world
@@ -156,8 +160,9 @@ with a file that sets only `line-length` uses both). `exclude` is the
exception: config patterns are *added* to `--exclude`, not replaced by it.
An unknown key, a bad value, an out-of-range number, or any TOML beyond the
-supported subset (tables, multi-line arrays, string escapes) is a hard error
-naming the file and line — exit 2, with nothing written. This is deliberate:
+supported subset (tables other than `[lint]`, multi-line arrays, string
+escapes) is a hard error naming the file and line — exit 2, with nothing
+written. This is deliberate:
a silently ignored `line_length` typo costs more than a strict parser does.
## Linting
@@ -193,12 +198,12 @@ what it can see.
| `undriven-net` † | — | everything read is driven by something |
| `multiply-driven` † | — | one driver per variable |
-† Off by default — `--select` them. These three read the file's *symbol
-table*, not just its syntax, which is what lets them tell one `count` from
-another; they are off because a single-file analysis cannot see a signal used
-from another file's hierarchy. See
-`docs/features/semantic-lints/README.md`. The table above is not the whole
-set — naming-style rules ship too, and
+† On by default when lucisv can see a project (a multi-file CLI run or the
+language server), and off for a single file or stdin unless `--select` names
+them. These three read the file's *symbol table*, not just its syntax; the
+project-wide identifier census keeps a hierarchical use in another file from
+becoming a false positive. See `docs/features/semantic-lints-on/README.md`.
+The table above is not the whole set — naming-style rules ship too, and
`cargo run -p vlog_linter --example rules_markdown` prints the generated
reference for every rule with its default.
@@ -397,24 +402,28 @@ Basic Verilog-2001 and the common synthesizable SystemVerilog subset:
methods with `virtual`/`static`/`local`/`protected`/`automatic`, `function
new`, `extern` and `pure virtual` prototypes and their out-of-body
definitions, plus everything that already works at module scope (`typedef`,
- `localparam`, `import`, directives, macro items, nested classes). `constraint
- c { ... }` and `covergroup … endgroup` are **passed through verbatim** — two
- grammars with no layout convention worth inventing. See
- `docs/features/classes/README.md`
+ `localparam`, `import`, directives, macro items, nested classes).
+ `constraint c { ... }` and `covergroup … endgroup` are structured too:
+ constraint expressions, `soft`/`dist`, implication, `foreach`, `solve
+ before`, coverpoints, bins, transitions and crosses all format canonically
+ and participate in rename, references and semantic lints. An unrecognized
+ body rewinds to its exact source bytes instead of blocking the surrounding
+ file. See `docs/features/constraint-bodies/README.md` and
+ `docs/features/covergroup-bodies/README.md`
- Concurrent assertions (IEEE 1800 §16): `assert`/`assume`/`cover`/`restrict
property ( ... )` with an optional `label:` prefix and an action block
(`else $error(...)`, `$info(...); else ...`, `else begin ... end`, and any
statement that nests blocks: `if (c) begin ... end else ...`,
- `fork ... join_none`, `case ... endcase`), wherever
- a module item or a statement can appear — module and package bodies,
- generate regions, `begin`/`end`, and at file scope. Plus `sequence ...
- endsequence` and `property ... endproperty` declarations. All of it is
- **passed through verbatim**, for the same reason `constraint` is: the
- property/sequence expression language (`|->`, `##[1:3]`, `throughout`,
- `disable iff`, `$rose`) is a second grammar with no layout convention worth
- inventing. Only the first line is re-indented to the item's level; the
- relative layout the source wrote is what survives. See
- `docs/features/assertions/README.md`
+ `fork ... join_none`, `case ... endcase`), wherever a module item or a
+ statement can appear — module and package bodies, generate regions,
+ `begin`/`end`, and at file scope. `sequence` and `property` declarations,
+ typed formals, local variables, `expect`, `cover sequence`, and `default
+ disable iff` are real nodes. The property/sequence expression grammar uses
+ the LRM precedence table; top-level `|->`/`|=>`/`##`/`and`/`or` operators
+ break one per line when needed. Rename, references, document symbols and
+ semantic lints see inside; an unrecognized construct falls back to its exact
+ source bytes and produces a rename warning. See
+ `docs/features/sva-bodies/README.md`
- Dynamic types: queues (`string q[$]`, bounded `[$:N]`), dynamic arrays
(`int a[]`), associative arrays (`[*]`, `[string]`, `[key_t]`) — in
declarations, class properties, typedefs and function/task arguments; the
@@ -423,8 +432,8 @@ Basic Verilog-2001 and the common synthesizable SystemVerilog subset:
`docs/features/dynamic-types/README.md`
- DV statements (IEEE 1800 §7.12, §9.3.5, §11.12, §12.7.3, §13.4.2, §18.7,
§18.16): `randomize() with { ... }` / `std::randomize(x, y) with { ... }`
- (the call is structural, the constraint block is **passed through
- verbatim**, exactly as `constraint c { ... }` is), the array-method
+ (the call and its constraint block are structural, with byte-exact fallback
+ for an unrecognized constraint shape), the array-method
iterator argument `q.sum() with (item.w)`, `foreach` over a
package-scoped or hierarchical array with selects on the way
(`foreach (pkg::isa[i])`, `foreach (h[id].sub[k])`, `foreach (a[i][j])`),
@@ -464,7 +473,8 @@ Basic Verilog-2001 and the common synthesizable SystemVerilog subset:
trailing `;` is reproduced only if the source wrote one. At item and
statement position a space before the argument list is accepted too
(`` `uvm_field_int (a, UVM_DEFAULT) ``) and is reproduced as written; in
- *expression* position `` `A (b) `` still parses as a call applied to `(b)`.
+ *expression* position the author-written gap is preserved too, because it
+ can affect how a macro with formals is interpreted.
A macro that ends its line is a complete macro, so whatever opens the next
line — a declaration, or a statement starting with `@`, `#`, `->` or `{` —
is its own item. See `docs/features/item-misc/README.md` and
@@ -490,10 +500,17 @@ Basic Verilog-2001 and the common synthesizable SystemVerilog subset:
(``sub #(`include "config.vh") u (...)``). See
`docs/features/directives-in-lists/README.md` and
`docs/features/directives-in-instances/README.md`
+- Programs, interface classes, `alias`, `union tagged`, `specparam`, library
+ map entries, and statement-form `expect`. `specify`, UDP `primitive`/`table`,
+ `checker`, and `config` blocks are recognized as opaque blocks so vendored
+ simulation models and formal collateral do not block the rest of a file;
+ their internal layout is preserved. See
+ `docs/features/vendor-formal-grammar/README.md`
-Not yet supported (parse errors). Roadmap ordered by measured impact on
-real RTL — see `docs/features/corpus-check/README.md` for the 820-file
-corpus baseline this ordering comes from:
+### Historical syntax roadmap
+
+This roadmap records how parse coverage was raised, in measured-impact order.
+See `docs/features/corpus-check/README.md` for the 820-file corpus baseline:
1. ~~Macro invocation at module-item / statement position
(`` `ASSERT_INIT(...) `` style)~~ — **done**; see
@@ -574,8 +591,9 @@ corpus baseline this ordering comes from:
`docs/features/dv-statements/README.md`. Emptied the `dv-statements`
bucket (26 files) and moved the parse rate from 94.1% to 97.1%; 24 of the
26 files format, the other 2 advanced to a macro-items blocker and to the
- `new obj` shallow-copy expression. `specify` blocks, `checker`,
- `program`, `interface class` and `randsequence` remain unsupported
+ `new obj` shallow-copy expression. `randsequence` remained unsupported at
+ this point; the other vendor/formal constructs listed here landed later in
+ 0.30.0
11. ~~A macro statement that ends its line followed by a symbol on the next
one, the `new obj` shallow copy (IEEE 1800 §8.12), and a based number
whose digits come from a macro (`` 32'h`DM_ADDR ``)~~ — **done**; see
@@ -598,6 +616,11 @@ corpus baseline this ordering comes from:
`` `X_EACH_CSR`` (need macro expansion, a deliberate non-goal) and 5
files that are not valid standalone Verilog
+Fragment-mode support subsequently raised the current frozen corpus baseline
+to **814/820 (99.3%)**. The remaining six files require cross-file macro
+expansion, contain a conditional-split outlier, or are not valid standalone
+Verilog; none regressed when the vendor/formal and SVA grammars landed.
+
Like ruff, `lucisv` refuses to output anything for a file it cannot fully
parse, so it can never corrupt code.
diff --git a/docs/coverage_gaps.md b/docs/coverage_gaps.md
index 11e34ca..c9163a4 100644
--- a/docs/coverage_gaps.md
+++ b/docs/coverage_gaps.md
@@ -102,12 +102,12 @@ LSP: hover + definition for package-imported parameters, enum members, class par
7. **M1–M3** grammar arms (specify/UDP/checker/interface class) as one "vendor and formal collateral" round, verbatim capture acceptable. *(Done by TODO §23 — and the M2 row's evidence was wrong; see the correction in the Medium table.)*
8. **M7** semantic lints on by default via §2.9-6.
-Two stale READMEs found by the inventory, to fix on the next docs pass:
-`docs/features/interfaces/README.md` still lists `program` and the
-clocking `= expression` as unsupported (delivered in §11 round 2);
-`docs/features/dv-statements/README.md` lists `foreach (a[, j])` as not
-done (delivered by testbench-mopup); `docs/features/assertions/README.md`
-says `interface` is still a parse error.
+The three stale README claims found by the inventory are now closed:
+`docs/features/interfaces/README.md` records that `program` and clocking
+`= expression` landed in testbench-mopup; `docs/features/dv-statements/README.md`
+records the delivered `foreach (a[, j])` form; and
+`docs/features/assertions/README.md` records that assertions work in an
+interface body through the shared item path.
---
@@ -153,4 +153,5 @@ quiet). What the tables above still leave open, by weight: M9 statement-level
and class-body format fences
(§2.9-3); M10 error recovery inside headers and lists; the second half of
M12 (`--rules-doc`, §2.9-5); M13's small interface/DPI grammar arms; L3,
-L6, L9, L10; and the three stale READMEs named under the order.
+L6, L9 and L10. The three stale READMEs named under the order were reconciled
+in the 0.33.0 documentation pass.
diff --git a/docs/features/assertions/README.md b/docs/features/assertions/README.md
index 7907be9..3fe1a96 100644
--- a/docs/features/assertions/README.md
+++ b/docs/features/assertions/README.md
@@ -119,13 +119,11 @@ the same two grammar rules and cost nothing:
### Requests to other clusters
-- **interface cluster**: `assert property` inside an `interface` body cannot
- be tested yet — `interface` itself is still a parse error
- (`unsupported construct starting with keyword \`interface\``). Once an
- interface body parses through the ordinary item path
- (`Parser::parse_item_kind`), concurrent assertions inside it work with no
- further change, because that is the same dispatch module bodies use. Worth
- one case in `interface.cases` when that lands.
+- ~~**interface cluster**: `assert property` inside an `interface` body could
+ not be tested because `interface` was still a parse error.~~ **Delivered by
+ `interfaces`**: an interface body uses the ordinary item path, so concurrent
+ assertions work there through the same dispatch as module bodies; the
+ original request required no assertion-specific parser change.
- **dv-statements cluster**: if you add a general `label:` prefix for
*statements*, note that `Parser::parse_stmt_kind` already consults
`at_concurrent_assertion()` before the keyword dispatch, and that check
@@ -440,4 +438,3 @@ the `skip_action_stmt` depth-counter rewrite.
half of the `a4f8476` commit too (the two changes were reviewed together).
No BLOCKING findings. The round-1 gap is closed.
-
diff --git a/docs/features/dv-statements/README.md b/docs/features/dv-statements/README.md
index e2ef616..d025b0d 100644
--- a/docs/features/dv-statements/README.md
+++ b/docs/features/dv-statements/README.md
@@ -60,8 +60,9 @@ its input bytes exactly is trivially token-equivalent.
`foreach (a[i][j])` spelling real code writes is read as "loop over `j`
with `a[i]` as the array". lucisv only prints the header back, so the two
readings emit the same tokens either way.
-- **Empty loop-variable slots (`foreach (a[, j])`) are not supported.** No
- corpus file writes one; it stays the parse error it was.
+- **Empty loop-variable slots (`foreach (a[, j])`) were not supported in this
+ round.** *Amended by `testbench-mopup`*: omitted iterator slots are now
+ structural. No corpus file wrote one when this round was measured.
- **A `let` port is a task/function port without a direction**, so
`parse_tf_ports` reads the list and [`TfArg`] holds each entry. `untyped`
is accepted the way any user-defined type name is.
@@ -213,7 +214,8 @@ another feature's region, so they are written here rather than made:
corpus file writes one; it is an "unsupported statement starting with
keyword `let`" error
- [ ] `randsequence` — no corpus file writes one
-- [ ] empty `foreach` loop-variable slots (`foreach (a[, j])`)
+- [x] empty `foreach` loop-variable slots (`foreach (a[, j])`) — delivered by
+ `testbench-mopup`
## Work log
diff --git a/docs/features/interfaces/README.md b/docs/features/interfaces/README.md
index 80b4167..157a69a 100644
--- a/docs/features/interfaces/README.md
+++ b/docs/features/interfaces/README.md
@@ -35,10 +35,9 @@ At the start of this round `interface` was the corpus's top blocker at
it is unchanged: an `interface` followed by `class` has always been
something else, and now there is somewhere for it to go. Still 0 of
820 corpus files.
-- **`program … endprogram` is out of scope** for this round even though
- it shares the same header/body grammar and would be a one-line
- addition here. No corpus file uses it (0 of 820), so it buys nothing
- measurable; see Handshakes.
+- **`program … endprogram` was out of scope for this round.** *Amended by
+ `testbench-mopup`*: it now shares the module header/body grammar and is
+ formatted structurally. No corpus file used it when this round was measured.
- A modport port is a **direction keyword plus the names it governs**.
The source's grouping is preserved (`input valid, data` is one group,
not two ports), because regrouping it would be a token-order change
@@ -51,7 +50,8 @@ At the start of this round `interface` was the corpus's top blocker at
never re-lays-out either. The `#(min:typ:max)` skew spelling is not
supported (0 corpus uses).
- A clocking item's optional `= expression` (`input data = top.dut.d;`,
- IEEE 1800-2017 §14.4) is not supported. 0 corpus uses.
+ IEEE 1800-2017 §14.4) was not supported in this round. *Amended by
+ `testbench-mopup`*: it is now structural. The original corpus had 0 uses.
- `virtual` / `virtual interface` in a **type position** is recorded on
`DataType::virt` as a one-byte `VirtualKw`, not as a `String`: every
`Expr` carries a `DataType` through `ExprKind::Type`, and a `String`
@@ -256,4 +256,3 @@ Targeted attacks:
`an_interface_is_held_to_the_same_rule`). Correct.
No BLOCKING findings for this cluster.
-
diff --git a/docs/site/dist/404.html b/docs/site/dist/404.html
index 5212474..2d52b95 100644
--- a/docs/site/dist/404.html
+++ b/docs/site/dist/404.html
@@ -24,7 +24,7 @@
},
};
})();
-
The linter shares discovery, parsing, configuration, and ignore behavior with the formatter, but uses error-tolerant parsing so it can report useful findings from partially understood files.
--select replaces the default set with a comma-separated list. It can be repeated. --ignore then removes rules from the selected or default set. Semantic rules such as unused-signal, undriven-net, and multiply-driven are opt-in because a single-file view cannot see all hierarchy interactions.
+
--select replaces the default set with a comma-separated list. It can be repeated. --ignore then removes rules from the selected or default set. Both can also be written in lucisv.toml under a [lint] table (select = [...], ignore = [...]), which a command-line flag overrides key by key, and in an editor as lucisv.lint.select / lucisv.lint.ignore.
+
The semantic rules — unused-signal, undriven-net, multiply-driven — run by default wherever lucisv can see the other files of your project (lucisv check rtl/, or the language server), because it can then tell that another file reads a signal through a hierarchical path. Over a single file or a stdin buffer there is nothing to ask, so they are off and must be --selected.
--fix applies safe changes and rewrites the file. Today, no-tabs and no-trailing-whitespace provide safe fixes. --unsafe-fixes widens applicability, but no built-in rule currently offers an unsafe fix.
Fixes are sorted, overlap-checked, and never applied inside format-fenced regions.
@@ -81,4 +82,4 @@
wirea; // lucisv: waive no-tabs
// lucisv: waive no-tabs
wireb;
// lucisv: waive-start module-name-style
module LegacyName;
endmodule
// lucisv: waive-stop module-name-style
verilog_lint: is accepted in place of lucisv: for Verible compatibility. The unused-waiver rule reports malformed, unknown, or no-longer-needed suppressions when their target rule is enabled.