~emersion/scfg

2824eccccfacff15e4b1d4307f3be444bd5102f8 — Simon Ser 7 months ago 0e1b10b
Tweak grammar
1 files changed, 9 insertions(+), 9 deletions(-)

M README.md
M README.md => README.md +9 -9
@@ 9,25 9,25 @@ Grammar in [ABNF]:
```abnf
config = *directive

directive = directive-name 1*WSP directive-params 1*WSP *1block newline
directive = directive-name [ 1*WSP directive-params ] [ 1*WSP block ] newline
directive-name = word
directive-params = *word
directive-params = [ word ] / word 1*( 1*WSP word )

block = "{" newline *directive newline "}"
block = "{" newline *directive "}"

word = atom / dquote-word / squote-word
atom = 1*(ACHAR / esc-pair)
dquote-word = DQUOTE *(DQCHAR / esc-pair) DQUOTE
atom = 1*( ACHAR / esc-pair )
dquote-word = DQUOTE *( DQCHAR / esc-pair ) DQUOTE
squote-word = "'" *SQCHAR "'"
esc-pair = "\" VCHAR

newline = *WSP LF *WSP

ACHAR = %x21 / %x23-26 / %x28-7A / %x7C / %x7E / %x80-10FFFF
	; any Unicode code point, excluding CTL, DQUOTE, "'", "{", "}", WSP
DQCHAR = %x21 / %x23-5B / %x5D-7E / %x80-10FFFF
ACHAR = %x21 / %x23-26 / %x28-5B / 0x5D-7A / %x7C / %x7E / %x80-10FFFF
	; any Unicode code point, excluding CTL, DQUOTE, "\", LF, "'", "{", "}", WSP
DQCHAR = ACHAR / "'" / "{" / "}" / WSP
	; any Unicode code point, excluding CTL, DQUOTE, "\", LF
SQCHAR = %x21-26 / %x28-7E / %x80-10FFFF
SQCHAR = %x09 / %x20-26 / %x28-7E / %x80-10FFFF
	; any Unicode code point, excluding CTL, "'", LF
VCHAR = SQCHAR / "'"
	; any Unicode code point, excluding CTL, LF