The following syntactic meta symbols are used (extended BNF):
The following lexical units are defined (the ones in boldface are the ones used in the grammar, the rest are just internal to the definition of other lexical units):
For identifiers the redundant escapes (’\?’ and ’\"’) are the same as the corresponding non-escaped variants (’?’ and ’"’). [The single quotes are part of an identifier. E.g. ’x’ and x are different IDENTs].
Whitespace and comments can be used between separate lexical units and/or symbols, and also separates them. Whitespace and comments cannot be used inside other lexical units, except for STRING and Q-IDENT where they are treated as part of the STRING or Q-IDENT lexical unit.
String constant concatenation "a" "b" becoming "ab" (as in C) is replaced by the "+" operator in Modelica.
Modelica uses the same comment syntax as C++ and Java (i.e., // signals the start of a line comment and /**/ …. */ is a multi-line comment); comments may contain any Unicode character. Modelica also has structured comments in the form of annotations and string comments.
Description strings (= production “string-comment” in the grammar) and strings in annotations (= STRING with production annotation-comment in the grammar) may contain any member of the Unicode character set. All other strings have to contain only the sub-set of Unicode characters identical with the 7-bit US-ASCII character set. [As a consequence, operators like “>” or “<”, and external functions only operate on ASCII strings and not on Unicode-strings. Within a description string the tags <HTML> and </HTML> or <html> and </html> define optionally begin and end of content that is HTML encoded.]
Boldface denotes keywords of the Modelica language. Keywords are reserved words and may not be used as identifiers.
Productions use hyphen as separator both in the grammar and in the text. Previously the grammar used underscore.