Tim Showalter <tjs(_at_)andrew(_dot_)cmu(_dot_)edu> writes:
What happens in this script --
if false keep; else if false fileinto "foo"; else trash
trash. You only run into ambiguities if you can write things like
if false if false fileinto "foo"; else trash
where it's not clear which "if" the else belongs to.
(The problem is that if-then-else is hard to specify unambiguously
in a context-free grammar (although it's certainly possible). In
practice, though, it tends to work fine - yacc, for instance, will
complain about the shift/reduce conflict, but will default to shifting
the else token, which is exactly what should happen.)
)Rob