[Freeciv-Dev] Re: commandline syntax and semantics (was: Server/ruleset
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Is it not easier to pick one character as an escape character like "\",
to actually treat the escape character as a character it escapes itself.
Then you parse the line without any need to understand context, just
that "escaped" characters are always just "characters" with no special
meaning.
If you set a flag to NOT remove escapes you can process the line many
times. Presumably the last pass would remove the escapes.
With this rule, you just need to count ", odd you are in, even you are
out, because escaped quotes are just normal characters.
The escaping rule, being general works, for a any other case you might
need without adding more and more special context heruistics. For example
you could put spaces or commas in strings without even needing to quote.
At 10:12 PM 01/10/01 +0200, Reinier Post wrote:
>Yes, but I presented a system for quoting that would be easy to parse:
>quote by surrounding with " ", and make "" stand for " within " "s.
>You do have to keep track of whether you're within quotes or not.
>It can be made obligatory to quote names.
[...]
>--
>Reinier
Cheers,
RossW
=====
- [Freeciv-Dev] Re: commandline syntax and semantics (was: Server/ruleset unification), (continued)
- [Freeciv-Dev] Re: commandline syntax and semantics (was: Server/ruleset unification), Reinier Post, 2001/10/01
- [Freeciv-Dev] Re: commandline syntax and semantics (was: Server/ruleset unification), Reinier Post, 2001/10/01
- [Freeciv-Dev] Re: commandline syntax and semantics (was: Server/ruleset unification), Arien Malec, 2001/10/01
- [Freeciv-Dev] Re: commandline syntax and semantics (was: Server/ruleset unification), Daniel Sjölie, 2001/10/02
- [Freeciv-Dev] Re: commandline syntax and semantics (was: Server/ruleset unification), Reinier Post, 2001/10/02
- [Freeciv-Dev] Re: commandline syntax and semantics (was: Server/ruleset unification), Daniel Sjölie, 2001/10/02
- [Freeciv-Dev] Re: commandline syntax and semantics (was: Server/ruleset unification), Reinier Post, 2001/10/27
- [Freeciv-Dev] Re: commandline syntax and semantics (was: Server/ruleset unification), Daniel Sjölie, 2001/10/27
- [Freeciv-Dev] Re: commandline syntax and semantics (was: Server/ruleset unification), Reinier Post, 2001/10/28
- [Freeciv-Dev] Re: commandline syntax and semantics (was: Server/ruleset unification), Reinier Post, 2001/10/02
[Freeciv-Dev] Re: commandline syntax and semantics (was: Server/ruleset unification),
Ross W. Wetmore <=
[Freeciv-Dev] Re: commandline syntax and semantics (was: Server/ruleset unification), Reinier Post, 2001/10/30
|
|