blob: d7e4511632c16c6e942a60481ef622cbb2145522 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
|
# Believe it or not, SystemVerilog supports spaces before and after the base
# specifier (ie 'b, 'd, 'h). See IEEE 1800-2017 Section 5.7.1 for examples.
---input---
8'b10101010
8 'b10101010
8'b 10101010
8'sb10101010
8'Sb10101010
8'B10101010
8'b1010_1010
8'b10xXzZ?10
24'o01234567
24 'o01234567
24'o 01234567
24'so01234567
24'So01234567
24'O01234567
24'o0123_4567
24'o01xXzZ?7
32'd27182818
32 'd27182818
32'd 27182818
32'sd27182818
32'Sd27182818
32'D27182818
32'd2718_2818
32'd27xXzZ?8
32'hdeadbeef
32 'hdeadbeef
32'h deadbeef
32'shdeadbeef
32'Shdeadbeef
32'Hdeadbeef
32'hdead_beef
32'hdexXzZ?f
'0 '1 'x 'X 'z 'Z
42 1234_5678
---tokens---
"8'b10101010" Literal.Number.Bin
'\n' Text.Whitespace
"8 'b10101010" Literal.Number.Bin
'\n' Text.Whitespace
"8'b 10101010" Literal.Number.Bin
'\n' Text.Whitespace
"8'sb10101010" Literal.Number.Bin
'\n' Text.Whitespace
"8'Sb10101010" Literal.Number.Bin
'\n' Text.Whitespace
"8'B10101010" Literal.Number.Bin
'\n' Text.Whitespace
"8'b1010_1010" Literal.Number.Bin
'\n' Text.Whitespace
"8'b10xXzZ?10" Literal.Number.Bin
'\n\n' Text.Whitespace
"24'o01234567" Literal.Number.Oct
'\n' Text.Whitespace
"24 'o01234567" Literal.Number.Oct
'\n' Text.Whitespace
"24'o 01234567" Literal.Number.Oct
'\n' Text.Whitespace
"24'so01234567" Literal.Number.Oct
'\n' Text.Whitespace
"24'So01234567" Literal.Number.Oct
'\n' Text.Whitespace
"24'O01234567" Literal.Number.Oct
'\n' Text.Whitespace
"24'o0123_4567" Literal.Number.Oct
'\n' Text.Whitespace
"24'o01xXzZ?7" Literal.Number.Oct
'\n\n' Text.Whitespace
"32'd27182818" Literal.Number.Integer
'\n' Text.Whitespace
"32 'd27182818" Literal.Number.Integer
'\n' Text.Whitespace
"32'd 27182818" Literal.Number.Integer
'\n' Text.Whitespace
"32'sd27182818" Literal.Number.Integer
'\n' Text.Whitespace
"32'Sd27182818" Literal.Number.Integer
'\n' Text.Whitespace
"32'D27182818" Literal.Number.Integer
'\n' Text.Whitespace
"32'd2718_2818" Literal.Number.Integer
'\n' Text.Whitespace
"32'd27xXzZ?8" Literal.Number.Integer
'\n\n' Text.Whitespace
"32'hdeadbeef" Literal.Number.Hex
'\n' Text.Whitespace
"32 'hdeadbeef" Literal.Number.Hex
'\n' Text.Whitespace
"32'h deadbeef" Literal.Number.Hex
'\n' Text.Whitespace
"32'shdeadbeef" Literal.Number.Hex
'\n' Text.Whitespace
"32'Shdeadbeef" Literal.Number.Hex
'\n' Text.Whitespace
"32'Hdeadbeef" Literal.Number.Hex
'\n' Text.Whitespace
"32'hdead_beef" Literal.Number.Hex
'\n' Text.Whitespace
"32'hdexXzZ?f" Literal.Number.Hex
'\n\n' Text.Whitespace
"'0" Literal.Number
' ' Text.Whitespace
"'1" Literal.Number
' ' Text.Whitespace
"'x" Literal.Number
' ' Text.Whitespace
"'X" Literal.Number
' ' Text.Whitespace
"'z" Literal.Number
' ' Text.Whitespace
"'Z" Literal.Number
'\n\n' Text.Whitespace
'42' Literal.Number.Integer
' ' Text.Whitespace
'1234_5678' Literal.Number.Integer
'\n' Text.Whitespace
|