Legend Context Free Grammar
The syntax rules are described in
EBNF ( Extended Backus-Naur-Form ).
A startsymbol must exist for each source file type. That means the syntax
of each file must match the corresponding start rule.
The other are internal helper rules.
Each rule
is structured as follows: <Rule Type: start or let>
<Rule Identifier> :: <EBNF-konform Expression>
An EBNF-konform expression defines a part
of the language syntax. It consists of a set of alternative productions i.e.
partial expressions, separated by the character '|'.
A production is specified with the help of the following elements and operators:
-
Expression1 Expression2 ... ExpressionN
Concatenation of partial expressions
-
Expression1 | Expression2 | ... | ExpressionN
Union of partial expressions ( alternatives )
-
[ Expression ]
Optional partial expression
-
{ Expression }
Iteration of a partial expression ( 0 .. )
-
Expression +
Iteration of a partial expression ( 1 .. )
-
( Expression )
Combination of a partial expression ( subexpression )
-
Token Identifier
... from the regular grammar
-
Rule Identifier
... from the context-free grammar
-
Keyword
Constant string / character sequence
-
[other]
Special keyword denoting the
character sequences from the set 'Sigma* \ Tokenset'