H98 Report: expression syntax glitch
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
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.