X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/239fa5bd3dff0b38b0cebdd3438311f21c24ba4f..54fa70952116ba0eb0f95b31376c925ae3c6dad2:/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 @[@<item>@] means an optional @<item>:
   \begin{quote}
-    \syntax{@[<item>@] ::= $\epsilon$ | <item>}
+    \syntax{@[<item>@] ::= $\epsilon$ @! <item>}
   \end{quote}
 \item @<item>^* means a sequence of zero or more @<item>s:
   \begin{quote}
-    \syntax{@<item>^* ::= $\epsilon$ | @<item>^* <item>}
+    \syntax{@<item>^* ::= $\epsilon$ @! @<item>^* <item>}
   \end{quote}
 \item @<item>^+ means a sequence of one or more @<item>s:
   \begin{quote}
@@ -182,7 +182,7 @@ unusual notation in order to make the presentation easier to read.
 \item @<item-list> means a sequence of one or more @<item>s separated
   by commas:
   \begin{quote}
-    \syntax{<item-list> ::= <item> | <item-list> "," <item>}
+    \syntax{<item-list> ::= <item> @! <item-list> "," <item>}
   \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}
-<declarator> ::=
-  @<pointer>^* <inner-declarator> @<declarator-suffix>^*
+<declarator>$[k]$ ::= @<pointer>^* <primary-declarator>$[k]$
 
-<inner-declarator> ::= <identifier> | <qualified-identifier>
-\alt "(" <declarator> ")"
-
-<qualified-identifier> ::= <identifier> "." <identifier>
+<primary-declarator>$[k]$ ::= $k$
+\alt "(" <primary-declarator>$[k]$ ")"
+\alt <primary-declarator>$[k]$ @<declarator-suffix>^*
 
 <pointer> ::= "*" @<qualifier>^*
 
 <declarator-suffix> ::= "[" <c-fragment> "]"
 \alt "(" <arguments> ")"
 
-<arguments> ::= <empty> | "..."
+<arguments> ::= $\epsilon$ | "..."
 \alt <argument-list> @["," "..."@]
 
 <argument> ::= @<declaration-specifier>^+ <argument-declarator>
 
-<argument-declarator> ::= <declarator> | @[<abstract-declarator>@]
+<argument-declarator> ::= <declarator>@[<identifier> @! $\epsilon$@]
+
+<simple-declarator> ::= <declarator>@[<identifier>@]
 
-<abstract-declarator> ::=
-  @<pointer>^+ | @<pointer>^* <inner-abstract-declarator>
+<dotted-name> ::= <identifier> "." <identifier>
 
-<inner-abstract-declarator> ::= "(" <abstract-declarator> ")"
-\alt @[<inner-abstract-declarator>@] @<declarator-suffix>^+
+<dotted-declarator> ::= <declarator>@[<dotted-name>@]
 \end{grammar}
 
 The declarator syntax is taken from C, but with some differences.
