Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2001:
[Freeciv-Dev] Re: XML
Home

[Freeciv-Dev] Re: XML

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Andrew Sutton <ansutton@xxxxxxx>
Cc: "Per I. Mathisen" <Per.Inge.Mathisen@xxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: XML
From: Petr Baudis <pasky@xxxxxxxxxxx>
Date: Fri, 7 Dec 2001 17:00:07 +0100

Dear diary, on Fri, Dec 07, 2001 at 03:30:52PM CET, I got a letter, where
Andrew Sutton <ansutton@xxxxxxx> told me, that...
> On Friday 07 December 2001 06:44 am, Petr Baudis wrote:
> > Dear diary, on Thu, Dec 06, 2001 at 11:37:01PM CET, I got a letter, where
> > "Per I. Mathisen" <Per.Inge.Mathisen@xxxxxxxxxxx> told me, that...
> >
> > > I've done a bit XML and XSLT (XML transformations) for my employer, and I
> > > agree that it is extremely verbose for what it does, _but_ I also think
> > > that freeciv would be much better off with XML than any arcane flex/bison
> > > or homebrewed solution.
> >
> > What's arcane on flex/bison? :)
> 
> see: ACM Crossroads: Why Bison is Becoming Extinct
> http://www.acm.org/crossroads/xrds7-5/bison.html
They say something about impossibility of parsing C or perl syntax by yacc.
Well, dunno about yacc but it's then really funny that both perl and gcc use
bison, isn't it? And, honestly, even when writing IMHO relatively complex
grammar using bison, I never got into those problems.

> > Learning? Well, I already made parsers for C-like formats and it should be
> > relatively easy to reuse them in FreeCiv. I will give them if someone will
> > want them, as I'm myself interested rather in AI for now.
> >
> > >                                                    It is also the most
> > > multiplatform solution there is.
> >
> > Hmm, flex/bison is pretty portable :).
> 
> flex and bison actually have interoperability issues with lex/yacc that can 
> make porting to non-GNU systems a little tougher. see the flex/bison man page 
> and texinfo for incompatibilities...
IIRC they have compability mode, and anyway, IMHO they will be ported to at
least all platforms where freeciv is.

> actually, on a side note flex isn't even GNU or being actively maintained. i
> don't know about bison.
That matters?

> > >  - run syntax validation tools on any platform or through a web page
> >
> > Any point in that? :)
> 
> good question.
> 
> both cases have their weak points. xml isn't very expressive and it's not
> really mean to be. writing your own parser will provide a more specialized
> language but is going to be a pain in the ass - regardless of how easy it is
> or how much experience anybody has.
I don't think so :).
> 
> that's it... that's my two cents. end result: i'd use xml before i'd write my
> own language, but if i needed something a little more functional, i'd
> investigate embeddedable scripting languages (tcl, et. al).
I would maybe use XML, depending on the style of the language. If it's only
config file, I wouldn't use it, as it's pretty useless then, IMHO.

-- 

                                Petr "Pasky" Baudis

UN*X programmer, UN*X administrator, hobbies = IPv6, IRC, FreeCiv hacking
.
  "A common mistake that people make, when trying to design
   something completely foolproof is to underestimate the
   ingenuity of complete fools."
     -- Douglas Adams in Mostly Harmless
.
Public PGP key, geekcode and stuff: http://pasky.ji.cz/~pasky/


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