2024-compiler/tests/00/00_my_grammar.txt

35 lines
657 B
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#return reduction
stmt#return reduction
return#return move
argExp#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
;#; move
blockItem#} reduction
}#} move
compUnit#EOF reduction
EOF#EOF accept