@@ -48,10 +48,13 @@ also be used to include reserved words in syntax rules, such as \texttt{"let"} o
4848\end{itemize}
4949
5050\noindent
51−The limitations on the form of a syntax rule are that it must include at least one
52−symbol or keyword, and there must be no repeated variables standing for non-terminals.
53−Rules can use previously defined rules, but may not be recursive.
54−The following syntax extensions would therefore be valid:
51+The limitations on the form of a syntax rule are that it must include at least
52+one symbol or keyword, and there must be no repeated variables standing for
53+non-terminals. Any expression can be used, but if there are two non-terminals
54+in a row in a rule, only simple expressions may be used (that is, variables,
55+constants, or bracketed expressions). Rules can use previously defined rules,
56+but may not be recursive. The following syntax extensions would therefore be
57+valid:
5558
5659\begin{SaveVerbatim}{syntaxex}
5760
@@ -100,10 +103,10 @@ exampe, a \texttt{for} loop binds a variable on each iteration:
100103
101104\begin{SaveVerbatim}{forloop}
102105
103−syntax for {x} "in" [xs] [body] = forLoop xs (\x => body)
106+syntax for {x} "in" [xs] ":" [body] = forLoop xs (\x => body)
104107
105108main : IO ()
106−main = do for x in [1..10] do
109+main = do for x in [1..10]:
107110 putStrLn ("Number " ++ show x)
108111 putStrLn "Done!"
109112