| 1 |
{ |
| 2 |
"fileTypes": ["sv", "SV", "v", "V", "svh", "SVH", "vh", "VH"], |
| 3 |
"hidden": true, |
| 4 |
"name": "system-verilog", |
| 5 |
"patterns": [ |
| 6 |
{ |
| 7 |
"begin": "\\s*\\b(function|task)\\b(\\s+automatic)?", |
| 8 |
"beginCaptures": { |
| 9 |
"1": { |
| 10 |
"name": "keyword.control.systemverilog" |
| 11 |
}, |
| 12 |
"2": { |
| 13 |
"name": "keyword.control.systemverilog" |
| 14 |
} |
| 15 |
}, |
| 16 |
"end": ";", |
| 17 |
"patterns": [ |
| 18 |
{ |
| 19 |
"match": "\\b([a-zA-Z_][a-zA-Z0-9_]*\\s+)?([a-zA-Z_][a-zA-Z0-9_:]*)\\s*(?=\\(|;)", |
| 20 |
"captures": { |
| 21 |
"1": { |
| 22 |
"name": "storage.type.systemverilog" |
| 23 |
}, |
| 24 |
"2": { |
| 25 |
"name": "entity.name.function.systemverilog" |
| 26 |
} |
| 27 |
} |
| 28 |
}, |
| 29 |
{ |
| 30 |
"include": "#port-dir" |
| 31 |
}, |
| 32 |
{ |
| 33 |
"include": "#base-grammar" |
| 34 |
} |
| 35 |
], |
| 36 |
"name": "meta.function.systemverilog" |
| 37 |
}, |
| 38 |
{ |
| 39 |
"match": "\\s*\\b(task)\\s+(automatic)?\\s*(\\w+)\\s*;", |
| 40 |
"captures": { |
| 41 |
"1": { |
| 42 |
"name": "keyword.control.systemverilog" |
| 43 |
}, |
| 44 |
"2": { |
| 45 |
"name": "keyword.control.systemverilog" |
| 46 |
}, |
| 47 |
"3": { |
| 48 |
"name": "entity.name.function.systemverilog" |
| 49 |
} |
| 50 |
}, |
| 51 |
"name": "meta.task.simple.systemverilog" |
| 52 |
}, |
| 53 |
{ |
| 54 |
"begin": "\\s*\\b(typedef\\s+(struct|enum|union)\\b)\\s*(packed)?\\s*([a-zA-Z_][a-zA-Z0-9_]*)?", |
| 55 |
"beginCaptures": { |
| 56 |
"1": { |
| 57 |
"name": "keyword.control.systemverilog" |
| 58 |
}, |
| 59 |
"2": { |
| 60 |
"name": "keyword.control.systemverilog" |
| 61 |
}, |
| 62 |
"3": { |
| 63 |
"name": "keyword.control.systemverilog" |
| 64 |
}, |
| 65 |
"4": { |
| 66 |
"name": "storage.type.systemverilog" |
| 67 |
} |
| 68 |
}, |
| 69 |
"end": "(})\\s*([a-zA-Z_][a-zA-Z0-9_]*)\\s*;", |
| 70 |
"endCaptures": { |
| 71 |
"1": { |
| 72 |
"name": "keyword.operator.other.systemverilog" |
| 73 |
}, |
| 74 |
"2": { |
| 75 |
"name": "entity.name.function.systemverilog" |
| 76 |
} |
| 77 |
}, |
| 78 |
"patterns": [ |
| 79 |
{ |
| 80 |
"include": "#struct-anonymous" |
| 81 |
}, |
| 82 |
{ |
| 83 |
"include": "#base-grammar" |
| 84 |
} |
| 85 |
], |
| 86 |
"name": "meta.typedef.struct.systemverilog" |
| 87 |
}, |
| 88 |
{ |
| 89 |
"match": "\\s*\\b(typedef\\s+class)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\s*;", |
| 90 |
"captures": { |
| 91 |
"1": { |
| 92 |
"name": "keyword.control.systemverilog" |
| 93 |
}, |
| 94 |
"2": { |
| 95 |
"name": "entity.name.declaration.systemverilog" |
| 96 |
} |
| 97 |
}, |
| 98 |
"name": "meta.typedef.class.systemverilog" |
| 99 |
}, |
| 100 |
{ |
| 101 |
"begin": "\\s*\\b(typedef)\\b", |
| 102 |
"beginCaptures": { |
| 103 |
"1": { |
| 104 |
"name": "keyword.control.systemverilog" |
| 105 |
} |
| 106 |
}, |
| 107 |
"end": "([a-zA-Z_][a-zA-Z0-9_]*)\\s*(?=(\\[[a-zA-Z0-9_:\\$\\-\\+]*\\])?;)", |
| 108 |
"endCaptures": { |
| 109 |
"1": { |
| 110 |
"name": "entity.name.function.systemverilog" |
| 111 |
} |
| 112 |
}, |
| 113 |
"patterns": [ |
| 114 |
{ |
| 115 |
"match": "\\b([a-zA-Z_]\\w*)\\s*(#)\\(", |
| 116 |
"captures": { |
| 117 |
"1": { |
| 118 |
"name": "storage.type.userdefined.systemverilog" |
| 119 |
}, |
| 120 |
"2": { |
| 121 |
"name": "keyword.operator.param.systemverilog" |
| 122 |
} |
| 123 |
}, |
| 124 |
"name": "meta.typedef.class.systemverilog" |
| 125 |
}, |
| 126 |
{ |
| 127 |
"include": "#base-grammar" |
| 128 |
}, |
| 129 |
{ |
| 130 |
"include": "#module-binding" |
| 131 |
} |
| 132 |
], |
| 133 |
"name": "meta.typedef.simple.systemverilog" |
| 134 |
}, |
| 135 |
{ |
| 136 |
"begin": "\\s*(module)\\s+\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b", |
| 137 |
"beginCaptures": { |
| 138 |
"1": { |
| 139 |
"name": "keyword.control.systemverilog" |
| 140 |
}, |
| 141 |
"2": { |
| 142 |
"name": "entity.name.type.module.systemverilog" |
| 143 |
} |
| 144 |
}, |
| 145 |
"end": ";", |
| 146 |
"endCaptures": { |
| 147 |
"1": { |
| 148 |
"name": "entity.name.function.systemverilog" |
| 149 |
} |
| 150 |
}, |
| 151 |
"patterns": [ |
| 152 |
{ |
| 153 |
"include": "#port-dir" |
| 154 |
}, |
| 155 |
{ |
| 156 |
"match": "\\s*(parameter)", |
| 157 |
"name": "keyword.other.systemverilog" |
| 158 |
}, |
| 159 |
{ |
| 160 |
"include": "#base-grammar" |
| 161 |
}, |
| 162 |
{ |
| 163 |
"include": "#ifmodport" |
| 164 |
}, |
| 165 |
{ |
| 166 |
"match": "\\$\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b", |
| 167 |
"name": "support.function.systemverilog" |
| 168 |
} |
| 169 |
], |
| 170 |
"name": "meta.module.systemverilog" |
| 171 |
}, |
| 172 |
{ |
| 173 |
"captures": { |
| 174 |
"1": { |
| 175 |
"name": "keyword.control.systemverilog" |
| 176 |
}, |
| 177 |
"2": { |
| 178 |
"name": "entity.name.function.systemverilog" |
| 179 |
} |
| 180 |
}, |
| 181 |
"match": "\\b(sequence)\\s+([a-zA-Z_][a-zA-Z0-9_]*)", |
| 182 |
"name": "meta.sequence.systemverilog" |
| 183 |
}, |
| 184 |
{ |
| 185 |
"match": "\\b(bind)\\s+([a-zA-Z_][a-zA-Z0-9_\\.]*)\\b", |
| 186 |
"captures": { |
| 187 |
"1": { |
| 188 |
"name": "keyword.control.systemverilog" |
| 189 |
} |
| 190 |
} |
| 191 |
}, |
| 192 |
{ |
| 193 |
"captures": { |
| 194 |
"0": { |
| 195 |
"name": "meta.section.begin.systemverilog" |
| 196 |
}, |
| 197 |
"1": { |
| 198 |
"name": "keyword.other.block.systemverilog" |
| 199 |
}, |
| 200 |
"3": { |
| 201 |
"name": "keyword.operator.systemverilog" |
| 202 |
}, |
| 203 |
"4": { |
| 204 |
"name": "entity.name.section.systemverilog" |
| 205 |
} |
| 206 |
}, |
| 207 |
"match": "\\s*(begin|fork)\\s*((:)\\s*([a-zA-Z_][a-zA-Z0-9_]*))\\b", |
| 208 |
"name": "meta.definition.systemverilog" |
| 209 |
}, |
| 210 |
{ |
| 211 |
"match": "\\b(property)\\s+(\\w+)", |
| 212 |
"captures": { |
| 213 |
"1": { |
| 214 |
"name": "keyword.sva.systemverilog" |
| 215 |
}, |
| 216 |
"2": { |
| 217 |
"name": "entity.name.sva.systemverilog" |
| 218 |
} |
| 219 |
} |
| 220 |
}, |
| 221 |
{ |
| 222 |
"match": "\\b(\\w+)\\s*(:)\\s*(assert)\\b", |
| 223 |
"captures": { |
| 224 |
"1": { |
| 225 |
"name": "entity.name.sva.systemverilog" |
| 226 |
}, |
| 227 |
"2": { |
| 228 |
"name": "keyword.operator.systemverilog" |
| 229 |
}, |
| 230 |
"3": { |
| 231 |
"name": "keyword.sva.systemverilog" |
| 232 |
} |
| 233 |
} |
| 234 |
}, |
| 235 |
{ |
| 236 |
"begin": "\\s*(//)\\s*(psl)\\s+((\\w+)\\s*(:))?\\s*(default|assert|assume)", |
| 237 |
"beginCaptures": { |
| 238 |
"0": { |
| 239 |
"name": "meta.psl.systemverilog" |
| 240 |
}, |
| 241 |
"1": { |
| 242 |
"name": "comment.line.double-slash.systemverilog" |
| 243 |
}, |
| 244 |
"2": { |
| 245 |
"name": "keyword.psl.systemverilog" |
| 246 |
}, |
| 247 |
"4": { |
| 248 |
"name": "entity.psl.name.systemverilog" |
| 249 |
}, |
| 250 |
"5": { |
| 251 |
"name": "keyword.operator.systemverilog" |
| 252 |
}, |
| 253 |
"6": { |
| 254 |
"name": "keyword.psl.systemverilog" |
| 255 |
} |
| 256 |
}, |
| 257 |
"end": ";", |
| 258 |
"patterns": [ |
| 259 |
{ |
| 260 |
"match": "\\b(never|always|default|clock|within|rose|fell|stable|until|before|next|eventually|abort|posedge)\\b", |
| 261 |
"name": "keyword.psl.systemverilog" |
| 262 |
}, |
| 263 |
{ |
| 264 |
"include": "#operators" |
| 265 |
}, |
| 266 |
{ |
| 267 |
"include": "#functions" |
| 268 |
}, |
| 269 |
{ |
| 270 |
"include": "#constants" |
| 271 |
} |
| 272 |
], |
| 273 |
"name": "meta.psl.systemverilog" |
| 274 |
}, |
| 275 |
{ |
| 276 |
"begin": "\\s*(/\\*)\\s*(psl)", |
| 277 |
"beginCaptures": { |
| 278 |
"0": { |
| 279 |
"name": "meta.psl.systemverilog" |
| 280 |
}, |
| 281 |
"1": { |
| 282 |
"name": "comment.block.systemverilog" |
| 283 |
}, |
| 284 |
"2": { |
| 285 |
"name": "keyword.psl.systemverilog" |
| 286 |
} |
| 287 |
}, |
| 288 |
"end": "(\\*/)", |
| 289 |
"endCaptures": { |
| 290 |
"1": { |
| 291 |
"name": "comment.block.systemverilog" |
| 292 |
} |
| 293 |
}, |
| 294 |
"patterns": [ |
| 295 |
{ |
| 296 |
"match": "^\\s*((\\w+)\\s*(:))?\\s*(default|assert|assume)", |
| 297 |
"captures": { |
| 298 |
"0": { |
| 299 |
"name": "meta.psl.systemverilog" |
| 300 |
}, |
| 301 |
"2": { |
| 302 |
"name": "entity.psl.name.systemverilog" |
| 303 |
}, |
| 304 |
"3": { |
| 305 |
"name": "keyword.operator.systemverilog" |
| 306 |
}, |
| 307 |
"4": { |
| 308 |
"name": "keyword.psl.systemverilog" |
| 309 |
} |
| 310 |
} |
| 311 |
}, |
| 312 |
{ |
| 313 |
"match": "\\b(property)\\s+(\\w+)", |
| 314 |
"captures": { |
| 315 |
"1": { |
| 316 |
"name": "keyword.psl.systemverilog" |
| 317 |
}, |
| 318 |
"2": { |
| 319 |
"name": "entity.psl.name.systemverilog" |
| 320 |
} |
| 321 |
} |
| 322 |
}, |
| 323 |
{ |
| 324 |
"match": "\\b(never|always|default|clock|within|rose|fell|stable|until|before|next|eventually|abort|posedge|negedge)\\b", |
| 325 |
"name": "keyword.psl.systemverilog" |
| 326 |
}, |
| 327 |
{ |
| 328 |
"include": "#operators" |
| 329 |
}, |
| 330 |
{ |
| 331 |
"include": "#functions" |
| 332 |
}, |
| 333 |
{ |
| 334 |
"include": "#constants" |
| 335 |
} |
| 336 |
], |
| 337 |
"name": "meta.psl.systemverilog" |
| 338 |
}, |
| 339 |
{ |
| 340 |
"match": "\\s*\\b(automatic|cell|config|deassign|defparam|design|disable|edge|endconfig|endgenerate|endspecify|endtable|event|generate|genvar|ifnone|incdir|instance|liblist|library|macromodule|negedge|noshowcancelled|posedge|pulsestyle_onevent|pulsestyle_ondetect|scalared|showcancelled|specify|specparam|table|use|vectored)\\b", |
| 341 |
"captures": { |
| 342 |
"1": { |
| 343 |
"name": "keyword.other.systemverilog" |
| 344 |
} |
| 345 |
} |
| 346 |
}, |
| 347 |
{ |
| 348 |
"match": "\\s*\\b(initial|always|wait|force|release|assign|always_comb|always_ff|always_latch|forever|repeat|while|for|if|iff|else|case|casex|casez|default|endcase|return|break|continue|do|foreach|with|inside|dist|clocking|cover|coverpoint|property|bins|binsof|illegal_bins|ignore_bins|randcase|modport|matches|solve|static|assert|assume|before|expect|cross|ref|first_match|srandom|struct|packed|final|chandle|alias|tagged|extern|throughout|timeprecision|timeunit|priority|type|union|uwire|wait_order|triggered|randsequence|import|export|context|pure|intersect|wildcard|within|new|typedef|enum|this|super|begin|fork|forkjoin|unique|unique0|priority)\\b", |
| 349 |
"captures": { |
| 350 |
"1": { |
| 351 |
"name": "keyword.control.systemverilog" |
| 352 |
} |
| 353 |
} |
| 354 |
}, |
| 355 |
{ |
| 356 |
"match": "\\s*\\b(end|endtask|endmodule|endfunction|endprimitive|endclass|endpackage|endsequence|endprogram|endclocking|endproperty|endgroup|endinterface|join|join_any|join_none)\\b(\\s*(:)\\s*(\\w+))?", |
| 357 |
"captures": { |
| 358 |
"1": { |
| 359 |
"name": "keyword.control.systemverilog" |
| 360 |
}, |
| 361 |
"3": { |
| 362 |
"name": "keyword.operator.systemverilog" |
| 363 |
}, |
| 364 |
"4": { |
| 365 |
"name": "entity.label.systemverilog" |
| 366 |
} |
| 367 |
}, |
| 368 |
"name": "meta.object.end.systemverilog" |
| 369 |
}, |
| 370 |
{ |
| 371 |
"match": "\\b(std)\\b::", |
| 372 |
"name": "support.class.systemverilog" |
| 373 |
}, |
| 374 |
{ |
| 375 |
"captures": { |
| 376 |
"1": { |
| 377 |
"name": "constant.other.define.systemverilog" |
| 378 |
}, |
| 379 |
"2": { |
| 380 |
"name": "entity.name.type.define.systemverilog" |
| 381 |
} |
| 382 |
}, |
| 383 |
"match": "^\\s*(`define)\\s+([a-zA-Z_][a-zA-Z0-9_]*)", |
| 384 |
"name": "meta.define.systemverilog" |
| 385 |
}, |
| 386 |
{ |
| 387 |
"captures": { |
| 388 |
"1": { |
| 389 |
"name": "constant.other.undef.systemverilog" |
| 390 |
}, |
| 391 |
"2": { |
| 392 |
"name": "entity.name.type.undef.systemverilog" |
| 393 |
} |
| 394 |
}, |
| 395 |
"match": "^\\s*(`undef)\\s+([a-zA-Z_][a-zA-Z0-9_]*)", |
| 396 |
"name": "meta.undef.systemverilog" |
| 397 |
}, |
| 398 |
{ |
| 399 |
"include": "#comments" |
| 400 |
}, |
| 401 |
{ |
| 402 |
"captures": { |
| 403 |
"1": { |
| 404 |
"name": "keyword.control.systemverilog" |
| 405 |
}, |
| 406 |
"2": { |
| 407 |
"name": "entity.name.type.class.systemverilog" |
| 408 |
} |
| 409 |
}, |
| 410 |
"match": "\\s*(primitive|package|constraint|interface|covergroup|program)\\s+\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b", |
| 411 |
"name": "meta.definition.systemverilog" |
| 412 |
}, |
| 413 |
{ |
| 414 |
"captures": { |
| 415 |
"2": { |
| 416 |
"name": "entity.name.type.class.systemverilog" |
| 417 |
}, |
| 418 |
"3": { |
| 419 |
"name": "keyword.operator.other.systemverilog" |
| 420 |
}, |
| 421 |
"4": { |
| 422 |
"name": "keyword.control.systemverilog" |
| 423 |
} |
| 424 |
}, |
| 425 |
"match": "(([a-zA-Z_][a-zA-Z0-9_]*)\\s*(:))?\\s*(coverpoint|cross)\\s+([a-zA-Z_][a-zA-Z0-9_]*)", |
| 426 |
"name": "meta.definition.systemverilog" |
| 427 |
}, |
| 428 |
{ |
| 429 |
"captures": { |
| 430 |
"1": { |
| 431 |
"name": "keyword.control.systemverilog" |
| 432 |
}, |
| 433 |
"2": { |
| 434 |
"name": "keyword.control.systemverilog" |
| 435 |
}, |
| 436 |
"3": { |
| 437 |
"name": "entity.name.type.class.systemverilog" |
| 438 |
} |
| 439 |
}, |
| 440 |
"match": "\\b(virtual\\s+)?(class)\\s+\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b", |
| 441 |
"name": "meta.definition.class.systemverilog" |
| 442 |
}, |
| 443 |
{ |
| 444 |
"captures": { |
| 445 |
"1": { |
| 446 |
"name": "keyword.control.systemverilog" |
| 447 |
}, |
| 448 |
"2": { |
| 449 |
"name": "entity.other.inherited-class.systemverilog" |
| 450 |
} |
| 451 |
}, |
| 452 |
"match": "\\b(extends)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\b", |
| 453 |
"name": "meta.definition.systemverilog" |
| 454 |
}, |
| 455 |
{ |
| 456 |
"include": "#all-types" |
| 457 |
}, |
| 458 |
{ |
| 459 |
"include": "#operators" |
| 460 |
}, |
| 461 |
{ |
| 462 |
"include": "#port-dir" |
| 463 |
}, |
| 464 |
{ |
| 465 |
"match": "\\b(and|nand|nor|or|xor|xnor|buf|not|bufif[01]|notif[01]|r?[npc]mos|tran|r?tranif[01]|pullup|pulldown)\\b", |
| 466 |
"name": "support.type.systemverilog" |
| 467 |
}, |
| 468 |
{ |
| 469 |
"include": "#strings" |
| 470 |
}, |
| 471 |
{ |
| 472 |
"match": "\\$\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b", |
| 473 |
"name": "support.function.systemverilog" |
| 474 |
}, |
| 475 |
{ |
| 476 |
"match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)(')(?=\\()", |
| 477 |
"name": "meta.cast.systemverilog", |
| 478 |
"captures": { |
| 479 |
"1": { |
| 480 |
"name": "storage.type.systemverilog" |
| 481 |
}, |
| 482 |
"2": { |
| 483 |
"name": "keyword.operator.cast.systemverilog" |
| 484 |
} |
| 485 |
} |
| 486 |
}, |
| 487 |
{ |
| 488 |
"match": "^\\s*(localparam|parameter)\\s+([A-Z_][A-Z0-9_]*)\\b\\s*(?=(=))", |
| 489 |
"name": "meta.param.systemverilog", |
| 490 |
"captures": { |
| 491 |
"1": { |
| 492 |
"name": "keyword.other.systemverilog" |
| 493 |
}, |
| 494 |
"2": { |
| 495 |
"name": "constant.other.systemverilog" |
| 496 |
} |
| 497 |
} |
| 498 |
}, |
| 499 |
{ |
| 500 |
"match": "^\\s*(localparam|parameter)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\b\\s*(?=(=))", |
| 501 |
"name": "meta.param.systemverilog", |
| 502 |
"captures": { |
| 503 |
"1": { |
| 504 |
"name": "keyword.other.systemverilog" |
| 505 |
} |
| 506 |
} |
| 507 |
}, |
| 508 |
{ |
| 509 |
"match": "^\\s*(local\\s+|protected\\s+|localparam\\s+|parameter\\s+)?(const\\s+|virtual\\s+)?(rand\\s+|randc\\s+)?(([a-zA-Z_][a-zA-Z0-9_]*)(::))?([a-zA-Z_][a-zA-Z0-9_]*)\\b\\s*(?=(#\\s*\\([\\w,]+\\)\\s*)?([a-zA-Z][a-zA-Z0-9_\\s\\[\\]']*)(;|,|=|'\\{))", |
| 510 |
"name": "meta.userdefined.systemverilog", |
| 511 |
"captures": { |
| 512 |
"1": { |
| 513 |
"name": "keyword.other.systemverilog" |
| 514 |
}, |
| 515 |
"2": { |
| 516 |
"name": "keyword.other.systemverilog" |
| 517 |
}, |
| 518 |
"3": { |
| 519 |
"name": "storage.type.rand.systemverilog" |
| 520 |
}, |
| 521 |
"5": { |
| 522 |
"name": "support.type.scope.systemverilog" |
| 523 |
}, |
| 524 |
"6": { |
| 525 |
"name": "keyword.operator.scope.systemverilog" |
| 526 |
}, |
| 527 |
"7": { |
| 528 |
"name": "storage.type.userdefined.systemverilog" |
| 529 |
} |
| 530 |
} |
| 531 |
}, |
| 532 |
{ |
| 533 |
"match": "\\s*\\b(option)\\.", |
| 534 |
"captures": { |
| 535 |
"1": { |
| 536 |
"name": "keyword.cover.systemverilog" |
| 537 |
} |
| 538 |
} |
| 539 |
}, |
| 540 |
{ |
| 541 |
"match": "\\s*\\b(local|const|protected|virtual|localparam|parameter)\\b", |
| 542 |
"captures": { |
| 543 |
"1": { |
| 544 |
"name": "keyword.other.systemverilog" |
| 545 |
} |
| 546 |
} |
| 547 |
}, |
| 548 |
{ |
| 549 |
"match": "\\s*\\b(rand|randc)\\b", |
| 550 |
"name": "storage.type.rand.systemverilog" |
| 551 |
}, |
| 552 |
{ |
| 553 |
"begin": "^(\\s*(bind)\\s+([a-zA-Z_][\\w\\.]*))?\\s*([a-zA-Z_][a-zA-Z0-9_]*)\\s*(?=#[^#])", |
| 554 |
"beginCaptures": { |
| 555 |
"2": { |
| 556 |
"name": "keyword.control.systemverilog" |
| 557 |
}, |
| 558 |
"4": { |
| 559 |
"name": "storage.module.systemverilog" |
| 560 |
} |
| 561 |
}, |
| 562 |
"end": "(?=;|=|:)", |
| 563 |
"patterns": [ |
| 564 |
{ |
| 565 |
"include": "#module-binding" |
| 566 |
}, |
| 567 |
{ |
| 568 |
"include": "#module-param" |
| 569 |
}, |
| 570 |
{ |
| 571 |
"include": "#comments" |
| 572 |
}, |
| 573 |
{ |
| 574 |
"include": "#operators" |
| 575 |
}, |
| 576 |
{ |
| 577 |
"include": "#constants" |
| 578 |
}, |
| 579 |
{ |
| 580 |
"include": "#strings" |
| 581 |
}, |
| 582 |
{ |
| 583 |
"match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(?=\\s*(\\(|$))", |
| 584 |
"name": "entity.name.type.module.systemverilog" |
| 585 |
} |
| 586 |
], |
| 587 |
"name": "meta.module.inst.param.systemverilog" |
| 588 |
}, |
| 589 |
{ |
| 590 |
"begin": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\s+(?!intersect|and|or|throughout|within)([a-zA-Z_][a-zA-Z0-9_]*)\\s*(\\[(\\d+)(\\:(\\d+))?\\])?\\s*(\\(|$)", |
| 591 |
"beginCaptures": { |
| 592 |
"1": { |
| 593 |
"name": "storage.module.systemverilog" |
| 594 |
}, |
| 595 |
"2": { |
| 596 |
"name": "entity.name.type.module.systemverilog" |
| 597 |
}, |
| 598 |
"4": { |
| 599 |
"name": "constant.numeric.systemverilog" |
| 600 |
}, |
| 601 |
"6": { |
| 602 |
"name": "constant.numeric.systemverilog" |
| 603 |
} |
| 604 |
}, |
| 605 |
"end": ";", |
| 606 |
"patterns": [ |
| 607 |
{ |
| 608 |
"include": "#module-binding" |
| 609 |
}, |
| 610 |
{ |
| 611 |
"include": "#comments" |
| 612 |
}, |
| 613 |
{ |
| 614 |
"include": "#strings" |
| 615 |
}, |
| 616 |
{ |
| 617 |
"include": "#operators" |
| 618 |
}, |
| 619 |
{ |
| 620 |
"include": "#constants" |
| 621 |
} |
| 622 |
], |
| 623 |
"name": "meta.module.inst.systemverilog" |
| 624 |
}, |
| 625 |
{ |
| 626 |
"name": "meta.struct.assign.systemverilog", |
| 627 |
"begin": "\\b\\s+(<?=)\\s*(\\'{)", |
| 628 |
"beginCaptures": { |
| 629 |
"1": { |
| 630 |
"name": "keyword.operator.other.systemverilog" |
| 631 |
}, |
| 632 |
"2": { |
| 633 |
"name": "keyword.operator.other.systemverilog" |
| 634 |
}, |
| 635 |
"3": { |
| 636 |
"name": "keyword.operator.other.systemverilog" |
| 637 |
} |
| 638 |
}, |
| 639 |
"end": ";", |
| 640 |
"patterns": [ |
| 641 |
{ |
| 642 |
"match": "\\b(\\w+)\\s*(:)(?!:)", |
| 643 |
"captures": { |
| 644 |
"1": { |
| 645 |
"name": "support.function.field.systemverilog" |
| 646 |
}, |
| 647 |
"2": { |
| 648 |
"name": "keyword.operator.other.systemverilog" |
| 649 |
} |
| 650 |
} |
| 651 |
}, |
| 652 |
{ |
| 653 |
"include": "#comments" |
| 654 |
}, |
| 655 |
{ |
| 656 |
"include": "#strings" |
| 657 |
}, |
| 658 |
{ |
| 659 |
"include": "#operators" |
| 660 |
}, |
| 661 |
{ |
| 662 |
"include": "#constants" |
| 663 |
}, |
| 664 |
{ |
| 665 |
"include": "#storage-scope-systemverilog" |
| 666 |
} |
| 667 |
] |
| 668 |
}, |
| 669 |
{ |
| 670 |
"include": "#storage-scope-systemverilog" |
| 671 |
}, |
| 672 |
{ |
| 673 |
"include": "#functions" |
| 674 |
}, |
| 675 |
{ |
| 676 |
"include": "#constants" |
| 677 |
} |
| 678 |
], |
| 679 |
"repository": { |
| 680 |
"functions": { |
| 681 |
"match": "\\b(\\w+)(?=\\s*\\()", |
| 682 |
"name": "support.function.generic.systemverilog" |
| 683 |
}, |
| 684 |
"all-types": { |
| 685 |
"patterns": [ |
| 686 |
{ |
| 687 |
"include": "#storage-type-systemverilog" |
| 688 |
}, |
| 689 |
{ |
| 690 |
"include": "#storage-modifier-systemverilog" |
| 691 |
} |
| 692 |
] |
| 693 |
}, |
| 694 |
"constants": { |
| 695 |
"patterns": [ |
| 696 |
{ |
| 697 |
"match": "(\\b\\d+)?'(s?[bB]\\s*[0-1xXzZ?][0-1_xXzZ?]*|s?[oO]\\s*[0-7xXzZ?][0-7_xXzZ?]*|s?[dD]\\s*[0-9xXzZ?][0-9_xXzZ?]*|s?[hH]\\s*[0-9a-fA-FxXzZ?][0-9a-fA-F_xXzZ?]*)((e|E)(\\+|-)?[0-9]+)?(?!'|\\w)", |
| 698 |
"name": "constant.numeric.systemverilog" |
| 699 |
}, |
| 700 |
{ |
| 701 |
"match": "'[01xXzZ]", |
| 702 |
"name": "constant.numeric.bit.systemverilog" |
| 703 |
}, |
| 704 |
{ |
| 705 |
"match": "\\b((\\d[\\d_]*)(e|E)(\\+|-)?[0-9]+)\\b", |
| 706 |
"name": "constant.numeric.exp.systemverilog" |
| 707 |
}, |
| 708 |
{ |
| 709 |
"match": "\\b(\\d[\\d_]*)\\b", |
| 710 |
"name": "constant.numeric.decimal.systemverilog" |
| 711 |
}, |
| 712 |
{ |
| 713 |
"match": "\\b(\\d+(fs|ps|ns|us|ms|s)?)\\b", |
| 714 |
"name": "constant.numeric.time.systemverilog" |
| 715 |
}, |
| 716 |
{ |
| 717 |
"match": "\\b([A-Z][A-Z0-9_]*)\\b", |
| 718 |
"name": "constant.other.net.systemverilog" |
| 719 |
}, |
| 720 |
{ |
| 721 |
"match": "(`ifdef|`ifndef|`default_nettype)\\s+(\\w+)", |
| 722 |
"captures": { |
| 723 |
"1": { |
| 724 |
"name": "constant.other.preprocessor.systemverilog" |
| 725 |
}, |
| 726 |
"2": { |
| 727 |
"name": "support.variable.systemverilog" |
| 728 |
} |
| 729 |
} |
| 730 |
}, |
| 731 |
{ |
| 732 |
"match": "`(celldefine|else|elsif|endcelldefine|endif|include|line|nounconnected_drive|resetall|timescale|unconnected_drive|undef|begin_\\w+|end_\\w+|remove_\\w+|restore_\\w+)\\b", |
| 733 |
"name": "constant.other.preprocessor.systemverilog" |
| 734 |
}, |
| 735 |
{ |
| 736 |
"match": "`\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b", |
| 737 |
"name": "constant.other.define.systemverilog" |
| 738 |
}, |
| 739 |
{ |
| 740 |
"match": "\\b(null)\\b", |
| 741 |
"name": "support.constant.systemverilog" |
| 742 |
} |
| 743 |
] |
| 744 |
}, |
| 745 |
"operators": { |
| 746 |
"patterns": [ |
| 747 |
{ |
| 748 |
"match": "(=|==|===|!=|!==|<=|>=|<|>)", |
| 749 |
"name": "keyword.operator.comparison.systemverilog" |
| 750 |
}, |
| 751 |
{ |
| 752 |
"match": "(\\-|\\+|\\*|\\/|%)", |
| 753 |
"name": "keyword.operator.arithmetic.systemverilog" |
| 754 |
}, |
| 755 |
{ |
| 756 |
"match": "(!|&&|\\|\\||\\bor\\b)", |
| 757 |
"name": "keyword.operator.logical.systemverilog" |
| 758 |
}, |
| 759 |
{ |
| 760 |
"match": "(&|\\||\\^|~|{|'{|}|<<|>>|\\?|:)", |
| 761 |
"name": "keyword.operator.bitwise.systemverilog" |
| 762 |
}, |
| 763 |
{ |
| 764 |
"match": "(#|@)", |
| 765 |
"name": "keyword.operator.other.systemverilog" |
| 766 |
} |
| 767 |
] |
| 768 |
}, |
| 769 |
"comments": { |
| 770 |
"patterns": [ |
| 771 |
{ |
| 772 |
"begin": "/\\*", |
| 773 |
"captures": { |
| 774 |
"0": { |
| 775 |
"name": "punctuation.definition.comment.systemverilog" |
| 776 |
} |
| 777 |
}, |
| 778 |
"end": "\\*/", |
| 779 |
"name": "comment.block.systemverilog" |
| 780 |
}, |
| 781 |
{ |
| 782 |
"captures": { |
| 783 |
"1": { |
| 784 |
"name": "punctuation.definition.comment.systemverilog" |
| 785 |
} |
| 786 |
}, |
| 787 |
"match": "(//).*$\\n?", |
| 788 |
"name": "comment.line.double-slash.systemverilog" |
| 789 |
} |
| 790 |
] |
| 791 |
}, |
| 792 |
"port-dir": { |
| 793 |
"patterns": [ |
| 794 |
{ |
| 795 |
"match": "\\s*\\b(output|input|inout|ref)\\s+(([a-zA-Z_][a-zA-Z0-9_]*)(::))?([a-zA-Z_][a-zA-Z0-9_]*)?\\s+(?=\\[[a-zA-Z0-9_\\-\\+]*:[a-zA-Z0-9_\\-\\+]*\\]\\s+[a-zA-Z_][a-zA-Z0-9_\\s]*)", |
| 796 |
"captures": { |
| 797 |
"1": { |
| 798 |
"name": "support.type.systemverilog" |
| 799 |
}, |
| 800 |
"3": { |
| 801 |
"name": "support.type.scope.systemverilog" |
| 802 |
}, |
| 803 |
"4": { |
| 804 |
"name": "keyword.operator.scope.systemverilog" |
| 805 |
}, |
| 806 |
"5": { |
| 807 |
"name": "storage.type.interface.systemverilog" |
| 808 |
} |
| 809 |
} |
| 810 |
}, |
| 811 |
{ |
| 812 |
"match": "\\s*\\b(output|input|inout|ref)\\s+(([a-zA-Z_][a-zA-Z0-9_]*)(::))?([a-zA-Z_][a-zA-Z0-9_]*)?\\s+(?=[a-zA-Z_][a-zA-Z0-9_\\s]*)", |
| 813 |
"captures": { |
| 814 |
"1": { |
| 815 |
"name": "support.type.systemverilog" |
| 816 |
}, |
| 817 |
"3": { |
| 818 |
"name": "support.type.scope.systemverilog" |
| 819 |
}, |
| 820 |
"4": { |
| 821 |
"name": "keyword.operator.scope.systemverilog" |
| 822 |
}, |
| 823 |
"5": { |
| 824 |
"name": "storage.type.interface.systemverilog" |
| 825 |
} |
| 826 |
} |
| 827 |
}, |
| 828 |
{ |
| 829 |
"match": "\\s*\\b(output|input|inout|ref)\\b", |
| 830 |
"name": "support.type.systemverilog" |
| 831 |
} |
| 832 |
] |
| 833 |
}, |
| 834 |
"base-grammar": { |
| 835 |
"patterns": [ |
| 836 |
{ |
| 837 |
"include": "#all-types" |
| 838 |
}, |
| 839 |
{ |
| 840 |
"include": "#comments" |
| 841 |
}, |
| 842 |
{ |
| 843 |
"include": "#operators" |
| 844 |
}, |
| 845 |
{ |
| 846 |
"include": "#constants" |
| 847 |
}, |
| 848 |
{ |
| 849 |
"include": "#strings" |
| 850 |
}, |
| 851 |
{ |
| 852 |
"match": "^\\s*([a-zA-Z_][a-zA-Z0-9_]*)\\s+[a-zA-Z_][a-zA-Z0-9_,=\\s]*", |
| 853 |
"captures": { |
| 854 |
"1": { |
| 855 |
"name": "storage.type.interface.systemverilog" |
| 856 |
} |
| 857 |
} |
| 858 |
}, |
| 859 |
{ |
| 860 |
"include": "#storage-scope-systemverilog" |
| 861 |
} |
| 862 |
] |
| 863 |
}, |
| 864 |
"storage-type-systemverilog": { |
| 865 |
"patterns": [ |
| 866 |
{ |
| 867 |
"match": "\\s*\\b(var|wire|tri|tri[01]|supply[01]|wand|triand|wor|trior|trireg|reg|integer|int|longint|shortint|logic|bit|byte|shortreal|string|time|realtime|real|process|void)\\b", |
| 868 |
"name": "storage.type.systemverilog" |
| 869 |
}, |
| 870 |
{ |
| 871 |
"match": "\\s*\\b(uvm_transaction|uvm_component|uvm_monitor|uvm_driver|uvm_test|uvm_env|uvm_object|uvm_agent|uvm_sequence_base|uvm_sequence|uvm_sequence_item|uvm_sequence_state|uvm_sequencer|uvm_sequencer_base|uvm_component_registry|uvm_analysis_imp|uvm_analysis_port|uvm_analysis_export|uvm_config_db|uvm_active_passive_enum|uvm_phase|uvm_verbosity|uvm_tlm_analysis_fifo|uvm_tlm_fifo|uvm_report_server|uvm_objection|uvm_recorder|uvm_domain|uvm_reg_field|uvm_reg|uvm_reg_block|uvm_bitstream_t|uvm_radix_enum|uvm_printer|uvm_packer|uvm_comparer|uvm_scope_stack)\\b", |
| 872 |
"name": "storage.type.uvm.systemverilog" |
| 873 |
} |
| 874 |
] |
| 875 |
}, |
| 876 |
"storage-scope-systemverilog": { |
| 877 |
"match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)(::)", |
| 878 |
"captures": { |
| 879 |
"1": { |
| 880 |
"name": "support.type.systemverilog" |
| 881 |
}, |
| 882 |
"2": { |
| 883 |
"name": "keyword.operator.scope.systemverilog" |
| 884 |
} |
| 885 |
}, |
| 886 |
"name": "meta.scope.systemverilog" |
| 887 |
}, |
| 888 |
"storage-modifier-systemverilog": { |
| 889 |
"match": "\\b(signed|unsigned|small|medium|large|supply[01]|strong[01]|pull[01]|weak[01]|highz[01])\\b", |
| 890 |
"name": "storage.modifier.systemverilog" |
| 891 |
}, |
| 892 |
"ifmodport": { |
| 893 |
"match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\.([a-zA-Z_][a-zA-Z0-9_]*)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\b", |
| 894 |
"captures": { |
| 895 |
"1": { |
| 896 |
"name": "storage.type.interface.systemverilog" |
| 897 |
}, |
| 898 |
"2": { |
| 899 |
"name": "support.modport.systemverilog" |
| 900 |
} |
| 901 |
} |
| 902 |
}, |
| 903 |
"strings": { |
| 904 |
"patterns": [ |
| 905 |
{ |
| 906 |
"begin": "\"", |
| 907 |
"beginCaptures": { |
| 908 |
"0": { |
| 909 |
"name": "punctuation.definition.string.begin.systemverilog" |
| 910 |
} |
| 911 |
}, |
| 912 |
"end": "\"", |
| 913 |
"endCaptures": { |
| 914 |
"0": { |
| 915 |
"name": "punctuation.definition.string.end.systemverilog" |
| 916 |
} |
| 917 |
}, |
| 918 |
"name": "string.quoted.double.systemverilog", |
| 919 |
"patterns": [ |
| 920 |
{ |
| 921 |
"match": "\\\\.", |
| 922 |
"name": "constant.character.escape.systemverilog" |
| 923 |
}, |
| 924 |
{ |
| 925 |
"match": "(?x)%\n (\\d+\\$)? # field (argument #)\n [#0\\- +']* # flags\n [,;:_]? # separator character (AltiVec)\n ((-?\\d+)|\\*(-?\\d+\\$)?)? # minimum field width\n (\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)? # precision\n (hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)? # length modifier\n [bdiouxXhHDOUeEfFgGaACcSspnmt%] # conversion type\n ", |
| 926 |
"name": "constant.other.placeholder.systemverilog" |
| 927 |
}, |
| 928 |
{ |
| 929 |
"match": "%", |
| 930 |
"name": "invalid.illegal.placeholder.systemverilog" |
| 931 |
} |
| 932 |
] |
| 933 |
} |
| 934 |
] |
| 935 |
}, |
| 936 |
"module-binding": { |
| 937 |
"begin": "\\.([a-zA-Z_][a-zA-Z0-9_]*)\\s*\\(", |
| 938 |
"beginCaptures": { |
| 939 |
"1": { |
| 940 |
"name": "support.function.port.systemverilog" |
| 941 |
} |
| 942 |
}, |
| 943 |
"end": "\\)", |
| 944 |
"patterns": [ |
| 945 |
{ |
| 946 |
"include": "#constants" |
| 947 |
}, |
| 948 |
{ |
| 949 |
"include": "#comments" |
| 950 |
}, |
| 951 |
{ |
| 952 |
"include": "#operators" |
| 953 |
}, |
| 954 |
{ |
| 955 |
"include": "#strings" |
| 956 |
}, |
| 957 |
{ |
| 958 |
"include": "#constants" |
| 959 |
}, |
| 960 |
{ |
| 961 |
"match": "\\b([a-zA-Z_]\\w*)(::)", |
| 962 |
"captures": { |
| 963 |
"1": { |
| 964 |
"name": "support.type.scope.systemverilog" |
| 965 |
}, |
| 966 |
"2": { |
| 967 |
"name": "keyword.operator.scope.systemverilog" |
| 968 |
} |
| 969 |
} |
| 970 |
}, |
| 971 |
{ |
| 972 |
"match": "\\b([a-zA-Z_]\\w*)(')", |
| 973 |
"captures": { |
| 974 |
"1": { |
| 975 |
"name": "storage.type.interface.systemverilog" |
| 976 |
}, |
| 977 |
"2": { |
| 978 |
"name": "keyword.operator.cast.systemverilog" |
| 979 |
} |
| 980 |
} |
| 981 |
}, |
| 982 |
{ |
| 983 |
"match": "\\$\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b", |
| 984 |
"name": "support.function.systemverilog" |
| 985 |
}, |
| 986 |
{ |
| 987 |
"match": "\\b(virtual)\\b", |
| 988 |
"name": "keyword.control.systemverilog" |
| 989 |
} |
| 990 |
], |
| 991 |
"match": "\\.([a-zA-Z_][a-zA-Z0-9_]*)\\s*", |
| 992 |
"captures": { |
| 993 |
"1": { |
| 994 |
"name": "support.function.port.implicit.systemverilog" |
| 995 |
} |
| 996 |
} |
| 997 |
}, |
| 998 |
"module-param": { |
| 999 |
"name": "meta.module-param.systemverilog", |
| 1000 |
"begin": "(#)\\s*\\(", |
| 1001 |
"beginCaptures": { |
| 1002 |
"1": { |
| 1003 |
"name": "keyword.operator.param.systemverilog" |
| 1004 |
} |
| 1005 |
}, |
| 1006 |
"end": "\\)", |
| 1007 |
"patterns": [ |
| 1008 |
{ |
| 1009 |
"include": "#comments" |
| 1010 |
}, |
| 1011 |
{ |
| 1012 |
"include": "#constants" |
| 1013 |
}, |
| 1014 |
{ |
| 1015 |
"include": "#operators" |
| 1016 |
}, |
| 1017 |
{ |
| 1018 |
"include": "#strings" |
| 1019 |
}, |
| 1020 |
{ |
| 1021 |
"include": "#module-binding" |
| 1022 |
}, |
| 1023 |
{ |
| 1024 |
"match": "\\b(virtual)\\b", |
| 1025 |
"name": "keyword.control.systemverilog" |
| 1026 |
} |
| 1027 |
] |
| 1028 |
}, |
| 1029 |
"struct-anonymous": { |
| 1030 |
"begin": "\\s*\\b(struct|union)\\s*(packed)?\\s*", |
| 1031 |
"beginCaptures": { |
| 1032 |
"1": { |
| 1033 |
"name": "keyword.control.systemverilog" |
| 1034 |
}, |
| 1035 |
"2": { |
| 1036 |
"name": "keyword.control.systemverilog" |
| 1037 |
} |
| 1038 |
}, |
| 1039 |
"end": "(})\\s*([a-zA-Z_]\\w*)\\s*;", |
| 1040 |
"endCaptures": { |
| 1041 |
"1": { |
| 1042 |
"name": "keyword.operator.other.systemverilog" |
| 1043 |
} |
| 1044 |
}, |
| 1045 |
"patterns": [ |
| 1046 |
{ |
| 1047 |
"include": "#base-grammar" |
| 1048 |
} |
| 1049 |
], |
| 1050 |
"name": "meta.struct.anonymous.systemverilog" |
| 1051 |
} |
| 1052 |
}, |
| 1053 |
"scopeName": "source.systemverilog", |
| 1054 |
"uuid": "789be04c-8b74-352e-8f37-63d336001277" |
| 1055 |
} |
| 1056 |
|