Ignore:
Timestamp:
Dec 26, 2014, 7:20:54 AM (6 years ago)
Author:
Maxim Reznik
Message:

Use recursion instead of loop to iterate sequences

Rewrite AG generator to use recursion. This allows to provide explicit rules
for attributes of sequence heads.
Provide explicit copy rules (auto generated earlier).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ada-2012/src/ag/env_in.ag

    r349 r361  
    308308    : Gela.Semantic_Types.Env_Index : env_in;
    309309
     310Rules for Aborted_Tasks.name :
     311(.
     312      ${head.env_in} := ${Aborted_Tasks.env_in};
     313.)
     314Rules for Accept_Body_Exception_Handlers.exception_handler :
     315(.
     316      ${head.env_in} := ${Accept_Body_Exception_Handlers.env_in};
     317.)
     318Rules for Accept_Body_Statements.statement :
     319(.
     320      ${head.env_in} := ${Accept_Body_Statements.env_in};
     321.)
     322Rules for Accept_Parameters.parameter_specification :
     323(.
     324      ${head.env_in} := ${Accept_Parameters.env_in};
     325.)
     326Rules for Access_To_Subprogram_Parameter_Profile.parameter_specification :
     327(.
     328      ${head.env_in} := ${Access_To_Subprogram_Parameter_Profile.env_in};
     329.)
     330Rules for Array_Component_Choices.discrete_choice :
     331(.
     332      ${head.env_in} := ${Array_Component_Choices.env_in};
     333.)
     334Rules for Aspect_Specifications.aspect_specification :
     335(.
     336      ${head.env_in} := ${Aspect_Specifications.env_in};
     337.)
     338Rules for Associations.association :
     339(.
     340      ${head.env_in} := ${Associations.env_in};
     341.)
     342Rules for Asynchronous_Statement_Paths.select_then_abort_path :
     343(.
     344      ${head.env_in} := ${Asynchronous_Statement_Paths.env_in};
     345.)
     346Rules for Block_Declarative_Items.declarative_item :
     347(.
     348      ${head.env_in} := ${Block_Declarative_Items.env_in};
     349.)
     350Rules for Block_Exception_Handlers.exception_handler :
     351(.
     352      ${head.env_in} := ${Block_Exception_Handlers.env_in};
     353.)
     354Rules for Block_Statements.statement :
     355(.
     356      ${head.env_in} := ${Block_Statements.env_in};
     357.)
     358Rules for Body_Declarative_Items.declarative_item :
     359(.
     360      ${head.env_in} := ${Body_Declarative_Items.env_in};
     361.)
     362Rules for Body_Exception_Handlers.exception_handler :
     363(.
     364      ${head.env_in} := ${Body_Exception_Handlers.env_in};
     365.)
     366Rules for Body_Statements.statement :
     367(.
     368      ${head.env_in} := ${Body_Statements.env_in};
     369.)
     370Rules for Case_Expression_Paths.case_expression_path :
     371(.
     372      ${head.env_in} := ${Case_Expression_Paths.env_in};
     373.)
     374Rules for Case_Path_Alternative_Choices.discrete_choice :
     375(.
     376      ${head.env_in} := ${Case_Path_Alternative_Choices.env_in};
     377.)
     378Rules for Case_Statement_Alternative_Choices.discrete_choice :
     379(.
     380      ${head.env_in} := ${Case_Statement_Alternative_Choices.env_in};
     381.)
     382Rules for Case_Statement_Paths.case_path :
     383(.
     384      ${head.env_in} := ${Case_Statement_Paths.env_in};
     385.)
     386Rules for Clause_Names.program_unit_name :
     387(.
     388      ${head.env_in} := ${Clause_Names.env_in};
     389.)
     390Rules for Compilation_Pragmas.context_item :
     391(.
     392      ${head.env_in} := ${Compilation_Pragmas.env_in};
     393.)
     394Rules for Component_Clauses.clause_or_pragma :
     395(.
     396      ${head.env_in} := ${Component_Clauses.env_in};
     397.)
     398Rules for Context_Clause_Elements.context_item :
     399(.
     400      ${head.env_in} := ${Context_Clause_Elements.env_in};
     401.)
     402Rules for Discrete_Subtype_Definitions.discrete_subtype_definition :
     403(.
     404      ${head.env_in} := ${Discrete_Subtype_Definitions.env_in};
     405.)
     406Rules for Discriminants.discriminant_specification :
     407(.
     408      ${head.env_in} := ${Discriminants.env_in};
     409.)
     410Rules for Enumeration_Literal_Declarations.enumeration_literal_specification :
     411(.
     412      ${head.env_in} := ${Enumeration_Literal_Declarations.env_in};
     413.)
     414Rules for Exception_Choices.exception_choice :
     415(.
     416      ${head.env_in} := ${Exception_Choices.env_in};
     417.)
     418Rules for Expression_Paths.if_else_expression_path :
     419(.
     420      ${head.env_in} := ${Expression_Paths.env_in};
     421.)
     422Rules for Extended_Return_Exception_Handlers.exception_handler :
     423(.
     424      ${head.env_in} := ${Extended_Return_Exception_Handlers.env_in};
     425.)
     426Rules for Extended_Return_Statements.statement :
     427(.
     428      ${head.env_in} := ${Extended_Return_Statements.env_in};
     429.)
     430Rules for Generic_Actual_Part.generic_association :
     431(.
     432      ${head.env_in} := ${Generic_Actual_Part.env_in};
     433.)
     434Rules for Generic_Formal_Part.generic_formal :
     435(.
     436      ${head.env_in} := ${Generic_Formal_Part.env_in};
     437.)
     438Rules for Handler_Statements.statement :
     439(.
     440      ${head.env_in} := ${Handler_Statements.env_in};
     441.)
     442Rules for Index_Subtype_Definitions.subtype_mark :
     443(.
     444      ${head.env_in} := ${Index_Subtype_Definitions.env_in};
     445.)
     446Rules for Label_Names.defining_identifier :
     447(.
     448      ${head.env_in} := ${Label_Names.env_in};
     449.)
     450Rules for Loop_Statements.statement :
     451(.
     452      ${head.env_in} := ${Loop_Statements.env_in};
     453.)
     454Rules for Membership_Test_Choices.membership_choice :
     455(.
     456      ${head.env_in} := ${Membership_Test_Choices.env_in};
     457.)
     458Rules for Names.defining_identifier :
     459(.
     460      ${head.env_in} := ${Names.env_in};
     461.)
     462Rules for Parameter_Profile.parameter_specification :
     463(.
     464      ${head.env_in} := ${Parameter_Profile.env_in};
     465.)
     466Rules for Pragma_Argument_Associations.pragma_argument_association :
     467(.
     468      ${head.env_in} := ${Pragma_Argument_Associations.env_in};
     469.)
     470Rules for Private_Part_Declarative_Items.basic_declarative_item :
     471(.
     472      ${head.env_in} := ${Private_Part_Declarative_Items.env_in};
     473.)
     474Rules for Private_Protected_Items.protected_element_declaration :
     475(.
     476      ${head.env_in} := ${Private_Protected_Items.env_in};
     477.)
     478Rules for Private_Task_Items.task_item :
     479(.
     480      ${head.env_in} := ${Private_Task_Items.env_in};
     481.)
     482Rules for Progenitor_List.subtype_mark :
     483(.
     484      ${head.env_in} := ${Progenitor_List.env_in};
     485.)
     486Rules for Protected_Operation_Items.protected_operation_item :
     487(.
     488      ${head.env_in} := ${Protected_Operation_Items.env_in};
     489.)
     490Rules for Record_Component_Associations.association :
     491(.
     492      ${head.env_in} := ${Record_Component_Associations.env_in};
     493.)
     494Rules for Record_Components.component_item :
     495(.
     496      ${head.env_in} := ${Record_Components.env_in};
     497.)
     498Rules for Selective_Statement_Paths.select_or_else_path :
     499(.
     500      ${head.env_in} := ${Selective_Statement_Paths.env_in};
     501.)
     502Rules for Sequence_Of_Statements.statement :
     503(.
     504      ${head.env_in} := ${Sequence_Of_Statements.env_in};
     505.)
     506Rules for Statement_Paths.if_elsif_else_path :
     507(.
     508      ${head.env_in} := ${Statement_Paths.env_in};
     509.)
     510Rules for Type_Clause_Names.subtype_mark :
     511(.
     512      ${head.env_in} := ${Type_Clause_Names.env_in};
     513.)
     514Rules for Variant_Choices.discrete_choice :
     515(.
     516      ${head.env_in} := ${Variant_Choices.env_in};
     517.)
     518Rules for Variants.variant :
     519(.
     520      ${head.env_in} := ${Variants.env_in};
     521.)
     522Rules for Visible_Part_Declarative_Items.basic_declarative_item :
     523(.
     524      ${head.env_in} := ${Visible_Part_Declarative_Items.env_in};
     525.)
     526Rules for Visible_Protected_Items.protected_operation_declaration :
     527(.
     528      ${head.env_in} := ${Visible_Protected_Items.env_in};
     529.)
     530Rules for Visible_Task_Items.task_item :
     531(.
     532      ${head.env_in} := ${Visible_Task_Items.env_in};
     533.)
     534Rules for With_Clause_Names.program_unit_name :
     535(.
     536      ${head.env_in} := ${With_Clause_Names.env_in};
     537.)
    310538
    311539Rules for Aborted_Tasks.name :
Note: See TracChangeset for help on using the changeset viewer.