Skip to content

Commit 19d0d49

Browse files
committed
Add support for repeats.
1 parent 34cc183 commit 19d0d49

File tree

3 files changed

+16
-41
lines changed

3 files changed

+16
-41
lines changed

examples/memory.uir

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,10 @@
33
%2:32 = input "wdata"
44
%3:5 = input "raddr"
55
%4:1 = input "ren"
6-
%5:32 = memory depth=#32 width=#32 {
7-
init 00000000000000000000000000000000
8-
init 00000000000000000000000000000000
9-
init 00000000000000000000000000000000
10-
init 00000000000000000000000000000000
11-
init 00000000000000000000000000000000
12-
init 00000000000000000000000000000000
13-
init 00000000000000000000000000000000
14-
init 00000000000000000000000000000000
15-
init 00000000000000000000000000000000
16-
init 00000000000000000000000000000000
17-
init 00000000000000000000000000000000
18-
init 00000000000000000000000000000000
19-
init 00000000000000000000000000000000
20-
init 00000000000000000000000000000000
21-
init 00000000000000000000000000000000
22-
init 00000000000000000000000000000000
23-
init 00000000000000000000000000000000
24-
init 00000000000000000000000000000000
25-
init 00000000000000000000000000000000
26-
init 00000000000000000000000000000000
27-
init 00000000000000000000000000000000
28-
init 00000000000000000000000000000000
29-
init 00000000000000000000000000000000
30-
init 00000000000000000000000000000000
31-
init 00000000000000000000000000000000
32-
init 00000000000000000000000000000000
33-
init 00000000000000000000000000000000
34-
init 00000000000000000000000000000000
35-
init 00000000000000000000000000000000
36-
init 00000000000000000000000000000000
37-
init 00000000000000000000000000000000
38-
init 00000000000000000000000000000000
6+
%5:_ = memory depth=#32 width=#32 {
7+
init 00000000000000000000000000000000*30
398
write addr=%1:5 data=%2:32 mask=11111111111111111111111111111111 clk=%0
40-
read addr=%3:5 width=#32 clk=%0 en=%4 [rdfirst]
9+
%5:32 = read addr=%3:5 clk=%0 en=%4 [rdfirst]
4110
}
4211
%6:32 = dff %5:32 clk=%0 init=00000000000000000000000000000000
4312
%7:0 = output "rdata" %6:32

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"author": "Catherine <[email protected]>",
77
"license": "BSD-0-Clause",
88
"homepage": "https://github.com/prjunnamed/",
9-
"version": "0.4.1",
9+
"version": "0.4.2",
1010
"repository": {
1111
"type": "git",
1212
"url": "https://github.com/prjunnamed/vscode-syntax.git"

syntaxes/prjunnamed.tmLanguage.json

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@
2727
"name": "constant.numeric.decimal.prjunnamed"
2828
},
2929
"ternary": {
30-
"match": "[01X]+",
31-
"name": "constant.numeric.binary.prjunnamed"
30+
"match": "([01X]+)(\\*([0-9]+))?",
31+
"captures": {
32+
"1": {"name": "constant.numeric.binary.prjunnamed"}
33+
}
3234
},
3335
"string-escape": {
3436
"match": "\\[0-9a-f]{2}",
@@ -55,12 +57,16 @@
5557
"patterns": [{"include": "#string-escape"}]
5658
},
5759
"cell-ref": {
58-
"match": "%\\d+(:\\d+)?(\\+\\d+)?",
59-
"name": "variable.other.prjunnamed"
60+
"match": "(%\\d+(:\\d+)?(\\+\\d+)?)(\\*([0-9]+))?",
61+
"captures": {
62+
"1": {"name": "variable.other.prjunnamed"}
63+
}
6064
},
6165
"cell-ref-new": {
62-
"match": "%_\\d+(:\\d+)?(\\+\\d+)?",
63-
"name": "markup.inserted.prjunnamed"
66+
"match": "(%_\\d+(:\\d+)?(\\+\\d+)?)(\\*([0-9]+))?",
67+
"captures": {
68+
"1": {"name": "markup.inserted.prjunnamed"}
69+
}
6470
},
6571
"memory-cell": {
6672
"begin": "memory",

0 commit comments

Comments
 (0)