Index: src/natools-s_expressions.adb ================================================================== --- src/natools-s_expressions.adb +++ src/natools-s_expressions.adb @@ -1,7 +1,7 @@ ------------------------------------------------------------------------------ --- Copyright (c) 2013, Natacha Porté -- +-- Copyright (c) 2013-2014, Natacha Porté -- -- -- -- Permission to use, copy, modify, and distribute this software for any -- -- purpose with or without fee is hereby granted, provided that the above -- -- copyright notice and this permission notice appear in all copies. -- -- -- @@ -33,6 +33,14 @@ Result (I) := Character'Pos (Data (Data'First + Integer (I))); end loop; end return; end To_Atom; + + procedure Next (Object : in out Descriptor'Class) is + Discarded : Events.Event; + pragma Unreferenced (Discarded); + begin + Next (Object, Discarded); + end Next; + end Natools.S_Expressions; Index: src/natools-s_expressions.ads ================================================================== --- src/natools-s_expressions.ads +++ src/natools-s_expressions.ads @@ -1,7 +1,7 @@ ------------------------------------------------------------------------------ --- Copyright (c) 2013, Natacha Porté -- +-- Copyright (c) 2013-2014, Natacha Porté -- -- -- -- Permission to use, copy, modify, and distribute this software for any -- -- purpose with or without fee is hereby granted, provided that the above -- -- copyright notice and this permission notice appear in all copies. -- -- -- @@ -104,14 +104,17 @@ procedure Next (Object : in out Descriptor; Event : out Events.Event) is abstract; -- Update Object to reflect the next event in the S-expression + + procedure Next (Object : in out Descriptor'Class); + -- Call Next discarding current event private use type Ada.Streams.Stream_Element; use type Ada.Streams.Stream_Element_Offset; use type Ada.Streams.Stream_Element_Array; use type Events.Event; end Natools.S_Expressions; Index: tests/natools-s_expressions-parsers-tests.adb ================================================================== --- tests/natools-s_expressions-parsers-tests.adb +++ tests/natools-s_expressions-parsers-tests.adb @@ -90,16 +90,14 @@ declare Input, Output : aliased Test_Tools.Memory_Stream; Printer : Printers.Canonical (Output'Access); Parser : aliased Parsers.Parser; Sub : Subparser (Parser'Access, Input'Access); - Event : Events.Event; -- ! begin Output.Set_Expected (Expected); Input.Set_Data (Source); --- Parser.Next_Event (Input'Access); - Sub.Next (Event); -- ! + Sub.Next; Printers.Transfer (Sub, Printer); Check_Parsing (Report, Name, Parser, Input, Output); end; Index: tests/natools-s_expressions-printers-pretty-tests.adb ================================================================== --- tests/natools-s_expressions-printers-pretty-tests.adb +++ tests/natools-s_expressions-printers-pretty-tests.adb @@ -45,16 +45,15 @@ declare Input, Output : aliased Test_Tools.Memory_Stream; Parser : aliased Parsers.Parser; Subparser : Parsers.Subparser (Parser'Access, Input'Access); Pretty_Printer : Printer (Output'Access); - Event : Events.Event; begin Input.Set_Data (Expected); Output.Set_Expected (Expected); Pretty_Printer.Set_Parameters (Param); - Subparser.Next (Event); + Subparser.Next; Transfer (Subparser, Pretty_Printer); Output.Check_Stream (Test); end; exception when Error : others =>