[Freeciv-Dev] Re: [RFC PATCH] init_techs
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
> > /set attribute nation.Greek.techs Alphabet,Iron Working
> > ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> An aside: a standard way to denote words with non-alphanumerics must
> be picked. I don't care what it is, but adding the ability to interpret
> the command line above leads to problems.
Feel free to suggest a system. I just write the parsing code around
here (and occasionally serve as village idiot).
> > /easy
> > ^^^^
> >
> > /hard Caesar
> > ^^^^ ^^^^^^
>
> It would be better to write this as
>
> /set ailevel hard
>
> and
>
> /set ailevel hard Caesar
>
> I never added it because I didn't want to complicate the parsing in
> set_command() any further. After the cleanup it will be easy.
Agreed.
> > The first part in each of these is the command. The second part is the
> > "char *arg" that gets passed to the function. These callbacks should be
> > content-oblivious, and it should be up to the specific functions to
> > interpret the data correctly.
>
> Don't you think all commands should be parsed with standard functions that
> perform typechecking?
I do, but I think they should be in the cmd_* functions, not in the
parsing code. See my previous e-mails/rants as to why.
-jdm
"You don't give blood then take it back again
We're all deserving of something more"
- "Grievance"
Department of Computer Science, Duke University, Durham, NC 27708-0129
Email: justin@xxxxxxxxxxx
- [Freeciv-Dev] Re: commandline syntax and semantics (was: Server/ruleset unification), (continued)
- [Freeciv-Dev] Re: Server/ruleset unification [Was [RFC PATCH] init_techs], Raimar Falke, 2001/09/30
- [Freeciv-Dev] Re: Server/ruleset unification [Was [RFC PATCH] init_techs], Daniel L Speyer, 2001/09/25
- [Freeciv-Dev] Re: Server/ruleset unification [Was [RFC PATCH] init_techs], Reinier Post, 2001/09/27
- [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, Reinier Post, 2001/09/24
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Reinier Post, 2001/09/24
- [Freeciv-Dev] Re: [RFC PATCH] init_techs,
Justin Moore <=
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Reinier Post, 2001/09/25
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Justin Moore, 2001/09/26
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Reinier Post, 2001/09/23
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Arien Malec, 2001/09/20
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Daniel L Speyer, 2001/09/22
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Justin Moore, 2001/09/22
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Arien Malec, 2001/09/22
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Reinier Post, 2001/09/23
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Raimar Falke, 2001/09/23
- [Freeciv-Dev] Re: [RFC PATCH] init_techs, Reinier Post, 2001/09/23
|
|