[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 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[]);
>
> 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?
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"How about the new language C&? No, that's not 'c ampersand', 'c reference',
'reference to c' or 'c and'. It's pronounced 'campersand', to confuse the
hell out of people who are unfamiliar with it, and it will, of course,
have no pointers."
-- Xazziri in comp.lang.c++ about C#
- [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 <=
- [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] 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
|
|