mirror of
https://github.com/vim/vim.git
synced 2025-12-13 20:36:39 +01:00
runtime(sml): Update syntax, improve special constant matching
- Match \dE\d real literal form - Match all string escape sequences - Add related tests closes: #18723 Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
ffc7f8c9da
commit
85fc83f849
@@ -3,7 +3,8 @@
|
||||
" Filenames: *.sml *.sig
|
||||
" Maintainer: Markus Mottl <markus.mottl@gmail.com>
|
||||
" Previous Maintainer: Fabrizio Zeno Cornelli <zeno@filibusta.crema.unimi.it> (invalid)
|
||||
" Last Change: 2025 Nov 07 - Update Number Regex
|
||||
" Last Change: 2025 Nov 11 - Improve special constant matching (Doug Kearns)
|
||||
" 2025 Nov 07 - Update Number Regex
|
||||
" 2022 Apr 01
|
||||
" 2015 Aug 31 - Fixed opening of modules (Ramana Kumar)
|
||||
" 2006 Oct 23 - Fixed character highlighting bug (MM)
|
||||
@@ -137,9 +138,25 @@ syn match smlConstructor "\u\(\w\|'\)*\>"
|
||||
" Module prefix
|
||||
syn match smlModPath "\u\(\w\|'\)*\."he=e-1
|
||||
|
||||
syn match smlCharacter +#"\\""\|#"."\|#"\\\d\d\d"+
|
||||
syn match smlCharErr +#"\\\d\d"\|#"\\\d"+
|
||||
syn region smlString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell
|
||||
" Strings and Characters
|
||||
syn match smlEscapeErr "\\." contained
|
||||
syn match smlEscape "\\[abtnvfr"\\]" contained
|
||||
syn match smlEscapeErr "\\^." contained
|
||||
syn match smlEscape "\\^[@A-Z[\\\]^_]" contained
|
||||
syn match smlEscapeErr "\\\d\{1,2}" contained
|
||||
syn match smlEscape "\\\d\{3}" contained
|
||||
syn match smlEscapeErr "\\u\x\{0,3}" contained
|
||||
syn match smlEscape "\\u\x\{4}" contained
|
||||
syn match smlEscape "\\\_[[:space:]]\+\\" contained
|
||||
syn cluster smlEscape contains=smlEscape,smlEscapeErr
|
||||
|
||||
syn region smlString start=+"+ end=+"+ contains=@smlEscape,@Spell
|
||||
|
||||
syn match smlCharacter +#"[^\\"]"+
|
||||
syn match smlCharacter +#"\\."+ contains=@smlEscape
|
||||
syn match smlCharacter +#"\\^."+ contains=@smlEscape
|
||||
syn match smlCharacter +#"\\\d\{3}"+ contains=@smlEscape
|
||||
syn match smlCharacter +#"\\u\x\{4}"+ contains=@smlEscape
|
||||
|
||||
syn match smlFunDef "=>"
|
||||
syn match smlRefAssign ":="
|
||||
@@ -156,7 +173,8 @@ syn match smlNumber "\~\=\<\d\+\>"
|
||||
syn match smlNumber "\~\=\<0x\x\+\>"
|
||||
syn match smlWord "\<0w\d\+\>"
|
||||
syn match smlWord "\<0wx\x\+\>"
|
||||
syn match smlReal "\~\=\<\d\+\.\d\+\%([eE]\~\=\d\+\)\=\>"
|
||||
syn match smlReal "\~\=\<\d\+\.\d\+\>"
|
||||
syn match smlReal "\~\=\<\d\+\%(\.\d\+\)\=[eE]\~\=\d\+\>"
|
||||
|
||||
" Synchronization
|
||||
syn sync minlines=20
|
||||
@@ -181,7 +199,7 @@ hi def link smlCommentErr Error
|
||||
hi def link smlEndErr Error
|
||||
hi def link smlThenErr Error
|
||||
|
||||
hi def link smlCharErr Error
|
||||
hi def link smlEscapeErr Error
|
||||
|
||||
hi def link smlComment Comment
|
||||
|
||||
@@ -213,6 +231,7 @@ hi def link smlNumber Number
|
||||
hi def link smlWord Number
|
||||
hi def link smlReal Float
|
||||
hi def link smlString String
|
||||
hi def link smlEscape Special
|
||||
hi def link smlType Type
|
||||
hi def link smlTodo Todo
|
||||
hi def link smlEncl Keyword
|
||||
|
||||
20
runtime/syntax/testdir/dumps/sml_00.dump
Normal file
20
runtime/syntax/testdir/dumps/sml_00.dump
Normal file
@@ -0,0 +1,20 @@
|
||||
>(+0#0000e05#ffffff0|*| |I|n|t|e|g|e|r| |c|o|n|s|t|a|n|t|s| |*|)| +0#0000000&@51
|
||||
@75
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|0+0#e000002&|;+0#af5f00255&| +0#0000000&@64
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|4+0#e000002&|2|;+0#af5f00255&| +0#0000000&@63
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|0+0#e000002&|x|2|A|;+0#af5f00255&| +0#0000000&@61
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|~+0#e000002&|4|2|;+0#af5f00255&| +0#0000000&@8|(+0#0000e05&|*| |s|i|n|g|l|e| |t|o|k|e|n| |*|)| +0#0000000&@35
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|~+0#e000002&|0|x|2|A|;+0#af5f00255&| +0#0000000&@6|(+0#0000e05&|*| |s|i|n|g|l|e| |t|o|k|e|n| |*|)| +0#0000000&@35
|
||||
@75
|
||||
@75
|
||||
|(+0#0000e05&|*| |W|o|r|d| |c|o|n|s|t|a|n|t|s| |*|)| +0#0000000&@54
|
||||
@75
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|0+0#e000002&|w|0|;+0#af5f00255&| +0#0000000&@62
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|0+0#e000002&|w|4|2|;+0#af5f00255&| +0#0000000&@61
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|0+0#e000002&|w|x|2|A|;+0#af5f00255&| +0#0000000&@60
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|~|0+0#e000002&|w|4|2|;+0#af5f00255&| +0#0000000&@6|(+0#0000e05&|*| |n|o|n|f|i|x| |~| |*|)| +0#0000000&@39
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|~|0+0#e000002&|w|x|2|A|;+0#af5f00255&| +0#0000000&@5|(+0#0000e05&|*| |n|o|n|f|i|x| |~| |*|)| +0#0000000&@39
|
||||
@75
|
||||
@75
|
||||
|(+0#0000e05&|*| |R|e|a|l| |c|o|n|s|t|a|n|t|s| |*|)| +0#0000000&@54
|
||||
@57|1|,|1| @10|T|o|p|
|
||||
20
runtime/syntax/testdir/dumps/sml_01.dump
Normal file
20
runtime/syntax/testdir/dumps/sml_01.dump
Normal file
@@ -0,0 +1,20 @@
|
||||
|v+0#af5f00255#ffffff0|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|0+0#e000002&|w|x|2|A|;+0#af5f00255&| +0#0000000&@60
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|~|0+0#e000002&|w|4|2|;+0#af5f00255&| +0#0000000&@6|(+0#0000e05&|*| |n|o|n|f|i|x| |~| |*|)| +0#0000000&@39
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|~|0+0#e000002&|w|x|2|A|;+0#af5f00255&| +0#0000000&@5|(+0#0000e05&|*| |n|o|n|f|i|x| |~| |*|)| +0#0000000&@39
|
||||
@75
|
||||
@75
|
||||
>(+0#0000e05&|*| |R|e|a|l| |c|o|n|s|t|a|n|t|s| |*|)| +0#0000000&@54
|
||||
@75
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|0+0#e000002&|.|0|;+0#af5f00255&| +0#0000000&@62
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|4+0#e000002&|2|.|4|2|;+0#af5f00255&| +0#0000000&@60
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|4+0#e000002&|2|E|4|2|;+0#af5f00255&| +0#0000000&@60
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|4+0#e000002&|2|E|~|4|2|;+0#af5f00255&| +0#0000000&@59
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|4+0#e000002&|2|.|4|2|E|4|2|;+0#af5f00255&| +0#0000000&@57
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|4+0#e000002&|2|.|4|2|E|~|4|2|;+0#af5f00255&| +0#0000000&@56
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|~+0#e000002&|4|2|.|4|2|;+0#af5f00255&| +0#0000000&@5|(+0#0000e05&|*| |s|i|n|g|l|e| |t|o|k|e|n| |*|)| +0#0000000&@35
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|~+0#e000002&|4|2|.|4|2|;+0#af5f00255&| +0#0000000&@5|(+0#0000e05&|*| |s|i|n|g|l|e| |t|o|k|e|n| |*|)| +0#0000000&@35
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|~+0#e000002&|4|2|E|4|2|;+0#af5f00255&| +0#0000000&@5|(+0#0000e05&|*| |s|i|n|g|l|e| |t|o|k|e|n| |*|)| +0#0000000&@35
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|~+0#e000002&|4|2|E|~|4|2|;+0#af5f00255&| +0#0000000&@4|(+0#0000e05&|*| |s|i|n|g|l|e| |t|o|k|e|n| |*|)| +0#0000000&@35
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|~+0#e000002&|4|2|.|4|2|E|4|2|;+0#af5f00255&| +0#0000000&@2|(+0#0000e05&|*| |s|i|n|g|l|e| |t|o|k|e|n| |*|)| +0#0000000&@35
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|~+0#e000002&|4|2|.|4|2|E|~|4|2|;+0#af5f00255&| +0#0000000&@1|(+0#0000e05&|*| |s|i|n|g|l|e| |t|o|k|e|n| |*|)| +0#0000000&@35
|
||||
@57|1|9|,|1| @9|2|5|%|
|
||||
20
runtime/syntax/testdir/dumps/sml_02.dump
Normal file
20
runtime/syntax/testdir/dumps/sml_02.dump
Normal file
@@ -0,0 +1,20 @@
|
||||
|v+0#af5f00255#ffffff0|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|~+0#e000002&|4|2|.|4|2|E|~|4|2|;+0#af5f00255&| +0#0000000&@1|(+0#0000e05&|*| |s|i|n|g|l|e| |t|o|k|e|n| |*|)| +0#0000000&@35
|
||||
@75
|
||||
@75
|
||||
|(+0#0000e05&|*| |C|h|a|r|a|c|t|e|r| |c|o|n|s|t|a|n|t|s| |*|)| +0#0000000&@49
|
||||
@75
|
||||
>v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|#+0#e000002&|"|a|"|;+0#af5f00255&| +0#0000000&@61
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|#+0#e000002&|"|\+0#e000e06&|a|"+0#e000002&|;+0#af5f00255&| +0#0000000&@60
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|#+0#e000002&|"|\+0#e000e06&|b|"+0#e000002&|;+0#af5f00255&| +0#0000000&@60
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|#+0#e000002&|"|\+0#e000e06&|t|"+0#e000002&|;+0#af5f00255&| +0#0000000&@60
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|#+0#e000002&|"|\+0#e000e06&|n|"+0#e000002&|;+0#af5f00255&| +0#0000000&@60
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|#+0#e000002&|"|\+0#e000e06&|v|"+0#e000002&|;+0#af5f00255&| +0#0000000&@60
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|#+0#e000002&|"|\+0#e000e06&|f|"+0#e000002&|;+0#af5f00255&| +0#0000000&@60
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|#+0#e000002&|"|\+0#e000e06&|r|"+0#e000002&|;+0#af5f00255&| +0#0000000&@60
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|#+0#e000002&|"|\+0#e000e06&|"|"+0#e000002&|;+0#af5f00255&| +0#0000000&@60
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|#+0#e000002&|"|\+0#e000e06&@1|"+0#e000002&|;+0#af5f00255&| +0#0000000&@60
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|#+0#e000002&|"|\+0#e000e06&|^|@|"+0#e000002&|;+0#af5f00255&| +0#0000000&@59
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|#+0#e000002&|"|\+0#e000e06&|^|A|"+0#e000002&|;+0#af5f00255&| +0#0000000&@59
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|#+0#e000002&|"|\+0#e000e06&|^|K|"+0#e000002&|;+0#af5f00255&| +0#0000000&@59
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|#+0#e000002&|"|\+0#e000e06&|^|Z|"+0#e000002&|;+0#af5f00255&| +0#0000000&@59
|
||||
@57|3|7|,|1| @9|5|9|%|
|
||||
20
runtime/syntax/testdir/dumps/sml_03.dump
Normal file
20
runtime/syntax/testdir/dumps/sml_03.dump
Normal file
@@ -0,0 +1,20 @@
|
||||
|v+0#af5f00255#ffffff0|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|#+0#e000002&|"|\+0#e000e06&|^|Z|"+0#e000002&|;+0#af5f00255&| +0#0000000&@59
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|#+0#e000002&|"|\+0#e000e06&|^|[|"+0#e000002&|;+0#af5f00255&| +0#0000000&@59
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|#+0#e000002&|"|\+0#e000e06&|^|\|"+0#e000002&|;+0#af5f00255&| +0#0000000&@59
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|#+0#e000002&|"|\+0#e000e06&|^|]|"+0#e000002&|;+0#af5f00255&| +0#0000000&@59
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|#+0#e000002&|"|\+0#e000e06&|^@1|"+0#e000002&|;+0#af5f00255&| +0#0000000&@59
|
||||
>v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|#+0#e000002&|"|\+0#e000e06&|^|_|"+0#e000002&|;+0#af5f00255&| +0#0000000&@59
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|#+0#e000002&|"|\+0#e000e06&|0@2|"+0#e000002&|;+0#af5f00255&| +0#0000000&@58
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|#+0#e000002&|"|\+0#e000e06&|9@2|"+0#e000002&|;+0#af5f00255&| +0#0000000&@58
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|#+0#e000002&|"|\+0#e000e06&|u|0@3|"+0#e000002&|;+0#af5f00255&| +0#0000000&@56
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|#+0#e000002&|"|\+0#e000e06&|u|F@3|"+0#e000002&|;+0#af5f00255&| +0#0000000&@56
|
||||
@75
|
||||
@75
|
||||
|(+0#0000e05&|*| |S|t|r|i|n|g| |c|o|n|s|t|a|n|t|s| |*|)| +0#0000000&@52
|
||||
@75
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|"+0#e000002&@1|;+0#af5f00255&| +0#0000000&@63
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|"+0#e000002&|a|b|c|"|;+0#af5f00255&| +0#0000000&@60
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|"+0#e000002&|.@2|\+0#e000e06&|a|.+0#e000002&@2|\+0#e000e06&|b|.+0#e000002&@2|\+0#e000e06&|t|.+0#e000002&@2|\+0#e000e06&|n|.+0#e000002&@2|\+0#e000e06&|v|.+0#e000002&@2|\+0#e000e06&|f|.+0#e000002&@2|\+0#e000e06&|r|.+0#e000002&@2|\+0#e000e06&|"|.+0#e000002&@2|\+0#e000e06&@1|.+0#e000002&@2|"|;+0#af5f00255&| +0#0000000&@15
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|"+0#e000002&|.@2|\+0#e000e06&|^|@|.+0#e000002&@2|\+0#e000e06&|^|A|.+0#e000002&@2|\+0#e000e06&|^|K|.+0#e000002&@2|\+0#e000e06&|^|Z|.+0#e000002&@2|\+0#e000e06&|^|[|.+0#e000002&@2|\+0#e000e06&|^|\|.+0#e000002&@2|\+0#e000e06&|^|]|.+0#e000002&@2|\+0#e000e06&|^@1|.+0#e000002&@2|\+0#e000e06&|^|_|.+0#e000002&@2|"|;+0#af5f00255&| +0#0000000&@6
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|"+0#e000002&|\+0#e000e06&|0@2|.+0#e000002&@2|\+0#e000e06&|9@2|.+0#e000002&@2|\+0#e000e06&|u|0@3|.+0#e000002&@2|\+0#e000e06&|u|F@3|.+0#e000002&@2|"|;+0#af5f00255&| +0#0000000&@31
|
||||
@57|5@1|,|1| @9|9|4|%|
|
||||
20
runtime/syntax/testdir/dumps/sml_04.dump
Normal file
20
runtime/syntax/testdir/dumps/sml_04.dump
Normal file
@@ -0,0 +1,20 @@
|
||||
|v+0#af5f00255#ffffff0|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|"+0#e000002&|\+0#e000e06&|0@2|.+0#e000002&@2|\+0#e000e06&|9@2|.+0#e000002&@2|\+0#e000e06&|u|0@3|.+0#e000002&@2|\+0#e000e06&|u|F@3|.+0#e000002&@2|"|;+0#af5f00255&| +0#0000000&@31
|
||||
|v+0#af5f00255&|a|l| +0#0000000&|_+0#af5f00255&| +0#0000000&|=+0#af5f00255&| +0#0000000&|"+0#e000002&|.@2|\+0#e000e06&| +0#0000000&@61
|
||||
| +0#e000e06&@11|\|.+0#e000002&@2|"|;+0#af5f00255&| +0#0000000&@56
|
||||
> @74
|
||||
|~+0#4040ff13&| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
| +0#0000000&@56|7|1|,|0|-|1| @7|B|o|t|
|
||||
71
runtime/syntax/testdir/input/sml.sml
Normal file
71
runtime/syntax/testdir/input/sml.sml
Normal file
@@ -0,0 +1,71 @@
|
||||
(* Integer constants *)
|
||||
|
||||
val _ = 0;
|
||||
val _ = 42;
|
||||
val _ = 0x2A;
|
||||
val _ = ~42; (* single token *)
|
||||
val _ = ~0x2A; (* single token *)
|
||||
|
||||
|
||||
(* Word constants *)
|
||||
|
||||
val _ = 0w0;
|
||||
val _ = 0w42;
|
||||
val _ = 0wx2A;
|
||||
val _ = ~0w42; (* nonfix ~ *)
|
||||
val _ = ~0wx2A; (* nonfix ~ *)
|
||||
|
||||
|
||||
(* Real constants *)
|
||||
|
||||
val _ = 0.0;
|
||||
val _ = 42.42;
|
||||
val _ = 42E42;
|
||||
val _ = 42E~42;
|
||||
val _ = 42.42E42;
|
||||
val _ = 42.42E~42;
|
||||
val _ = ~42.42; (* single token *)
|
||||
val _ = ~42.42; (* single token *)
|
||||
val _ = ~42E42; (* single token *)
|
||||
val _ = ~42E~42; (* single token *)
|
||||
val _ = ~42.42E42; (* single token *)
|
||||
val _ = ~42.42E~42; (* single token *)
|
||||
|
||||
|
||||
(* Character constants *)
|
||||
|
||||
val _ = #"a";
|
||||
val _ = #"\a";
|
||||
val _ = #"\b";
|
||||
val _ = #"\t";
|
||||
val _ = #"\n";
|
||||
val _ = #"\v";
|
||||
val _ = #"\f";
|
||||
val _ = #"\r";
|
||||
val _ = #"\"";
|
||||
val _ = #"\\";
|
||||
val _ = #"\^@";
|
||||
val _ = #"\^A";
|
||||
val _ = #"\^K";
|
||||
val _ = #"\^Z";
|
||||
val _ = #"\^[";
|
||||
val _ = #"\^\";
|
||||
val _ = #"\^]";
|
||||
val _ = #"\^^";
|
||||
val _ = #"\^_";
|
||||
val _ = #"\000";
|
||||
val _ = #"\999";
|
||||
val _ = #"\u0000";
|
||||
val _ = #"\uFFFF";
|
||||
|
||||
|
||||
(* String constants *)
|
||||
|
||||
val _ = "";
|
||||
val _ = "abc";
|
||||
val _ = "...\a...\b...\t...\n...\v...\f...\r...\"...\\...";
|
||||
val _ = "...\^@...\^A...\^K...\^Z...\^[...\^\...\^]...\^^...\^_...";
|
||||
val _ = "\000...\999...\u0000...\uFFFF...";
|
||||
val _ = "...\
|
||||
\...";
|
||||
|
||||
Reference in New Issue
Block a user