[erlang-bugs] compile and syntax_tools disagree
Richard Carlsson
richardc@REDACTED
Tue Apr 3 13:00:37 CEST 2007
Ulf Wiger (TN/EAB) wrote:
> Maybe it's just I who don't understand how to read the
> doc on abstract forms, but quoted from
> http://www.erlang.org/doc/doc-5.5.4/erts-5.5.4/doc/html/part_frame.html
>
> "If C is a function clause ( Ps ) when Gs -> B where Ps
> is a pattern sequence, Gs is a guard sequence and B
> is a body, then
> Rep(C) = {clause,LINE,Rep(Ps),Rep(Gs),Rep(B)}.
> ...
> A guard Gs is a nonempty sequence of guard tests G_1, ...,
> G_k, and Rep(Gs) = [Rep(G_1), ..., Rep(G_k)].
Don't miss the immediately following paragraph:
"A guard sequence Gss is a sequence of guards Gs_1; ...; Gs_k, and
Rep(Gss) = [Rep(Gs_1), ..., Rep(Gs_k)]. If the guard sequence is empty,
Rep(Gss) = []."
The description of {clause, ...} that you quote above says "Gs is a
guard sequence". It would have been more obvious if that paragraph had
used Gss instead of Gs.
/Richard
More information about the erlang-bugs
mailing list