X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/239fa5bd3dff0b38b0cebdd3438311f21c24ba4f..2672be806e7480e2f4aed24430c863b3683c43c1:/doc/sod.tex diff --git a/doc/sod.tex b/doc/sod.tex index ba2aaa5..8a46735 100644 --- a/doc/sod.tex +++ b/doc/sod.tex @@ -169,11 +169,11 @@ unusual notation in order to make the presentation easier to read. \end{quote} \item @[@@] means an optional @: \begin{quote} - \syntax{@[@] ::= $\epsilon$ | } + \syntax{@[@] ::= $\epsilon$ @! } \end{quote} \item @^* means a sequence of zero or more @s: \begin{quote} - \syntax{@^* ::= $\epsilon$ | @^* } + \syntax{@^* ::= $\epsilon$ @! @^* } \end{quote} \item @^+ means a sequence of one or more @s: \begin{quote} @@ -182,7 +182,7 @@ unusual notation in order to make the presentation easier to read. \item @ means a sequence of one or more @s separated by commas: \begin{quote} - \syntax{ ::= | "," } + \syntax{ ::= @! "," } \end{quote} \end{itemize} @@ -611,31 +611,29 @@ All of these have their usual C meanings. \subsubsection{Declarators} \label{sec:syntax.c-types.declarator} \begin{grammar} - ::= - @^* @^* +$[k]$ ::= @^* $[k]$ - ::= | -\alt "(" ")" - - ::= "." +$[k]$ ::= $k$ +\alt "(" $[k]$ ")" +\alt $[k]$ @^* ::= "*" @^* ::= "[" "]" \alt "(" ")" - ::= | "..." + ::= $\epsilon$ | "..." \alt @["," "..."@] ::= @^+ - ::= | @[@] + ::= @[ @! $\epsilon$@] + + ::= @[@] - ::= - @^+ | @^* + ::= "." - ::= "(" ")" -\alt @[@] @^+ + ::= @[@] \end{grammar} The declarator syntax is taken from C, but with some differences.