| 1 |
|
|---|
| 2 | actual_function= FUNCTION_NAME .
|
|---|
| 3 | actual_parameter_list= '(' actual_parameter { ',' actual_parameter } ')' .
|
|---|
| 4 | actual_parameter= actual_value | actual_variable | actual_procedure
|
|---|
| 5 | | actual_function .
|
|---|
| 6 | actual_procedure= PROCEDURE_NAME .
|
|---|
| 7 | actual_value= expression .
|
|---|
| 8 | actual_variable= variable .
|
|---|
| 9 | addition_operator= '+' | '-' | OR .
|
|---|
| 10 | array_type= ARRAY '[' index_type { ',' index_type } ']' OF element_type .
|
|---|
| 11 | array_variable= variable .
|
|---|
| 12 | assignment_statement= ( variable | FUNCTION_NAME ) ':=' expression .
|
|---|
| 13 | base_type= type .
|
|---|
| 14 | block= declaration_part statement_part .
|
|---|
| 15 | bound_specification= NAME '..' NAME ':' ordinal_type_identifier .
|
|---|
| 16 | case_element= case_label_list ':' statement .
|
|---|
| 17 | case_label_list= constant { ',' constant } .
|
|---|
| 18 | case_statement= CASE expression OF case_element { ';' case_element } [ ';' ] END .
|
|---|
| 19 | component_variable= indexed_variable | field_designator | file_buffer .
|
|---|
| 20 | compound_statement= BEGIN statement_sequence END .
|
|---|
| 21 | conditional_statement= if_statement | case_statement .
|
|---|
| 22 | conformant_array_schema= packed_conformant_array_schema
|
|---|
| 23 | | unpacked_conformant_array_schema .
|
|---|
| 24 | constant_definition_part= CONST constant_definition ';' { constant_definition ';' } .
|
|---|
| 25 | constant_definition= NAME '=' constant .
|
|---|
| 26 | constant= [ '+' | '-' ] ( CONSTANT_NAME | number ) | STRING .
|
|---|
| 27 | declaration_part= [ label_declaration_part ] [ constant_definition_part ]
|
|---|
| 28 | [ type_definition_part ] [ variable_declaration_part ]
|
|---|
| 29 | directive= FORWARD .
|
|---|
| 30 | element_list= [ expression { ',' expression } ] .
|
|---|
| 31 | element_type= type .
|
|---|
| 32 | entire_variable= VARIABLE_NAME | FIELD_NAME .
|
|---|
| 33 | enumerated_type= '(' identifier_list ')' .
|
|---|
| 34 | expression_list= expression { ',' expression } .
|
|---|
| 35 | expression= simple_expression [ relational_operator simple_expression ] .
|
|---|
| 36 | factor= NUMBER | STRING | NIL | CONSTANT_NAME | set | variable
|
|---|
| 37 | | function_designator | '(' expression ')' | NOT factor .
|
|---|
| 38 | field_designator= record_variable '.' FIELD_NAME .
|
|---|
| 39 | field_list= [ ( fixed_part [ ';' variant_part ] | variant_part ) [ ';' ] ] .
|
|---|
| 40 | field_width= expression .
|
|---|
| 41 | file_buffer= file_variable '^' .
|
|---|
| 42 | file_component_type= type .
|
|---|
| 43 | file_type= FILE OF file_component_type .
|
|---|
| 44 | file_variable= variable .
|
|---|
| 45 | final_expression= expression .
|
|---|
| 46 | fixed_part= record_section { ';' record_section } .
|
|---|
| 47 | for_statement= FOR VARIABLE_NAME ':=' initial_expression ( TO | DOWNTO )
|
|---|
| 48 | final_expression DO statement .
|
|---|
| 49 | formal_parameter_list= '(' formal_parameter_section { ';' formal_parameter_section } ')' .
|
|---|
| 50 | formal_parameter_section= value_parameter_section | variable_parameter_section
|
|---|
| 51 | | procedure_parameter_section | function_parameter_section .
|
|---|
| 52 | fraction_length= expression .
|
|---|
| 53 | function_declaration= function_heading ';' ( block | directive ) .
|
|---|
| 54 | function_designator= FUNCTION_NAME [ actual_parameter_list ] .
|
|---|
| 55 | function_heading= FUNCTION NAME [ formal_parameter_list ] ':' result_type .
|
|---|
| 56 | function_parameter_section= function_heading .
|
|---|
| 57 | goto_statement= GOTO label .
|
|---|
| 58 | identifier_list= NAME { ',' NAME } .
|
|---|
| 59 | if_statement= IF expression THEN statement [ ELSE statement ] .
|
|---|
| 60 | index_type= simple_type .
|
|---|
| 61 | indexed_variable= array_variable '[' expression_list ']' .
|
|---|
| 62 | initial_expression= expression .
|
|---|
| 63 | integer_number= NUMBER .
|
|---|
| 64 | label_declaration_part= LABEL label { ',' label } ';' .
|
|---|
| 65 | label= NUMBER .
|
|---|
| 66 | lower_bound= constant .
|
|---|
| 67 | multiplication_operator= '*' | '/' | DIV | MOD | AND .
|
|---|
| 68 | number= integer_number | real_number .
|
|---|
| 69 | ordinal_type_identifier= TYPE_NAME .
|
|---|
| 70 | output_list= output_value { ',' output_value } .
|
|---|
| 71 | output_value= expression [ ';' field_width [ ':' fraction_length ] ] .
|
|---|
| 72 | packed_conformant_array_schema= PACKED ARRAY '[' bound_specification ']' OF TYPE_NAME .
|
|---|
| 73 | parameter_type= TYPE_NAME | conformant_array_schema .
|
|---|
| 74 | pointer_type= '^' TYPE_NAME .
|
|---|
| 75 | pointer_variable= variable .
|
|---|
| 76 | procedure_and_function_declaration_part .
|
|---|
| 77 | procedure_and_function_declaration_part= { ( procedure_declaration
|
|---|
| 78 | | function_declaration ) ';' } .
|
|---|
| 79 | procedure_declaration= procedure_heading ';' ( block | directive ) .
|
|---|
| 80 | procedure_heading= PROCEDURE NAME [ formal_parameter_list ] .
|
|---|
| 81 | procedure_parameter_section= procedure_heading .
|
|---|
| 82 | procedure_statement= PROCEDURE_NAME [ actual_parameter_list ] .
|
|---|
| 83 | program_heading= PROGRAM NAME '(' identifier_list ')' ';' .
|
|---|
| 84 | program= program_heading block '.' .
|
|---|
| 85 | real_number= NUMBER .
|
|---|
| 86 | record_section= identifier_list ':' type .
|
|---|
| 87 | record_type= RECORD field_list END .
|
|---|
| 88 | record_variable= variable .
|
|---|
| 89 | referenced_variable= pointer_variable '^' .
|
|---|
| 90 | relational_operator= '=' | '<>' | '<' | '<=' | '>' | '>=' | IN .
|
|---|
| 91 | repeat_statement= REPEAT statement_sequence UNTIL expression .
|
|---|
| 92 | repetitive_statement= while_statement | repeat_statement | for_statement .
|
|---|
| 93 | result_type= TYPE_NAME .
|
|---|
| 94 | set_type= SET OF base_type .
|
|---|
| 95 | set= '[' element_list ']' .
|
|---|
| 96 | simple_expression= [ '+' | '-' ] term { addition_operator term } .
|
|---|
| 97 | simple_statement= [ assignment_statement | procedure_statement | goto_statement ] .
|
|---|
| 98 | simple_type= subrange_type | enumerated_type .
|
|---|
| 99 | statement_part= BEGIN statement_sequence END .
|
|---|
| 100 | statement_sequence= statement { ';' statement } .
|
|---|
| 101 | statement= [ LABEL ':' ] ( simple_statement | structured_statement ) .
|
|---|
| 102 | structured_statement= compound_statement | repetitive_statement
|
|---|
| 103 | | conditional_statement | with_statement .
|
|---|
| 104 | structured_type= [ PACKED ] unpacked_structured_type .
|
|---|
| 105 | subrange_type= lower_bound '..' upper_bound .
|
|---|
| 106 | tag_field= [ NAME ':' ] .
|
|---|
| 107 | term= factor { multiplication_operator factor } .
|
|---|
| 108 | type_definition_part= TYPE type_definition ';' { type_definition ';' } .
|
|---|
| 109 | type_definition= NAME '=' type .
|
|---|
| 110 | type= simple_type | structured_type | pointer_type | TYPE_NAME .
|
|---|
| 111 | unpacked_conformant_array_schema= ARRAY '[' bound_specification
|
|---|
| 112 | { ';' bound_specification } ']' OF ( TYPE_NAME | conformant_array_schema ) .
|
|---|
| 113 | unpacked_structured_type= array_type | record_type | set_type | file_type .
|
|---|
| 114 | upper_bound= constant .
|
|---|
| 115 | value_parameter_section= identifier_list ':' parameter_type .
|
|---|
| 116 | variable_declaration_part= VAR variable_declaration ';' { variable_declaration ';' } .
|
|---|
| 117 | variable_declaration= identifier_list ':' type .
|
|---|
| 118 | variable_parameter_section= VAR identifier_list ':' parameter_type .
|
|---|
| 119 | variable= entire_variable | component_variable | referenced_variable .
|
|---|
| 120 | variant_part= CASE tag_field TYPE_NAME OF variant { ';' variant } .
|
|---|
| 121 | variant= case_label_list ':' '(' field_list ')' .
|
|---|
| 122 | while_statement= WHILE expression DO statement .
|
|---|
| 123 | with_statement= WITH record_variable { ',' record_variable } DO statement .
|
|---|