Next:Lexical analysis. Up:Expressions, parsing and pretty Previous:Expressions, parsing and pretty Contents
We will use BNF-like notation (the standard notation for
grammar) with the following convention:
- Typewriter font for terminal symbols (
like this
). Sequences of
terminal symbols are the only thing reads (by definition). We use range
of characters to simplify when needed (like 0...9
for 0123456789
). - Italic for non-terminal symbols (like that). Non-terminal
symbols are meta-variables describing a set of sequences of terminal
symbols. All non-terminal symbols we use are defined in this section (a
:= denotes such a definition)
- Square brackets [...] denotes optional components, curly brackets
{...} denotes the repetition zero, one or more times of a component, curly
brackets with a plus {...} denotes repetition one or more times of a
component and vertical bar denotes ... ... alternate choices.
Parentheses are used for grouping.
- Warning: sometimes, the syntax uses terminal symbol, like square
brackets, which we use also with a scpecial meaning to describe the
grammar. It is not easy to distinguish for instance the typewriter
square brackets (
[]
) and the normal version ([]). When needed,
we will clarify this by a remark.
Next:Lexical analysis. Up:Expressions, parsing and pretty Previous:Expressions, parsing and pretty Contents Christophe Raffalli
2005-03-02