Bläddra i källkod

Remove (non-portable) -s switch from LFLAGS
Add error rule to lex files


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@55504 15284696-431f-4ddb-bdfa-cd5b030d7da7

Glynn Clements 12 år sedan
förälder
incheckning
6bd27dae8f
3 ändrade filer med 11 tillägg och 1 borttagningar
  1. 1 1
      include/Make/Grass.make
  2. 5 0
      lib/db/sqlp/sqlp.l
  3. 5 0
      raster/r.mapcalc/mapcalc.l

+ 1 - 1
include/Make/Grass.make

@@ -92,7 +92,7 @@ MANIFEST = internal
 endif
 
 # lexical analyzer and default options
-LFLAGS      = -s
+LFLAGS      = 
 
 # parser generator and default options
 YFLAGS      = -d -v

+ 5 - 0
lib/db/sqlp/sqlp.l

@@ -206,6 +206,11 @@
 %}
 "--".*$		;	/* comment */
 
+ /***************************************
+  * DEFAULT RULE
+  ***************************************/
+.	{ yyerror("Syntax error"); }
+
 %%
 /**********************************************************************
  *

+ 5 - 0
raster/r.mapcalc/mapcalc.l

@@ -213,6 +213,11 @@ F		[fF]
 ";"		|
 "\n"		{	return ';';	}
 
+
+.		{
+			fprintf(stderr, "syntax error: '%*s'\n", yyleng, yytext);
+			yyterminate();
+		}
 %%
 
 int yywrap(void)