Natools

Diff
Login

Differences From Artifact [12439cabc9]:

To Artifact [dc49608feb]:


1602
1603
1604
1605
1606
1607
1608
1609
1610
1611

1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631

   procedure Find_Token (Source : in     Chunked_String;
                         Set    : in     Maps.Character_Set;
                         Test   : in     Ada.Strings.Membership;
                         First  :    out Positive;
                         Last   :    out Natural)
   is
      function Invert (M : Ada.Strings.Membership)
         return Ada.Strings.Membership;
      pragma Inline (Invert);


      N : Natural;

      function Invert (M : Ada.Strings.Membership)
         return Ada.Strings.Membership
      is
         use Ada.Strings;
      begin
         case M is
            when Inside  => return Outside;
            when Outside => return Inside;
         end case;
      end Invert;
   begin
      N := Index (Source, Set, Test);

      if N = 0 then
         First := 1;
         Last := 0;
      else







|
|
|
>


<
<
<
<
<
<
<
<
<
<
<







1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614











1615
1616
1617
1618
1619
1620
1621

   procedure Find_Token (Source : in     Chunked_String;
                         Set    : in     Maps.Character_Set;
                         Test   : in     Ada.Strings.Membership;
                         First  :    out Positive;
                         Last   :    out Natural)
   is
      Invert : constant array (Ada.Strings.Membership)
        of Ada.Strings.Membership
        := (Ada.Strings.Inside  => Ada.Strings.Outside,
            Ada.Strings.Outside => Ada.Strings.Inside);

      N : Natural;











   begin
      N := Index (Source, Set, Test);

      if N = 0 then
         First := 1;
         Last := 0;
      else