Reorganize tests into a real spec suite

This commit is contained in:
2024-08-04 19:18:43 -03:00
parent 57c160173c
commit e7c2053222
693 changed files with 136 additions and 116 deletions

View File

@ -0,0 +1,147 @@
---input---
Certificate ::= SEQUENCE {
tbsCertificate TBSCertificate,
signatureAlgorithm AlgorithmIdentifier,
signatureValue BIT STRING }
TBSCertificate ::= SEQUENCE {
version [0] EXPLICIT Version DEFAULT v1,
serialNumber CertificateSerialNumber,
signature AlgorithmIdentifier,
issuer Name,
validity Validity,
subject Name,
subjectPublicKeyInfo SubjectPublicKeyInfo,
issuerUniqueID [1] IMPLICIT UniqueIdentifier OPTIONAL,
-- If present, version MUST be v2 or v3
subjectUniqueID [2] IMPLICIT UniqueIdentifier OPTIONAL,
-- If present, version MUST be v2 or v3
extensions [3] EXPLICIT Extensions OPTIONAL
-- If present, version MUST be v3
}
---tokens---
'Certificate' Name.Type
' ' Text.Whitespace
'::=' Operator
' ' Text.Whitespace
'SEQUENCE' Keyword.Declaration
' ' Text.Whitespace
'{' Punctuation
'\n ' Text.Whitespace
'tbsCertificate' Name.Variable
' ' Text.Whitespace
'TBSCertificate' Name.Type
',' Punctuation
'\n ' Text.Whitespace
'signatureAlgorithm' Name.Variable
' ' Text.Whitespace
'AlgorithmIdentifier' Name.Type
',' Punctuation
'\n ' Text.Whitespace
'signatureValue' Name.Variable
' ' Text.Whitespace
'BIT STRING' Keyword.Type
' ' Text.Whitespace
'}' Punctuation
'\n\n' Text.Whitespace
'TBSCertificate' Name.Type
' ' Text.Whitespace
'::=' Operator
' ' Text.Whitespace
'SEQUENCE' Keyword.Declaration
' ' Text.Whitespace
'{' Punctuation
'\n ' Text.Whitespace
'version' Name.Variable
' ' Text.Whitespace
'[' Punctuation
'0' Literal.Number.Integer
']' Punctuation
' ' Text.Whitespace
'EXPLICIT' Keyword
' ' Text.Whitespace
'Version' Name.Type
' ' Text.Whitespace
'DEFAULT' Keyword.Declaration
' ' Text.Whitespace
'v1' Name.Variable
',' Punctuation
'\n ' Text.Whitespace
'serialNumber' Name.Variable
' ' Text.Whitespace
'CertificateSerialNumber' Name.Type
',' Punctuation
'\n ' Text.Whitespace
'signature' Name.Variable
' ' Text.Whitespace
'AlgorithmIdentifier' Name.Type
',' Punctuation
'\n ' Text.Whitespace
'issuer' Name.Variable
' ' Text.Whitespace
'Name' Name.Type
',' Punctuation
'\n ' Text.Whitespace
'validity' Name.Variable
' ' Text.Whitespace
'Validity' Name.Type
',' Punctuation
'\n ' Text.Whitespace
'subject' Name.Variable
' ' Text.Whitespace
'Name' Name.Type
',' Punctuation
'\n ' Text.Whitespace
'subjectPublicKeyInfo' Name.Variable
' ' Text.Whitespace
'SubjectPublicKeyInfo' Name.Type
',' Punctuation
'\n ' Text.Whitespace
'issuerUniqueID' Name.Variable
' ' Text.Whitespace
'[' Punctuation
'1' Literal.Number.Integer
']' Punctuation
' ' Text.Whitespace
'IMPLICIT' Keyword
' ' Text.Whitespace
'UniqueIdentifier' Name.Type
' ' Text.Whitespace
'OPTIONAL' Keyword.Declaration
',' Punctuation
'\n ' Text.Whitespace
'-- If present, version MUST be v2 or v3' Comment.Single
'\n ' Text.Whitespace
'subjectUniqueID' Name.Variable
' ' Text.Whitespace
'[' Punctuation
'2' Literal.Number.Integer
']' Punctuation
' ' Text.Whitespace
'IMPLICIT' Keyword
' ' Text.Whitespace
'UniqueIdentifier' Name.Type
' ' Text.Whitespace
'OPTIONAL' Keyword.Declaration
',' Punctuation
'\n ' Text.Whitespace
'-- If present, version MUST be v2 or v3' Comment.Single
'\n ' Text.Whitespace
'extensions' Name.Variable
' ' Text.Whitespace
'[' Punctuation
'3' Literal.Number.Integer
']' Punctuation
' ' Text.Whitespace
'EXPLICIT' Keyword
' ' Text.Whitespace
'Extensions' Name.Type
' ' Text.Whitespace
'OPTIONAL' Keyword.Declaration
'\n ' Text.Whitespace
'-- If present, version MUST be v3' Comment.Single
'\n ' Text.Whitespace
'}' Punctuation
'\n' Text.Whitespace

View File

@ -0,0 +1,49 @@
---input---
/*
Outer comment
/*
Inner comment
*/
Outer comment
*/
test ::= SEQUENCE {
a INTEGER,
b OCTET STRING,
b BIT STRING }
---tokens---
'/*' Comment.Multiline
'\n Outer comment\n ' Comment.Multiline
'/*' Comment.Multiline
'\n Inner comment\n ' Comment.Multiline
'*/' Comment.Multiline
'\n Outer comment\n' Comment.Multiline
'*/' Comment.Multiline
'\n\n' Text.Whitespace
'test' Name.Variable
' ' Text.Whitespace
'::=' Operator
' ' Text.Whitespace
'SEQUENCE' Keyword.Declaration
' ' Text.Whitespace
'{' Punctuation
'\n ' Text.Whitespace
'a' Error
' ' Text.Whitespace
'INTEGER' Keyword.Type
',' Punctuation
'\n ' Text.Whitespace
'b' Error
' ' Text.Whitespace
'OCTET STRING' Keyword.Type
',' Punctuation
'\n ' Text.Whitespace
'b' Error
' ' Text.Whitespace
'BIT STRING' Keyword.Type
' ' Text.Whitespace
'}' Punctuation
'\n' Text.Whitespace

View File

