Professional Documents
Culture Documents
Compiler2017习题课(01)
Compiler2017习题课(01)
~ 1 ~
~ 2 ~
~ 3 ~
Common Mistakes:
~ 4 ~
~ 5 ~
Common Mistakes:
➢ The root of the parse tree is not the start symbol of the grammar.
➢ Some terminals are missed in the parse tree, usually the epsilon, an
operator and a parenthesis.
~ 6 ~
Common Mistakes:
~ 7 ~
Common Mistakes:
~ 8 ~
Common Mistakes:
➢ List the classification and set of tokens, but not the sequence of tokens.
~ 9 ~
~ 10 ~
Common Mistakes:
~ 11 ~
~ 12 ~
Common Mistakes:
~ 13 ~
~ 14 ~
~ 15 ~
Common Mistakes:
~ 16 ~
~ 17 ~
Common Mistakes:
~ 18 ~
~ 19 ~
~ 20 ~
Common Mistakes:
~ 21 ~
Common Mistakes:
~ 22 ~
Common Mistakes:
➢ Redundant '$' in FOLLOW(L') when there is a production L' -> ,SL' | eps ,
and S is the start symbol.
~ 23 ~
~ 24 ~
Common Mistakes:
~ 25 ~
~ 26 ~
Common Mistakes:
~ 27 ~
~ 28 ~
~ 29 ~
~ 30 ~
~ 31 ~
~ 32 ~