summaryrefslogtreecommitdiff
path: root/tests/lexers/prolog/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/prolog/example.txt
parentf0445be718da83541ea3401aad882f3937147263 (diff)
downloadpygments-git-examplefiles.tar.gz
Move test_examplefiles to new tests/lexers scheme.examplefiles
Diffstat (limited to 'tests/lexers/prolog/example.txt')
-rw-r--r--tests/lexers/prolog/example.txt181
1 files changed, 181 insertions, 0 deletions
diff --git a/tests/lexers/prolog/example.txt b/tests/lexers/prolog/example.txt
new file mode 100644
index 00000000..13e2cb1f
--- /dev/null
+++ b/tests/lexers/prolog/example.txt
@@ -0,0 +1,181 @@
+---input---
+partition([], _, [], []).
+partition([X|Xs], Pivot, Smalls, Bigs) :-
+ ( X @< Pivot ->
+ Smalls = [X|Rest],
+ partition(Xs, Pivot, Rest, Bigs)
+ ; Bigs = [X|Rest],
+ partition(Xs, Pivot, Smalls, Rest)
+ ).
+
+quicksort([]) --> [].
+quicksort([X|Xs]) -->
+ { partition(Xs, X, Smaller, Bigger) },
+ quicksort(Smaller), [X], quicksort(Bigger).
+
+---tokens---
+'partition' Name.Function
+'(' Punctuation
+'[' Punctuation
+']' Punctuation
+',' Punctuation
+' ' Text
+'_' Keyword
+',' Punctuation
+' ' Text
+'[' Punctuation
+']' Punctuation
+',' Punctuation
+' ' Text
+'[' Punctuation
+']' Punctuation
+')' Punctuation
+'.' Punctuation
+'\n' Text
+
+'partition' Name.Function
+'(' Punctuation
+'[' Punctuation
+'X' Name.Variable
+'|' Punctuation
+'Xs' Name.Variable
+']' Punctuation
+',' Punctuation
+' ' Text
+'Pivot' Name.Variable
+',' Punctuation
+' ' Text
+'Smalls' Name.Variable
+',' Punctuation
+' ' Text
+'Bigs' Name.Variable
+')' Punctuation
+' ' Text
+':-' Punctuation
+'\n ' Text
+'(' Punctuation
+' ' Text
+'X' Name.Variable
+' ' Text
+'@<' Literal.String.Atom
+' ' Text
+'Pivot' Name.Variable
+' ' Text
+'->' Literal.String.Atom
+'\n ' Text
+'Smalls' Name.Variable
+' ' Text
+'=' Operator
+' ' Text
+'[' Punctuation
+'X' Name.Variable
+'|' Punctuation
+'Rest' Name.Variable
+']' Punctuation
+',' Punctuation
+'\n ' Text
+'partition' Name.Function
+'(' Punctuation
+'Xs' Name.Variable
+',' Punctuation
+' ' Text
+'Pivot' Name.Variable
+',' Punctuation
+' ' Text
+'Rest' Name.Variable
+',' Punctuation
+' ' Text
+'Bigs' Name.Variable
+')' Punctuation
+'\n ' Text
+';' Punctuation
+' ' Text
+'Bigs' Name.Variable
+' ' Text
+'=' Operator
+' ' Text
+'[' Punctuation
+'X' Name.Variable
+'|' Punctuation
+'Rest' Name.Variable
+']' Punctuation
+',' Punctuation
+'\n ' Text
+'partition' Name.Function
+'(' Punctuation
+'Xs' Name.Variable
+',' Punctuation
+' ' Text
+'Pivot' Name.Variable
+',' Punctuation
+' ' Text
+'Smalls' Name.Variable
+',' Punctuation
+' ' Text
+'Rest' Name.Variable
+')' Punctuation
+'\n ' Text
+')' Punctuation
+'.' Punctuation
+'\n\n' Text
+
+'quicksort' Name.Function
+'(' Punctuation
+'[' Punctuation
+']' Punctuation
+')' Punctuation
+' ' Text
+'-->' Punctuation
+' ' Text
+'[' Punctuation
+']' Punctuation
+'.' Punctuation
+'\n' Text
+
+'quicksort' Name.Function
+'(' Punctuation
+'[' Punctuation
+'X' Name.Variable
+'|' Punctuation
+'Xs' Name.Variable
+']' Punctuation
+')' Punctuation
+' ' Text
+'-->' Punctuation
+' \n ' Text
+'{' Punctuation
+' ' Text
+'partition' Name.Function
+'(' Punctuation
+'Xs' Name.Variable
+',' Punctuation
+' ' Text
+'X' Name.Variable
+',' Punctuation
+' ' Text
+'Smaller' Name.Variable
+',' Punctuation
+' ' Text
+'Bigger' Name.Variable
+')' Punctuation
+' ' Text
+'}' Punctuation
+',' Punctuation
+'\n ' Text
+'quicksort' Name.Function
+'(' Punctuation
+'Smaller' Name.Variable
+')' Punctuation
+',' Punctuation
+' ' Text
+'[' Punctuation
+'X' Name.Variable
+']' Punctuation
+',' Punctuation
+' ' Text
+'quicksort' Name.Function
+'(' Punctuation
+'Bigger' Name.Variable
+')' Punctuation
+'.' Punctuation
+'\n' Text