@ -0,0 +1,80 @@
---input---
/*
This
is
a
long
unterminated
comment
with
many
newlines.
It
should
take
a
reasonable
time
to
lex.
---tokens---
'/' Operator
'*' Operator
'\n' Text.Whitespace
'This' Name.Other
'\n' Text.Whitespace
'is' Keyword
'\n' Text.Whitespace
'a' Name.Other
'\n' Text.Whitespace
'long' Name.Other
'\n' Text.Whitespace
'unterminated' Name.Other
'\n' Text.Whitespace
'comment' Name.Other
'\n' Text.Whitespace
'with' Name.Other
'\n' Text.Whitespace
'many' Name.Other
'\n' Text.Whitespace
'newlines' Name.Other
'.' Punctuation
'\n' Text.Whitespace
'\n' Text.Whitespace
'It' Name.Other
'\n' Text.Whitespace
'should' Name.Other
'\n' Text.Whitespace
'take' Name.Other
'\n' Text.Whitespace
'a' Name.Other
'\n' Text.Whitespace
'reasonable' Name.Other
'\n' Text.Whitespace
'time' Name.Other
'\n' Text.Whitespace
'to' Name.Other
'\n' Text.Whitespace
'lex' Name.Other
'.' Punctuation
'\n' Text.Whitespace

View File

@ -0,0 +1,8 @@
---input---
<!--- cfcomment --->
---tokens---
'<!---' Comment.Multiline
' cfcomment ' Comment.Multiline
'--->' Comment.Multiline
'\n' Text

View File

@ -0,0 +1,12 @@
---input---
<!--- nested <!--- cfcomment ---> --->
---tokens---
'<!---' Comment.Multiline
' nested ' Comment.Multiline
'<!---' Comment.Multiline
' cfcomment ' Comment.Multiline
'--->' Comment.Multiline
' ' Comment.Multiline
'--->' Comment.Multiline
'\n' Text

View File

@ -0,0 +1,11 @@
---input---
{{
characters$MACRO.
}}
---tokens---
'{{' Literal.String
'\ncharacters$MACRO.\n' Literal.String
'}}' Literal.String
'\n' Text.Whitespace

View File

@ -0,0 +1,16 @@
---input---
/*
* comment
*/
; comment
// comment
---tokens---
'/*\n * comment\n */' Comment.Multiline
'\n' Text.Whitespace
'; comment' Comment.Single
'\n' Text.Whitespace
'// comment' Comment.Single
'\n' Text.Whitespace

View File

