@@ -2,23 +2,23 @@ maml = space value space
22
33value = object / array / string / multiline-string / number / " true" / " false" / " null"
44
5- object = '{' [ members ] space '}'
5+ object = " { " [ members ] space " } "
66
77members = space key-value ws [ comment ] separator members
88members =/ space key-value space [ separator ]
99
10- key-value = key ws ':' ws value
10+ key-value = key ws " : " ws value
1111
1212key = string / identifier
1313
14- identifier = 1 * ( ALPHA / DIGIT / '-' / '_' )
14+ identifier = 1 * ( ALPHA / DIGIT / " - " / " _ " )
1515
16- array = '[' [ items ] space ']'
16+ array = " [ " [ items ] space " ] "
1717
1818items = space value ws [ comment ] separator items
1919items =/ space value space [ separator ]
2020
21- separator = ',' / newline
21+ separator = " , " / newline
2222
2323string = quote * char quote
2424
@@ -28,31 +28,40 @@ multiline-string-body = *literal-char *( allowed-quotes 1*literal-char ) [ allow
2828
2929allowed-quotes = 1 * 2quote
3030
31- quote = ' " '
31+ quote = % x 22
3232
3333literal-char = %x 09 / %x 20 -21 / %x 23 -7E / non-ascii / newline
3434
35- number = [ '-' ] integer [ fraction ] [ exp ]
35+ number = [ " - " ] integer [ fraction ] [ exp ]
3636
3737onenine = %x 31 -39
3838
39- exp = ( 'e' / 'E' ) [ '-' / '+' ] 1*DIGIT
39+ exp = ( " e " / " E " ) [ " - " / " + " ] 1 * DIGIT
4040
41- fraction = '.' 1*DIGIT
41+ fraction = " . " 1 * DIGIT
4242
43- integer = '0' / ( onenine *DIGIT )
43+ integer = " 0 " / ( onenine * DIGIT )
4444
4545char = %x 20 -21 / %x 23 -5B / %x 5D -10FFFF
46- char =/ %x5C ( %x5C / ' " ' / ' / ' / ' b ' / ' f ' / ' n ' / ' r ' / ' t ' / ' u ' 4HEXDIG )
46+ char =/ %x 5C ( %x 5C / quote / " / " / " b " / " f " / " n " / " r " / " t " / " u " 4HEXDIG )
4747
4848space = * ( ws [ comment ] )
4949
50- comment = '#' * non-eol
50+ comment = " # " * non-eol
5151
5252non-eol = %x 09 / %x 20 -7E / non-ascii
5353
5454non-ascii = %x 80 -D7FF / %x E000 -10FFFF
5555
56- newline = LF / CRLF
56+ newline = LF / CR LF
5757
5858ws = * ( SP / HTAB / LF / CR )
59+
60+ SP = %x 20 ; space
61+ CR = %x 0D ; carriage return
62+ LF = %x 0A ; linefeed
63+ HTAB = %x 09 ; horizontal tab
64+ ALPHA = %x 41 -5A / %x 61 -7A ; A-Z / a-z
65+ DIGIT = %x 30 -39 ; 0-9
66+ HEXDIG = DIGIT / " A" / " B" / " C" / " D" / " E" / " F"
67+
0 commit comments