summaryrefslogtreecommitdiff
path: root/tests/lexers/capdl
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/capdl
parentf0445be718da83541ea3401aad882f3937147263 (diff)
downloadpygments-git-examplefiles.tar.gz
Move test_examplefiles to new tests/lexers scheme.examplefiles
Diffstat (limited to 'tests/lexers/capdl')
-rw-r--r--tests/lexers/capdl/example.txt375
1 files changed, 375 insertions, 0 deletions
diff --git a/tests/lexers/capdl/example.txt b/tests/lexers/capdl/example.txt
new file mode 100644
index 00000000..9f5b33aa
--- /dev/null
+++ b/tests/lexers/capdl/example.txt
@@ -0,0 +1,375 @@
+---input---
+#ifdef ARCH_ARM
+arch arm11
+#else
+arch ia32
+#endif
+
+objects {
+ my_ep = ep /* A synchronous endpoint */
+
+ /* Two thread control blocks */
+ tcb1 = tcb
+ tcb2 = tcb
+
+ /* Four frames of physical memory */
+ frame1 = frame (4k)
+ frame2 = frame (4k)
+ frame3 = frame (4k)
+ frame4 = frame (4k)
+
+ /* Two page tables */
+ pt1 = pt
+ pt2 = pt
+
+ /* Two page directories */
+ pd1 = pd
+ pd2 = pd
+
+ /* Two capability nodes */
+ cnode1 = cnode (2 bits)
+ cnode2 = cnode (3 bits)
+}
+caps {
+ cnode1 {
+ 0x1: frame1 (RW) /* read/write */
+ 0x2: my_ep (R) /* read-only */
+ }
+ cnode2 {
+ 0x1: my_ep (W) /* write-only */
+ }
+ tcb1 {
+ vspace: pd1
+ ipc_buffer_slot: frame1
+ cspace: cnode1
+ }
+ pd1 {
+ 0x10: pt1
+ }
+ pt1 {
+ 0x8: frame1 (RW)
+ 0x9: frame2 (R)
+ }
+ tcb2 {
+ vspace: pd2
+ ipc_buffer_slot: frame3
+ cspace: cnode2
+ }
+ pd2 {
+ 0x10: pt2
+ }
+ pt2 {
+ 0x10: frame3 (RW)
+ 0x12: frame4 (R)
+ }
+}
+
+---tokens---
+'#ifdef ARCH_ARM\n' Comment.Preproc
+
+'arch' Keyword
+' ' Text
+'arm11' Keyword
+'\n' Text
+
+'#else\n' Comment.Preproc
+
+'arch' Keyword
+' ' Text
+'ia32' Keyword
+'\n' Text
+
+'#endif\n' Comment.Preproc
+
+'\n' Text
+
+'objects' Keyword
+' ' Text
+'{' Punctuation
+'\n ' Text
+'my_ep' Name
+' ' Text
+'=' Punctuation
+' ' Text
+'ep' Keyword.Type
+' ' Text
+'/* A synchronous endpoint */' Comment
+'\n\n ' Text
+'/* Two thread control blocks */' Comment
+'\n ' Text
+'tcb1' Name
+' ' Text
+'=' Punctuation
+' ' Text
+'tcb' Keyword.Type
+'\n ' Text
+'tcb2' Name
+' ' Text
+'=' Punctuation
+' ' Text
+'tcb' Keyword.Type
+'\n\n ' Text
+'/* Four frames of physical memory */' Comment
+'\n ' Text
+'frame1' Name
+' ' Text
+'=' Punctuation
+' ' Text
+'frame' Keyword.Type
+' ' Text
+'(' Punctuation
+'4k' Literal.Number
+')' Punctuation
+'\n ' Text
+'frame2' Name
+' ' Text
+'=' Punctuation
+' ' Text
+'frame' Keyword.Type
+' ' Text
+'(' Punctuation
+'4k' Literal.Number
+')' Punctuation
+'\n ' Text
+'frame3' Name
+' ' Text
+'=' Punctuation
+' ' Text
+'frame' Keyword.Type
+' ' Text
+'(' Punctuation
+'4k' Literal.Number
+')' Punctuation
+'\n ' Text
+'frame4' Name
+' ' Text
+'=' Punctuation
+' ' Text
+'frame' Keyword.Type
+' ' Text
+'(' Punctuation
+'4k' Literal.Number
+')' Punctuation
+'\n\n ' Text
+'/* Two page tables */' Comment
+'\n ' Text
+'pt1' Name
+' ' Text
+'=' Punctuation
+' ' Text
+'pt' Keyword.Type
+'\n ' Text
+'pt2' Name
+' ' Text
+'=' Punctuation
+' ' Text
+'pt' Keyword.Type
+'\n\n ' Text
+'/* Two page directories */' Comment
+'\n ' Text
+'pd1' Name
+' ' Text
+'=' Punctuation
+' ' Text
+'pd' Keyword.Type
+'\n ' Text
+'pd2' Name
+' ' Text
+'=' Punctuation
+' ' Text
+'pd' Keyword.Type
+'\n\n ' Text
+'/* Two capability nodes */' Comment
+'\n ' Text
+'cnode1' Name
+' ' Text
+'=' Punctuation
+' ' Text
+'cnode' Keyword.Type
+' ' Text
+'(' Punctuation
+'2' Literal.Number
+' ' Text
+'bits' Literal.Number
+')' Punctuation
+'\n ' Text
+'cnode2' Name
+' ' Text
+'=' Punctuation
+' ' Text
+'cnode' Keyword.Type
+' ' Text
+'(' Punctuation
+'3' Literal.Number
+' ' Text
+'bits' Literal.Number
+')' Punctuation
+'\n' Text
+
+'}' Punctuation
+'\n' Text
+
+'caps' Keyword
+' ' Text
+'{' Punctuation
+'\n ' Text
+'cnode1' Name
+' ' Text
+'{' Punctuation
+'\n ' Text
+'0x1' Literal.Number.Hex
+':' Punctuation
+' ' Text
+'frame1' Name
+' ' Text
+'(' Punctuation
+'RW' Keyword.Reserved
+')' Punctuation
+' ' Text
+'/* read/write */' Comment
+'\n ' Text
+'0x2' Literal.Number.Hex
+':' Punctuation
+' ' Text
+'my_ep' Name
+' ' Text
+'(' Punctuation
+'R' Keyword.Reserved
+')' Punctuation
+' ' Text
+'/* read-only */' Comment
+'\n ' Text
+'}' Punctuation
+'\n ' Text
+'cnode2' Name
+' ' Text
+'{' Punctuation
+'\n ' Text
+'0x1' Literal.Number.Hex
+':' Punctuation
+' ' Text
+'my_ep' Name
+' ' Text
+'(' Punctuation
+'W' Keyword.Reserved
+')' Punctuation
+' ' Text
+'/* write-only */' Comment
+'\n ' Text
+'}' Punctuation
+'\n ' Text
+'tcb1' Name
+' ' Text
+'{' Punctuation
+'\n ' Text
+'vspace' Literal.Number
+':' Punctuation
+' ' Text
+'pd1' Name
+'\n ' Text
+'ipc_buffer_slot' Literal.Number
+':' Punctuation
+' ' Text
+'frame1' Name
+'\n ' Text
+'cspace' Literal.Number
+':' Punctuation
+' ' Text
+'cnode1' Name
+'\n ' Text
+'}' Punctuation
+'\n ' Text
+'pd1' Name
+' ' Text
+'{' Punctuation
+'\n ' Text
+'0x10' Literal.Number.Hex
+':' Punctuation
+' ' Text
+'pt1' Name
+'\n ' Text
+'}' Punctuation
+'\n ' Text
+'pt1' Name
+' ' Text
+'{' Punctuation
+'\n ' Text
+'0x8' Literal.Number.Hex
+':' Punctuation
+' ' Text
+'frame1' Name
+' ' Text
+'(' Punctuation
+'RW' Keyword.Reserved
+')' Punctuation
+'\n ' Text
+'0x9' Literal.Number.Hex
+':' Punctuation
+' ' Text
+'frame2' Name
+' ' Text
+'(' Punctuation
+'R' Keyword.Reserved
+')' Punctuation
+'\n ' Text
+'}' Punctuation
+'\n ' Text
+'tcb2' Name
+' ' Text
+'{' Punctuation
+'\n ' Text
+'vspace' Literal.Number
+':' Punctuation
+' ' Text
+'pd2' Name
+'\n ' Text
+'ipc_buffer_slot' Literal.Number
+':' Punctuation
+' ' Text
+'frame3' Name
+'\n ' Text
+'cspace' Literal.Number
+':' Punctuation
+' ' Text
+'cnode2' Name
+'\n ' Text
+'}' Punctuation
+'\n ' Text
+'pd2' Name
+' ' Text
+'{' Punctuation
+'\n ' Text
+'0x10' Literal.Number.Hex
+':' Punctuation
+' ' Text
+'pt2' Name
+'\n ' Text
+'}' Punctuation
+'\n ' Text
+'pt2' Name
+' ' Text
+'{' Punctuation
+'\n ' Text
+'0x10' Literal.Number.Hex
+':' Punctuation
+' ' Text
+'frame3' Name
+' ' Text
+'(' Punctuation
+'RW' Keyword.Reserved
+')' Punctuation
+'\n ' Text
+'0x12' Literal.Number.Hex
+':' Punctuation
+' ' Text
+'frame4' Name
+' ' Text
+'(' Punctuation
+'R' Keyword.Reserved
+')' Punctuation
+'\n ' Text
+'}' Punctuation
+'\n' Text
+
+'}' Punctuation
+'\n' Text