toad-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Toad-devel] File format for tournament information


From: Garner, Robin
Subject: RE: [Toad-devel] File format for tournament information
Date: Wed, 2 Apr 2003 15:01:24 +1000

> Now I'll have to brush up on (i.e. learn for the first time) my Haskell
> skills.

Not really necessary - it's just a "proof of existence" parser.  On the other hand, I'm a Haskell evangelist, so by all means ... as you can see it's great for writing parsers.  www.haskell.org is the place to start.

> Any objections to defining an XML format, so that the DTD holds the
> format description?

I'm not a subscriber to the point of view that XML is inherently good, so I'd need to be convinced of the benefits.  >From what I've seen to date, XML makes files harder to read, harder to parse and much much larger.  Yes, you can do cute things with XSLT, but if the file format is easily readable anyway ...   But if you have specific benefits in mind, I'm open to persuasion !

>  - Pick, and stick to, a delimiter for the fields; you're using space
>    sometimes, comma sometimes. 

The comma delimiter is there because there is a 2-level list.  The alternative would be to have grouping elements (parentheses for example) around the sub-group.  I don't think there's an objective way to determine whether one approach is better than another.

>                                   If you want a human-readable file, it
>    should be well-defined what is syntax and what is data.  (This would
>    be fixed by using an XML format with every piece of data a
>    well-defined "element".)

All text data fields are quoted strings; other elements are either keywords
("tournament","title","venue","date","player","win","loss","forfeit","bye","none","version") or numbers.  What I'm striving for is the readability of a programming language, but still in an LL(k) grammar, and I think this format achieves these aims.  Separators are white-space or commas.

>  - Use ISO date format; it's smaller, unambiguous, logical, and
>    standard.  (It also matches the date field order that the majority
>    of the Go-playing population of the world uses :-)

Good idea.  Do you have a definition handy ?

Cheers


reply via email to

[Prev in Thread] Current Thread [Next in Thread]