mirror of
https://github.com/ralsina/tartrazine.git
synced 2024-11-10 13:32:24 +00:00
159 lines
3.2 KiB
Plaintext
159 lines
3.2 KiB
Plaintext
|
# 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
|