-
龙书《编译原理》第二版的全部习题解答已调整为手机可查看的格式
资源介绍
# 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 *
………………
- 上一篇: 编译原理习题答案&;;龙书第二版中文
- 下一篇: ros by example英文原版,更详细。