What is the language definition for PROG?
PROG ::= PROGRAM IDENT ; Block
What is the language definition for BLOCK?
Block ::= [ DeclPart ] CompStmt
What is the language definition for DeclPart?
DeclPart ::= [ ConstPart ] [ VarPart ]
What is the language definition for ConstPart?
ConstPart ::= CONST ConstDef { , ConstDef } ;
What is the language definition for ConstDef?
ConstDef ::= IDENT = Expr
What is the language definition for VarPart?
VarPart ::= VAR DeclStmt { , IDENT } ;
What is the language definition for DeclStmt?
DeclStmt ::= IDENT { , IDENT } : Type [:== Exp]
What is the language definition for Type?
Type ::= INTEGER | REAL | BOOLEAN | CHAR | STRING
What is the language definition for Stmt?
Stmt ::= SimpleStmt | StructuredStmt
What is the language definition for SimpleStmt
SimpleStmt ::= AssignStmt | ReadLnStmt | WriteLnStmt | WriteStmt
What is the language definition for StructuredStmt?
StructuredStmt ::= IfStmt | CompStmt
What is the language definition for CompStmt?
CompStmt ::= BeginStmt { ; Stmt } END
What is the language definition for WriteLnStmt?
WriteLnStmt ::= WRITELN ( ExprList )
What is the language definition for WriteStmt?
WriteStmt ::= Write( ExprList )
What is the language definition for Variable?
Variable ::= IDENT
What is the language definition for IfStmt?
IfStmt ::= IF Expr THEN Stmt [ ELSE Stmt ]
What is the language definition for AssignStmt?
AssignStmt ::= Variable ::= Expr
What is the language definition for ReadLnStmt?
ReadLnStmt ::= ReadLn ( VarList )
What is the language definition for ExprList?
ExprList ::= Expr { , Expr }
What is the language definition for VarList?
VarList ::= Variable { , Variable }
What is the language definition for Expr?
Expr ::= RealExp ::= SimpleExpr [ ( = | < | > ) SimpleExpr ]
What is the language definition for SimpleExpr?
SimpleExpr ::= Term { ( + | - | OR ) Term }
What is the language definition for Term?
Term ::= SFactor { ( * | / | DIV | MOD | And ) SFactor }
What is the language definition for SFactor?
SFactor ::= [ ( - | + | NOT ) ] Factor