| Reg expr | Sym | Use | Notes |
[A-Za-z_][A-Za-z0-9_]* | SIDENT | entity name, entity type | A simple identifier. This is the identifier sub-set that is acceptable to most text-based languages used, including shell command interpreters (bash, csh), Perl,C, Java, etc. Most user-defined names in the ADL language are of this type (exceptions are noted, where needed). |
[A-Za-z_$.-] [A-Za-z0-9_$.-]* | IDENT | entity name, attribute name | An identifier. Similar to a C identifier, but '-', '$' and '.' are also valid characters. |
[^,"'>=#\s]+ | STR | attribute value | A "bare" string. A string that is not quoted is allowed as a value for an attribute, if it does not contain any special characters. |
'[^']*' or "(\\["]!\\t! \\n!\\r![^"])*" | STR | attribute value | A quoted string, with two variants - single-quoted and double-quoted, interpreted in a manner similar to Perl - the single-quoted string recognizes no special meta-characters and can quote any printable characters except a single quote; the double-quoted string recognizes the \ meta-character and allows quoting of the double-quote itself and some non-printable characters as well. |
[\]\[{}:,='"] | punctuation | See the Punctuation Details section below. |
=> | punctuation | Association separator |
[ ]+ | whitespace | whitespace is a syntax separator, whenever two adjacent lexemes cannot be distinguished otherwise (e.g., two identifiers). In all other cases, whitespace between lexemes is simply ignored. |
\n | separator | A newline or the EOF assertion. Multiple newlines are treated as one. |
: | separates an entity definition from an in-line list of attributes for that entity |
, | separates attributes in an attribute list following an entity definition (in-line attributes) |
{} | block separators. These must appear alone on a line. A pair of braces encloses a set of attributes and/or sub-entities related to the entity after which they appear. Only one block is allowed per entity and only a single pair of braces should be used to enclose it, i.e., constructs like these below are invalid: input X { { # double brace - illegal protocol=http } } input X { } { # second block for same entity - illegal protocol=http } |
[] | array block separators. A pair of square brackets following an entity heading identifies it as an "array" entity. Like the { } separators, these must appear alone on a line. Each line in the [ ] block is a comma-separated list of attributes for a single array element. |
\ | when found at the end of a line, this is a 'line continuation' character. The next line is treated as part of the current line. |
# | comment separator. All characters following #, up to the end of line are ignored (including the \ line continuation character). |