Complete.Org: Mailing Lists: Archives: freeciv-dev: February 1999:
Re: [Freeciv-Dev] Serious Suggestions
Home

Re: [Freeciv-Dev] Serious Suggestions

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] Serious Suggestions
From: Falk Hueffner <falk.hueffner@xxxxxxxxxxxxxxxxxxxxxxxx>
Date: 23 Feb 1999 19:38:35 +0100

>>>>> "Matt" == Matt Busigin <jediknight@xxxxxxxxx> writes:

    Matt> On 23 Feb 1999, Falk Hueffner wrote: #I have also considered
    Matt> this recently. I think using a "real" language #for this is
    Matt> a bit overkill.

    Matt> Agreed - more bloat isn't good!  FreeCiv scales relatively
    Matt> well on different platforms, but a whole language might make
    Matt> it slower, and more resource hungry.

Hm. Gnus screwed the quoting. Perhaps you should stick to ">" as
quoting character (and perhaps I should, too, if I only knew how to :)

    Matt> #I considered a simple language with some predefined
    Matt> predicates like:

    Matt> #defenders < 2 : Riflemen #food_surplus > 2 : Settlers
    Matt> #!have(Great Wall) && size >= 4 : City Walls #size >= 7 :
    Matt> Aqueduct #production > 8 : JS-Bach

    Matt> I wouldn't use C logical &&, but rather 'and'.

Uhm, right. I just wanted to sketch the structure a bit...

    Matt> Need some help?  This sounds interesting, and at one time, I
    Matt> was developing a language of my own using lex & yacc.  For
    Matt> this, though, I think using yacc is a bit overkill.  The
    Matt> parser really isn't that difficult for something as small as
    Matt> this.

I have made the experience that parsers get too comlicated too
quickly, and are really hard to debug, and the code generated by yacc
is not really that large. Automake has also nice lex/yacc support.

I think I'll try to come up with a simple grammar and then we can
discuss further...

        Falk


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