H98 Report: expression syntax glitch

S.M.Kahrs S.M.Kahrs@ukc.ac.uk
Mon, 25 Feb 2002 16:00:31 +0000


Ross's example reminds me of a problem I once reported about
the SML syntax.  In Haskell, it is ambiguated, vaguely:

False && if undefined then undefined else undefined || True

=2E..is what?

Apparently, it is False, on the grounds of the 'extends as far right
as possible' meta-rule for if/lambda/let.
That rule favours bottom-up over (clever) top-down
parsing, because a top-down parser could mistakenly believe that '||'
is the outermost operator - giving us a True expression.