| Class | Description |
|---|---|
| Comment |
https://www.cl.cam.ac.uk/~mgk25/iso-14977.pdf
(* A comment is allowed anywhere outside a
<terminal string>, <meta identifier>,
<integer> or <special sequence> *);
comment = ’(*’, {comment symbol}, ’*)’
|
| CommentOrSpaceDelimitor | |
| Comments | |
| CommentSymbol |
https://www.cl.cam.ac.uk/~mgk25/iso-14977.pdf
comment symbol
= comment
| terminal string
| special sequence
| character;
|
| DecimalDigit |
(* see 7.2 *) decimal digit
= ’0’ | ’1’ | ’2’ | ’3’ | ’4’ | ’5’ | ’6’ | ’7’
| ’8’ | ’9’;
|
| DefinitionsList |
https://www.cl.cam.ac.uk/~mgk25/iso-14977.pdf
definitions list
= single definition, {’|’, single definition}
|
| Empty |
https://www.cl.cam.ac.uk/~mgk25/iso-14977.pdf
empty = ;
|
| Exception |
https://www.cl.cam.ac.uk/~mgk25/iso-14977.pdf
(* A <factor> may be used as an <exception>
if it could be replaced by a <factor>
containing no <meta identifiers> *);
exception = factor
|
| Factor |
https://www.cl.cam.ac.uk/~mgk25/iso-14977.pdf
(* The <integer> specifies the number of
repetitions of the <primary> *);
factor = [integer, ’*’], primary
|
| GroupedSequence |
https://www.cl.cam.ac.uk/~mgk25/iso-14977.pdf
(* The brackets ( and ) allow any
<definitions list> to be a <primary> *);
grouped sequence = ’(’, definitions list, ’)’
|
| Integer |
https://www.cl.cam.ac.uk/~mgk25/iso-14977.pdf
(* see 4.9 *) integer
= decimal digit, {decimal digit};
|
| Letter |
(* see 7.2 *) letter
= ’a’ | ’b’ | ’c’ | ’d’ | ’e’ | ’f’ | ’g’ | ’h’
| ’i’ | ’j’ | ’k’ | ’l’ | ’m’ | ’n’ | ’o’ | ’p’
| ’q’ | ’r’ | ’s’ | ’t’ | ’u’ | ’v’ | ’w’ | ’x’
| ’y’ | ’z’
| ’A’ | ’B’ | ’C’ | ’D’ | ’E’ | ’F’ | ’G’ | ’H’
| ’I’ | ’J’ | ’K’ | ’L’ | ’M’ | ’N’ | ’O’ | ’P’
| ’Q’ | ’R’ | ’S’ | ’T’ | ’U’ | ’V’ | ’W’ | ’X’
| ’Y’ | ’Z’;
|
| MetaIdentifier |
https://www.cl.cam.ac.uk/~mgk25/iso-14977.pdf
4.14 Meta-identifier
A meta-identifier consists of an ordered list of one or more
meta-identifier-characters subject to the condition that the
first meta-identifier-character is a letter.
|
| OptionalSequence |
https://www.cl.cam.ac.uk/~mgk25/iso-14977.pdf
optional sequence = ’[’, definitions list, ’]’
|
| Primary |
https://www.cl.cam.ac.uk/~mgk25/iso-14977.pdf
primary
= optional sequence
| repeated sequence
| special sequence
| grouped sequence
| meta identifier
| terminal string
| empty;
|
| RepeatedSequence |
https://www.cl.cam.ac.uk/~mgk25/iso-14977.pdf
(* The brackets { and } enclose symbols
which may be repeated any number of times *);
repeated sequence = ’{’, definitions list, ’}’
|
| SingleDefinition |
https://www.cl.cam.ac.uk/~mgk25/iso-14977.pdf
(* , separates successive <terms> *);
single definition = term, {’,’, term}
|
| SpecialSequence |
https://www.cl.cam.ac.uk/~mgk25/iso-14977.pdf
(* The meaning of a <special sequence> is not
defined in the standard metalanguage.
|
| Syntax |
https://www.cl.cam.ac.uk/~mgk25/iso-14977.pdf
4.2 Syntax
The syntax of a language consists of one or more syntax-rules.
|
| SyntaxRule |
https://www.cl.cam.ac.uk/~mgk25/iso-14977.pdf
4.3 Syntax-rule
A syntax-rule consists of a meta-identifier (the name of
the non-terminal symbol being defined) followed by a
defining-symbol followed by a definitions-list followed by
a terminator-symbol.
|
| Term |
https://www.cl.cam.ac.uk/~mgk25/iso-14977.pdf
(* A <term> represents any sequence of symbols
that is defined by the <factor> but
not defined by the <exception> *);
term = factor, [’-’, exception]
|
| TerminalString |
(* A <terminal string> represents the
<characters> between the quote symbols
’_’ or "_" *);
terminal string
= "’", character - "’", {character - "’"}, "’"
| ’"’, character - ’"’, {character - ’"’}, ’"’
|