dragon-book-exercise-answers
dragon-book-exercise-answers copied to clipboard
Compilers Principles, Techniques, & Tools (purple dragon book) second edition exercise answers. 编译原理(紫龙书)第2版习题答案。
The question is rather ambiguous, but I found it interesting to make the regular expression match an unbalanced quote as well: ``` /*" */ ```
The augmented grammar is 1)S'->S 2)S->SS+ 3)S->SS* 4)S->a and the closure collection is i0: S'->.S S->.SS+ S->.SS* S->.a i1: S'->S. S->S.S+ S->S.S* S->.a S->.SS+ THIS 'S' IS THE SECOND 'S'...
From the definition of the follow set, we know,1.follow(bterm) = first(bexpr') except ∈ and 2.bexpr' => ∈ follow(bterm) = follow(bexpr) In a word, follow(bterm) = {$,),or}
http://dragon-book.jcf94.com/book/ch02/2.2/2.2.html question 2.2.4 unit 4 and 5 "Arithmetic expressions of integers and identifiers with the four binary operators +, -, *, /." there are no " ( ) " in...
Should have an edge labelled "b" from I to G. On a side-note, why do we have the b-edge from G going back to G instead of to C? When...