[mapserver-dev] Mapfile syntax permissiveness

Howard Butler hobu.inc at gmail.com
Sat Dec 27 10:05:46 EST 2008


I was working on implementing a Pygments lexer so we could have  
mapfile styling for the new website (see the results at http://mapserver.osgeo.org/ogc/mapcontext.html 
  ) and one thing that caused me trouble (still not right in my lexer,  
anyway) is that we allow both:

NAME mymapname

and

NAME "mymapname"

Why do some keywords like NAME and DATA allow both the quoted and  
unquoted form?  Was there a historical reason for this?  Is it just  
because flex supported it?  In my mind, unquoted implies a symbol or a  
reserved name, not user data.  Would we ever revert to requiring every  
piece of user data to be quoted?  Would there be benefits to this in  
contrast to the pain it would cause (maybe we have a 'strict' and  
'lax' mapfile parser or something)?

Howard


More information about the mapserver-dev mailing list