内容发布更新时间 : 2024/11/16 6:03:36星期一 下面是文章的全部内容请认真阅读。
精品文档
目录
P36-6 ...................................................................................................................................... 2 P36-7 ...................................................................................................................................... 2 P36-8 ...................................................................................................................................... 2 P36-9 ...................................................................................................................................... 3 P36-10 .................................................................................................................................... 3 P36-11 .................................................................................................................................... 3 P64–7 ................................................................................................................................... 4 P64–8 ................................................................................................................................... 5 P64–12 ................................................................................................................................. 5 P64–14 ................................................................................................................................. 7 P81–1 ................................................................................................................................... 8 P81–2 ................................................................................................................................... 9 P81–3 ................................................................................................................................. 12 P133–1 ............................................................................................................................... 12 P133–2 ............................................................................................................................... 12 P133–3 ............................................................................................................................... 14 P134–5 ............................................................................................................................... 15 P164–5 ............................................................................................................................... 19 P164–7 ............................................................................................................................... 19 P217–1 ............................................................................................................................... 19 P217–3 ............................................................................................................................... 20 P218–4 ............................................................................................................................... 20 P218–5 ............................................................................................................................... 21 P218–6 ............................................................................................................................... 22 P218–7 ............................................................................................................................... 22 P219–12 ............................................................................................................................. 22 P270–9 ............................................................................................................................... 24
.
精品文档
P36-6
(1)
L(G1)是0~9组成的数字串
(2)
最左推导:
N?ND?NDD?NDDD?DDDD?0DDD?01DD?012D?0127N?ND?DD?3D?34N?ND?NDD?DDD?5DD?56D?568
最右推导:
N?ND?N7?ND7?N27?ND27?N127?D127?0127N?ND?N4?D4?34N?ND?N8?ND8?N68?D68?568
P36-7
G(S)
O?1|3|5|7|9N?2|4|6|8|OD?0|NS?O|AOA?AD|N
P36-8
文法:
E?T|E?T|E?TT?F|T*F|T/F F?(E)|i最左推导:
E?E?T?T?T?F?T?i?T?i?T*F?i?F*F?i?i*F?i?i*iE?T?T*F?F*F?i*F?i*(E)?i*(E?T)?i*(T?T)?i*(F?T)?i*(i?T)?i*(i?F)?i*(i?i)最右推导:
E?E?T?E?T*F?E?T*i?E?F*i?E?i*i?T?i*i?F?i*i?i?i*iE?T?F*T?F*F?F*(E)?F*(E?T)?F*(E?F)?F*(E?i)?F*(T?i)?F*(F?i)?F*(i?i)?i*(i?i)语法树:/********************************
.
EE+TE+TFTFiFiii+i+i*****************/
P36-9
句子iiiei有两个语法树:
SS??iSeSiS??iiSeSiSei??iiSeiiiSei??iiieiiiiei
P36-10
/**************
S?TS|TT?(S)|( )
***************/
P36-11
/*************** L1:
S?ACA?aAb|ab C?cC|?L2:
S?ABA?aA|?
B?bBc|bcL3:
.
EE+TTT*FFFiiii-i-i精品文档
EE-TE-TFTFiFiii+i*i