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

152 lines
2.9 KiB
Plaintext

program#void reduction
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
argVarDecl#, reduction
,#, move
varDef#IDN reduction
IDN#IDN move
argVarDef#, reduction
argVarDecl#, reduction
,#, move
varDef#IDN reduction
IDN#IDN move
argVarDef#; reduction
argVarDecl#; reduction
;#; move
blockItem#IDN reduction
stmt#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
relExpAtom#= reduction
eqExpAtom#= reduction
assignExpAtom#= reduction
=#= move
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
;#; move
blockItem#IDN reduction
stmt#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
relExpAtom#= reduction
eqExpAtom#= reduction
assignExpAtom#= reduction
=#= move
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
;#; move
blockItem#IDN reduction
stmt#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
relExpAtom#= reduction
eqExpAtom#= reduction
assignExpAtom#= reduction
=#= move
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
;#; 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