comp.lang.ada
 help / color / mirror / Atom feed
From: Syntax Issues <syntax.issues@gmail.com>
Subject: Text parsing package
Date: Tue, 22 Mar 2011 16:34:48 -0700 (PDT)
Date: 2011-03-22T16:34:48-07:00	[thread overview]
Message-ID: <4fa6c081-910a-4e62-928a-0f6cdd1da951@l18g2000yqm.googlegroups.com> (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 --



             reply	other threads:[~2011-03-22 23:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-22 23:34 Syntax Issues [this message]
2011-03-23  3:01 ` Text parsing package 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
replies disabled

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