Skip to content

Commit f17a528

Browse files
committed
Update maml.abnf
1 parent 97518e5 commit f17a528

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

maml.abnf

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
maml = space value space
22

3-
value = object / array / string / number / "true" / "false" / "null"
3+
value = object / array / string / multiline-string / number / "true" / "false" / "null"
44

55
object = '{' [ members ] space '}'
66

@@ -20,7 +20,17 @@ items =/ space value space [ separator ]
2020

2121
separator = ',' / newline
2222

23-
string = '"' *char '"'
23+
string = quote *char quote
24+
25+
multiline-string = 3quote [ newline ] multiline-string-body 3quote
26+
27+
multiline-string-body = *literal-char *( allowed-quotes 1*literal-char ) [ allowed-quotes ]
28+
29+
allowed-quotes = 1*2quote
30+
31+
quote = '"'
32+
33+
literal-char = %x09 / %x20-21 / %x23-7E / non-ascii / newline
2434
2535
number = [ '-' ] integer [ fraction ] [ exp ]
2636
@@ -33,7 +43,7 @@ fraction = '.' 1*DIGIT
3343
integer = '0' / ( onenine *DIGIT )
3444
3545
char = %x20-21 / %x23-5B / %x5D-10FFFF
36-
char =/ '\' ( '"' / '\' / '/' / 'b' / 'f' / 'n' / 'r' / 't' / %x75 4HEXDIG )
46+
char =/ %x5C ( %x5C / '"' / '/' / 'b' / 'f' / 'n' / 'r' / 't' / 'u' 4HEXDIG )
3747

3848
space = *( ws [ comment ] )
3949

0 commit comments

Comments
 (0)