Snowberry configuration file syntax

From Doomsday Wiki
Jump to: navigation, search

This article presents an EBNF syntax definition of Snowberry configuration files.

config-file  ::= { S element } S
element  ::= list | block
key  ::= value-key
row-key  ::= identifier S ":" S row
row  ::= { ascii-character } "\n"
value-key  ::= identifier S "=" S value { S value }
value  ::= string
string  ::= "\"" { ascii-character } "\""
token  ::= { ascii-character, but not S nor E }
list  ::= identifier S "<" S valuelist S ">"
valuelist  ::= value { S "," S value }
block  ::= blocktype S identifier S { identifier S value S } blockcontents
blocktype  ::= token
blockcontents  ::= "(" { S element } S ")"
identifier  ::= token
S  ::= "\t" | "\n" } *whitespace*
E  ::= "=" | "(" | ")" | "<" | ">" | "," *separator*