home *** CD-ROM | disk | FTP | other *** search
- start -> turbo
-
- turbo -> program_heading block '.'
-
- actual_par -> exp
- -> var
-
- actual_par_list -> actual_par
- -> actual_par_list actual_par
-
- adding_op -> '+'
- -> '-'
- -> 'OR'
- -> 'XOR'
-
- array_type -> 'ARRAY' '[' index_type_list ']' 'OF' component_type
-
- array_var -> var
-
- assign_stmt -> var ':=' exp
-
- base_type -> simple_type
-
- block -> decl_part stmt_part
-
- case_element -> case_list ':' stmt
-
- case_label -> con
-
- case_label_list -> case_label
- -> case_label_list ',' case_label
-
- case_list -> case_list_element
- -> case_list ',' case_list_element
-
- case_list_element -> con
- -> con '..' con
-
- case_stmt -> 'CASE' exp 'OF' case_element_list 'END'
- -> 'CASE' exp 'OF' case_element_list 'OTHERWISE' stmt_list 'END'
-
- case_element_list -> case_element
- -> case_element_list ';' case_element
-
- comp_factor -> signed_factor
- -> 'NOT' signed_factor
-
- component_type -> type
-
- component_var -> indexed_var
- -> field_designator
-
- compound_stmt -> 'BEGIN' stmt_list 'END'
-
- conditional_stmt -> if_stmt
- -> case_stmt
-
- con -> uns_number
- -> sign uns_number
- -> con_id
- -> sign con_id
- -> string
-
- con_def_part -> 'CONST' con_def_list ';'
-
- con_def_list -> con_def
- -> con_def_list ';' con_def
-
- con_def -> untyped_con_def
- -> typed_con_def
-
- con_id -> '<id>'
-
- control_character -> '@' uns_integer
-
- control_var -> var_id
-
- decl_part -> decl_section
- -> decl_part decl_section
-
- decl_section -> label_decl_part
- -> con_def_part
- -> type_def_part
- -> var_decl_part
- -> proc_and_func_decl_part
-
- empty ->
-
- empty_stmt -> empty
-
- entire_var -> var_id
- -> typed_con_id
-
- exp -> simple_exp relation_list
-
- exp_list -> exp
- -> exp_list ',' exp
-
- relation_list -> relational_op simple_exp
- -> relation_list relational_op simple_exp
-
- factor -> var
- -> uns_con
- -> exps
- -> func_designator
- -> set
-
- exps -> exp
- -> exps exp
-
- field_designator -> record_var '.' field_id
-
- field_id -> '<id>'
-
- field_id_list -> field_id
- -> field_id_list field_id
-
- field_list -> fixed_part
- -> fixed_part ';' variant_part
- -> variant_part
-
- file_id -> '<id>'
-
- file_id_list -> empty
- -> file_id
- -> file_id_list file_id
-
- file_type -> 'FILE' 'OF' type
-
- final_value -> exp
-
- fixed_part -> record_section
- -> fixed_part ';' record_section
-
- for_list -> initial_value 'TO' final_value
- -> initial_value 'DOWNTO' final_value
-
- for_stmt -> 'FOR' control_var ':=' for_list 'DO' stmt
-
- formal_par_section -> par_group
- -> 'VAR' par_group
-
- func_decl -> func_heading block ';'
-
- func_designator -> func_id
- -> func_id '(' actual_par_list ')'
-
- func_heading -> 'FUNCTION' '<id>' ':' result_type ';'
- -> 'FUNCTION' '<id>' '(' formal_par_section_list ')' ':' result_type ';'
-
- formal_par_section_list -> formal_par_section
- -> formal_par_section_list formal_par_section
-
- func_id -> '<id>'
-
- goto_stmt -> 'GOTO' '<label>'
-
- id_list -> '<id>'
- -> id_list '<id>'
-
- if_stmt -> 'IF' exp 'THEN' stmt
- -> 'IF' exp 'THEN' stmt 'ELSE' stmt
-
- index_type -> simple_type
-
- index_type_list -> index_type
- -> index_type_list ',' index_type
-
- indexed_var -> array_var '[' exp_list ']'
-
- initial_value -> exp
-
- inline_list_element -> uns_integer
- -> con_id
- -> var_id
- -> location_counter_ref
-
- inline_list_element_list -> inline_list_element
- -> inline_list_element_list ',' inline_list_element
-
- inline_stmt -> 'INLINE' inline_list_element_list
-
- label_decl_part -> 'LABEL' label_list ';'
-
- label_list -> '<label>'
- -> label_list ',' '<label>'
-
- location_counter_ref -> '*'
- -> '*' sign con
-
- multiplying_op -> '*'
- -> '/'
- -> 'DIV'
- -> 'MOD'
- -> 'AND'
- -> 'SHL'
- -> 'SHR'
-
- par_group -> id_list ':' type_id
-
- pointer_type -> '^' type_id
-
- pointer_var -> var
-
- proc_and_func_decl_part -> proc_or_func_decl
- -> proc_and_func_decl_part proc_or_func_decl
-
- proc_decl -> proc_heading block ';'
-
- proc_heading -> 'PROCEDURE' '<id>' ';'
- -> 'PROCEDURE' '<id>' '(' formal_par_section_list ')' ';'
-
- proc_or_func_decl -> proc_decl
- -> func_decl
-
- proc_stmt -> proc_id
- -> proc_id '(' actual_par_list ')'
-
- proc_id -> '<id>'
-
- program_heading -> empty
- -> 'PROGRAM' program_id file_id_list
-
- program_id -> '<id>'
-
- record_section -> empty
- -> field_id_list ':' type
-
- record_type -> 'RECORD' field_list 'END'
-
- record_var -> var
-
- record_var_list -> record_var
- -> record_var_list record_var
-
- refd_var -> pointer_var '^'
-
- relational_op -> '='
- -> '<>'
- -> '<='
- -> '>='
- -> '<'
- -> '>'
- -> 'IN'
-
- repeat_stmt -> 'REPEAT' stmt_list 'UNTIL' exp
-
- repetitive_stmt -> while_stmt
- -> repeat_stmt
- -> for_stmt
-
- result_type -> type_id
-
- scalar_type -> '(' id_list ')'
-
- scale_factor -> '<digit_seq>'
- -> sign '<digit_seq>'
-
- set -> '[' set_element_list ']'
-
- set_element -> exp
- -> exp '..' exp
-
- set_element_list -> set_element
- -> set_element_list set_element
-
- set_type -> 'SET' 'OF' base_type
-
- sign -> '+'
- -> '-'
-
- signed_factor -> factor
- -> sign factor
-
- simple_exp -> term
- -> simple_exp adding_op term
-
- simple_stmt -> assign_stmt
- -> proc_stmt
- -> goto_stmt
- -> inline_stmt
- -> empty_stmt
-
- simple_type -> scalar_type
- -> subrange_type
- -> type_id
-
- stmt -> simple_stmt
- -> struc_stmt
-
- stmt_list -> stmt
- -> stmt_list ';' stmt
-
- stmt_part -> compound_stmt
-
- string -> empty
- -> string string_element
-
- string_element -> '<text_string>'
- -> control_character
-
- string_type -> 'STRING' '[' con ']'
-
- struc_stmt -> compound_stmt
- -> conditional_stmt
- -> repetitive_stmt
- -> with_stmt
-
- struc_type -> unpacked_struc_type
- -> 'PACKED' unpacked_struc_type
-
- subrange_type -> con '..' con
-
- tag_field -> empty
- -> field_id ':'
-
- term -> comp_factor
- -> term multiplying_op comp_factor
-
- type_def -> '<id>' '=' type
-
- type_def_list -> type_def
- -> type_def_list type_def
-
- type_def_part -> 'TYPE' type_def_list ';'
-
- type_id -> '<id>'
-
- type -> simple_type
- -> struc_type
- -> pointer_type
-
- typed_con_def -> 'TYPE' '<id>' '=' con
-
- typed_con_id -> '<id>'
-
- unpacked_struc_type -> string_type
- -> array_type
- -> record_type
- -> set_type
- -> file_type
-
- uns_con -> uns_number
- -> string
- -> con_id
- -> 'NIL'
-
- uns_integer -> '<digit_seq>'
- -> '$' '<hexdigit_seq>'
-
- uns_number -> uns_integer
- -> uns_real
-
- uns_real -> '<digit_seq>' '.' '<digit_seq>'
- -> '<digit_seq>' '.' '<digit_seq>' 'E' scale_factor
- -> '<digit_seq>' 'E' scale_factor
-
- untyped_con_def -> '<id>' '=' con
-
- var -> entire_var
- -> component_var
- -> refd_var
-
- var_decl -> id_list ':' type
- -> id_list ':' type 'ABSOLUTE' con
-
- var_decl_list -> var_decl
- -> var_decl_list var_decl
-
- var_decl_part -> 'VAR' var_decl_list ';'
-
- var_id -> '<id>'
-
- variant -> empty
- -> case_label_list ':' '(' field_list ')'
-
- variant_part -> 'CASE' tag_field type_id 'OF' variant_list
-
- variant_list -> variant
- -> variant_list ';' variant
-
- while_stmt -> 'WHILE' exp 'DO' stmt
-
- with_stmt -> 'WITH' record_var_list 'DO' stmt
-