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):
S-CHAR is any member of the Unicode character set (http://www.unicode.org; see section 13.4 for storing as UTF-8 on files) except double-quote ‘”’, and backslash ‘\’.
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.
Note:
White-space and comments can be used between separate lexical units and/or symbols, and also separates them. Each lexical unit will consume the maximum number of characters from the input stream. White-space 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.
Each description-string or string in annotations (= STRING with production annotation-clause 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 shall not be used as identifiers.
Productions use hyphen as separator both in the grammar and in the text. Previously the grammar used underscore.