systemverilog-O2EXZ7SR.js 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565
  1. import "./chunk-2LSFTFF7.js";
  2. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/basic-languages/systemverilog/systemverilog.js
  3. var conf = {
  4. comments: {
  5. lineComment: "//",
  6. blockComment: ["/*", "*/"]
  7. },
  8. brackets: [
  9. ["{", "}"],
  10. ["[", "]"],
  11. ["(", ")"],
  12. ["begin", "end"],
  13. ["case", "endcase"],
  14. ["casex", "endcase"],
  15. ["casez", "endcase"],
  16. ["checker", "endchecker"],
  17. ["class", "endclass"],
  18. ["clocking", "endclocking"],
  19. ["config", "endconfig"],
  20. ["function", "endfunction"],
  21. ["generate", "endgenerate"],
  22. ["group", "endgroup"],
  23. ["interface", "endinterface"],
  24. ["module", "endmodule"],
  25. ["package", "endpackage"],
  26. ["primitive", "endprimitive"],
  27. ["program", "endprogram"],
  28. ["property", "endproperty"],
  29. ["specify", "endspecify"],
  30. ["sequence", "endsequence"],
  31. ["table", "endtable"],
  32. ["task", "endtask"]
  33. ],
  34. autoClosingPairs: [
  35. { open: "[", close: "]" },
  36. { open: "{", close: "}" },
  37. { open: "(", close: ")" },
  38. { open: "'", close: "'", notIn: ["string", "comment"] },
  39. { open: '"', close: '"', notIn: ["string"] }
  40. ],
  41. surroundingPairs: [
  42. { open: "{", close: "}" },
  43. { open: "[", close: "]" },
  44. { open: "(", close: ")" },
  45. { open: '"', close: '"' },
  46. { open: "'", close: "'" }
  47. ],
  48. folding: {
  49. offSide: false,
  50. markers: {
  51. start: new RegExp("^(?:\\s*|.*(?!\\/[\\/\\*])[^\\w])(?:begin|case(x|z)?|class|clocking|config|covergroup|function|generate|interface|module|package|primitive|property|program|sequence|specify|table|task)\\b"),
  52. end: new RegExp("^(?:\\s*|.*(?!\\/[\\/\\*])[^\\w])(?:end|endcase|endclass|endclocking|endconfig|endgroup|endfunction|endgenerate|endinterface|endmodule|endpackage|endprimitive|endproperty|endprogram|endsequence|endspecify|endtable|endtask)\\b")
  53. }
  54. }
  55. };
  56. var language = {
  57. defaultToken: "",
  58. tokenPostfix: ".sv",
  59. brackets: [
  60. { token: "delimiter.curly", open: "{", close: "}" },
  61. { token: "delimiter.parenthesis", open: "(", close: ")" },
  62. { token: "delimiter.square", open: "[", close: "]" },
  63. { token: "delimiter.angle", open: "<", close: ">" }
  64. ],
  65. keywords: [
  66. "accept_on",
  67. "alias",
  68. "always",
  69. "always_comb",
  70. "always_ff",
  71. "always_latch",
  72. "and",
  73. "assert",
  74. "assign",
  75. "assume",
  76. "automatic",
  77. "before",
  78. "begin",
  79. "bind",
  80. "bins",
  81. "binsof",
  82. "bit",
  83. "break",
  84. "buf",
  85. "bufif0",
  86. "bufif1",
  87. "byte",
  88. "case",
  89. "casex",
  90. "casez",
  91. "cell",
  92. "chandle",
  93. "checker",
  94. "class",
  95. "clocking",
  96. "cmos",
  97. "config",
  98. "const",
  99. "constraint",
  100. "context",
  101. "continue",
  102. "cover",
  103. "covergroup",
  104. "coverpoint",
  105. "cross",
  106. "deassign",
  107. "default",
  108. "defparam",
  109. "design",
  110. "disable",
  111. "dist",
  112. "do",
  113. "edge",
  114. "else",
  115. "end",
  116. "endcase",
  117. "endchecker",
  118. "endclass",
  119. "endclocking",
  120. "endconfig",
  121. "endfunction",
  122. "endgenerate",
  123. "endgroup",
  124. "endinterface",
  125. "endmodule",
  126. "endpackage",
  127. "endprimitive",
  128. "endprogram",
  129. "endproperty",
  130. "endspecify",
  131. "endsequence",
  132. "endtable",
  133. "endtask",
  134. "enum",
  135. "event",
  136. "eventually",
  137. "expect",
  138. "export",
  139. "extends",
  140. "extern",
  141. "final",
  142. "first_match",
  143. "for",
  144. "force",
  145. "foreach",
  146. "forever",
  147. "fork",
  148. "forkjoin",
  149. "function",
  150. "generate",
  151. "genvar",
  152. "global",
  153. "highz0",
  154. "highz1",
  155. "if",
  156. "iff",
  157. "ifnone",
  158. "ignore_bins",
  159. "illegal_bins",
  160. "implements",
  161. "implies",
  162. "import",
  163. "incdir",
  164. "include",
  165. "initial",
  166. "inout",
  167. "input",
  168. "inside",
  169. "instance",
  170. "int",
  171. "integer",
  172. "interconnect",
  173. "interface",
  174. "intersect",
  175. "join",
  176. "join_any",
  177. "join_none",
  178. "large",
  179. "let",
  180. "liblist",
  181. "library",
  182. "local",
  183. "localparam",
  184. "logic",
  185. "longint",
  186. "macromodule",
  187. "matches",
  188. "medium",
  189. "modport",
  190. "module",
  191. "nand",
  192. "negedge",
  193. "nettype",
  194. "new",
  195. "nexttime",
  196. "nmos",
  197. "nor",
  198. "noshowcancelled",
  199. "not",
  200. "notif0",
  201. "notif1",
  202. "null",
  203. "or",
  204. "output",
  205. "package",
  206. "packed",
  207. "parameter",
  208. "pmos",
  209. "posedge",
  210. "primitive",
  211. "priority",
  212. "program",
  213. "property",
  214. "protected",
  215. "pull0",
  216. "pull1",
  217. "pulldown",
  218. "pullup",
  219. "pulsestyle_ondetect",
  220. "pulsestyle_onevent",
  221. "pure",
  222. "rand",
  223. "randc",
  224. "randcase",
  225. "randsequence",
  226. "rcmos",
  227. "real",
  228. "realtime",
  229. "ref",
  230. "reg",
  231. "reject_on",
  232. "release",
  233. "repeat",
  234. "restrict",
  235. "return",
  236. "rnmos",
  237. "rpmos",
  238. "rtran",
  239. "rtranif0",
  240. "rtranif1",
  241. "s_always",
  242. "s_eventually",
  243. "s_nexttime",
  244. "s_until",
  245. "s_until_with",
  246. "scalared",
  247. "sequence",
  248. "shortint",
  249. "shortreal",
  250. "showcancelled",
  251. "signed",
  252. "small",
  253. "soft",
  254. "solve",
  255. "specify",
  256. "specparam",
  257. "static",
  258. "string",
  259. "strong",
  260. "strong0",
  261. "strong1",
  262. "struct",
  263. "super",
  264. "supply0",
  265. "supply1",
  266. "sync_accept_on",
  267. "sync_reject_on",
  268. "table",
  269. "tagged",
  270. "task",
  271. "this",
  272. "throughout",
  273. "time",
  274. "timeprecision",
  275. "timeunit",
  276. "tran",
  277. "tranif0",
  278. "tranif1",
  279. "tri",
  280. "tri0",
  281. "tri1",
  282. "triand",
  283. "trior",
  284. "trireg",
  285. "type",
  286. "typedef",
  287. "union",
  288. "unique",
  289. "unique0",
  290. "unsigned",
  291. "until",
  292. "until_with",
  293. "untyped",
  294. "use",
  295. "uwire",
  296. "var",
  297. "vectored",
  298. "virtual",
  299. "void",
  300. "wait",
  301. "wait_order",
  302. "wand",
  303. "weak",
  304. "weak0",
  305. "weak1",
  306. "while",
  307. "wildcard",
  308. "wire",
  309. "with",
  310. "within",
  311. "wor",
  312. "xnor",
  313. "xor"
  314. ],
  315. builtin_gates: [
  316. "and",
  317. "nand",
  318. "nor",
  319. "or",
  320. "xor",
  321. "xnor",
  322. "buf",
  323. "not",
  324. "bufif0",
  325. "bufif1",
  326. "notif1",
  327. "notif0",
  328. "cmos",
  329. "nmos",
  330. "pmos",
  331. "rcmos",
  332. "rnmos",
  333. "rpmos",
  334. "tran",
  335. "tranif1",
  336. "tranif0",
  337. "rtran",
  338. "rtranif1",
  339. "rtranif0"
  340. ],
  341. operators: [
  342. "=",
  343. "+=",
  344. "-=",
  345. "*=",
  346. "/=",
  347. "%=",
  348. "&=",
  349. "|=",
  350. "^=",
  351. "<<=",
  352. ">>+",
  353. "<<<=",
  354. ">>>=",
  355. "?",
  356. ":",
  357. "+",
  358. "-",
  359. "!",
  360. "~",
  361. "&",
  362. "~&",
  363. "|",
  364. "~|",
  365. "^",
  366. "~^",
  367. "^~",
  368. "+",
  369. "-",
  370. "*",
  371. "/",
  372. "%",
  373. "==",
  374. "!=",
  375. "===",
  376. "!==",
  377. "==?",
  378. "!=?",
  379. "&&",
  380. "||",
  381. "**",
  382. "<",
  383. "<=",
  384. ">",
  385. ">=",
  386. "&",
  387. "|",
  388. "^",
  389. ">>",
  390. "<<",
  391. ">>>",
  392. "<<<",
  393. "++",
  394. "--",
  395. "->",
  396. "<->",
  397. "inside",
  398. "dist",
  399. "::",
  400. "+:",
  401. "-:",
  402. "*>",
  403. "&&&",
  404. "|->",
  405. "|=>",
  406. "#=#"
  407. ],
  408. symbols: /[=><!~?:&|+\-*\/\^%#]+/,
  409. escapes: /%%|\\(?:[antvf\\"']|x[0-9A-Fa-f]{1,2}|[0-7]{1,3})/,
  410. identifier: /(?:[a-zA-Z_][a-zA-Z0-9_$\.]*|\\\S+ )/,
  411. systemcall: /[$][a-zA-Z0-9_]+/,
  412. timeunits: /s|ms|us|ns|ps|fs/,
  413. tokenizer: {
  414. root: [
  415. [
  416. /^(\s*)(@identifier)/,
  417. [
  418. "",
  419. {
  420. cases: {
  421. "@builtin_gates": {
  422. token: "keyword.$2",
  423. next: "@module_instance"
  424. },
  425. table: {
  426. token: "keyword.$2",
  427. next: "@table"
  428. },
  429. "@keywords": { token: "keyword.$2" },
  430. "@default": {
  431. token: "identifier",
  432. next: "@module_instance"
  433. }
  434. }
  435. }
  436. ]
  437. ],
  438. [/^\s*`include/, { token: "keyword.directive.include", next: "@include" }],
  439. [/^\s*`\s*\w+/, "keyword"],
  440. { include: "@identifier_or_keyword" },
  441. { include: "@whitespace" },
  442. [/\(\*.*\*\)/, "annotation"],
  443. [/@systemcall/, "variable.predefined"],
  444. [/[{}()\[\]]/, "@brackets"],
  445. [/[<>](?!@symbols)/, "@brackets"],
  446. [
  447. /@symbols/,
  448. {
  449. cases: {
  450. "@operators": "delimiter",
  451. "@default": ""
  452. }
  453. }
  454. ],
  455. { include: "@numbers" },
  456. [/[;,.]/, "delimiter"],
  457. { include: "@strings" }
  458. ],
  459. identifier_or_keyword: [
  460. [
  461. /@identifier/,
  462. {
  463. cases: {
  464. "@keywords": { token: "keyword.$0" },
  465. "@default": "identifier"
  466. }
  467. }
  468. ]
  469. ],
  470. numbers: [
  471. [/\d+?[\d_]*(?:\.[\d_]+)?[eE][\-+]?\d+/, "number.float"],
  472. [/\d+?[\d_]*\.[\d_]+(?:\s*@timeunits)?/, "number.float"],
  473. [/(?:\d+?[\d_]*\s*)?'[sS]?[dD]\s*[0-9xXzZ?]+?[0-9xXzZ?_]*/, "number"],
  474. [/(?:\d+?[\d_]*\s*)?'[sS]?[bB]\s*[0-1xXzZ?]+?[0-1xXzZ?_]*/, "number.binary"],
  475. [/(?:\d+?[\d_]*\s*)?'[sS]?[oO]\s*[0-7xXzZ?]+?[0-7xXzZ?_]*/, "number.octal"],
  476. [/(?:\d+?[\d_]*\s*)?'[sS]?[hH]\s*[0-9a-fA-FxXzZ?]+?[0-9a-fA-FxXzZ?_]*/, "number.hex"],
  477. [/1step/, "number"],
  478. [/[\dxXzZ]+?[\dxXzZ_]*(?:\s*@timeunits)?/, "number"],
  479. [/'[01xXzZ]+/, "number"]
  480. ],
  481. module_instance: [
  482. { include: "@whitespace" },
  483. [/(#?)(\()/, ["", { token: "@brackets", next: "@port_connection" }]],
  484. [/@identifier\s*[;={}\[\],]/, { token: "@rematch", next: "@pop" }],
  485. [/@symbols|[;={}\[\],]/, { token: "@rematch", next: "@pop" }],
  486. [/@identifier/, "type"],
  487. [/;/, "delimiter", "@pop"]
  488. ],
  489. port_connection: [
  490. { include: "@identifier_or_keyword" },
  491. { include: "@whitespace" },
  492. [/@systemcall/, "variable.predefined"],
  493. { include: "@numbers" },
  494. { include: "@strings" },
  495. [/[,]/, "delimiter"],
  496. [/\(/, "@brackets", "@port_connection"],
  497. [/\)/, "@brackets", "@pop"]
  498. ],
  499. whitespace: [
  500. [/[ \t\r\n]+/, ""],
  501. [/\/\*/, "comment", "@comment"],
  502. [/\/\/.*$/, "comment"]
  503. ],
  504. comment: [
  505. [/[^\/*]+/, "comment"],
  506. [/\*\//, "comment", "@pop"],
  507. [/[\/*]/, "comment"]
  508. ],
  509. strings: [
  510. [/"([^"\\]|\\.)*$/, "string.invalid"],
  511. [/"/, "string", "@string"]
  512. ],
  513. string: [
  514. [/[^\\"]+/, "string"],
  515. [/@escapes/, "string.escape"],
  516. [/\\./, "string.escape.invalid"],
  517. [/"/, "string", "@pop"]
  518. ],
  519. include: [
  520. [
  521. /(\s*)(")([\w*\/*]*)(.\w*)(")/,
  522. [
  523. "",
  524. "string.include.identifier",
  525. "string.include.identifier",
  526. "string.include.identifier",
  527. { token: "string.include.identifier", next: "@pop" }
  528. ]
  529. ],
  530. [
  531. /(\s*)(<)([\w*\/*]*)(.\w*)(>)/,
  532. [
  533. "",
  534. "string.include.identifier",
  535. "string.include.identifier",
  536. "string.include.identifier",
  537. { token: "string.include.identifier", next: "@pop" }
  538. ]
  539. ]
  540. ],
  541. table: [
  542. { include: "@whitespace" },
  543. [/[()]/, "@brackets"],
  544. [/[:;]/, "delimiter"],
  545. [/[01\-*?xXbBrRfFpPnN]/, "variable.predefined"],
  546. ["endtable", "keyword.endtable", "@pop"]
  547. ]
  548. }
  549. };
  550. export {
  551. conf,
  552. language
  553. };
  554. /*! Bundled license information:
  555. monaco-editor/esm/vs/basic-languages/systemverilog/systemverilog.js:
  556. (*!-----------------------------------------------------------------------------
  557. * Copyright (c) Microsoft Corporation. All rights reserved.
  558. * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
  559. * Released under the MIT license
  560. * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
  561. *-----------------------------------------------------------------------------*)
  562. */
  563. //# sourceMappingURL=systemverilog-O2EXZ7SR.js.map