Re: Data table text I/O package?
- From: "Dmitry A. Kazakov" <mailbox@xxxxxxxxxxxxxxxxx>
- Date: Mon, 20 Jun 2005 20:54:38 +0200
On Mon, 20 Jun 2005 20:25:13 +0200, Georg Bauhaus wrote:
> Dmitry A. Kazakov wrote:
>> On Mon, 20 Jun 2005 13:19:44 +0200, Georg Bauhaus wrote:
>>
>>
>>>Dmitry A. Kazakov wrote:
>>>
>>>
>>>> Get (Line, Pointer, Field_2); -- Get field and move Pointer
>>>> ...
>>>> etc
>>>>
>>>>Quite trivial.
>>>
>>>And quite adventurous in any but an internal context.
>
> If you are parsing data from outside, you have to know
> the quality and structure of data (plus the pitfalls mentioned
> by Robert Duff.) As to quality, just one inadvertently typed
> space might be hazardous when it splits an atom in two... :)
>
> (Think of a medium quality CSV file, and a number typed 3.1 5.
> Oops!)
No, you just have to use different delimiters between and within the
fields. This is why in Ada parameters of a procedure call are separated by
commas rather than spaces.
Though is it about what syntax would be the best? Or is it about how to
parse something in a defined syntax?
> XML can help with this for example by identifying the bounds
> of a data item, even if mistyped:
> <Distance km='3.1 5'/>
> This will be noticed by the XML parser if it knows about km's
> type (NMTOKEN).
Now consider a space between / and >:
<Distance km='3.15'/ >
XML adds here nothing, but a huge readability loss.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
.
- Follow-Ups:
- Re: Data table text I/O package?
- From: Simon Wright
- Re: Data table text I/O package?
- From: Georg Bauhaus
- Re: Data table text I/O package?
- References:
- Data table text I/O package?
- From: Jacob Sparre Andersen
- Re: Data table text I/O package?
- From: Preben Randhol
- Re: Data table text I/O package?
- From: Jacob Sparre Andersen
- Re: Data table text I/O package?
- From: Preben Randhol
- Re: Data table text I/O package?
- From: Jacob Sparre Andersen
- Re: Data table text I/O package?
- From: Randy Brukardt
- Re: Data table text I/O package?
- From: Jacob Sparre Andersen
- Re: Data table text I/O package?
- From: Marius Amado Alves
- Re: Data table text I/O package?
- From: Georg Bauhaus
- Re: Data table text I/O package?
- From: Dmitry A. Kazakov
- Re: Data table text I/O package?
- From: Georg Bauhaus
- Re: Data table text I/O package?
- From: Dmitry A. Kazakov
- Re: Data table text I/O package?
- From: Georg Bauhaus
- Re: Data table text I/O package?
- From: Dmitry A. Kazakov
- Re: Data table text I/O package?
- From: Georg Bauhaus
- Data table text I/O package?
- Prev by Date: Re: Data table text I/O package?
- Next by Date: Pronunciation
- Previous by thread: Re: Data table text I/O package?
- Next by thread: Re: Data table text I/O package?
- Index(es):
Relevant Pages
|