Debian Codegraph @

documentation/manual/grammar/delimseries.yo

raw
1 A series of elements which are separated from each other using some delimiter
2 again normally uses left-recursion. For example, a bf(C++) variable definition
3 list consists of one or more identifiers, separated by comma's. If there is
4 only one identifier no comma is used. Here is the rule defining a list using
5 separators:
6 verb(
7 variables:
8 IDENTIFIER
9 |
10 variables ',' IDENTIFIER
11 )
12 The above rule can be used as a prototype for recognizing a series of
13 delimited elements. The generic form of this rule could be formulated as
14 follows:
15 verb(
16 series:
17 unit
18 |
19 series delimiter unit
20 )
21 Note that the single element is em(first) recognized, whereafter the
22 left-recursive alternative may be recognized repeatedly. In fact, this rule is
23 not really different from the standard rule for a series, which does not hold
24 true for the rule to recognize an em(optional) series of delimited elements,
25 covered in the next section.