aboutsummaryrefslogtreecommitdiffstats
path: root/lib/parsetools/doc
diff options
context:
space:
mode:
authorHenrik Nord <[email protected]>2011-08-23 15:56:30 +0200
committerHenrik Nord <[email protected]>2011-08-23 16:50:56 +0200
commit62f194499810270b488cc46a5e611f0be77f36a7 (patch)
tree63deedc8fe90f9306d35d6403e598f384eaf7e41 /lib/parsetools/doc
parent7b6bc498755be949091162ea9c32345f85f9b334 (diff)
parentf5c2fe153db22cfaabf263091f4f073c26ed5480 (diff)
downloadotp-62f194499810270b488cc46a5e611f0be77f36a7.tar.gz
otp-62f194499810270b488cc46a5e611f0be77f36a7.tar.bz2
otp-62f194499810270b488cc46a5e611f0be77f36a7.zip
Merge branch 'gs/yecc-example' into dev
* gs/yecc-example: Fix incorrect order of pseudo variables in yecc example OTP-9484
Diffstat (limited to 'lib/parsetools/doc')
-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>