正在加载图片...
<stm→if<Exp〉then<Stm>else<Stm> <Stm> = if <Exp> then <Stm <Stm→ 假设有条件语句 then if then s else 2 则可有下图所示的两棵不同的语法分析树 <Stm> <Stm> i f <exp> then <stm else<stm> if <Exp> then <st f<Exp> then <S e1 if <Exp> then <stm> else <st f语句的二义性<Stm> →if <Exp> then <Stm> else <Stm> <Stm> →if <Exp> then <Stm> <Stm> → ...... 假设有条件语句 if e1 then if e2 then s1 else s2 则可有下图所示的两棵不同的语法分析树: if语句的二义性 if if then <Stm> <Stm> <Stm> <Stm> <Exp> then else <Exp> e1 e2 s1 s2 <Stm> <Stm> <Stm> <Stm> if then else if then <Exp> <Exp> e1 e2 s1 s1
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有