[GRASS-dev] DBF driver: semicolon and select troubles

Glynn Clements glynn at gclements.plus.com
Sun Jul 1 23:31:39 EDT 2007


Markus Neteler wrote:

> Unrelated: I get these warnings on Mandriva:
> 
> bison -y -d -v yac.y
> yac.y:74.15-19: Warnung: symbol TABLE redeclared
> yac.y:75.8-11: Warnung: symbol DROP redeclared
> yac.y:75.13-17: Warnung: symbol TABLE redeclared
> 
> bison --version
> bison (GNU Bison) 2.3
> 
> It this harmful?

I don't think so. They've always been there, and they're due to:

63	%token DROP
73	%token ALTER TABLE
74	%token CREATE TABLE
75	%token DROP TABLE

DROP is defined on 63 then defined again on 75. TABLE is defined on 73
then again on 74 and 75. A %token directive with multiple tokens is
exactly equivalent to multiple %token directives.

You can eliminate the warnings with:

--- lib/db/sqlp/yac.y	1 Jul 2007 08:52:49 -0000	1.28
+++ lib/db/sqlp/yac.y	2 Jul 2007 03:30:05 -0000
@@ -71,8 +71,7 @@
 %token OR
 %token NOT
 %token ALTER TABLE
-%token CREATE TABLE
-%token DROP TABLE
+%token CREATE
 %token NULL_VALUE
 %token VARCHAR
 %token INT

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list