From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Text parsing package
Date: Mon, 28 Mar 2011 14:08:20 +0200
Date: 2011-03-28T14:08:19+02:00 [thread overview]
Message-ID: <1m1o43xtgtuwv$.7lv2z8elht0n$.dlg@40tude.net> (raw)
In-Reply-To: op.vs1tlclsule2fv@index.ici
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
> <mailbox@dmitry-kazakov.de> 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
prev parent reply other threads:[~2011-03-28 12:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox