aboutsummaryrefslogtreecommitdiffstats
path: root/lib/parsetools
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2011-08-24 16:44:16 +0200
committerAnders Svensson <[email protected]>2011-08-24 16:44:16 +0200
commit3536111957c809976ed3e7091e85960990be904d (patch)
treeaafc4cf4f996ece272e6b9c3d2366061c34f08da /lib/parsetools
parenta7c0e439ee84d25ce18f65959be06315063a7de8 (diff)
parent0c09797c725c98e5466bf6c575b7be4f2fc0e813 (diff)
downloadotp-3536111957c809976ed3e7091e85960990be904d.tar.gz
otp-3536111957c809976ed3e7091e85960990be904d.tar.bz2
otp-3536111957c809976ed3e7091e85960990be904d.zip
Merge remote branch 'upstream/dev' into dev
Diffstat (limited to 'lib/parsetools')
-rw-r--r--lib/parsetools/doc/src/yecc.xml8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/parsetools/doc/src/yecc.xml b/lib/parsetools/doc/src/yecc.xml
index c712609cf4..1d2a985d7d 100644
--- a/lib/parsetools/doc/src/yecc.xml
+++ b/lib/parsetools/doc/src/yecc.xml
@@ -425,9 +425,9 @@ myparser:parse_and_scan({Mod, Tokenizer, Args}) </code>
Nonterminals E T F.
Terminals '+' '*' '(' ')' number.
Rootsymbol E.
-E -> E '+' T: ['$1', '$2', '$3'].
+E -> E '+' T: ['$2', '$1', '$3'].
E -> T : '$1'.
-T -> T '*' F: ['$1', '$2', '$3'].
+T -> T '*' F: ['$2', '$1', '$3'].
T -> F : '$1'.
F -> '(' E ')' : '$2'.
F -> number : '$1'. </code>
@@ -438,8 +438,8 @@ Terminals '+' '*' '(' ')' number.
Rootsymbol E.
Left 100 '+'.
Left 200 '*'.
-E -> E '+' E : ['$1', '$2', '$3'].
-E -> E '*' E : ['$1', '$2', '$3'].
+E -> E '+' E : ['$2', '$1', '$3'].
+E -> E '*' E : ['$2', '$1', '$3'].
E -> '(' E ')' : '$2'.
E -> number : '$1'. </code>
<p>3. An overloaded minus operator:</p>