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

81 lines
1.6 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#const reduction
decl#const reduction
constDecl#const reduction
const#const move
bType#int reduction
int#int move
constDef#IDN reduction
IDN#IDN move
=#= move
constInitVal#INT reduction
constExp#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
argConst#, reduction
,#, move
constDef#IDN reduction
IDN#IDN move
=#= move
constInitVal#INT reduction
constExp#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
argConst#; 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
relExpAtom#; reduction
eqExpAtom#; reduction
assignExpAtom#; reduction
;#; move
blockItem#} reduction
}#} move
compUnit#EOF reduction
EOF#EOF accept