Natools

Check-in [9f0aaf857d]
Login
Overview
Comment:s_expressions-parsers: return End_Of_Input on locked objects, to behave like genuine S-expression end
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9f0aaf857d7fb7c8ecafbbe1e0ad8e48068d8c6b
User & Date: nat on 2014-03-28 20:20:44
Other Links: manifest | tags
Context
2014-03-28
20:25
s_expressions-parsers: fix typo check-in: a14e9a88da user: nat tags: trunk
20:20
s_expressions-parsers: return End_Of_Input on locked objects, to behave like genuine S-expression end check-in: 9f0aaf857d user: nat tags: trunk
2014-03-27
21:24
s_expressions-parsers-tests: adapt the test suite to the new Parsers packet check-in: b02835bdfa user: nat tags: trunk
Changes

Modified src/natools-s_expressions-parsers.adb from [c491bede79] to [cea1ca4044].

100
101
102
103
104
105
106
107

108
109
110
111
112
113
114
   overriding procedure Next
     (Self : in out Parser;
      Event : out Events.Event)
   is
      O : Octet;
   begin
      if Self.Locked then
         raise Constraint_Error;

      end if;

      Self.Latest := Events.Error;
      loop
         --  Process pending events

         if Self.Next_Event /= Events.End_Of_Input then







|
>







100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
   overriding procedure Next
     (Self : in out Parser;
      Event : out Events.Event)
   is
      O : Octet;
   begin
      if Self.Locked then
         Event := Evnets.End_Of_Input;
         return;
      end if;

      Self.Latest := Events.Error;
      loop
         --  Process pending events

         if Self.Next_Event /= Events.End_Of_Input then