1. carding second chapter, understand and write a summary.
2. Try to write grammar PL / 0 language. (Or do you think the better language rules)
Integer
S-->0|1|2|3|……|8|9|N
N-->|1|2|3|……|8|9|ND
D-->S
I identifier
i->a|b|c|……|y|z|A|B|C|……|Y|Z
Expression e
<Expression> -> [+ | -] <item> {<subtraction operator> <item>} /
Conditional statements
<Conditional statements> -> if <condition> then <statement>
Assignment
i = e
Compound statement
stmt-> begin <statement> {; <statement>} end
<Statement> -> <assignment> | <conditional statements> | <When the loop type> | <procedure call statement> | <statement read> | <Write statement> | <compound statement> | <empty statement>
function
<Function> -> <Modifier> <parameter> <return type> <function name> <Method> The
<Modifier> -> public | static | ... |
<Parameter> -> lag | null
<Return type> -> int | String | char | ... | void
<Function name> ---> String | ...