summaryrefslogtreecommitdiff
path: root/tests/lexers/systemverilog/example.txt
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2021-01-18 21:24:00 +0100
committerGeorg Brandl <georg@python.org>2021-01-18 22:08:36 +0100
commit2a3d3a7d5b9c60dedf6638d876161d9563faebcf (patch)
tree809c0b4a686db98f5954afa1944404cd9652c6b2 /tests/lexers/systemverilog/example.txt
parentf0445be718da83541ea3401aad882f3937147263 (diff)
downloadpygments-git-examplefiles.tar.gz
Move test_examplefiles to new tests/lexers scheme.examplefiles
Diffstat (limited to 'tests/lexers/systemverilog/example.txt')
-rw-r--r--tests/lexers/systemverilog/example.txt149
1 files changed, 149 insertions, 0 deletions
diff --git a/tests/lexers/systemverilog/example.txt b/tests/lexers/systemverilog/example.txt
new file mode 100644
index 00000000..9390d179
--- /dev/null
+++ b/tests/lexers/systemverilog/example.txt
@@ -0,0 +1,149 @@
+---input---
+module toplevel(clock,reset);
+ input clock;
+ input reset;
+
+ reg flop1;
+ reg flop2;
+
+ always @ (posedge reset or posedge clock)
+ if (reset)
+ begin
+ flop1 <= 0;
+ flop2 <= 1;
+ end
+ else
+ begin
+ flop1 <= flop2;
+ flop2 <= flop1;
+ end
+endmodule
+
+---tokens---
+'module' Keyword
+' ' Text
+'toplevel' Name
+'(' Punctuation
+'clock' Name
+',' Punctuation
+'reset' Name
+')' Punctuation
+';' Punctuation
+'\n' Text
+
+' ' Text
+'input' Keyword
+' ' Text
+'clock' Name
+';' Punctuation
+'\n' Text
+
+' ' Text
+'input' Keyword
+' ' Text
+'reset' Name
+';' Punctuation
+'\n' Text
+
+' \n ' Text
+'reg' Keyword.Type
+' ' Text
+'flop1' Name
+';' Punctuation
+'\n' Text
+
+' ' Text
+'reg' Keyword.Type
+' ' Text
+'flop2' Name
+';' Punctuation
+'\n' Text
+
+' \n ' Text
+'always' Keyword
+' ' Text
+'@' Punctuation
+' ' Text
+'(' Punctuation
+'posedge' Keyword
+' ' Text
+'reset' Name
+' ' Text
+'or' Keyword
+' ' Text
+'posedge' Keyword
+' ' Text
+'clock' Name
+')' Punctuation
+'\n' Text
+
+' ' Text
+'if' Keyword
+' ' Text
+'(' Punctuation
+'reset' Name
+')' Punctuation
+'\n' Text
+
+' ' Text
+'begin' Keyword
+'\n' Text
+
+' ' Text
+'flop1' Name
+' ' Text
+'<' Operator
+'=' Operator
+' ' Text
+'0' Literal.Number.Integer
+';' Punctuation
+'\n' Text
+
+' ' Text
+'flop2' Name
+' ' Text
+'<' Operator
+'=' Operator
+' ' Text
+'1' Literal.Number.Integer
+';' Punctuation
+'\n' Text
+
+' ' Text
+'end' Keyword
+'\n' Text
+
+' ' Text
+'else' Keyword
+'\n' Text
+
+' ' Text
+'begin' Keyword
+'\n' Text
+
+' ' Text
+'flop1' Name
+' ' Text
+'<' Operator
+'=' Operator
+' ' Text
+'flop2' Name
+';' Punctuation
+'\n' Text
+
+' ' Text
+'flop2' Name
+' ' Text
+'<' Operator
+'=' Operator
+' ' Text
+'flop1' Name
+';' Punctuation
+'\n' Text
+
+' ' Text
+'end' Keyword
+'\n' Text
+
+'endmodule' Keyword
+'\n' Text