
Go backward to C.1 Introduction
Go up to C Concrete Syntax
Go forward to C.3 Disambiguation
C.2 Context-Free Syntax
The grammar in this section uses uppercase words for nonterminal
symbols, allowing also hyphens. All other characters stand for
themselves, with the following exceptions:
- `::=' and `|' are generally used as meta-notation,
as in BNF;
- A string of characters enclosed in double quotation marks
`"..."' always stands for the enclosed characters themselves;
- `N t...t N' indicates one or more
repetitions of the nonterminal symbol N separated by the
terminal symbol t (which is usually a comma or semicolon);
- `N...N' is simply one or more repetitions of
N
(occasionally, N here is a sequence of terminal
and nonterminal symbols, such as `[ SPEC ]');
- `var/vars' indicates that the singular and plural forms
may be used interchangeably, and similarly for other keywords;
`end/' indicates that the use of `end' is optional, and
similarly for semicolons: `;/'.
The following nonterminal symbols are for lexical syntax, and defined
in Section C.4: WORDS, DOT-WORDS,
NO-BRACKET-SIGNS, DIGIT, DIGITS, NUMBER,
QUOTED-CHAR, URL, and PATH. Lexical analysis for
CASL is generally independent of the context-free parsing (apart from
the recognition of URL and PATH, which may appear in
libraries but not within individual specifications).
Context-free parsing of CASL specifications according to the grammar
in this section yields a parse tree where terms and formulae occurring
in axioms and definitions have been grouped with respect to explicit
parentheses and brackets, but where the intended applicative structure
has not yet been recognized. A further phase of mixfix
grouping analysis is needed, dependent on the symbols declared in the
specification and parsing annotations, before the parse tree can be
mapped to a complete abstract syntax tree.
CoFI
Document: CASL/Summary -- Version: 1.0 -- 22 July 1999.
Comments to cofi-language@brics.dk
