prog -> { decs stms }
decs -> dec decs
|
dec -> type id ;
type -> int
| bool
stms -> stm stms
|
stm -> id = exp ;
| printi(exp) ;
| printb(exp) ;
exp -> intnum
| true
| false
| id
| (exp)
| exp + exp
| exp - exp
| exp * exp
| exp / exp
| exp && exp
| exp || exp
2022-12-22 00:45:21
6KB
技术开开发
1