↑,
@checkTable↓,
@fillTable↓,
::= "public" ↑=ObjectType
@checkTable↓
↑,
@checkTable↓,
@fillMemory↓↑
@fillTable↓,,,
"(" ( )? ")"
"{" ( )* ( )* "return"
↑,
@checkType↓, ";" "}"
↑ ::= ↑=ArrayType
|↑=BooleanType
|↑=IntegerType
::=
( )*
::= ↑=ObjectType
@checkTable↓
↑,
@checkTable↓,
@fillMemory↓↑
@fillTable↓,,
::= ","
赋值语句(AssignmentStatement) ::= ↑id_name @checkTable↓↑
“=” ↑, “;”
@checkType↓,
@generateCode↓=stmt_assign,
数组元素赋值语句(ArrayAssignmentStatement) ::= ↑ @checkTable↓↑
@checkType↓,ArrayType
"[" ↑,
@checkType↓,IntegerType
"]" "=" ↑,
@checkType↓,IntegerType ";"
@generateCode↓=stmt_array_assign,
if语句(IfStatement) := "if" "(" ↑,
@checkType↓,BooleanType
")" "else"
@generateCode↓=stmt_if,
while语句(WhileStatemen) ::= "while" "(" ↑,
@checkType↓,BooleanType
")"
@generateCode↓=stmt_while,
打印语句(PrintStatement) ::= "System.out.println" "("
↑,
@checkType↓,IntegerType
")" ";"
@generateCode↓=stmt_print,
属性及动作解释 |