
Allegro CL 
1 Introduction 1.4 Definitions 1.4.1 Notational Conventions 1.4.1.2 Modified BNF Syntax
1.4.1.2.1 Splicing in Modified BNF SyntaxThe primary extension used is the following:
An expression of this form appears whenever a list of elements is to be spliced into a larger structure and the elements can appear in any order. The symbol O represents a description of the syntax of some number of syntactic elements to be spliced; that description must be of the form
O_{1}  ...  O_{l} where each O_{i} can be of the form S or of the form S^{*} or of the form S^{1}. The expression [[O]] means that a list of the form
(O_{i1} ... O_{ij}) 1 <= j
is spliced into the enclosing expression,
such that if n <> m and 1 <= n,m <= j,
then either O_{in} <> O_{im}
or O_{in} = O_{im} = Q_{k},
where for some 1 <= k <= n, O_{k} is of the form Q_{k}^{*}.
Furthermore, for each O_{in} that is of the form For example, the expression (x [[A  B^{*}  C]] y) means that at most one A, any number of B's, and at most one C can occur in any order. It is a description of any of these:
(x y) (x B A C y) (x A B B B B B C y) (x C B A B B B y) but not any of these:
(x B B A A C C y) (x C B C y) In the first case, both A and C appear too often, and in the second case C appears too often.
The notation [[O_{1}  O_{2}  ... ]]+ adds the additional restriction that at least one item from among the possible choices must be used. For example: (x [[A  B^{*}  C]]+ y) means that at most one A, any number of B's, and at most one C can occur in any order, but that in any case at least one of these options must be selected. It is a description of any of these:
(x B y) (x B A C y) (x A B B B B B C y) (x C B A B B B y) but not any of these:
(x y) (x B B A A C C y) (x C B C y) In the first case, no item was used; in the second case, both A and C appear too often; and in the third case C appears too often. Also, the expression:
(x [[ can generate exactly these and no others:
(x A B C y) (x A C B y) (x A B y) (x B A C y) (x B C A y) (x B A y) (x C A B y) (x C B A y)
