C +grammar+ +updated
C +grammar+ +updated
Program VarDeclList VarDecl Num FunDeclList FunDecl ParamDeclList ParamDeclListTail ParamDecl Block Type StmtList VarDeclList FunDeclList epsilon VarDecl VarDeclList Type identifier ; Type identifier [ Num ] ; intNum floatNum FunDecl FunDecl FunDeclList Type identifier ( ParamDecList ) Block epsilon ParamDeclListTail ParamDecl ParamDecl , ParamDeclListTail Type identifier Type identifier[] { VarDeclList StmtList } int float Stmt Stmt StmtList Primary Stmt ; Expr ; return Expr ; read identifier ; write Expr ; writeln ; break ; if ( Expr ) Stmt else Stmt if ( Expr ) Stmt while ( Expr ) Stmt Block Primary UnaryOp Expr Expr BinOp Expr identifier = Expr identifier [ Expr ] = Expr identifier Num ( Expr ) identifier ( ExprList ) identifier [ Expr ] epsilon ExprListTail Expr Expr , ExprListTail addOp not addOp mulOp relOp and or
Expr