|
@@ -4302,11 +4302,11 @@ grammar rule that was applied, which in this example is \code{'exp'}
|
|
|
for all three \code{Tree} nodes. Each tree object also has a
|
|
|
\code{children} field that is a list containing trees and/or tokens.
|
|
|
|
|
|
-A grammar is ambiguous when there are strings that can be parsed in
|
|
|
-more than one way. For example, consider the string \code{'1+2+3'}.
|
|
|
-Using the grammar comprised of rules \eqref{eq:parse-int} and
|
|
|
-\eqref{eq:parse-plus}, this string can parsed in two different ways,
|
|
|
-resulting in the two parse trees shown in
|
|
|
+A grammar is \emph{ambiguous}\index{subject}{ambiguous} when there are
|
|
|
+strings that can be parsed in more than one way. For example, consider
|
|
|
+the string \code{'1+2+3'}. Using the grammar comprised of rules
|
|
|
+\eqref{eq:parse-int} and \eqref{eq:parse-plus}, this string can parsed
|
|
|
+in two different ways, resulting in the two parse trees shown in
|
|
|
figure~\ref{fig:ambig-parse-tree}.
|
|
|
|
|
|
\begin{figure}[tbp]
|