2024-compiler/tests/01/01_grammar.txt

120 lines
2.3 KiB
Plaintext

program#int reduction
compUnit#int reduction
decl#int reduction
varDecl#int reduction
bType#int reduction
int#int move
varDef#IDN reduction
IDN#IDN move
argVarDef#= reduction
=#= move
initVal#INT reduction
exp#INT reduction
assignExp#INT reduction
eqExp#INT reduction
relExp#INT reduction
addExp#INT reduction
mulExp#INT reduction
unaryExp#INT reduction
number#INT reduction
INT#INT move
mulExpAtom#; reduction
addExpAtom#; reduction
relExpAtom#; reduction
eqExpAtom#; reduction
assignExpAtom#; reduction
argVarDecl#; reduction
;#; move
compUnit#int reduction
decl#int reduction
varDecl#int reduction
bType#int reduction
int#int move
varDef#IDN reduction
IDN#IDN move
argVarDef#= reduction
=#= move
initVal#INT reduction
exp#INT reduction
assignExp#INT reduction
eqExp#INT reduction
relExp#INT reduction
addExp#INT reduction
mulExp#INT reduction
unaryExp#INT reduction
number#INT reduction
INT#INT move
mulExpAtom#; reduction
addExpAtom#; reduction
relExpAtom#; reduction
eqExpAtom#; reduction
assignExpAtom#; reduction
argVarDecl#; reduction
;#; move
compUnit#void reduction
funcDef#void reduction
funcType#void reduction
void#void move
IDN#IDN move
(#( move
funcFParams#) reduction
)#) move
block#{ reduction
{#{ move
blockItem#int reduction
decl#int reduction
varDecl#int reduction
bType#int reduction
int#int move
varDef#IDN reduction
IDN#IDN move
argVarDef#= reduction
=#= move
initVal#INT reduction
exp#INT reduction
assignExp#INT reduction
eqExp#INT reduction
relExp#INT reduction
addExp#INT reduction
mulExp#INT reduction
unaryExp#INT reduction
number#INT reduction
INT#INT move
mulExpAtom#; reduction
addExpAtom#; reduction
relExpAtom#; reduction
eqExpAtom#; reduction
assignExpAtom#; reduction
argVarDecl#; reduction
;#; move
blockItem#return reduction
stmt#return reduction
return#return move
argExp#IDN reduction
exp#IDN reduction
assignExp#IDN reduction
eqExp#IDN reduction
relExp#IDN reduction
addExp#IDN reduction
mulExp#IDN reduction
unaryExp#IDN reduction
IDN#IDN move
callFunc#+ reduction
mulExpAtom#+ reduction
addExpAtom#+ reduction
+#+ move
mulExp#IDN reduction
unaryExp#IDN reduction
IDN#IDN move
callFunc#; reduction
mulExpAtom#; reduction
addExpAtom#; reduction
relExpAtom#; reduction
eqExpAtom#; reduction
assignExpAtom#; reduction
;#; move
blockItem#} reduction
}#} move
compUnit#EOF reduction
EOF#EOF accept