Ignore:
Timestamp:
Dec 26, 2014, 12:22:18 PM (6 years ago)
Author:
Maxim Reznik
Message:

Change list expansion

Traverse of list was changed in prev commit. Now lists are processed in
depth-first order left-to-right. So corresponding list representation is
LIST ::= item LIST<tail>; instead of previous
LIST ::= LIST<head> item;

So change AG generator and AG rules.
Construction and iteration of symbol list is changed also.

File:
1 edited

Legend:

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

    r361 r362  
    310310Rules for Aborted_Tasks.name :
    311311(.
    312       ${head.env_in} := ${Aborted_Tasks.env_in};
     312      ${tail.env_in} := ${Aborted_Tasks.env_in};
    313313.)
    314314Rules for Accept_Body_Exception_Handlers.exception_handler :
    315315(.
    316       ${head.env_in} := ${Accept_Body_Exception_Handlers.env_in};
     316      ${tail.env_in} := ${Accept_Body_Exception_Handlers.env_in};
    317317.)
    318318Rules for Accept_Body_Statements.statement :
    319319(.
    320       ${head.env_in} := ${Accept_Body_Statements.env_in};
     320      ${tail.env_in} := ${Accept_Body_Statements.env_in};
    321321.)
    322322Rules for Accept_Parameters.parameter_specification :
    323323(.
    324       ${head.env_in} := ${Accept_Parameters.env_in};
     324      ${tail.env_in} := ${Accept_Parameters.env_in};
    325325.)
    326326Rules for Access_To_Subprogram_Parameter_Profile.parameter_specification :
    327327(.
    328       ${head.env_in} := ${Access_To_Subprogram_Parameter_Profile.env_in};
     328      ${tail.env_in} := ${Access_To_Subprogram_Parameter_Profile.env_in};
    329329.)
    330330Rules for Array_Component_Choices.discrete_choice :
    331331(.
    332       ${head.env_in} := ${Array_Component_Choices.env_in};
     332      ${tail.env_in} := ${Array_Component_Choices.env_in};
    333333.)
    334334Rules for Aspect_Specifications.aspect_specification :
    335335(.
    336       ${head.env_in} := ${Aspect_Specifications.env_in};
     336      ${tail.env_in} := ${Aspect_Specifications.env_in};
    337337.)
    338338Rules for Associations.association :
    339339(.
    340       ${head.env_in} := ${Associations.env_in};
     340      ${tail.env_in} := ${Associations.env_in};
    341341.)
    342342Rules for Asynchronous_Statement_Paths.select_then_abort_path :
    343343(.
    344       ${head.env_in} := ${Asynchronous_Statement_Paths.env_in};
     344      ${tail.env_in} := ${Asynchronous_Statement_Paths.env_in};
    345345.)
    346346Rules for Block_Declarative_Items.declarative_item :
    347347(.
    348       ${head.env_in} := ${Block_Declarative_Items.env_in};
     348      ${tail.env_in} := ${Block_Declarative_Items.env_in};
    349349.)
    350350Rules for Block_Exception_Handlers.exception_handler :
    351351(.
    352       ${head.env_in} := ${Block_Exception_Handlers.env_in};
     352      ${tail.env_in} := ${Block_Exception_Handlers.env_in};
    353353.)
    354354Rules for Block_Statements.statement :
    355355(.
    356       ${head.env_in} := ${Block_Statements.env_in};
     356      ${tail.env_in} := ${Block_Statements.env_in};
    357357.)
    358358Rules for Body_Declarative_Items.declarative_item :
    359359(.
    360       ${head.env_in} := ${Body_Declarative_Items.env_in};
     360      ${tail.env_in} := ${Body_Declarative_Items.env_in};
    361361.)
    362362Rules for Body_Exception_Handlers.exception_handler :
    363363(.
    364       ${head.env_in} := ${Body_Exception_Handlers.env_in};
     364      ${tail.env_in} := ${Body_Exception_Handlers.env_in};
    365365.)
    366366Rules for Body_Statements.statement :
    367367(.
    368       ${head.env_in} := ${Body_Statements.env_in};
     368      ${tail.env_in} := ${Body_Statements.env_in};
    369369.)
    370370Rules for Case_Expression_Paths.case_expression_path :
    371371(.
    372       ${head.env_in} := ${Case_Expression_Paths.env_in};
     372      ${tail.env_in} := ${Case_Expression_Paths.env_in};
    373373.)
    374374Rules for Case_Path_Alternative_Choices.discrete_choice :
    375375(.
    376       ${head.env_in} := ${Case_Path_Alternative_Choices.env_in};
     376      ${tail.env_in} := ${Case_Path_Alternative_Choices.env_in};
    377377.)
    378378Rules for Case_Statement_Alternative_Choices.discrete_choice :
    379379(.
    380       ${head.env_in} := ${Case_Statement_Alternative_Choices.env_in};
     380      ${tail.env_in} := ${Case_Statement_Alternative_Choices.env_in};
    381381.)
    382382Rules for Case_Statement_Paths.case_path :
    383383(.
    384       ${head.env_in} := ${Case_Statement_Paths.env_in};
     384      ${tail.env_in} := ${Case_Statement_Paths.env_in};
    385385.)
    386386Rules for Clause_Names.program_unit_name :
    387387(.
    388       ${head.env_in} := ${Clause_Names.env_in};
     388      ${tail.env_in} := ${Clause_Names.env_in};
    389389.)
    390390Rules for Compilation_Pragmas.context_item :
    391391(.
    392       ${head.env_in} := ${Compilation_Pragmas.env_in};
     392      ${tail.env_in} := ${Compilation_Pragmas.env_in};
    393393.)
    394394Rules for Component_Clauses.clause_or_pragma :
    395395(.
    396       ${head.env_in} := ${Component_Clauses.env_in};
     396      ${tail.env_in} := ${Component_Clauses.env_in};
    397397.)
    398398Rules for Context_Clause_Elements.context_item :
    399399(.
    400       ${head.env_in} := ${Context_Clause_Elements.env_in};
     400      ${tail.env_in} := ${Context_Clause_Elements.env_in};
    401401.)
    402402Rules for Discrete_Subtype_Definitions.discrete_subtype_definition :
    403403(.
    404       ${head.env_in} := ${Discrete_Subtype_Definitions.env_in};
     404      ${tail.env_in} := ${Discrete_Subtype_Definitions.env_in};
    405405.)
    406406Rules for Discriminants.discriminant_specification :
    407407(.
    408       ${head.env_in} := ${Discriminants.env_in};
     408      ${tail.env_in} := ${Discriminants.env_in};
    409409.)
    410410Rules for Enumeration_Literal_Declarations.enumeration_literal_specification :
    411411(.
    412       ${head.env_in} := ${Enumeration_Literal_Declarations.env_in};
     412      ${tail.env_in} := ${Enumeration_Literal_Declarations.env_in};
    413413.)
    414414Rules for Exception_Choices.exception_choice :
    415415(.
    416       ${head.env_in} := ${Exception_Choices.env_in};
     416      ${tail.env_in} := ${Exception_Choices.env_in};
    417417.)
    418418Rules for Expression_Paths.if_else_expression_path :
    419419(.
    420       ${head.env_in} := ${Expression_Paths.env_in};
     420      ${tail.env_in} := ${Expression_Paths.env_in};
    421421.)
    422422Rules for Extended_Return_Exception_Handlers.exception_handler :
    423423(.
    424       ${head.env_in} := ${Extended_Return_Exception_Handlers.env_in};
     424      ${tail.env_in} := ${Extended_Return_Exception_Handlers.env_in};
    425425.)
    426426Rules for Extended_Return_Statements.statement :
    427427(.
    428       ${head.env_in} := ${Extended_Return_Statements.env_in};
     428      ${tail.env_in} := ${Extended_Return_Statements.env_in};
    429429.)
    430430Rules for Generic_Actual_Part.generic_association :
    431431(.
    432       ${head.env_in} := ${Generic_Actual_Part.env_in};
     432      ${tail.env_in} := ${Generic_Actual_Part.env_in};
    433433.)
    434434Rules for Generic_Formal_Part.generic_formal :
    435435(.
    436       ${head.env_in} := ${Generic_Formal_Part.env_in};
     436      ${tail.env_in} := ${Generic_Formal_Part.env_in};
    437437.)
    438438Rules for Handler_Statements.statement :
    439439(.
    440       ${head.env_in} := ${Handler_Statements.env_in};
     440      ${tail.env_in} := ${Handler_Statements.env_in};
    441441.)
    442442Rules for Index_Subtype_Definitions.subtype_mark :
    443443(.
    444       ${head.env_in} := ${Index_Subtype_Definitions.env_in};
     444      ${tail.env_in} := ${Index_Subtype_Definitions.env_in};
    445445.)
    446446Rules for Label_Names.defining_identifier :
    447447(.
    448       ${head.env_in} := ${Label_Names.env_in};
     448      ${tail.env_in} := ${Label_Names.env_in};
    449449.)
    450450Rules for Loop_Statements.statement :
    451451(.
    452       ${head.env_in} := ${Loop_Statements.env_in};
     452      ${tail.env_in} := ${Loop_Statements.env_in};
    453453.)
    454454Rules for Membership_Test_Choices.membership_choice :
    455455(.
    456       ${head.env_in} := ${Membership_Test_Choices.env_in};
     456      ${tail.env_in} := ${Membership_Test_Choices.env_in};
    457457.)
    458458Rules for Names.defining_identifier :
    459459(.
    460       ${head.env_in} := ${Names.env_in};
     460      ${tail.env_in} := ${Names.env_in};
    461461.)
    462462Rules for Parameter_Profile.parameter_specification :
    463463(.
    464       ${head.env_in} := ${Parameter_Profile.env_in};
     464      ${tail.env_in} := ${Parameter_Profile.env_in};
    465465.)
    466466Rules for Pragma_Argument_Associations.pragma_argument_association :
    467467(.
    468       ${head.env_in} := ${Pragma_Argument_Associations.env_in};
     468      ${tail.env_in} := ${Pragma_Argument_Associations.env_in};
    469469.)
    470470Rules for Private_Part_Declarative_Items.basic_declarative_item :
    471471(.
    472       ${head.env_in} := ${Private_Part_Declarative_Items.env_in};
     472      ${tail.env_in} := ${Private_Part_Declarative_Items.env_in};
    473473.)
    474474Rules for Private_Protected_Items.protected_element_declaration :
    475475(.
    476       ${head.env_in} := ${Private_Protected_Items.env_in};
     476      ${tail.env_in} := ${Private_Protected_Items.env_in};
    477477.)
    478478Rules for Private_Task_Items.task_item :
    479479(.
    480       ${head.env_in} := ${Private_Task_Items.env_in};
     480      ${tail.env_in} := ${Private_Task_Items.env_in};
    481481.)
    482482Rules for Progenitor_List.subtype_mark :
    483483(.
    484       ${head.env_in} := ${Progenitor_List.env_in};
     484      ${tail.env_in} := ${Progenitor_List.env_in};
    485485.)
    486486Rules for Protected_Operation_Items.protected_operation_item :
    487487(.
    488       ${head.env_in} := ${Protected_Operation_Items.env_in};
     488      ${tail.env_in} := ${Protected_Operation_Items.env_in};
    489489.)
    490490Rules for Record_Component_Associations.association :
    491491(.
    492       ${head.env_in} := ${Record_Component_Associations.env_in};
     492      ${tail.env_in} := ${Record_Component_Associations.env_in};
    493493.)
    494494Rules for Record_Components.component_item :
    495495(.
    496       ${head.env_in} := ${Record_Components.env_in};
     496      ${tail.env_in} := ${Record_Components.env_in};
    497497.)
    498498Rules for Selective_Statement_Paths.select_or_else_path :
    499499(.
    500       ${head.env_in} := ${Selective_Statement_Paths.env_in};
     500      ${tail.env_in} := ${Selective_Statement_Paths.env_in};
    501501.)
    502502Rules for Sequence_Of_Statements.statement :
    503503(.
    504       ${head.env_in} := ${Sequence_Of_Statements.env_in};
     504      ${tail.env_in} := ${Sequence_Of_Statements.env_in};
    505505.)
    506506Rules for Statement_Paths.if_elsif_else_path :
    507507(.
    508       ${head.env_in} := ${Statement_Paths.env_in};
     508      ${tail.env_in} := ${Statement_Paths.env_in};
    509509.)
    510510Rules for Type_Clause_Names.subtype_mark :
    511511(.
    512       ${head.env_in} := ${Type_Clause_Names.env_in};
     512      ${tail.env_in} := ${Type_Clause_Names.env_in};
    513513.)
    514514Rules for Variant_Choices.discrete_choice :
    515515(.
    516       ${head.env_in} := ${Variant_Choices.env_in};
     516      ${tail.env_in} := ${Variant_Choices.env_in};
    517517.)
    518518Rules for Variants.variant :
    519519(.
    520       ${head.env_in} := ${Variants.env_in};
     520      ${tail.env_in} := ${Variants.env_in};
    521521.)
    522522Rules for Visible_Part_Declarative_Items.basic_declarative_item :
    523523(.
    524       ${head.env_in} := ${Visible_Part_Declarative_Items.env_in};
     524      ${tail.env_in} := ${Visible_Part_Declarative_Items.env_in};
    525525.)
    526526Rules for Visible_Protected_Items.protected_operation_declaration :
    527527(.
    528       ${head.env_in} := ${Visible_Protected_Items.env_in};
     528      ${tail.env_in} := ${Visible_Protected_Items.env_in};
    529529.)
    530530Rules for Visible_Task_Items.task_item :
    531531(.
    532       ${head.env_in} := ${Visible_Task_Items.env_in};
     532      ${tail.env_in} := ${Visible_Task_Items.env_in};
    533533.)
    534534Rules for With_Clause_Names.program_unit_name :
    535535(.
    536       ${head.env_in} := ${With_Clause_Names.env_in};
     536      ${tail.env_in} := ${With_Clause_Names.env_in};
    537537.)
    538538
     
    554554Rules for Accept_Parameters.parameter_specification :
    555555(.
    556       ${parameter_specification.env_in} := ${head.env_out};
     556      ${parameter_specification.env_in} := ${tail.env_out};
    557557.)
    558558
    559559Rules for Access_To_Subprogram_Parameter_Profile.parameter_specification :
    560560(.
    561       ${parameter_specification.env_in} := ${head.env_out};
     561      ${parameter_specification.env_in} := ${tail.env_out};
    562562.)
    563563
     
    584584Rules for Block_Declarative_Items.declarative_item :
    585585(.
    586       ${declarative_item.env_in} := ${head.env_out};
     586      ${declarative_item.env_in} := ${tail.env_out};
    587587.)
    588588
     
    599599Rules for Body_Declarative_Items.declarative_item :
    600600(.
    601       ${declarative_item.env_in} := ${head.env_out};
     601      ${declarative_item.env_in} := ${tail.env_out};
    602602.)
    603603
     
    639639Rules for Compilation_Pragmas.context_item :
    640640(.
    641       ${context_item.env_in} := ${head.env_out};
     641      ${context_item.env_in} := ${tail.env_out};
    642642.)
    643643
     
    649649Rules for Context_Clause_Elements.context_item :
    650650(.
    651       ${context_item.env_in} := ${head.env_out};
     651      ${context_item.env_in} := ${tail.env_out};
    652652.)
    653653
     
    659659Rules for Discriminants.discriminant_specification :
    660660(.
    661       ${discriminant_specification.env_in} := ${head.env_out};
     661      ${discriminant_specification.env_in} := ${tail.env_out};
    662662.)
    663663
    664664Rules for Enumeration_Literal_Declarations.enumeration_literal_specification :
    665665(.
    666       ${enumeration_literal_specification.env_in} := ${head.env_out};
     666      ${enumeration_literal_specification.env_in} := ${tail.env_out};
    667667.)
    668668
     
    694694Rules for Generic_Formal_Part.generic_formal :
    695695(.
    696       ${generic_formal.env_in} := ${head.env_out};
     696      ${generic_formal.env_in} := ${tail.env_out};
    697697.)
    698698
     
    729729Rules for Parameter_Profile.parameter_specification :
    730730(.
    731       ${parameter_specification.env_in} := ${head.env_out};
     731      ${parameter_specification.env_in} := ${tail.env_out};
    732732.)
    733733
     
    739739Rules for Private_Part_Declarative_Items.basic_declarative_item :
    740740(.
    741       ${basic_declarative_item.env_in} := ${head.env_out};
     741      ${basic_declarative_item.env_in} := ${tail.env_out};
    742742.)
    743743
    744744Rules for Private_Protected_Items.protected_element_declaration :
    745745(.
    746       ${protected_element_declaration.env_in} := ${head.env_out};
     746      ${protected_element_declaration.env_in} := ${tail.env_out};
    747747.)
    748748
    749749Rules for Private_Task_Items.task_item :
    750750(.
    751       ${task_item.env_in} := ${head.env_out};
     751      ${task_item.env_in} := ${tail.env_out};
    752752.)
    753753
     
    759759Rules for Protected_Operation_Items.protected_operation_item :
    760760(.
    761       ${protected_operation_item.env_in} := ${head.env_out};
     761      ${protected_operation_item.env_in} := ${tail.env_out};
    762762.)
    763763
     
    769769Rules for Record_Components.component_item :
    770770(.
    771       ${component_item.env_in} := ${head.env_out};
     771      ${component_item.env_in} := ${tail.env_out};
    772772.)
    773773
     
    799799Rules for Variants.variant :
    800800(.
    801       ${variant.env_in} := ${head.env_out};
     801      ${variant.env_in} := ${tail.env_out};
    802802.)
    803803
    804804Rules for Visible_Part_Declarative_Items.basic_declarative_item :
    805805(.
    806       ${basic_declarative_item.env_in} := ${head.env_out};
     806      ${basic_declarative_item.env_in} := ${tail.env_out};
    807807.)
    808808
    809809Rules for Visible_Protected_Items.protected_operation_declaration :
    810810(.
    811       ${protected_operation_declaration.env_in} := ${head.env_out};
     811      ${protected_operation_declaration.env_in} := ${tail.env_out};
    812812.)
    813813
    814814Rules for Visible_Task_Items.task_item :
    815815(.
    816       ${task_item.env_in} := ${head.env_out};
     816      ${task_item.env_in} := ${tail.env_out};
    817817.)
    818818
Note: See TracChangeset for help on using the changeset viewer.