read up the mapfile

Steve Lime steve.lime at DNR.STATE.MN.US
Thu Aug 25 10:00:20 EDT 2005

A good bit of the code to do this has already been written. There's a function
some place in mapfile.c to load the .map file into one big string buffer with the
intent of parsing it. In fact, we already parse strings in many cases: URL config,
and expressions.

Adding support for an "include" could be done this way. I still wonder about the
wisdom of doing so at runtime. I guarantee just a simple include won't be enough,
users will want conditional includes and variable substitution at the very least. So
I still believe that a pre-processor is the way to go (perhaps with a super simple
run-time include).


>>> Huub Fleuren <hfl at HOME.NL> 08/25/05 7:10 AM >>>

A bit in response to the previous message:

I was thinking of a way to preprocess the mapfile.

Now, the mapfile is read by the lexer character by character, if I 'm 
not mistaken.

If the lexer could read from a strstream instread of the FILE*
we could support all kinds of includes, like other pieces and bits of 
mapfiles, classfiles  et cetera.

don't correct me if i'm wrong.


More information about the mapserver-dev mailing list