编译原理第二版龙书习题解答(最全_格式已改为手机可查看)

Gavin Lei 28 0 RAR 2018-12-07 08:12:08

# Exercises for Section 2.2 ### 2.2.1 Consider the context-free grammar: S -> S S + | S S * | a 1. Show how the string `aa+a*` can be generated by this grammar. 2. Construct a parse tree for this string. 3. What language does this grammar generate? Justify your answer. #### Answer 1. `S` -> `S` S * -> `S` S + S * -> a `S` + S * -> a a + `S` * -> a a + a * ………………

用户评论
请输入评论内容
评分:
暂无评论