[erlang-bugs] yecc example bug
Garrett Smith
g@REDACTED
Thu Aug 18 01:06:53 CEST 2011
In http://www.erlang.org/doc/man/yecc.html
The text (it occurs in two examples):
E -> E '+' E : ['$1', '$2', '$3'].
E -> E '*' E : ['$1', '$2', '$3'].
Should be:
E -> E '+' E : ['$2', '$1', '$3'].
E -> E '*' E : ['$2', '$1', '$3'].
The point of the examples is "parsing infix arithmetic expressions
into prefix notation".
Without reordering the triplet, the parse is a no-op.
Garrett
More information about the erlang-bugs
mailing list