next up previous
Next: Expressions Up: The Abstract Syntax Tree Previous: Declarations


Statements

Statements[6]:
RULE stms: StmtList  LISTOF statement                                  END;
RULE locd: statement ::=    LblIdUse ':' statement                     END;
RULE emty: statement ::=                                               END;
RULE assn: statement ::=    variable ':=' expression                   END;
RULE call: statement ::=    ProcCall                                   END;
RULE goto: statement ::=    'goto' LblIdUse                            END;
RULE cmpd: statement ::=    'begin' StmtList 'end'                     END;
RULE ones: statement ::=    'if' expression 'then' statement           END;
RULE twos: statement ::=    'if' expression 'then' statement
                                            'else' statement           END;
RULE cstm: statement ::=    'case' expression 'of' cases 'end'         END;
RULE rpts: statement ::=    'repeat' StmtList 'until' expression       END;
RULE whil: statement ::=    'while' expression 'do' statement          END;
RULE foru: statement ::=    'for' ExpIdUse ':=' expression
                              'to' expression 'do' statement           END;
RULE ford: statement ::=    'for' ExpIdUse ':=' expression
                              'downto' expression 'do' statement       END;
RULE with: statement ::=    'with' WithVar 'do' WithBody               END;
RULE casl: cases     LISTOF case                                       END;
RULE celt: case      ::=    selectors ':' statement                    END;
RULE csel: selectors LISTOF constant                                   END;
RULE wcls: WithVar   ::=    variable                                   END;
RULE wbdy: WithBody  ::=    statement                                  END;
RULE iost: statement ::=    InOutStmt                                  END;
This macro is defined in definitions 6 and 7.
This macro is invoked in definition 1.

Statements[7]:
RULE proc: ProcCall  ::=    PrcIdUse PrcArgs                           END;
RULE parg: PrcArgs   LISTOF Actual                                     END;
RULE arge: Actual    ::=    expression                                 END;
RULE read: InOutStmt ::=    'read'    '(' RdArgs ')'                   END;
RULE rlin: InOutStmt ::=    'readln'                                   END;
RULE rdln: InOutStmt ::=    'readln'  '(' RdArgs ')'                   END;
RULE writ: InOutStmt ::=    'write'   '(' WrtArgs ')'                  END;
RULE wlin: InOutStmt ::=    'writeln'                                  END;
RULE wrln: InOutStmt ::=    'writeln' '(' WrtArgs ')'                  END;
RULE rarg: RdArgs    LISTOF RdArg                                      END;
RULE rrgv: RdArg     ::=    variable                                   END;
RULE warg: WrtArgs   LISTOF WrtArg                                     END;
RULE wrgr: WrtArg    ::=    expression ':' expression ':' expression   END;
RULE wrgw: WrtArg    ::=    expression ':' expression                  END;
RULE wrge: WrtArg    ::=    expression                                 END;
This macro is defined in definitions 6 and 7.
This macro is invoked in definition 1.


next up previous
Next: Expressions Up: The Abstract Syntax Tree Previous: Declarations
2008-08-29