[mapserver-commits] r7421 - branches/branch-5-0/mapserver
svn at osgeo.org
svn at osgeo.org
Sun Mar 2 09:49:25 EST 2008
Author: sdlime
Date: 2008-03-02 09:49:25 -0500 (Sun, 02 Mar 2008)
New Revision: 7421
Modified:
branches/branch-5-0/mapserver/maplexer.l
Log:
Fixed a problem where 2 or more divisions in an expression result in parse errors (bug 2527).
Modified: branches/branch-5-0/mapserver/maplexer.l
===================================================================
--- branches/branch-5-0/mapserver/maplexer.l 2008-03-02 14:45:12 UTC (rev 7420)
+++ branches/branch-5-0/mapserver/maplexer.l 2008-03-02 14:49:25 UTC (rev 7421)
@@ -43,6 +43,7 @@
%s URL_VARIABLE
%s URL_STRING
%s EXPRESSION_STRING
+%s EXPRESSION_STRING_REGEX
%s INCLUDE
%s MSSTR
@@ -108,7 +109,7 @@
break;
}
-<INITIAL,URL_STRING,EXPRESSION_STRING,INCLUDE>[ \t\r]+ ;
+<INITIAL,URL_STRING,EXPRESSION_STRING,EXPRESSION_STRING_REGEX,INCLUDE>[ \t\r]+ ;
<INITIAL>#.* { if (msyyreturncomments) return(MS_COMMENT); }
@@ -122,7 +123,10 @@
<EXPRESSION_STRING>lt|< { return(LT); }
<EXPRESSION_STRING>ge|>= { return(GE); }
<EXPRESSION_STRING>le|<= { return(LE); }
-<EXPRESSION_STRING>=~ { return(RE); }
+<EXPRESSION_STRING>=~ {
+ BEGIN(EXPRESSION_STRING_REGEX);
+ return(RE);
+ }
<EXPRESSION_STRING>in { return(IN); }
<EXPRESSION_STRING>not|! { return(NOT); }
@@ -413,7 +417,7 @@
return(MS_IREGEX);
}
-<EXPRESSION_STRING>\/[^\/]*\/i {
+<EXPRESSION_STRING_REGEX>\/[^\/]*\/i {
msyytext++;
msyytext[strlen(msyytext)-2] = '\0';
msyylval.strval = strdup(msyytext);
@@ -426,7 +430,7 @@
return(MS_REGEX);
}
-<EXPRESSION_STRING>\/[^\/]*\/ {
+<EXPRESSION_STRING_REGEX>\/[^\/]*\/ {
msyytext++;
msyytext[strlen(msyytext)-1] = '\0';
msyylval.strval = strdup(msyytext);
More information about the mapserver-commits
mailing list