summaryrefslogtreecommitdiffstats
path: root/tests/snippets/systemverilog/test_numbers.txt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 11:33:32 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 11:33:32 +0000
commit1f403ad2197fc7442409f434ee574f3e6b46fb73 (patch)
tree0299c6dd11d5edfa918a29b6456bc1875f1d288c /tests/snippets/systemverilog/test_numbers.txt
parentInitial commit. (diff)
downloadpygments-1f403ad2197fc7442409f434ee574f3e6b46fb73.tar.xz
pygments-1f403ad2197fc7442409f434ee574f3e6b46fb73.zip
Adding upstream version 2.14.0+dfsg.upstream/2.14.0+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/snippets/systemverilog/test_numbers.txt')
-rw-r--r--tests/snippets/systemverilog/test_numbers.txt158
1 files changed, 158 insertions, 0 deletions
diff --git a/tests/snippets/systemverilog/test_numbers.txt b/tests/snippets/systemverilog/test_numbers.txt
new file mode 100644
index 0000000..d7e4511
--- /dev/null
+++ b/tests/snippets/systemverilog/test_numbers.txt
@@ -0,0 +1,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