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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a3b1adae5552af6d X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news4.google.com!feeder.news-service.com!weretis.net!feeder4.news.weretis.net!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Text parsing package Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <4fa6c081-910a-4e62-928a-0f6cdd1da951@l18g2000yqm.googlegroups.com> <1j2rym8p7nnpr$.6ov97ypbvrfe$.dlg@40tude.net> Date: Mon, 28 Mar 2011 14:08:20 +0200 Message-ID: <1m1o43xtgtuwv$.7lv2z8elht0n$.dlg@40tude.net> NNTP-Posting-Date: 28 Mar 2011 14:08:19 CEST NNTP-Posting-Host: 21e95d01.newsspool2.arcor-online.net X-Trace: DXC=\a;?6Q6:h3g:i=48;n?Z:`A9EHlD;3Ycb4Fo<]lROoRa8kF On Mon, 28 Mar 2011 12:18:38 +0200, Yannick Duch�ne (Hibou57) wrote: > Le Mon, 28 Mar 2011 10:15:52 +0200, Dmitry A. Kazakov > a �crit: >>>> 3. As others have mentioned, it is a good idea to abstract the source >>>> formats in order to be able to parse files, strings, streams etc. >>> And Ada already provides a root for that: Ada.Streams.Root_Stream_Type >> >> Unfortunately Root_Stream_Type is not an interface and string cannot be >> inherited from. So in the effect you would need a special root. > I meant implementing a concrete Root_Stream_Type using a string as source. > You would have an open method, getting a string or any kind of reference > to string, just not as a filename this time. But wonder about efficiency > (because of the tagged type), which is important for such low-level and > heavily iterated stuff. Another problem is that it would be difficult to use. Mix-in does not work because String cannot be a discriminant. You would have a nasty access-to-string one or have to copy the whole string into the stream object. >> Yes, it would be nice to have structured multiple co-routines as an >> alternative to FSM. There are some cases where tasks look like an >> overkill. > I remember I made that wish too (can't remember what was said to advocate > against it). The reason is always same, if there is nobody from ARG personally interested in the concept, it will be blindly rejected. Here I mean not the implementation, but merely a serious consideration of possible ways to approach the problem. Alone this require much mental work. > Let's hope for Ada 2017 or Ada 2022. I doubt it. This is a "serious" issue, not a patch or yet another kludge. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de