[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Re: [PATCH] Add support for a configuration file
From: |
Ian Jackson |
Subject: |
Re: [Qemu-devel] Re: [PATCH] Add support for a configuration file |
Date: |
Thu, 15 May 2008 15:58:49 +0100 |
andrzej zaborowski writes ("Re: [Qemu-devel] Re: [PATCH] Add support for a
configuration file"):
> What I'd love, though, but expect others will consider bloat, is that
> files are passed through cpp before interpreting.
cpp is a terrible preprocessor. It mostly works for C source code
(although it has some serious deficiences there - for example, that
you can't have macros that generate macros). But for anything whose
lexical structure is not much like C it causes terrible trouble -
randomly inserting spaces, need for explicit token pasting (dependent
on the C operator set), etc. It breaks even something as simple as
#-comments, which are obviously what we would want in our plain text
config file.
If you really want a preprocessor, use m4 (one that supports -p and
using a suitable m4_changequote). m4 isn't particularly pretty but it
doesn't interfere with the core of the syntax.
Better, make the configuration defaults sufficiently good that it is
not necessary to reproduce lots of boilerplate to get things done.
Then macros aren't needed for human-written files - and of course
program-written config files can don't need a macro system anyway.
Ian.
- Re: [kvm-devel] [Qemu-devel] Re: [PATCH] Add support for a configuration file, (continued)
- Re: [kvm-devel] [Qemu-devel] Re: [PATCH] Add support for a configuration file, Fabrice Bellard, 2008/05/14
- Re: [kvm-devel] [Qemu-devel] Re: [PATCH] Add support for a configuration file, Luca Barbato, 2008/05/17
- Re: [kvm-devel] [Qemu-devel] Re: [PATCH] Add support for a configuration file, Daniel P. Berrange, 2008/05/14
- Re: [Qemu-devel] Re: [PATCH] Add support for a configuration file, Anthony Liguori, 2008/05/14
- Re: [Qemu-devel] Re: [PATCH] Add support for a configuration file, Paul Brook, 2008/05/14
- Re: [Qemu-devel] Re: [PATCH] Add support for a configuration file, Fabrice Bellard, 2008/05/14
Re: [Qemu-devel] Re: [PATCH] Add support for a configuration file, andrzej zaborowski, 2008/05/14
Re: [Qemu-devel] [PATCH] Add support for a configuration file, Erik de Castro Lopo, 2008/05/15
Re: [Qemu-devel] [PATCH] Add support for a configuration file, Anthony Liguori, 2008/05/15