[Freeciv-Dev] Re: [RFC PATCH] init_techs
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Mon, Sep 24, 2001 at 11:01:47AM -0400, Daniel L Speyer wrote:
> On Mon, 24 Sep 2001, Raimar Falke wrote:
>
> > On Mon, Sep 24, 2001 at 09:33:28AM -0400, Daniel L Speyer wrote:
> > > What about a truly general and extendable parsing? Admittedly, this would
> > > be difficult to write, but break down the command line according to
> > > syntactical rules and then pass each function manually typed void*s. A
> > > callback function would look like
> > >
> > > enum datatype;
> > > void do_command(int argV, datatype argT[], char *argC[]);
> ^^^^^^
> Oops, this should be void *
> > >
> > > Then if a function wants different arguments, it can throw some sort of
> > > generalized error (not literally throw, that's just the idea). There
> > > could even be a function int checkarguments(int Vgiven,datatype
> > > Tgiven[],int Vwanted,datatype Twanted[]) which would check everything,
> > > give an appropriate error, and then return whether or not the function
> > > should proceed.
> > >
> > > If we designed it to be extensible enough, we could get the benefits of
> > > both unified syntax and extendable functions.
> >
> > You know (f)lex and yacc/bison?
>
> I don't, though I'm sure I could learn them. Why?
You can easily define a small language which may be used to interface
with the server. It can reduce the amount of parsing the "real"
freeciv code has to do. It looks like some propose to implement
something like this by hand.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"Only one human captain has ever survived battle with the Minbari
fleet. He is behind me. You are in front of me. If you value your
lives, be somewhere else."
-- Ambassador Delenn, "Severed Dreams," Babylon 5
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, (continued)
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Arien Malec, 2001/09/23
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Justin Moore, 2001/09/24
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Raimar Falke, 2001/09/24
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Justin Moore, 2001/09/24
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Reinier Post, 2001/09/24
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Daniel L Speyer, 2001/09/24
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Raimar Falke, 2001/09/24
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Daniel L Speyer, 2001/09/24
- [Freeciv-Dev] Re: [RFC PATCH] init_techs,
Raimar Falke <=
- [Freeciv-Dev] Server/ruleset unification & grammars [Was [RFC PATCH] init_techs], Arien Malec, 2001/09/24
- [Freeciv-Dev] Re: Server/ruleset unification & grammars [Was [RFC PATCH] init_techs], Stepan Roh, 2001/09/24
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Reinier Post, 2001/09/24
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Raimar Falke, 2001/09/24
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Greg Wooledge, 2001/09/24
- [Freeciv-Dev] Server/ruleset unification [Was [RFC PATCH] init_techs], Arien Malec, 2001/09/24
- [Freeciv-Dev] Re: Server/ruleset unification [Was [RFC PATCH] init_techs], Raimar Falke, 2001/09/25
- [Freeciv-Dev] Re: Server/ruleset unification [Was [RFC PATCH] init_techs], Arien Malec, 2001/09/25
- [Freeciv-Dev] Re: Server/ruleset unification [Was [RFC PATCH] init_techs], Raimar Falke, 2001/09/25
- [Freeciv-Dev] Re: Server/ruleset unification [Was [RFC PATCH] init_techs], Arien Malec, 2001/09/25
|
|