[Freeciv-Dev] Re: do you really want to work on the ~ (was: registry)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Wed, Dec 05, 2001 at 08:25:23PM +0100, Petr Baudis wrote:
> I think we don't need XML at all. It at least looks much less readable and
> comfortablee for me. I would be completely happy with C-like ruleset syntax -
> i.e.:
>
> building {
> id = "Airport";
> name = _("Airport");
> tech_req = "Radio";
> effect {
> type = "Unit_Veteran";
> range = "City";
> aff_unit = "Air";
> }
> effect {
> type = "Airlift";
> range = "City";
> }
> helptext = _("Blablabla\
> blabla\n\nbla\
> blah!");
> }
That is neater. XML is more verbose, certainly.
> It would be IMHO much cleaner than current one, and actually not so much
> different. As a parser, I don't see anything particulary wrong on flex+bison.
> Easy to use, portable, effecient.
I don't recommend it. Writing your own parser is error-prone (unless
you feel like the challenge). Much nicer to use a library which loads
a format for you. XML gives you that, and even some level of
validation.
Alternatively, there may be standardised forms of the above. Doesn't
the stuff libproplist uses look a bit like that?
OTOH, the thing about XMl is there exist nice editors for it. And nice
modes for popular editors. And it's easy to filter and
transform. (Automatically generated beautful LaTeX format
documentation from your ruleset file?)
I would argue that the *only* bad thing about XML is its excessive
verboseness when viewed by hand. It has technical and pragmatic
advantages.
Jules
- [Freeciv-Dev] registry, Andrew Sutton, 2001/12/05
- [Freeciv-Dev] do you really want to work on the ~ (was: registry), Reinier Post, 2001/12/05
- [Freeciv-Dev] Re: do you really want to work on the ~ (was: registry), Petr Baudis, 2001/12/05
- [Freeciv-Dev] Re: do you really want to work on the ~ (was: registry), Andrew Sutton, 2001/12/05
- [Freeciv-Dev] Re: do you really want to work on the ~ (was: registry), Jules Bean, 2001/12/05
- [Freeciv-Dev] Re: do you really want to work on the ~ (was: registry), Reinier Post, 2001/12/05
- [Freeciv-Dev] Re: do you really want to work on the ~ (was: registry), Gregor Zeitlinger, 2001/12/05
- [Freeciv-Dev] Re: do you really want to work on the ~ (was: registry), Jules Bean, 2001/12/06
- [Freeciv-Dev] Re: do you really want to work on the ~ (was: registry), Gregor Zeitlinger, 2001/12/06
|
|