Example. 结构歧义

“咬死了猎人的狗”可以读成“(咬死了猎人)的狗”,指一条狗; 也可以读成“咬死了(猎人的狗)”,指一件事. 两种读法用的字完全相同,差别只在怎样分组.

程序里同样的情况随处可见: 1 + 2 * 3 1 + 2 * 3 既可按 ( 1+2 )×3=9 分组,也可按 1+( 2×3 )=7 分组; if a then if b then x else y if a then if b then x else y 里的 else else 既可挂在内层 if if 上,也可挂在外层 if if 上.