7.2.Lexical conventions (Since 1.1.0)
- A script is a sequence of tokens separated by
| or ||. Leading and trailing
whitespace of every token is ignored; an empty token is skipped.
- The reserved characters are
| ; ( ) { } [ ] # ! $ @ %. $ starts a native
function, @ an expression marker, % a user-function call (§7.8); # separates a
variation name; ! ends a gloss token; ; is the compound operator. A gloss name,
expression name, or label MUST NOT contain | ; ( ) { } [ ], MUST NOT start with $,
@ or %, and a gloss name MUST NOT end with !. A gloss name additionally MUST NOT
contain % anywhere, and contains # at most once and never as its first or last
character.
- There is no comment syntax and no escaping or quoting.
- Numbers are written as plain decimals (optional sign, digits, optional fraction). A
producer MUST emit that form; a consumer MAY accept other numeric spellings. A
non-numeric value in a numeric slot is an error.
- Arguments are positional and comma-separated inside one pair of parentheses, which
MUST NOT nest. Every argument is optional: an empty or missing slot takes its default,
and omitted parentheses mean all defaults. A trailing
label slot takes the rest of the
argument text, so a label may contain commas.
- Case. Gloss names, expression names (including
none and break), user-function
names, and anchor sites are matched case-insensitively. Native function keywords
($pause, $shift, $reset, $spell, $anchor, $mirror, $buoy, $compound,
$viseme) are lowercase and case-sensitive.
| splits only at bracket and brace depth 0, so the bodies of [ … ] and { … } keep
their inner separators. ; splits only at parenthesis, bracket and brace depth 0.