a 1 b 2
and
a 1 b 2
are lexically equivalent and parse identically to give the four tokens:
a 1 b 2
The ASCII characters representing whitespace can occur within literal strings, in which case they are protected from the normal parsing process (they remain as part of the string). For example:
name "John Smith"
parses to two tokens, including the single literal-string token "John Smith".
"John \ Smith"
is parsed as "John Smith".
a 1 # this is a comment
confdir:
will reference the global configuration directory.
</etc/alsa1.conf> <confdir:pcm/surround.conf>
{} [] , ; = . ' " new-line form-feed carriage-return whitespace
a { b 1 }
a [ "first" "second" ]
The above code is equal to
a.0 "first" a.1 "second"
a 1; b 1,
a=1 b=2
Using equal signs is not required because whitespace suffices to separate tokens.
a 1 # is equal to a=1 # is equal to a=1; # is equal to a 1,
a { b = 1 } a={ b 1, }
a.b 1 a.b=1
a [ "first" "second" ]
a.0 "first" a.1 "second"
The operation mode 'merge' merges the node with the old one (which must exist). Type checking is done, so strings cannot be assigned to integers and so on. This mode is specified with the prefix character minus (-).
The operation mode 'do not override' ignores a new configuration node if a configuration node with the same name exists. This mode is specified with the prefix character question mark (?).
The operation mode 'override' always overrides the old configuration node with new contents. This mode is specified with the prefix character exclamation mark (!).
defaults.pcm.!device 1
# Configuration file syntax # Include a new configuration file <filename> # Simple assignment name [=] value [,|;] # Compound assignment (first style) name [=] { name1 [=] value [,|;] ... } # Compound assignment (second style) name.name1 [=] value [,|;] # Array assignment (first style) name [ value0 [,|;] value1 [,|;] ... ] # Array assignment (second style) name.0 [=] value0 [,|;] name.1 [=] value1 [,|;]