Files
lucisv/editors/vscode/syntaxes/systemverilog.tmLanguage.json
lucioandClaude Fable 5.1 a69a1cb528 Coverage gaps L3, L6, L10: six language shapes, randsequence as real nodes, an opt-in uvm_field_* indent
TODO §54 (docs/features/coverage-gaps-l); closes docs/coverage_gaps.md
L3, L6 and L10. The first dev stalled under machine load; a second
finished from the tree.

54.1 `->>` with optional delay or event control (`StmtKind::EventTrigger`),
stream `with [range]` (`ExprKind::StreamWith`), the LRM's other
`casting_type`s, drive strength on a net declaration (`DataDecl::strength`,
whose comment slots also fix a pre-existing refusal on an `assign` with
a comment before its strength), `let` at statement position
(`StmtKind::Let`), and `#(min:typ:max)` clocking skews — `ClockingSkew`
as the LRM's two alternatives, `edge [delay]` | `delay` (review rework of
QA's HIGH). Comment slots added to `let`, stream concatenations and the
clocking grammar; the RTL gap fuzzer at 505 gaps, zero failing.
54.2 `randsequence` (it was a parse error; the keyword is new):
`RandSequence` → `Production` → `Alternative` → `ProdItem` (ref, block,
if, repeat, case, rand join), code blocks by the statement grammar; one
production per line, alternatives aligned; the LRM's examples as cases.
54.3 `[format] uvm-utils-indent` / `lucisv.format.uvmUtilsIndent`, default
off, tracking nested `_begin`/`_end` pairs; 21 corpus files change with
it on, all idempotent. A short comment-free enum body already one-lines,
so no key was built — the behaviour is pinned. `[format]` table tests
added (review rework). `->>`'s event control is bound through the shared
`bind_timing` (review rework of QA's second HIGH).

0 of 820 corpus files differ from 0.48.x with the key off; the opentitan
sweep is identical; no corpus or opentitan file writes any of the new
shapes.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-09-07 01:12:49 -05:00

77 lines
4.0 KiB
JSON

{
"information_for_contributors": [
"One grammar for both contributed language ids: `verilog` and `systemverilog` register the same scopeName and the same file in package.json, because lucisv's own lexer draws no line between the two dialects.",
"The keyword alternation in `repository.keywords.match` is generated from `vlog_parser::KEYWORDS` and must stay identical to it. `crates/lucisv_server/tests/grammar.rs` fails the build if the two drift apart — regenerate, do not hand-edit.",
"Deliberately absent: operators, `(* attributes *)`, and any rule needing lookaround. The reasoning is in docs/features/editor-packaging/README.md."
],
"name": "SystemVerilog",
"scopeName": "source.systemverilog",
"patterns": [
{ "include": "#comments" },
{ "include": "#strings" },
{ "include": "#directives" },
{ "include": "#macros" },
{ "include": "#system-tasks" },
{ "include": "#numbers" },
{ "include": "#keywords" }
],
"repository": {
"comments": {
"patterns": [
{
"name": "comment.line.double-slash.systemverilog",
"match": "//.*"
},
{
"name": "comment.block.systemverilog",
"begin": "/\\*",
"end": "\\*/"
}
]
},
"strings": {
"name": "string.quoted.double.systemverilog",
"begin": "\"",
"end": "\"|$",
"patterns": [
{
"name": "constant.character.escape.systemverilog",
"match": "\\\\."
}
]
},
"directives": {
"name": "keyword.control.directive.systemverilog",
"match": "`(define|undefineall|undef|ifdef|ifndef|elsif|else|endif|include|timescale|default_nettype|resetall|celldefine|endcelldefine|unconnected_drive|nounconnected_drive|line|begin_keywords|end_keywords|pragma|__FILE__|__LINE__)\\b"
},
"macros": {
"name": "entity.name.function.preprocessor.systemverilog",
"match": "`[a-zA-Z_][a-zA-Z0-9_$]*"
},
"system-tasks": {
"name": "support.function.system.systemverilog",
"match": "\\$[a-zA-Z_][a-zA-Z0-9_$]*"
},
"numbers": {
"patterns": [
{
"name": "constant.numeric.based.systemverilog",
"match": "(\\b[0-9][0-9_]*\\s*)?'[sS]?[bBoOdDhH][0-9a-fA-FxXzZ?_]+"
},
{
"name": "constant.numeric.fill.systemverilog",
"match": "'[01xXzZ]\\b"
},
{
"name": "constant.numeric.systemverilog",
"match": "\\b[0-9][0-9_]*(\\.[0-9_]+)?([eE][-+]?[0-9_]+)?(fs|ps|ns|us|ms|s)?\\b"
}
]
},
"keywords": {
"name": "keyword.other.systemverilog",
"match": "\\b(module|macromodule|endmodule|interface|endinterface|package|endpackage|program|endprogram|modport|clocking|endclocking|input|output|inout|ref|wire|tri|tri0|tri1|wand|wor|trireg|supply0|supply1|uwire|reg|logic|bit|byte|shortint|int|longint|integer|time|realtime|real|shortreal|string|chandle|event|var|void|signed|unsigned|packed|parameter|localparam|defparam|specparam|type|typedef|enum|struct|union|assign|alias|always|always_comb|always_ff|always_latch|initial|final|begin|end|if|else|case|casex|casez|randcase|let|endcase|default|unique|unique0|priority|for|while|repeat|forever|do|foreach|break|continue|return|fork|join|join_any|join_none|disable|wait|posedge|negedge|edge|or|and|nand|nor|xor|xnor|not|buf|bufif0|bufif1|notif0|notif1|pullup|pulldown|generate|endgenerate|genvar|class|endclass|extends|implements|virtual|pure|extern|rand|randsequence|randc|local|protected|constraint|covergroup|endgroup|function|endfunction|task|endtask|automatic|static|const|import|export|timeunit|timeprecision|assert|assume|cover|property|endproperty|sequence|endsequence|inside|with|iff|release|force|deassign|primitive|endprimitive|specify|endspecify|table|endtable|checker|endchecker|config|endconfig|library|small|medium|large|scalared|vectored|highz0|highz1|strong0|strong1|pull0|pull1|weak0|weak1|cmos|rcmos|nmos|pmos|rnmos|rpmos|tran|rtran|tranif0|tranif1|rtranif0|rtranif1)\\b"
}
}
}