mirror of
https://github.com/ralsina/tartrazine.git
synced 2024-11-13 23:12:24 +00:00
170 lines
3.0 KiB
Plaintext
170 lines
3.0 KiB
Plaintext
---input---
|
|
;; All sorts of numbers, common and less common.
|
|
|
|
0
|
|
142
|
|
-142
|
|
+142
|
|
-0.5
|
|
+0.5
|
|
-0.5e-10
|
|
+0.5e10
|
|
0.5e+10
|
|
.5F+10
|
|
.123
|
|
123.
|
|
123.L-25|54
|
|
+inf.0
|
|
-inf.0
|
|
#b+nan.0-inf.0i
|
|
1-2i
|
|
1-i
|
|
+i
|
|
-5f24@3.14159
|
|
4/5
|
|
5.4e5@4
|
|
#i5
|
|
#o5
|
|
#i#o5
|
|
#o#i5
|
|
#b01/10
|
|
#x0f42a
|
|
#E#b01/10
|
|
#d#I01/10
|
|
#i-324@3.14159
|
|
#o#I01/1022-inf.0i
|
|
|
|
;; These are not numbers but plain symbols.
|
|
|
|
1+
|
|
1-
|
|
i
|
|
inf
|
|
-inf
|
|
nan
|
|
-nan
|
|
|
|
---tokens---
|
|
';; All sorts of numbers, common and less common.' Comment.Single
|
|
'\n\n' Text.Whitespace
|
|
|
|
'0' Literal.Number.Integer
|
|
'\n' Text.Whitespace
|
|
|
|
'142' Literal.Number.Integer
|
|
'\n' Text.Whitespace
|
|
|
|
'-142' Literal.Number.Integer
|
|
'\n' Text.Whitespace
|
|
|
|
'+142' Literal.Number.Integer
|
|
'\n' Text.Whitespace
|
|
|
|
'-0.5' Literal.Number.Float
|
|
'\n' Text.Whitespace
|
|
|
|
'+0.5' Literal.Number.Float
|
|
'\n' Text.Whitespace
|
|
|
|
'-0.5e-10' Literal.Number.Float
|
|
'\n' Text.Whitespace
|
|
|
|
'+0.5e10' Literal.Number.Float
|
|
'\n' Text.Whitespace
|
|
|
|
'0.5e+10' Literal.Number.Float
|
|
'\n' Text.Whitespace
|
|
|
|
'.5F+10' Literal.Number.Float
|
|
'\n' Text.Whitespace
|
|
|
|
'.123' Literal.Number.Float
|
|
'\n' Text.Whitespace
|
|
|
|
'123.' Literal.Number.Float
|
|
'\n' Text.Whitespace
|
|
|
|
'123.L-25|54' Literal.Number.Float
|
|
'\n' Text.Whitespace
|
|
|
|
'+inf.0' Literal.Number.Float
|
|
'\n' Text.Whitespace
|
|
|
|
'-inf.0' Literal.Number.Float
|
|
'\n' Text.Whitespace
|
|
|
|
'#b+nan.0-inf.0i' Literal.Number.Bin
|
|
'\n' Text.Whitespace
|
|
|
|
'1-2i' Literal.Number.Integer
|
|
'\n' Text.Whitespace
|
|
|
|
'1-i' Literal.Number.Integer
|
|
'\n' Text.Whitespace
|
|
|
|
'+i' Literal.Number.Integer
|
|
'\n' Text.Whitespace
|
|
|
|
'-5f24@3.14159' Literal.Number.Float
|
|
'\n' Text.Whitespace
|
|
|
|
'4/5' Literal.Number.Integer
|
|
'\n' Text.Whitespace
|
|
|
|
'5.4e5@4' Literal.Number.Float
|
|
'\n' Text.Whitespace
|
|
|
|
'#i5' Literal.Number.Integer
|
|
'\n' Text.Whitespace
|
|
|
|
'#o5' Literal.Number.Oct
|
|
'\n' Text.Whitespace
|
|
|
|
'#i#o5' Literal.Number.Oct
|
|
'\n' Text.Whitespace
|
|
|
|
'#o#i5' Literal.Number.Oct
|
|
'\n' Text.Whitespace
|
|
|
|
'#b01/10' Literal.Number.Bin
|
|
'\n' Text.Whitespace
|
|
|
|
'#x0f42a' Literal.Number.Hex
|
|
'\n' Text.Whitespace
|
|
|
|
'#E#b01/10' Literal.Number.Bin
|
|
'\n' Text.Whitespace
|
|
|
|
'#d#I01/10' Literal.Number.Integer
|
|
'\n' Text.Whitespace
|
|
|
|
'#i-324@3.14159' Literal.Number.Float
|
|
'\n' Text.Whitespace
|
|
|
|
'#o#I01/1022-inf.0i' Literal.Number.Oct
|
|
'\n\n' Text.Whitespace
|
|
|
|
';; These are not numbers but plain symbols.' Comment.Single
|
|
'\n\n' Text.Whitespace
|
|
|
|
'1+' Name.Builtin
|
|
'\n' Text.Whitespace
|
|
|
|
'1-' Name.Builtin
|
|
'\n' Text.Whitespace
|
|
|
|
'i' Name.Variable
|
|
'\n' Text.Whitespace
|
|
|
|
'inf' Name.Builtin
|
|
'\n' Text.Whitespace
|
|
|
|
'-inf' Name.Variable
|
|
'\n' Text.Whitespace
|
|
|
|
'nan' Name.Builtin
|
|
'\n' Text.Whitespace
|
|
|
|
'-nan' Name.Variable
|
|
'\n' Text.Whitespace
|