[GRASS-SVN] r55504 - in grass/trunk: include/Make lib/db/sqlp raster/r.mapcalc
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Mar 22 17:42:48 PDT 2013
Author: glynn
Date: 2013-03-22 17:42:48 -0700 (Fri, 22 Mar 2013)
New Revision: 55504
Modified:
grass/trunk/include/Make/Grass.make
grass/trunk/lib/db/sqlp/sqlp.l
grass/trunk/raster/r.mapcalc/mapcalc.l
Log:
Remove (non-portable) -s switch from LFLAGS
Add error rule to lex files
Modified: grass/trunk/include/Make/Grass.make
===================================================================
--- grass/trunk/include/Make/Grass.make 2013-03-22 19:31:08 UTC (rev 55503)
+++ grass/trunk/include/Make/Grass.make 2013-03-23 00:42:48 UTC (rev 55504)
@@ -92,7 +92,7 @@
endif
# lexical analyzer and default options
-LFLAGS = -s
+LFLAGS =
# parser generator and default options
YFLAGS = -d -v
Modified: grass/trunk/lib/db/sqlp/sqlp.l
===================================================================
--- grass/trunk/lib/db/sqlp/sqlp.l 2013-03-22 19:31:08 UTC (rev 55503)
+++ grass/trunk/lib/db/sqlp/sqlp.l 2013-03-23 00:42:48 UTC (rev 55504)
@@ -206,6 +206,11 @@
%}
"--".*$ ; /* comment */
+ /***************************************
+ * DEFAULT RULE
+ ***************************************/
+. { yyerror("Syntax error"); }
+
%%
/**********************************************************************
*
Modified: grass/trunk/raster/r.mapcalc/mapcalc.l
===================================================================
--- grass/trunk/raster/r.mapcalc/mapcalc.l 2013-03-22 19:31:08 UTC (rev 55503)
+++ grass/trunk/raster/r.mapcalc/mapcalc.l 2013-03-23 00:42:48 UTC (rev 55504)
@@ -213,6 +213,11 @@
";" |
"\n" { return ';'; }
+
+. {
+ fprintf(stderr, "syntax error: '%*s'\n", yyleng, yytext);
+ yyterminate();
+ }
%%
int yywrap(void)
More information about the grass-commit
mailing list