Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: extremely preliminary server command parsing
Home

[Freeciv-Dev] Re: extremely preliminary server command parsing

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Justin Moore <justin@xxxxxxxxxxx>, Freeciv Developers <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: extremely preliminary server command parsing
From: Reinier Post <rp@xxxxxxxxxx>
Date: Tue, 23 Oct 2001 00:37:42 +0200

On Mon, Oct 22, 2001 at 01:17:25PM -0400, Justin Moore wrote:

> - blank lines or lines whose first character is a '#' are ignored (done)

At present, the ruleset code allows '#' comments to follow data
in some places.  It would be nice to have this, but '#' can occur
within data.

> - lines with a '\' as the last non-whitespace, non-commented character
>     indicate a line continuation

I think Arien's proposal is easier to use, especially for non-Unix users.

> - lines that end with a newline end a comment (this includes line
>     continuated commands)

Don't all lines end with a newline?

> - if a file does not end with a newline (the last valid line contains a
>     continuation) return an error
> 
>    While we don't necessarily need to create commands with our parsing
> functions in mind, we shouldn't make them *too* complex to parse.

Agreed.

Overall, without having looked at the patch yet, as someone who is
familiar with stdinhand.c I think most of the alternatives discussed
are fine, and to have a parser for any combination of those alternatives
will be a big improvement on the existing code.

-- 
Reinier


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