From: Mark Wooding Date: Tue, 20 Aug 2019 11:24:32 +0000 (+0100) Subject: doc/refintro.tex: Fix indexed-nonterminal argument abbreviation. X-Git-Url: https://git.distorted.org.uk/~mdw/sod/commitdiff_plain/48c123c9d37880d48d415309b014325e5bc55162 doc/refintro.tex: Fix indexed-nonterminal argument abbreviation. The thing with the unfinished ellipsis causes a very unpleasant effect where dots at different heights are separated only by a comma. Reluctantly, I fix this by replacing the nearly approachable `\$alpha | \beta | ...' notation with numeric superscripts. --- diff --git a/doc/refintro.tex b/doc/refintro.tex index 6d93b65..b0626c3 100644 --- a/doc/refintro.tex +++ b/doc/refintro.tex @@ -107,12 +107,14 @@ As a notational convenience, where an indexed nonterminal appears on the right-hand side of a production rule, each actual argument may be a sequence of alternative right-hand sides, separated by `$|$', rather than a a simple terminal or nonterminal symbol. A complex indexing of this form, say -$x[\alpha_1 | \beta_1 | \cdots, \ldots, \alpha_n | \beta_n | \cdots]$ means -exactly the same as $x[a_1, \ldots, a_n]$ with the additional rules +\syntax{$x$@[$\alpha_1^1$ @! $\alpha_1^2$ $| \cdots |$ $\alpha_1^{m_1}, +\ldots,$ $\alpha_n^1$ @! $\alpha_n^2$ $| \cdots |$ $\alpha_n^{m_n}$@]} +means exactly the same as \syntax{$x$@[$a_1, \ldots, a_n$@]} with the +additional rules \begin{quote} - \syntax{$a_1$ ::= $\alpha_1$ @! $\beta_1$ @! $\cdots$} \\ - \hbox{}\qquad $\vdots$ \\ - \syntax{$a_n$ ::= $\alpha_n$ @! $\beta_n$ @! $\cdots$} + \syntax{$a_1$ ::= $\alpha_1^1$ @! $\alpha_1^2$ $| \cdots |$ $\alpha_1^{m_1}$} \\* + \hbox{}\qquad $\vdots$ \\* + \syntax{$a_n$ ::= $\alpha_n^1$ @! $\alpha_n^2$ $| \cdots |$ $\alpha_1^{m_n}$} \end{quote} where $a_1$, \ldots, $a_n$ are new nonterminal symbols.