~emersion/scfg

ref: 0e1b10bd9d2ae45139e5687dde3de4d86c0ec1b6 scfg/README.md -rw-r--r-- 1.0 KiB
0e1b10bdSimon Ser Initial commit 9 months ago

#scfg

A simple configuration file format.

#Specification

Grammar in ABNF:

config = *directive

directive = directive-name 1*WSP directive-params 1*WSP *1block newline
directive-name = word
directive-params = *word

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

word = atom / dquote-word / squote-word
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
	; any Unicode code point, excluding CTL, DQUOTE, "\", LF
SQCHAR = %x21-26 / %x28-7E / %x80-10FFFF
	; any Unicode code point, excluding CTL, "'", LF
VCHAR = SQCHAR / "'"
	; any Unicode code point, excluding CTL, LF

#Implementations

go-scfg

#License

This specification text is licensed with CC-BY-SA.