@ -0,0 +1,122 @@
---input---
"\\"
{{\\}}
"\a"
{{\a}}
"\b"
{{\b}}
"\n"
{{\n}}
"\r"
{{\r}}
"\t"
{{\t}}
"\""
{{\"}}
"\012"
{{\012}}
"\345"
{{\345}}
"\67"
{{\67}}
---tokens---
'"' Literal.String
'\\\\' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'{{' Literal.String
'\\\\' Literal.String.Escape
'}}' Literal.String
'\n' Text.Whitespace
'"' Literal.String
'\\a' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'{{' Literal.String
'\\a' Literal.String.Escape
'}}' Literal.String
'\n' Text.Whitespace
'"' Literal.String
'\\b' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'{{' Literal.String
'\\b' Literal.String.Escape
'}}' Literal.String
'\n' Text.Whitespace
'"' Literal.String
'\\n' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'{{' Literal.String
'\\n' Literal.String.Escape
'}}' Literal.String
'\n' Text.Whitespace
'"' Literal.String
'\\r' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'{{' Literal.String
'\\r' Literal.String.Escape
'}}' Literal.String
'\n' Text.Whitespace
'"' Literal.String
'\\t' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'{{' Literal.String
'\\t' Literal.String.Escape
'}}' Literal.String
'\n' Text.Whitespace
'"' Literal.String
'\\"' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'{{' Literal.String
'\\"' Literal.String.Escape
'}}' Literal.String
'\n' Text.Whitespace
'"' Literal.String
'\\012' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'{{' Literal.String
'\\012' Literal.String.Escape
'}}' Literal.String
'\n' Text.Whitespace
'"' Literal.String
'\\345' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'{{' Literal.String
'\\345' Literal.String.Escape
'}}' Literal.String
'\n' Text.Whitespace
'"' Literal.String
'\\67' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'{{' Literal.String
'\\67' Literal.String.Escape
'}}' Literal.String
'\n' Text.Whitespace

View File

@ -0,0 +1,44 @@
---input---
#define MACRO(ARG1#ARG2) #macro_body#
#define/**/
MACRO(ARG1'ARG2' ARG3)/**/
#\#macro
body\##
---tokens---
'#define' Comment.Preproc
' ' Text.Whitespace
'MACRO' Comment.Preproc
'(' Punctuation
'ARG1' Comment.Preproc
'#' Punctuation
'ARG2' Comment.Preproc
')' Punctuation
' ' Text.Whitespace
'#' Punctuation
'macro_body' Comment.Preproc
'#' Punctuation
'\n' Text.Whitespace
'#define' Comment.Preproc
'/**/' Comment.Multiline
'\n' Text.Whitespace
'MACRO' Comment.Preproc
'(' Punctuation
'ARG1' Comment.Preproc
"'" Punctuation
'ARG2' Comment.Preproc
"'" Punctuation
' ' Text.Whitespace
'ARG3' Comment.Preproc
')' Punctuation
'/**/' Comment.Multiline
'\n' Text.Whitespace
'#' Punctuation
'\\#' Comment.Preproc
'macro\nbody' Comment.Preproc
'\\#' Comment.Preproc
'#' Punctuation
'\n' Text.Whitespace

View File

@ -0,0 +1,40 @@
---input---
$MACRO.(((x#y\)))' "(#'x)\)x\))"# {{x\))x)\)(#'}});
---tokens---
'$MACRO.' Comment.Preproc
'(' Punctuation
'(' Comment.Preproc
'(' Comment.Preproc
'x#y\\)' Comment.Preproc
')' Comment.Preproc
')' Comment.Preproc
"'" Punctuation
' ' Comment.Preproc
'"' Literal.String
'(' Error
'#' Error
"'" Error
'x' Literal.String
')' Error
'\\)' Comment.Preproc
'x' Literal.String
'\\)' Comment.Preproc
')' Error
'"' Literal.String
'#' Punctuation
' ' Comment.Preproc
'{{' Literal.String
'x' Literal.String
'\\)' Comment.Preproc
')' Error
'x' Literal.String
')' Error
'\\)' Comment.Preproc
'(' Error
'#' Error
"'" Error
'}}' Literal.String
')' Punctuation
';' Comment.Single
'\n' Text.Whitespace

View File

@ -0,0 +1,30 @@
---input---
0dbfs
A4
kr
ksmps
nchnls
nchnls_i
sr
---tokens---
'0dbfs' Name.Variable.Global
'\n' Text.Whitespace
'A4' Name.Variable.Global
'\n' Text.Whitespace
'kr' Name.Variable.Global
'\n' Text.Whitespace
'ksmps' Name.Variable.Global
'\n' Text.Whitespace
'nchnls' Name.Variable.Global
'\n' Text.Whitespace
'nchnls_i' Name.Variable.Global
'\n' Text.Whitespace
'sr' Name.Variable.Global
'\n' Text.Whitespace

View File

@ -0,0 +1,176 @@
---input---
goto aLabel
igoto aLabel
kgoto aLabel
reinit aLabel
rigoto aLabel
tigoto aLabel
cggoto 1==0, aLabel
cigoto 1==0, aLabel
cingoto 1==0, aLabel
ckgoto 1==0, aLabel
cngoto 1==0, aLabel
cnkgoto 1==0, aLabel
timout 0, 0, aLabel
loop_ge 0, 0, 0, aLabel
loop_gt 0, 0, 0, aLabel
loop_le 0, 0, 0, aLabel
loop_lt 0, 0, 0, aLabel
---tokens---
'goto' Keyword
' ' Text.Whitespace
'aLabel' Name.Label
'\n' Text.Whitespace
'igoto' Keyword
' ' Text.Whitespace
'aLabel' Name.Label
'\n' Text.Whitespace
'kgoto' Keyword
' ' Text.Whitespace
'aLabel' Name.Label
'\n' Text.Whitespace
'reinit' Keyword.Pseudo
' ' Text.Whitespace
'aLabel' Name.Label
'\n' Text.Whitespace
'rigoto' Keyword.Pseudo
' ' Text.Whitespace
'aLabel' Name.Label
'\n' Text.Whitespace
'tigoto' Keyword.Pseudo
' ' Text.Whitespace
'aLabel' Name.Label
'\n' Text.Whitespace
'cggoto' Keyword.Pseudo
' ' Text.Whitespace
'1' Literal.Number.Integer
'==' Operator
'0' Literal.Number.Integer
',' Punctuation
' ' Text.Whitespace
'aLabel' Name.Label
'\n' Text.Whitespace
'cigoto' Keyword.Pseudo
' ' Text.Whitespace
'1' Literal.Number.Integer
'==' Operator
'0' Literal.Number.Integer
',' Punctuation
' ' Text.Whitespace
'aLabel' Name.Label
'\n' Text.Whitespace
'cingoto' Keyword.Pseudo
' ' Text.Whitespace
'1' Literal.Number.Integer
'==' Operator
'0' Literal.Number.Integer
',' Punctuation
' ' Text.Whitespace
'aLabel' Name.Label
'\n' Text.Whitespace
'ckgoto' Keyword.Pseudo
' ' Text.Whitespace
'1' Literal.Number.Integer
'==' Operator
'0' Literal.Number.Integer
',' Punctuation
' ' Text.Whitespace
'aLabel' Name.Label
'\n' Text.Whitespace
'cngoto' Keyword.Pseudo
' ' Text.Whitespace
'1' Literal.Number.Integer
'==' Operator
'0' Literal.Number.Integer
',' Punctuation
' ' Text.Whitespace
'aLabel' Name.Label
'\n' Text.Whitespace
'cnkgoto' Keyword.Pseudo
' ' Text.Whitespace
'1' Literal.Number.Integer
'==' Operator
'0' Literal.Number.Integer
',' Punctuation
' ' Text.Whitespace
'aLabel' Name.Label
'\n' Text.Whitespace
'timout' Keyword.Pseudo
' ' Text.Whitespace
'0' Literal.Number.Integer
',' Punctuation
' ' Text.Whitespace
'0' Literal.Number.Integer
',' Punctuation
' ' Text.Whitespace
'aLabel' Name.Label
'\n' Text.Whitespace
'loop_ge' Keyword.Pseudo
' ' Text.Whitespace
'0' Literal.Number.Integer
',' Punctuation
' ' Text.Whitespace
'0' Literal.Number.Integer
',' Punctuation
' ' Text.Whitespace
'0' Literal.Number.Integer
',' Punctuation
' ' Text.Whitespace
'aLabel' Name.Label
'\n' Text.Whitespace
'loop_gt' Keyword.Pseudo
' ' Text.Whitespace
'0' Literal.Number.Integer
',' Punctuation
' ' Text.Whitespace
'0' Literal.Number.Integer
',' Punctuation
' ' Text.Whitespace
'0' Literal.Number.Integer
',' Punctuation
' ' Text.Whitespace
'aLabel' Name.Label
'\n' Text.Whitespace
'loop_le' Keyword.Pseudo
' ' Text.Whitespace
'0' Literal.Number.Integer
',' Punctuation
' ' Text.Whitespace
'0' Literal.Number.Integer
',' Punctuation
' ' Text.Whitespace
'0' Literal.Number.Integer
',' Punctuation
' ' Text.Whitespace
'aLabel' Name.Label
'\n' Text.Whitespace
'loop_lt' Keyword.Pseudo
' ' Text.Whitespace
'0' Literal.Number.Integer
',' Punctuation
' ' Text.Whitespace
'0' Literal.Number.Integer
',' Punctuation
' ' Text.Whitespace
'0' Literal.Number.Integer
',' Punctuation
' ' Text.Whitespace
'aLabel' Name.Label
'\n' Text.Whitespace

View File

@ -0,0 +1,14 @@
---input---
#include/**/"file.udo"
#include/**/|file.udo|
---tokens---
'#include' Comment.Preproc
'/**/' Comment.Multiline
'"file.udo"' Literal.String
'\n' Text.Whitespace
'#include' Comment.Preproc
'/**/' Comment.Multiline
'|file.udo|' Literal.String
'\n' Text.Whitespace

View File

@ -0,0 +1,11 @@
---input---
#includestr/**/"$MACRO..udo"
---tokens---
'#includestr' Comment.Preproc
'/**/' Comment.Multiline
'"' Literal.String
'$MACRO.' Comment.Preproc
'.udo' Literal.String
'"' Literal.String
'\n' Text.Whitespace

View File

@ -0,0 +1,42 @@
---input---
instr/**/1,/**/N_a_M_e_,/**/+Name/**///
iDuration = p3
outc:a(aSignal)
endin
---tokens---
'instr' Keyword.Declaration
'/**/' Comment.Multiline
'1' Name.Function
',' Punctuation
'/**/' Comment.Multiline
'N_a_M_e_' Name.Function
',' Punctuation
'/**/' Comment.Multiline
'+' Punctuation
'Name' Name.Function
'/**/' Comment.Multiline
'//' Comment.Single
'\n' Text.Whitespace
' ' Text.Whitespace
'i' Keyword.Type
'Duration' Name
' ' Text.Whitespace
'=' Operator
' ' Text.Whitespace
'p3' Name.Variable.Instance
'\n' Text.Whitespace
' ' Text.Whitespace
'outc' Name.Builtin
':' Punctuation
'a' Keyword.Type
'(' Punctuation
'a' Keyword.Type
'Signal' Name
')' Punctuation
'\n' Text.Whitespace
'endin' Keyword.Declaration
'\n' Text.Whitespace

View File

@ -0,0 +1,62 @@
---input---
do
else
elseif
endif
enduntil
fi
if
ithen
kthen
od
then
until
while
return
rireturn
---tokens---
'do' Keyword
'\n' Text.Whitespace
'else' Keyword
'\n' Text.Whitespace
'elseif' Keyword
'\n' Text.Whitespace
'endif' Keyword
'\n' Text.Whitespace
'enduntil' Keyword
'\n' Text.Whitespace
'fi' Keyword
'\n' Text.Whitespace
'if' Keyword
'\n' Text.Whitespace
'ithen' Keyword
'\n' Text.Whitespace
'kthen' Keyword
'\n' Text.Whitespace
'od' Keyword
'\n' Text.Whitespace
'then' Keyword
'\n' Text.Whitespace
'until' Keyword
'\n' Text.Whitespace
'while' Keyword
'\n' Text.Whitespace
'return' Keyword.Pseudo
'\n' Text.Whitespace
'rireturn' Keyword.Pseudo
'\n' Text.Whitespace

View File

@ -0,0 +1,13 @@
---input---
aLabel:
label2:
---tokens---
'aLabel' Name.Label
':' Punctuation
'\n' Text.Whitespace
' ' Text.Whitespace
'label2' Name.Label
':' Punctuation
'\n' Text.Whitespace

View File

@ -0,0 +1,20 @@
---input---
#ifdef MACRO
#ifndef MACRO
#undef MACRO
---tokens---
'#ifdef' Comment.Preproc
' ' Text.Whitespace
'MACRO' Comment.Preproc
'\n' Text.Whitespace
'#ifndef' Comment.Preproc
' ' Text.Whitespace
'MACRO' Comment.Preproc
'\n' Text.Whitespace
'#undef' Comment.Preproc
' ' Text.Whitespace
'MACRO' Comment.Preproc
'\n' Text.Whitespace

View File

@ -0,0 +1,9 @@
---input---
kG:V
---tokens---
'k' Keyword.Type
'G' Name
':' Punctuation
'V' Name
'\n' Text.Whitespace

View File

@ -0,0 +1,52 @@
---input---
123 0123456789
0xabcdef0123456789 0XABCDEF
1e2
3e+4
5e-6
7E8
9E+0
1E-2
3.
4.56
.789
---tokens---
'123' Literal.Number.Integer
' ' Text.Whitespace
'0123456789' Literal.Number.Integer
'\n' Text.Whitespace
'0x' Keyword.Type
'abcdef0123456789' Literal.Number.Hex
' ' Text.Whitespace
'0X' Keyword.Type
'ABCDEF' Literal.Number.Hex
'\n' Text.Whitespace
'1e2' Literal.Number.Float
'\n' Text.Whitespace
'3e+4' Literal.Number.Float
'\n' Text.Whitespace
'5e-6' Literal.Number.Float
'\n' Text.Whitespace
'7E8' Literal.Number.Float
'\n' Text.Whitespace
'9E+0' Literal.Number.Float
'\n' Text.Whitespace
'1E-2' Literal.Number.Float
'\n' Text.Whitespace
'3.' Literal.Number.Float
'\n' Text.Whitespace
'4.56' Literal.Number.Float
'\n' Text.Whitespace
'.789' Literal.Number.Float
'\n' Text.Whitespace

View File

@ -0,0 +1,30 @@
---input---
# define MACRO#macro_body#
#define/**/
MACRO/**/
#\#macro
body\##
---tokens---
'# \tdefine' Comment.Preproc
' ' Text.Whitespace
'MACRO' Comment.Preproc
'#' Punctuation
'macro_body' Comment.Preproc
'#' Punctuation
'\n' Text.Whitespace
'#define' Comment.Preproc
'/**/' Comment.Multiline
'\n' Text.Whitespace
'MACRO' Comment.Preproc
'/**/' Comment.Multiline
'\n' Text.Whitespace
'#' Punctuation
'\\#' Comment.Preproc
'macro\nbody' Comment.Preproc
'\\#' Comment.Preproc
'#' Punctuation
'\n' Text.Whitespace

View File

@ -0,0 +1,114 @@
---input---
+
-
~
¬
!
*
/
^
%
<<
>>
<
>
<=
>=
==
!=
&
#
|
&&
||
?
:
+=
-=
*=
/=
---tokens---
'+' Operator
'\n' Text.Whitespace
'-' Operator
'\n' Text.Whitespace
'~' Operator
'\n' Text.Whitespace
'¬' Operator
'\n' Text.Whitespace
'!' Operator
'\n' Text.Whitespace
'*' Operator
'\n' Text.Whitespace
'/' Operator
'\n' Text.Whitespace
'^' Operator
'\n' Text.Whitespace
'%' Operator
'\n' Text.Whitespace
'<<' Operator
'\n' Text.Whitespace
'>>' Operator
'\n' Text.Whitespace
'<' Operator
'\n' Text.Whitespace
'>' Operator
'\n' Text.Whitespace
'<=' Operator
'\n' Text.Whitespace
'>=' Operator
'\n' Text.Whitespace
'==' Operator
'\n' Text.Whitespace
'!=' Operator
'\n' Text.Whitespace
'&' Operator
'\n' Text.Whitespace
'#' Operator
'\n' Text.Whitespace
'|' Operator
'\n' Text.Whitespace
'&&' Operator
'\n' Text.Whitespace
'||' Operator
'\n' Text.Whitespace
'?' Operator
'\n' Text.Whitespace
':' Operator
'\n' Text.Whitespace
'+=' Operator
'\n' Text.Whitespace
'-=' Operator
'\n' Text.Whitespace
'*=' Operator
'\n' Text.Whitespace
'/=' Operator
'\n' Text.Whitespace

View File

@ -0,0 +1,26 @@
---input---
#else
#end
#endif
###
@ 12345
@@ 67890
---tokens---
'#else' Comment.Preproc
'\n' Text.Whitespace
'#end' Comment.Preproc
'\n' Text.Whitespace
'#endif' Comment.Preproc
'\n' Text.Whitespace
'###' Comment.Preproc
'\n' Text.Whitespace
'@ \t12345' Comment.Preproc
'\n' Text.Whitespace
'@@ \t67890' Comment.Preproc
'\n' Text.Whitespace

View File

@ -0,0 +1,290 @@
---input---
printks "%!"
printks "%%"
printks "%n"
printks "%N"
printks "%r"
printks "%R"
printks "%t"
printks "%T"
printks "\\a"
printks "\\A"
printks "\\b"
printks "\\B"
printks "\\n"
printks "\\N"
printks "\\r"
printks "\\R"
printks "\\t"
printks "\\T"
prints "%!"
prints "%%"
prints "%n"
prints "%N"
prints "%r"
prints "%R"
prints "%t"
prints "%T"
prints "\\a"
prints "\\A"
prints "\\b"
prints "\\B"
prints "\\n"
prints "\\N"
prints "\\r"
prints "\\R"
prints "\\t"
prints "\\T"
---tokens---
'printks' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'%!' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'printks' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'%%' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'printks' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'%n' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'printks' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'%N' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'printks' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'%r' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'printks' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'%R' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'printks' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'%t' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'printks' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'%T' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'printks' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'\\\\a' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'printks' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'\\\\A' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'printks' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'\\\\b' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'printks' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'\\\\B' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'printks' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'\\\\n' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'printks' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'\\\\N' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'printks' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'\\\\r' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'printks' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'\\\\R' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'printks' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'\\\\t' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'printks' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'\\\\T' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'prints' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'%!' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'prints' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'%%' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'prints' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'%n' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'prints' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'%N' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'prints' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'%r' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'prints' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'%R' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'prints' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'%t' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'prints' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'%T' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'prints' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'\\\\a' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'prints' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'\\\\A' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'prints' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'\\\\b' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'prints' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'\\\\B' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'prints' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'\\\\n' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'prints' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'\\\\N' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'prints' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'\\\\r' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'prints' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'\\\\R' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'prints' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'\\\\t' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace
'prints' Name.Builtin
' ' Text.Whitespace
'"' Literal.String
'\\\\T' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace

View File

@ -0,0 +1,9 @@
---input---
"characters$MACRO."
---tokens---
'"' Literal.String
'characters' Literal.String
'$MACRO.' Comment.Preproc
'"' Literal.String
'\n' Text.Whitespace

View File

@ -0,0 +1,24 @@
---input---
opcode/**/aUDO,/**/i[],/**/aik//
aUDO
endop
---tokens---
'opcode' Keyword.Declaration
'/**/' Comment.Multiline
'aUDO' Name.Function
',' Punctuation
'/**/' Comment.Multiline
'i[]' Keyword.Type
',' Punctuation
'/**/' Comment.Multiline
'aik' Keyword.Type
'//' Comment.Single
'\n' Text.Whitespace
' ' Text.Whitespace
'aUDO' Name.Function
'\n' Text.Whitespace
'endop' Keyword.Declaration
'\n' Text.Whitespace

View File

@ -0,0 +1,72 @@
---input---
nodelabel: node@0 { foo = "bar"; };
nodelabel: node { foo = "bar"; };
nodelabel0: nodelabel1: node@0 { foo = "bar"; };
---tokens---
'nodelabel' Name.Label
':' Punctuation
' ' Text.Whitespace
'node' Name.Function
'@' Operator
'0' Literal.Number.Integer
' ' Comment.Multiline
'{' Punctuation
' ' Text.Whitespace
'foo' Name
' ' Text.Whitespace
'=' Operator
' ' Text.Whitespace
'"' Literal.String
'bar' Literal.String
'"' Literal.String
';' Punctuation
' ' Text.Whitespace
'}' Punctuation
';' Punctuation
'\n' Text.Whitespace
'nodelabel' Name.Label
':' Punctuation
' ' Text.Whitespace
'node' Name.Function
' ' Comment.Multiline
'{' Punctuation
' ' Text.Whitespace
'foo' Name
' ' Text.Whitespace
'=' Operator
' ' Text.Whitespace
'"' Literal.String
'bar' Literal.String
'"' Literal.String
';' Punctuation
' ' Text.Whitespace
'}' Punctuation
';' Punctuation
'\n' Text.Whitespace
'nodelabel0' Name.Label
':' Punctuation
' ' Text.Whitespace
'nodelabel1' Name.Label
':' Punctuation
' ' Text.Whitespace
'node' Name.Function
'@' Operator
'0' Literal.Number.Integer
' ' Comment.Multiline
'{' Punctuation
' ' Text.Whitespace
'foo' Name
' ' Text.Whitespace
'=' Operator
' ' Text.Whitespace
'"' Literal.String
'bar' Literal.String
'"' Literal.String
';' Punctuation
' ' Text.Whitespace
'}' Punctuation
';' Punctuation
'\n' Text.Whitespace

View File

@ -0,0 +1,11 @@
---input---
> py
hi
---tokens---
'>' Generic.Prompt
' ' Text
'py' Text
'\n' Text
'hi\n' Generic.Output

View File

@ -0,0 +1,6 @@
---input---
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
---tokens---
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' Text
'\n' Text.Whitespace

View File

@ -0,0 +1,54 @@
---input---
constraint foo, bar {
:name "myrule"
rule (odd X) \ (even X) | true <=> fail.
}
rule. % not a kwd
---tokens---
'constraint' Keyword.Declaration
' ' Text.Whitespace
'foo, bar ' Name.Function
'{' Text
'\n\n ' Text.Whitespace
':name' Keyword.Mode
' ' Text.Whitespace
'"' Literal.String.Double
'myrule' Literal.String.Double
'"' Literal.String.Double
'\n ' Text.Whitespace
'rule' Keyword.Declaration
' ' Text.Whitespace
'(' Text
'odd' Text
' ' Text.Whitespace
'X' Name.Variable
')' Operator
' ' Text.Whitespace
'\\' Keyword.Declaration
' ' Text.Whitespace
'(' Text
'even' Text
' ' Text.Whitespace
'X' Name.Variable
')' Operator
' ' Text.Whitespace
'|' Keyword.Declaration
' ' Text.Whitespace
'true' Text
' ' Text.Whitespace
'<=>' Keyword.Declaration
' ' Text.Whitespace
'fail' Text
'.' Operator
'\n\n' Text.Whitespace
'}' Text
'\n' Text.Whitespace
'rule' Text
'.' Operator
' ' Text.Whitespace
'% not a kwd\n' Comment

View File

@ -0,0 +1,67 @@
---input---
true.
stop :- !.
of (fun F) :- pi x\ of x => of (F x).
match (uvar as Y) :- print Y.
---tokens---
'true' Text
'.' Operator
'\n' Text.Whitespace
'stop' Text
' ' Text.Whitespace
':-' Keyword.Declaration
' ' Text.Whitespace
'!' Keyword.Declaration
'.' Operator
'\n' Text.Whitespace
'of' Text
' ' Text.Whitespace
'(' Text
'fun' Text
' ' Text.Whitespace
'F' Name.Variable
')' Operator
' ' Text.Whitespace
':-' Keyword.Declaration
' ' Text.Whitespace
'pi' Keyword.Declaration
' ' Text.Whitespace
'x' Name.Variable
'\\' Text
' ' Text.Whitespace
'of' Text
' ' Text.Whitespace
'x' Text
' ' Text.Whitespace
'=>' Keyword.Declaration
' ' Text.Whitespace
'of' Text
' ' Text.Whitespace
'(' Text
'F' Name.Variable
' ' Text.Whitespace
'x' Text
')' Operator
'.' Operator
'\n' Text.Whitespace
'match' Text
' ' Text.Whitespace
'(' Text
'uvar' Keyword.Declaration
' ' Text.Whitespace
'as' Keyword.Declaration
' ' Text.Whitespace
'Y' Name.Variable
')' Operator
' ' Text.Whitespace
':-' Keyword.Declaration
' ' Text.Whitespace
'print' Text
' ' Text.Whitespace
'Y' Name.Variable
'.' Operator
'\n' Text.Whitespace

View File

@ -0,0 +1,35 @@
---input---
namespace foo.bar {
baz :- std.do! [].
}
shorten foo. { bar }.
---tokens---
'namespace' Keyword.Declaration
' ' Text.Whitespace
'foo.bar' Text
' ' Text.Whitespace
'{\n' Text
' ' Text.Whitespace
'baz' Text
' ' Text.Whitespace
':-' Keyword.Declaration
' ' Text.Whitespace
'std.do!' Text
' ' Text.Whitespace
'[]' Keyword.Declaration
'.' Operator
'\n' Text.Whitespace
'}\n' Text
'shorten' Keyword.Declaration
' ' Text.Whitespace
'foo.' Text
' ' Text.Whitespace
'{ ' Text
'bar' Text
' ' Text.Whitespace
'}.' Text
'\n' Text.Whitespace

View File

@ -0,0 +1,60 @@
---input---
pred p1.
pred p2 i:int, o:list A.
pred p3 i:(bool -> prop).
:index(_ 2) pred p4 i:int, i:A.
---tokens---
'pred' Keyword.Declaration
' ' Text.Whitespace
'p1' Name.Function
'.' Text
'\n' Text.Whitespace
'pred' Keyword.Declaration
' ' Text.Whitespace
'p2' Name.Function
' ' Text.Whitespace
'i:' Keyword.Mode
'int' Keyword.Type
',' Text
' ' Text.Whitespace
'o:' Keyword.Mode
'list' Keyword.Type
' ' Text.Whitespace
'A' Keyword.Type
'.' Text
'\n' Text.Whitespace
'pred' Keyword.Declaration
' ' Text.Whitespace
'p3' Name.Function
' ' Text.Whitespace
'i:' Keyword.Mode
'(' Keyword.Type
'bool' Keyword.Type
' ' Text.Whitespace
'->' Keyword.Type
' ' Text.Whitespace
'prop' Keyword.Type
')' Keyword.Type
'.' Text
'\n' Text.Whitespace
':index' Keyword.Mode
'(' Text.Whitespace
'_ 2' Literal.Number.Integer
')' Text
' ' Text.Whitespace
'pred' Keyword.Declaration
' ' Text.Whitespace
'p4' Name.Function
' ' Text.Whitespace
'i:' Keyword.Mode
'int' Keyword.Type
',' Text
' ' Text.Whitespace
'i:' Keyword.Mode
'A' Keyword.Type
'.' Text
'\n' Text.Whitespace

View File

@ -0,0 +1,33 @@
---input---
tc {{ Eq lp:A }} {{ f lp:B l } }} :- foo A B.
---tokens---
'tc' Text
' ' Text.Whitespace
'{{' Punctuation
' Eq ' Text
'lp:' Keyword
'A' Name.Variable
' ' Text
'}}' Punctuation
' ' Text.Whitespace
'{{' Punctuation
' f ' Text
'lp:' Keyword
'B' Name.Variable
' ' Text
'l' Text
' ' Text
'}' Text
' ' Text
'}}' Punctuation
' ' Text.Whitespace
':-' Keyword.Declaration
' ' Text.Whitespace
'foo' Text
' ' Text.Whitespace
'A' Name.Variable
' ' Text.Whitespace
'B' Name.Variable
'.' Operator
'\n' Text.Whitespace

View File

@ -0,0 +1,112 @@
---input---
kind list type -> type.
type nil list A.
type cons A -> list A -> list A.
kind tm type.
type fun (tm -> tm) -> tm.
type app tm -> tm -> tm.
pred foo i:(tm -> tm), o:tm.
---tokens---
'kind' Keyword.Declaration
' ' Text.Whitespace
'list' Name.Function
' ' Text.Whitespace
'type' Keyword.Type
' ' Text.Whitespace
'->' Keyword.Type
' ' Text.Whitespace
'type' Keyword.Type
'.' Text
'\n' Text.Whitespace
'type' Keyword.Declaration
' ' Text.Whitespace
'nil' Name.Function
' ' Text.Whitespace
'list' Keyword.Type
' ' Text.Whitespace
'A' Keyword.Type
'.' Text
'\n' Text.Whitespace
'type' Keyword.Declaration
' ' Text.Whitespace
'cons' Name.Function
' ' Text.Whitespace
'A' Keyword.Type
' ' Text.Whitespace
'->' Keyword.Type
' ' Text.Whitespace
'list' Keyword.Type
' ' Text.Whitespace
'A' Keyword.Type
' ' Text.Whitespace
'->' Keyword.Type
' ' Text.Whitespace
'list' Keyword.Type
' ' Text.Whitespace
'A' Keyword.Type
'.' Text
'\n' Text.Whitespace
'kind' Keyword.Declaration
' ' Text.Whitespace
'tm' Name.Function
' ' Text.Whitespace
'type' Keyword.Type
'.' Text
'\n' Text.Whitespace
'type' Keyword.Declaration
' ' Text.Whitespace
'fun' Name.Function
' ' Text.Whitespace
'(' Keyword.Type
'tm' Keyword.Type
' ' Text.Whitespace
'->' Keyword.Type
' ' Text.Whitespace
'tm' Keyword.Type
')' Keyword.Type
' ' Text.Whitespace
'->' Keyword.Type
' ' Text.Whitespace
'tm' Keyword.Type
'.' Text
'\n' Text.Whitespace
'type' Keyword.Declaration
' ' Text.Whitespace
'app' Name.Function
' ' Text.Whitespace
'tm' Keyword.Type
' ' Text.Whitespace
'->' Keyword.Type
' ' Text.Whitespace
'tm' Keyword.Type
' ' Text.Whitespace
'->' Keyword.Type
' ' Text.Whitespace
'tm' Keyword.Type
'.' Text
'\n' Text.Whitespace
'pred' Keyword.Declaration
' ' Text.Whitespace
'foo' Name.Function
' ' Text.Whitespace
'i:' Keyword.Mode
'(' Keyword.Type
'tm' Keyword.Type
' ' Text.Whitespace
'->' Keyword.Type
' ' Text.Whitespace
'tm' Keyword.Type
')' Keyword.Type
',' Text
' ' Text.Whitespace
'o:' Keyword.Mode
'tm' Keyword.Type
'.' Text
'\n' Text.Whitespace

View File

@ -0,0 +1,100 @@
---input---
# (C) முத்தையா அண்ணாமலை 2013, 2015
நிரல்பாகம் gcd ( x, y )
மு = max(x,y)
q = min(x,y)
@( q == 0 ) ஆனால்
பின்கொடு மு
முடி
பின்கொடு gcd( மு - q , q )
முடி
---tokens---
'# (C) முத்தையா அண்ணாமலை 2013, 2015' Comment.Single
'\n' Text.Whitespace
'நிரல்பாகம்' Keyword
' ' Text.Whitespace
'gcd' Name
' ' Text.Whitespace
'(' Punctuation
' ' Text.Whitespace
'x' Name
',' Operator
' ' Text.Whitespace
'y' Name
' ' Text.Whitespace
')' Punctuation
'\n' Text.Whitespace
'மு' Name
' ' Text.Whitespace
'=' Operator
' ' Text.Whitespace
'max' Name.Builtin
'(' Punctuation
'x' Name
',' Operator
'y' Name
')' Punctuation
'\n' Text.Whitespace
' ' Text.Whitespace
'q' Name
' ' Text.Whitespace
'=' Operator
' ' Text.Whitespace
'min' Name.Builtin
'(' Punctuation
'x' Name
',' Operator
'y' Name
')' Punctuation
'\n' Text.Whitespace
'\n' Text.Whitespace
'@' Operator
'(' Punctuation
' ' Text.Whitespace
'q' Name
' ' Text.Whitespace
'==' Operator
' ' Text.Whitespace
'0' Literal.Number.Integer
' ' Text.Whitespace
')' Punctuation
' ' Text.Whitespace
'ஆனால்' Keyword
'\n' Text.Whitespace
' ' Text.Whitespace
'பின்கொடு' Keyword
' ' Text.Whitespace
'மு' Name
'\n' Text.Whitespace
'முடி' Keyword
'\n' Text.Whitespace
'பின்கொடு' Keyword
' ' Text.Whitespace
'gcd' Name
'(' Punctuation
' ' Text.Whitespace
'மு' Name
' ' Text.Whitespace
'-' Operator
' ' Text.Whitespace
'q' Name
' ' Text.Whitespace
',' Operator
' ' Text.Whitespace
'q' Name
' ' Text.Whitespace
')' Punctuation
'\n' Text.Whitespace
'முடி' Keyword
'\n' Text.Whitespace

View File

@ -0,0 +1,21 @@
---input---
1^3+(5-5)*gcd(a,b)
---tokens---
'1' Literal.Number.Integer
'^' Operator
'3' Literal.Number.Integer
'+' Operator
'(' Punctuation
'5' Literal.Number.Integer
'-' Operator
'5' Literal.Number.Integer
')' Punctuation
'*' Operator
'gcd' Name
'(' Punctuation
'a' Name
',' Operator
'b' Name
')' Punctuation
'\n' Text.Whitespace

View File

@ -0,0 +1,28 @@
---input---
@( 0 > 3 ) ஆனால்
பதிப்பி "wont print"
முடி
---tokens---
'@' Operator
'(' Punctuation
' ' Text.Whitespace
'0' Literal.Number.Integer
' ' Text.Whitespace
'>' Operator
' ' Text.Whitespace
'3' Literal.Number.Integer
' ' Text.Whitespace
')' Punctuation
' ' Text.Whitespace
'ஆனால்' Keyword
'\n' Text.Whitespace
' ' Text.Whitespace
'பதிப்பி' Keyword
' ' Text.Whitespace
'"wont print"' Literal.String
'\n' Text.Whitespace
'முடி' Keyword
'\n' Text.Whitespace

View File

@ -0,0 +1,8 @@
---input---
1+3
---tokens---
'1' Literal.Number.Integer
'+' Operator
'3' Literal.Number.Integer
'\n' Text.Whitespace

View File

@ -0,0 +1,28 @@
---input---
GET / HTTP/1.0
Content-Type: application/calendar+xml
<foo>
---tokens---
'GET' Name.Function
' ' Text
'/' Name.Namespace
' ' Text
'HTTP' Keyword.Reserved
'/' Operator
'1.0' Literal.Number
'\n' Text
'Content-Type' Name.Attribute
'' Text
':' Operator
' ' Text
'application/calendar+xml' Literal
'\n' Text
'\n' Text
'<foo' Name.Tag
'>' Name.Tag
'\n' Text.Whitespace

View File

@ -0,0 +1,28 @@
---input---
GET / HTTP/1.0
Content-Type: application/xml
<foo>
---tokens---
'GET' Name.Function
' ' Text
'/' Name.Namespace
' ' Text
'HTTP' Keyword.Reserved
'/' Operator
'1.0' Literal.Number
'\n' Text
'Content-Type' Name.Attribute
'' Text
':' Operator
' ' Text
'application/xml' Literal
'\n' Text
'\n' Text
'<foo' Name.Tag
'>' Name.Tag
'\n' Text.Whitespace

View File

@ -0,0 +1,12 @@
---input---
HTTP/1.1 200 OK
---tokens---
'HTTP' Keyword.Reserved
'/' Operator
'1.1' Literal.Number
' ' Text
'200' Literal.Number
' ' Text
'OK' Name.Exception
'\n' Text

View File

@ -0,0 +1,10 @@
---input---
HTTP/1.1 200
---tokens---
'HTTP' Keyword.Reserved
'/' Operator
'1.1' Literal.Number
' ' Text
'200' Literal.Number
'\n' Text

View File

@ -0,0 +1,11 @@
---input---
HTTP/1.1 200
---tokens---
'HTTP' Keyword.Reserved
'/' Operator
'1.1' Literal.Number
' ' Text
'200' Literal.Number
' ' Text
'\n' Text

View File

@ -0,0 +1,41 @@
---input---
POST /login HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Content-Length: 50
login=foo&password=12345
---tokens---
'POST' Name.Function
' ' Text
'/login' Name.Namespace
' ' Text
'HTTP' Keyword.Reserved
'/' Operator
'1.1' Literal.Number
'\n' Text
'Content-Type' Name.Attribute
'' Text
':' Operator
' ' Text
'application/x-www-form-urlencoded' Literal
'\n' Text
'Content-Length' Name.Attribute
'' Text
':' Operator
' ' Text
'50' Literal
'\n' Text
'\n' Text
'login' Name.Tag
'=' Operator
'foo' Literal.String
'&' Punctuation
'password' Name.Tag
'=' Operator
'12345\n' Literal.String

View File

@ -0,0 +1,6 @@
---input---
false
---tokens---
'false' Keyword.Constants
'\n' Text.Whitespace

View File

@ -0,0 +1,6 @@
---input---
true
---tokens---
'true' Keyword.Constants
'\n' Text.Whitespace

View File

@ -0,0 +1,9 @@
---input---
@"this is the first line
and what is this one?"
---tokens---
'@"' Literal.String
'this is the first line\nand what is this one?' Literal.String
'"' Literal.String
'\n' Text.Whitespace

View File

@ -0,0 +1,8 @@
---input---
@"good bye"
---tokens---
'@"' Literal.String
'good bye' Literal.String
'"' Literal.String
'\n' Text.Whitespace

View File

@ -0,0 +1,12 @@
---input---
@"ant\fbee\rcougar"
---tokens---
'@"' Literal.String
'ant' Literal.String
'\\f' Literal.String.Escape
'bee' Literal.String
'\\r' Literal.String.Escape
'cougar' Literal.String
'"' Literal.String
'\n' Text.Whitespace

View File

@ -0,0 +1,8 @@
---input---
@"\x0f"
---tokens---
'@"' Literal.String
'\\x0f' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace

View File

@ -0,0 +1,8 @@
---input---
@"\u89ee"
---tokens---
'@"' Literal.String
'\\u89ee' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace

View File

@ -0,0 +1,8 @@
---input---
@"\U01f6aa"
---tokens---
'@"' Literal.String
'\\U01f6aa' Literal.String.Escape
'"' Literal.String
'\n' Text.Whitespace

View File

@ -0,0 +1,10 @@
---input---
# first line
# second line
---tokens---
'# first line' Comment.Single
'\n' Text.Whitespace
'# second line' Comment.Single
'\n' Text.Whitespace

View File

@ -0,0 +1,6 @@
---input---
# a comment
---tokens---
'# a comment' Comment.Single
'\n' Text.Whitespace

View File

@ -0,0 +1,6 @@
---input---
:
---tokens---
':' Name.Constant
'\n' Text.Whitespace

View File

@ -0,0 +1,6 @@
---input---
::
---tokens---
'::' Name.Constant
'\n' Text.Whitespace

View File

@ -0,0 +1,6 @@
---input---
:breathe
---tokens---
':breathe' Name.Constant
'\n' Text.Whitespace

View File

@ -0,0 +1,6 @@
---input---
:0x0x0x0
---tokens---
':0x0x0x0' Name.Constant
'\n' Text.Whitespace

View File

@ -0,0 +1,12 @@
---input---
@````Look,
more than three
backticks can be
used...
kinda poetic...
but not really
````
---tokens---
'@````Look,\nmore than three\nbackticks can be\nused...\nkinda poetic...\nbut not really\n````' Literal.String
'\n' Text.Whitespace

View File

@ -0,0 +1,7 @@
---input---
@`An ordinary
long-buffer`
---tokens---
'@`An ordinary\nlong-buffer`' Literal.String
'\n' Text.Whitespace

View File

@ -0,0 +1,9 @@
---input---
```More than
one backtick
can be used
```
---tokens---
'```More than \none backtick \ncan be used\n```' Literal.String
'\n' Text.Whitespace

View File

@ -0,0 +1,7 @@
---input---
`A nice
long-string`
---tokens---
'`A nice\nlong-string`' Literal.String
'\n' Text.Whitespace

View File

@ -0,0 +1,6 @@
---input---
nil
---tokens---
'nil' Keyword.Constants
'\n' Text.Whitespace

View File

@ -0,0 +1,6 @@
---input---
3e8
---tokens---
'3e8' Literal.Number.Float
'\n' Text.Whitespace

View File

@ -0,0 +1,6 @@
---input---
2e-1
---tokens---
'2e-1' Literal.Number.Float
'\n' Text.Whitespace

View File

@ -0,0 +1,6 @@
---input---
2_3_1__.1_2_e-1
---tokens---
'2_3_1__.1_2_e-1' Literal.Number.Float
'\n' Text.Whitespace

View File

@ -0,0 +1,6 @@
---input---
1.0
---tokens---
'1.0' Literal.Number.Float
'\n' Text.Whitespace

View File

@ -0,0 +1,6 @@
---input---
0x0_9_.1_f__
---tokens---
'0x0_9_.1_f__' Literal.Number.Hex
'\n' Text.Whitespace

View File

@ -0,0 +1,6 @@
---input---
0x09.1F
---tokens---
'0x09.1F' Literal.Number.Hex
'\n' Text.Whitespace

View File

@ -0,0 +1,6 @@
---input---
0xF_F__F___F____
---tokens---
'0xF_F__F___F____' Literal.Number.Hex
'\n' Text.Whitespace

View File

@ -0,0 +1,6 @@
---input---
0xaB
---tokens---
'0xaB' Literal.Number.Hex
'\n' Text.Whitespace

View File

@ -0,0 +1,6 @@
---input---
1_3__0890__100__
---tokens---
'1_3__0890__100__' Literal.Number.Float
'\n' Text.Whitespace

View File

@ -0,0 +1,6 @@
---input---
3__0890__100
---tokens---
'3__0890__100' Literal.Number.Float
'\n' Text.Whitespace

View File

@ -0,0 +1,6 @@
---input---
1_000_000
---tokens---
'1_000_000' Literal.Number.Float
'\n' Text.Whitespace

View File

@ -0,0 +1,6 @@
---input---
1
---tokens---
'1' Literal.Number.Float
'\n' Text.Whitespace

View File

@ -0,0 +1,6 @@
---input---
-2.71828
---tokens---
'-2.71828' Literal.Number.Float
'\n' Text.Whitespace

View File

@ -0,0 +1,6 @@
---input---
-0xFF
---tokens---
'-0xFF' Literal.Number.Hex
'\n' Text.Whitespace

View File

@ -0,0 +1,6 @@
---input---
-2
---tokens---
'-2' Literal.Number.Float
'\n' Text.Whitespace

View File

@ -0,0 +1,6 @@
---input---
-36r20
---tokens---
'-36r20' Literal.Number
'\n' Text.Whitespace

View File

@ -0,0 +1,6 @@
---input---
3r01&02
---tokens---
'3r01&02' Literal.Number
'\n' Text.Whitespace

View File

@ -0,0 +1,6 @@
---input---
2r0101010001
---tokens---
'2r0101010001' Literal.Number
'\n' Text.Whitespace

View File

@ -0,0 +1,6 @@
---input---
1E9
---tokens---
'1E9' Literal.Number.Float
'\n' Text.Whitespace

View File

@ -0,0 +1,7 @@
---input---
@()
---tokens---
'@(' Punctuation
')' Punctuation
'\n' Text.Whitespace

View File

@ -0,0 +1,24 @@
---input---
@(@(3 0 3) 8 @(3 0 3))
---tokens---
'@(' Punctuation
'@(' Punctuation
'3' Literal.Number.Float
' ' Text.Whitespace
'0' Literal.Number.Float
' ' Text.Whitespace
'3' Literal.Number.Float
')' Punctuation
' ' Text.Whitespace
'8' Literal.Number.Float
' ' Text.Whitespace
'@(' Punctuation
'3' Literal.Number.Float
' ' Text.Whitespace
'0' Literal.Number.Float
' ' Text.Whitespace
'3' Literal.Number.Float
')' Punctuation
')' Punctuation
'\n' Text.Whitespace

View File

@ -0,0 +1,12 @@
---input---
@(:hello :there :friend)
---tokens---
'@(' Punctuation
':hello' Name.Constant
' ' Text.Whitespace
':there' Name.Constant
' ' Text.Whitespace
':friend' Name.Constant
')' Punctuation
'\n' Text.Whitespace

View File

@ -0,0 +1,7 @@
---input---
()
---tokens---
'(' Punctuation
')' Punctuation
'\n' Text.Whitespace

View File

@ -0,0 +1,20 @@
---input---
(+ 1 2 (- 9 8))
---tokens---
'(' Punctuation
'+' Name.Function
' ' Text.Whitespace
'1' Literal.Number.Float
' ' Text.Whitespace
'2' Literal.Number.Float
' ' Text.Whitespace
'(' Punctuation
'-' Name.Function
' ' Text.Whitespace
'9' Literal.Number.Float
' ' Text.Whitespace
'8' Literal.Number.Float
')' Punctuation
')' Punctuation
'\n' Text.Whitespace

View File

@ -0,0 +1,14 @@
---input---
(+ 1 2 3)
---tokens---
'(' Punctuation
'+' Name.Function
' ' Text.Whitespace
'1' Literal.Number.Float
' ' Text.Whitespace
'2' Literal.Number.Float
' ' Text.Whitespace
'3' Literal.Number.Float
')' Punctuation
'\n' Text.Whitespace

View File

@ -0,0 +1,13 @@
---input---
~(1 2 3)
---tokens---
'~' Operator
'(' Punctuation
'1' Literal.Number.Float
' ' Text.Whitespace
'2' Literal.Number.Float
' ' Text.Whitespace
'3' Literal.Number.Float
')' Punctuation
'\n' Text.Whitespace

View File

@ -0,0 +1,7 @@
---input---
~1
---tokens---
'~' Operator
'1' Literal.Number.Float
'\n' Text.Whitespace

View File

@ -0,0 +1,7 @@
---input---
':hobbes
---tokens---
"'" Operator
':hobbes' Name.Constant
'\n' Text.Whitespace

View File

@ -0,0 +1,13 @@
---input---
'(:a :b :c)
---tokens---
"'" Operator
'(' Punctuation
':a' Name.Constant
' ' Text.Whitespace
':b' Name.Constant
' ' Text.Whitespace
':c' Name.Constant
')' Punctuation
'\n' Text.Whitespace

View File

@ -0,0 +1,13 @@
---input---
|(= $ 1)
---tokens---
'|' Operator
'(' Punctuation
'=' Name.Function
' ' Text.Whitespace
'$' Name.Variable
' ' Text.Whitespace
'1' Literal.Number.Float
')' Punctuation
'\n' Text.Whitespace

View File

@ -0,0 +1,7 @@
---input---
|:a-fine-keyword
---tokens---
'|' Operator
':a-fine-keyword' Name.Constant
'\n' Text.Whitespace

View File

@ -0,0 +1,7 @@
---input---
|8
---tokens---
'|' Operator
'8' Literal.Number.Float
'\n' Text.Whitespace

View File

@ -0,0 +1,11 @@
---input---
|@[8 9]
---tokens---
'|' Operator
'@[' Punctuation
'8' Literal.Number.Float
' ' Text.Whitespace
'9' Literal.Number.Float
']' Punctuation
'\n' Text.Whitespace

View File

@ -0,0 +1,11 @@
---input---
|[1 2]
---tokens---
'|' Operator
'[' Punctuation
'1' Literal.Number.Float
' ' Text.Whitespace
'2' Literal.Number.Float
']' Punctuation
'\n' Text.Whitespace

View File

@ -0,0 +1,9 @@
---input---
|"nice string"
---tokens---
'|' Operator
'"' Literal.String
'nice string' Literal.String
'"' Literal.String
'\n' Text.Whitespace

View File

@ -0,0 +1,11 @@
---input---
|{:a 1}
---tokens---
'|' Operator
'{' Punctuation
':a' Name.Constant
' ' Text.Whitespace
'1' Literal.Number.Float
'}' Punctuation
'\n' Text.Whitespace

Some files were not shown because too many files have changed in this diff Show More