From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a3b1adae5552af6d,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!l18g2000yqm.googlegroups.com!not-for-mail From: Syntax Issues Newsgroups: comp.lang.ada Subject: Text parsing package Date: Tue, 22 Mar 2011 16:34:48 -0700 (PDT) Organization: http://groups.google.com Message-ID: <4fa6c081-910a-4e62-928a-0f6cdd1da951@l18g2000yqm.googlegroups.com> NNTP-Posting-Host: 65.50.108.230 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1300836888 23748 127.0.0.1 (22 Mar 2011 23:34:48 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 22 Mar 2011 23:34:48 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: l18g2000yqm.googlegroups.com; posting-host=65.50.108.230; posting-account=iBd8kwoAAADZsnwFNFLVlwsLLxwDLPUm User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.134 Safari/534.16,gzip(gfe) Xref: g2news1.google.com comp.lang.ada:18388 Date: 2011-03-22T16:34:48-07:00 List-Id: 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 --