X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/f575cdca18b30a96a76514c105a933c3e59d6311..7d8d3a165fa725b686d1c89b78179a4d5705d11a:/doc/syntax.tex

diff --git a/doc/syntax.tex b/doc/syntax.tex
index fc34e4e..8c66487 100644
--- a/doc/syntax.tex
+++ b/doc/syntax.tex
@@ -130,7 +130,8 @@ binary.  However, length and signedness indicators are not permitted.
 \subsection{Punctuation} \label{sec:syntax.lex.punct}
 
 \begin{grammar}
-<punctuation> ::= "\dots"
+<punctuation> ::= "<<" | ">>" | "||" | "&&"
+  | "<=" | ">=" | "==" | "!=" | "\dots"
 \alt any nonalphanumeric character other than "_", "\"", or "'"
 \end{grammar}
 
@@ -367,7 +368,36 @@ keyword arguments.
 
 <property> ::= <identifier> "=" <expression>
 
-<expression> ::= <additive>
+<expression> ::= <logical-or>
+
+<logical-or> ::= <logical-and>
+  | <logical-or> "||" <logical-and>
+
+<logical-and> ::= <bitwise-or>
+  | <logical-and> "&&" <bitwise-or>
+
+<bitwise-or> ::= <bitwise-xor>
+  | <bitwise-or> "|" <bitwise-xor>
+
+<bitwise-xor> ::= <bitwise-and>
+  | <bitwise-xor> "^" <bitwise-and>
+
+<bitwise-and> ::= <equality>
+  | <bitwise-and> "&" <equality>
+
+<equality> ::= <ordering>
+  | <equality> "==" <ordering>
+  | <equality> "!=" <ordering>
+
+<ordering> ::= <shift>
+  | <ordering> "<" <shift>
+  | <ordering> "<=" <shift>
+  | <ordering> ">=" <shift>
+  | <ordering> ">" <shift>
+
+<shift> ::= <additive>
+  | <shift> "<<" <additive>
+  | <shift> ">>" <additive>
 
 <additive> ::= <term>
   | <additive> "+" <term>
@@ -640,8 +670,12 @@ declarations instead.
 
 \begin{grammar}
 <code-definition> ::=
-  "code" <identifier> ":" <item-name> @[<constraints>@]
+  "code" <reason> ":" <item-name> @[<constraints>@]
   "{" <c-fragment> "}"
+\alt
+  "code" <reason> ":" <constraints> ";"
+
+<reason> ::= <identifier>
 
 <constraints> ::= "[" <list>$[\mbox{@<constraint>}]$ "]"
 
