dragon-book-exercise-answers
dragon-book-exercise-answers copied to clipboard
Compilers Principles, Techniques, & Tools (purple dragon book) second edition exercise answers. 编译原理(紫龙书)第2版习题答案。
Gitbook
I have just forked your project and made a gitbook for it. [gitbook](http://jcf94.github.io/dragon-book-exercise-answers/) I don't know whether it will be helpful for you. ^.^
Ex 4.4.4 S -> S (S) S | ε first(S) = [(, ε] followS(S) = [), $] follow set should include '(' opening parenthesis terminal symbol as well
https://github.com/RKGekk/BasicParserCS
Just adjusted file for section 4.2, because the formatting was preventing a parse tree image from displaying.
> hundred -> low {hundred.roman = repeat('C', low.v)} | 4 {hundred.roman = 'CD'} | high {hundred.roman = 'D' || repeat('X', high.v - 5)} | 9 {hundred.roman = 'CM'} high is...
in 3.4.1, the code of the table that represents the transition diagram is in a \ block, so it displays the original codes instead of the table. hope that you...
4)的前两条产生式好像不能推导出term - expr 和 factor / term 这两条式子吧?是不是改为 expr -> expr-expr 和 term -> term/term 更好一点? 5)同理。
是不是应该这样: expr -> {print("(")}expr {print(")+(")} expr {print(")")} + | {print("(")}expr {print(")-(")} expr {print(")")} - | {print("(")} expr {print(")*(")} expr {print(")")} * | {print("(")} expr {print(")/(")} expr {print(")")} / | digit...
Record is stored in a new table not the one that stores normal statement. At the beginning of translating record offset of is pushed into satck and at the end...
4.4.4 (3)FOLLOW集 原答案少(