Changeset 382


Ignore:
Timestamp:
Jan 8, 2015, 8:08:44 AM (6 years ago)
Author:
Maxim Reznik
Message:

Revert #379 #380 #381

Location:
trunk/ada-2012
Files:
7 edited

Legend:

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

    r381 r382  
    1919      ${root_type_definition.type_kind} := 0;
    2020.)
    21 
    22 Synthesized attributes
    23   operator_symbol
    24    : Gela.Semantic_Types.Auxiliary_Operator_Kinds : kind;
    25 
    26 Rules for operator_symbol.operator_symbol_token :
    27 (.
    28       --  Depends on ${operator_symbol.Down};
    29       ${operator_symbol.kind} := Gela.Semantic_Types.Is_Operator;
    30 .)
    31 
    32 
  • trunk/ada-2012/src/api/gela-semantic_types.ads

    r381 r382  
    5656      Not_Operator);
    5757
    58    type Auxiliary_Operator_Kinds is (Is_Operator, Is_String);
    59 
    6058end Gela.Semantic_Types;
  • trunk/ada-2012/src/parser/gela-fix_node_factories.adb

    r381 r382  
    55with Gela.Elements.Record_Aggregates;
    66with Gela.Elements.Prefixes;
    7 with Gela.Semantic_Types;
    87
    98package body Gela.Fix_Node_Factories is
     
    2524               Operator_Symbol_Token));
    2625   begin
    27       Result.Set_Kind (Gela.Semantic_Types.Is_Operator);
    28 
    2926      return Gela.Elements.Operator_Symbols.Operator_Symbol_Access (Result);
    3027   end Operator_Symbol;
  • trunk/ada-2012/src/parser/gela-nodes-fixed_operator_symbols.adb

    r381 r382  
    1 with Gela.Semantic_Types;
    2 
    31package body Gela.Nodes.Fixed_Operator_Symbols is
    42
     
    2321      Visiter : in out Gela.Element_Visiters.Visiter'Class)
    2422   is
     23      use type Gela.Lexical_Types.Symbol;
     24      Comp    : constant Gela.Compilations.Compilation_Access :=
     25        Self.Enclosing_Compilation;
     26      Token : constant Gela.Lexical_Types.Token :=
     27        Comp.Get_Token (Self.Operator_Symbol_Token);
    2528   begin
    26       case Self.Kind is
    27          when Gela.Semantic_Types.Is_Operator =>
    28             Visiter.Operator_Symbol (Self);
    29          when Gela.Semantic_Types.Is_String =>
    30             Visiter.String_Literal (Self);
    31       end case;
     29      if Token.Symbol = Gela.Lexical_Types.No_Symbol then
     30         Visiter.String_Literal (Self);
     31      else
     32         Visiter.Operator_Symbol (Self);
     33      end if;
    3234   end Visit;
    3335
  • trunk/ada-2012/src/semantic/gela-resolve.adb

    r368 r382  
    296296
    297297   begin
     298      Result := 0;
     299
    298300      if not Constraint.Assigned then
    299          Result := 0;
    300301         return;
    301302      end if;
  • trunk/ada-2012/tests/grammars/ts_00021/ts_00021.adb

    r380 r382  
    2929      use Gela.Grammars.LR_Tables;
    3030      use type Gela.Grammars.Terminal_Count;
     31      use type Gela.Grammars.Production_Count;
    3132      use type Gela.Grammars.LR.State_Count;
    3233
     
    4344         Ada.Text_IO.Put (Gela.Grammars.LR.State_Count'Image (S));
    4445
    45          Ada.Text_IO.Put (' ');
     46         if S in 1 .. 9 then
     47            Ada.Text_IO.Put (' ');
     48         end if;
    4649      elsif not Is_Empty (R) then
    4750         Ada.Text_IO.Put ("REDUCE");
     
    5053           (Gela.Grammars.Production_Index'Image (Production (R)));
    5154
    52          Ada.Text_IO.Put (' ');
     55         if Production (R) <= 9 then
     56            Ada.Text_IO.Put (' ');
     57         end if;
    5358      else
    5459         Ada.Text_IO.Put ("Error    ");
  • trunk/ada-2012/tests/grammars/ts_00023/ts_00023.adb

    r380 r382  
    2929      use Gela.Grammars.LR_Tables;
    3030      use type Gela.Grammars.Terminal_Count;
     31      use type Gela.Grammars.Production_Count;
    3132      use type Gela.Grammars.LR.State_Count;
    3233
     
    4344         Ada.Text_IO.Put (Gela.Grammars.LR.State_Count'Image (S));
    4445
    45          Ada.Text_IO.Put (' ');
     46         if S in 1 .. 9 then
     47            Ada.Text_IO.Put (' ');
     48         end if;
    4649      elsif not Is_Empty (R) then
    4750         Ada.Text_IO.Put ("REDUCE");
     
    5053           (Gela.Grammars.Production_Index'Image (Production (R)));
    5154
    52          Ada.Text_IO.Put (' ');
     55         if Production (R) <= 9 then
     56            Ada.Text_IO.Put (' ');
     57         end if;
    5358      else
    5459         Ada.Text_IO.Put ("Error    ");
Note: See TracChangeset for help on using the changeset viewer.