comp.lang.ada
 help / color / mirror / Atom feed
* Text parsing package
@ 2011-03-22 23:34 Syntax Issues
  2011-03-23  3:01 ` Shark8
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Syntax Issues @ 2011-03-22 23:34 UTC (permalink / raw)


I have just finished a simple text parsing package. If anyone is
interested I can post the code (only about 160~ lines).


Example of how its used:

with
	Parsing,
	Ada.Text_Io,
	Ada.Strings.Unbounded;
use
	Ada.Text_Io,
	Ada.Strings.Unbounded;
procedure Test_Parsing
	is
	begin
		Parsing.Open("Test.txt");
		Put_Line(Float'Image(Parsing.Next_Float));
		Put_Line(Parsing.Next_String);
		Put_Line(Parsing.Next_String);
		Put_Line(Parsing.Next_String);
		Put_Line(To_String(Parsing.Next_Unbounded_String));
		Put_Line(Integer'Image(Parsing.Next_Integer));
		Put_Line(Float'Image(Parsing.Next_Float));
		Parsing.Close;
	end Test_Parsing;
-- Test.txt --
152.15 Test!
TesT
c

ca4

4

12.9
-- End of file --

-- Output --
 1.52150E+02
Test!
TesT
c
ca4
 4
 1.29000E+01
-- End of output --



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-03-28 12:08 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-22 23:34 Text parsing package Syntax Issues
2011-03-23  3:01 ` Shark8
2011-03-23  6:29 ` Alex Mentis
2011-03-23  6:36 ` J-P. Rosen
2011-03-23  8:32 ` Dmitry A. Kazakov
2011-03-23 11:19   ` Syntax Issues
2011-03-28  0:15   ` Yannick Duchêne (Hibou57)
2011-03-28  8:15     ` Dmitry A. Kazakov
2011-03-28 10:18       ` Yannick Duchêne (Hibou57)
2011-03-28 12:08         ` Dmitry A. Kazakov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox