libgda r3248 - in trunk: . libgda/sql-parser providers/bdb providers/firebird providers/mdb providers/mysql providers/postgres providers/skel-implementation/capi providers/skel-implementation/models providers/sqlite



Author: vivien
Date: Sun Oct 26 21:39:57 2008
New Revision: 3248
URL: http://svn.gnome.org/viewvc/libgda?rev=3248&view=rev

Log:
2008-10-26  Vivien Malerba <malerba gnome-db org>

	* configure.in:
	* providers/skel-implementation/models/Makefile.am:
	* providers/skel-implementation/capi/Makefile.am:
	* providers/firebird/Makefile.am:
	* providers/bdb/Makefile.am:
	* providers/sqlite/Makefile.am:
	* providers/mdb/Makefile.am:
	* providers/mysql/Makefile.am:
	* providers/postgres/Makefile.am: limit the providers' list of exported symbols
	* providers/skel-implementation/capi/parser.y:
	* providers/firebird/parser.y:
	* providers/mysql/parser.y:
	* providers/postgres/parser.y:
	* libgda/sql-parser/parser.y:
	* libgda/sql-parser/delimiter.y:
	  - don't compute debug string if not debugging,
	  - reported modifications from the PostgreSQL and SQlite's providers's
	    parsers to other providers


Modified:
   trunk/ChangeLog
   trunk/NEWS
   trunk/configure.in
   trunk/libgda/sql-parser/delimiter.y
   trunk/libgda/sql-parser/parser.y
   trunk/providers/bdb/Makefile.am
   trunk/providers/firebird/Makefile.am
   trunk/providers/firebird/parser.y
   trunk/providers/mdb/Makefile.am
   trunk/providers/mysql/Makefile.am
   trunk/providers/mysql/parser.y
   trunk/providers/postgres/Makefile.am
   trunk/providers/postgres/parser.y
   trunk/providers/skel-implementation/capi/Makefile.am
   trunk/providers/skel-implementation/capi/parser.y
   trunk/providers/skel-implementation/models/Makefile.am
   trunk/providers/sqlite/Makefile.am

Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS	(original)
+++ trunk/NEWS	Sun Oct 26 21:39:57 2008
@@ -1,6 +1,6 @@
 libgda 3.99.6, 
 
- - bug fixes: #541991
+ - bug fixes: #541991, #546339
  - Translations:
 
 libgda 3.99.5, 2008-10-09

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Sun Oct 26 21:39:57 2008
@@ -137,6 +137,7 @@
 dnl linklibext is the shared link library extension, which varies by platform
 
 EXPORT_SYM_REGEX='-export-symbols-regex "^(gda_|fnYM49765777344607__gda).*"'
+EXPORT_PROV_SYM_REGEX='-export-symbols-regex "^(plugin_).*"'
 AC_MSG_CHECKING([for platform])
 platform_win32=no
 platform_carbon=no
@@ -147,6 +148,7 @@
     NO_UNDEFINED='-no-undefined'
     SOPREFIX='cyg'
     LIBTOOL_EXPORT_OPTIONS=$EXPORT_SYM_REGEX
+    LIBTOOL_PROV_EXPORT_OPTIONS=$EXPORT_PROV_SYM_REGEX
     linklibext=".dll.a"
     AC_MSG_RESULT([Win32])
     ;;
@@ -157,6 +159,7 @@
     NO_UNDEFINED='-no-undefined'
     SOPREFIX='lib'
     LIBTOOL_EXPORT_OPTIONS=
+    LIBTOOL_PROV_EXPORT_OPTIONS=
     linklibext=".dll.a"
     AC_CHECK_TOOL(WINDRES, windres, windres)
     AC_SUBST(WINDRES)
@@ -168,6 +171,7 @@
     SOPREFIX='lib'
     AM_BINRELOC
     LIBTOOL_EXPORT_OPTIONS=$EXPORT_SYM_REGEX
+    LIBTOOL_PROV_EXPORT_OPTIONS=$EXPORT_PROV_SYM_REGEX
     AC_DEFINE(HAVE_CARBON)
     dnl SO_SUFFIX=dylib
   ;;
@@ -177,12 +181,14 @@
     SOPREFIX='lib'
     AM_BINRELOC
     LIBTOOL_EXPORT_OPTIONS=$EXPORT_SYM_REGEX
+    LIBTOOL_PROV_EXPORT_OPTIONS=$EXPORT_PROV_SYM_REGEX
     ;;
 esac
 
 AM_CONDITIONAL(PLATFORM_WIN32, [test $platform_win32 = yes])
 AM_CONDITIONAL(PLATFORM_CARBON, [test $platform_carbon = yes])
 AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
+AC_SUBST(LIBTOOL_PROV_EXPORT_OPTIONS)
 AC_SUBST(NO_UNDEFINED)
 AC_SUBST(SOPREFIX)
 

Modified: trunk/libgda/sql-parser/delimiter.y
==============================================================================
--- trunk/libgda/sql-parser/delimiter.y	(original)
+++ trunk/libgda/sql-parser/delimiter.y	Sun Oct 26 21:39:57 2008
@@ -7,9 +7,11 @@
 %token_type {GValue *}
 %default_type {GValue *}
 %token_destructor {if ($$) {
-		 gchar *str = gda_sql_value_stringify ($$);
-		 DEBUG ("token destructor /%s/", str);
-		 g_free (str);
+#ifdef GDA_DEBUG_NO
+                 gchar *str = gda_sql_value_stringify ($$);
+                 g_print ("___ token destructor /%s/\n", str)
+                 g_free (str);
+#endif
 		 g_value_unset ($$); g_free ($$);}}
 
 // The generated parser function takes a 4th argument as follows:
@@ -41,12 +43,6 @@
 #include <libgda/sql-parser/gda-statement-struct-unknown.h>
 #include <libgda/sql-parser/gda-statement-struct-parts.h>
 #include <assert.h>
-
-#ifdef GDA_DEBUG_NO
-#define DEBUG(format, ...) g_print ("___" format "\n", __VA_ARGS__)
-#else
-#define DEBUG(format, ...)
-#endif
 }
 
 // The following directive causes tokens to

Modified: trunk/libgda/sql-parser/parser.y
==============================================================================
--- trunk/libgda/sql-parser/parser.y	(original)
+++ trunk/libgda/sql-parser/parser.y	Sun Oct 26 21:39:57 2008
@@ -7,9 +7,11 @@
 %token_type {GValue *}
 %default_type {GValue *}
 %token_destructor {if ($$) {
+#ifdef GDA_DEBUG_NO
 		 gchar *str = gda_sql_value_stringify ($$);
-		 DEBUG ("token destructor /%s/", str);
+		 g_print ("___ token destructor /%s/\n", str)
 		 g_free (str);
+#endif
 		 g_value_unset ($$); g_free ($$);}}
 
 // The generated parser function takes a 4th argument as follows:
@@ -47,12 +49,6 @@
 #include <libgda/sql-parser/gda-statement-struct-parts.h>
 #include <assert.h>
 
-#ifdef GDA_DEBUG_NO
-#define DEBUG(format, ...) g_print ("___" format "\n", __VA_ARGS__)
-#else
-#define DEBUG(format, ...)
-#endif
-
 typedef struct {
 	GValue *fname;
 	GdaSqlExpr *expr;

Modified: trunk/providers/bdb/Makefile.am
==============================================================================
--- trunk/providers/bdb/Makefile.am	(original)
+++ trunk/providers/bdb/Makefile.am	Sun Oct 26 21:39:57 2008
@@ -15,7 +15,7 @@
 	gda-bdb-provider.h \
 	libmain.c
 
-libgda_bdb_la_LDFLAGS = -export-dynamic -module -avoid-version $(NO_UNDEFINED)
+libgda_bdb_la_LDFLAGS = -export-dynamic -module -avoid-version $(NO_UNDEFINED) $(LIBTOOL_PROV_EXPORT_OPTIONS)
 libgda_bdb_la_LIBADD = \
 	$(top_builddir)/libgda/libgda-4.0.la \
 	$(LIBGDA_LIBS) 

Modified: trunk/providers/firebird/Makefile.am
==============================================================================
--- trunk/providers/firebird/Makefile.am	(original)
+++ trunk/providers/firebird/Makefile.am	Sun Oct 26 21:39:57 2008
@@ -45,7 +45,7 @@
         parser.c \
         firebird_token_types.h
 
-libgda_firebird_la_LDFLAGS = -export-dynamic -module -avoid-version $(NO_UNDEFINED)
+libgda_firebird_la_LDFLAGS = -export-dynamic -module -avoid-version $(NO_UNDEFINED) $(LIBTOOL_PROV_EXPORT_OPTIONS)
 libgda_firebird_la_LIBADD = \
 	$(top_builddir)/libgda/libgda-4.0.la \
 	$(LIBGDA_LIBS) #$(FIREBIRD_LIBS)

Modified: trunk/providers/firebird/parser.y
==============================================================================
--- trunk/providers/firebird/parser.y	(original)
+++ trunk/providers/firebird/parser.y	Sun Oct 26 21:39:57 2008
@@ -7,9 +7,11 @@
 %token_type {GValue *}
 %default_type {GValue *}
 %token_destructor {if ($$) {
+#ifdef GDA_DEBUG_NO
 		 gchar *str = gda_sql_value_stringify ($$);
-		 DEBUG ("token destructor /%s/", str);
+		 g_print ("___ token destructor /%s/\n", str)
 		 g_free (str);
+#endif
 		 g_value_unset ($$); g_free ($$);}}
 
 // The generated parser function takes a 4th argument as follows:
@@ -47,12 +49,6 @@
 #include <libgda/sql-parser/gda-statement-struct-parts.h>
 #include <assert.h>
 
-#ifdef GDA_DEBUG_NO
-#define DEBUG(format, ...) g_print ("___" format "\n", __VA_ARGS__)
-#else
-#define DEBUG(format, ...)
-#endif
-
 typedef struct {
 	GValue *fname;
 	GdaSqlExpr *expr;
@@ -104,6 +100,8 @@
 	case '<':
 		if (op[1] == '=')
 			return GDA_SQL_OPERATOR_TYPE_LEQ;
+		else if (op[1] == '>')
+			return GDA_SQL_OPERATOR_TYPE_DIFF;
 		else if (op[1] == 0)
 			return GDA_SQL_OPERATOR_TYPE_LT;
 		break;
@@ -888,43 +886,27 @@
 					    GDA_SQL_ANY_PART (R)->parent = GDA_SQL_ANY_PART (cond);
 }
 expr(E) ::= expr(R) NOT IN LP exprlist(L) RP. {GdaSqlOperation *cond;
-					       GdaSqlExpr *expr;
 					       GSList *list;
-					       expr = gda_sql_expr_new (NULL);
-					       cond = gda_sql_operation_new (GDA_SQL_ANY_PART (expr));
-					       expr->cond = cond;
-					       cond->operator_type = GDA_SQL_OPERATOR_TYPE_IN;
+					       E = gda_sql_expr_new (NULL);
+					       cond = gda_sql_operation_new (GDA_SQL_ANY_PART (E));
+					       E->cond = cond;
+					       cond->operator_type = GDA_SQL_OPERATOR_TYPE_NOTIN;
 					       cond->operands = g_slist_prepend (L, R);
 					       for (list = cond->operands; list; list = list->next)
 						       GDA_SQL_ANY_PART (list->data)->parent = GDA_SQL_ANY_PART (cond);
-					       
+}
+expr(E) ::= expr(R) NOT IN LP compound(S) RP. {GdaSqlOperation *cond;
+					       GdaSqlExpr *expr;
 					       E = gda_sql_expr_new (NULL);
 					       cond = gda_sql_operation_new (GDA_SQL_ANY_PART (E));
 					       E->cond = cond;
-					       cond->operator_type = GDA_SQL_OPERATOR_TYPE_NOT;
+					       cond->operator_type = GDA_SQL_OPERATOR_TYPE_NOTIN;
+					       
+					       expr = gda_sql_expr_new (GDA_SQL_ANY_PART (cond));
+					       gda_sql_expr_take_select (expr, S);
 					       cond->operands = g_slist_prepend (NULL, expr);
-					       GDA_SQL_ANY_PART (expr)->parent = GDA_SQL_ANY_PART (cond);
-}
-expr(E) ::= expr(R) NOT IN LP compound(S) RP. {GdaSqlOperation *cond;
-						GdaSqlExpr *expr1, *expr2;
-						expr1 = gda_sql_expr_new (NULL);
-						cond = gda_sql_operation_new (GDA_SQL_ANY_PART (expr1));
-						expr1->cond = cond;
-						cond->operator_type = GDA_SQL_OPERATOR_TYPE_IN;
-						
-						expr2 = gda_sql_expr_new (NULL);
-						gda_sql_expr_take_select (expr2, S);
-						cond->operands = g_slist_prepend (NULL, expr2);
-						GDA_SQL_ANY_PART (expr2)->parent = GDA_SQL_ANY_PART (cond);
-						cond->operands = g_slist_prepend (cond->operands, R);
-						GDA_SQL_ANY_PART (R)->parent = GDA_SQL_ANY_PART (cond);
-						
-						E = gda_sql_expr_new (NULL);
-						cond = gda_sql_operation_new (GDA_SQL_ANY_PART (E));
-						E->cond = cond;
-						cond->operator_type = GDA_SQL_OPERATOR_TYPE_NOT;
-						cond->operands = g_slist_prepend (NULL, expr1);
-						GDA_SQL_ANY_PART (expr1)->parent = GDA_SQL_ANY_PART (cond);
+					       cond->operands = g_slist_prepend (cond->operands, R);
+					       GDA_SQL_ANY_PART (R)->parent = GDA_SQL_ANY_PART (cond);
 }
 expr(A) ::= CASE case_operand(X) case_exprlist(Y) case_else(Z) END. {
 	GdaSqlCase *sc;
@@ -973,14 +955,14 @@
 // Values: for all constants (G_TYPE_STRING GValue)
 value(V) ::= NULL. {V = NULL;}
 value(V) ::= STRING(S). {V = S;}
-value(V) ::= TEXTUAL(T). {V = T;}
+//value(V) ::= TEXTUAL(T). {V = T;}
 value(V) ::= INTEGER(I). {V = I;}
 value(V) ::= FLOAT(F). {V = F;}
 
 // pvalue: values which are parameters (GdaSqlExpr)
 %type pvalue {GdaSqlExpr *}
 %destructor pvalue {gda_sql_expr_free ($$);}
-	pvalue(E) ::= UNSPECVAL LSBRACKET paramspec(P) RSBRACKET. {E = gda_sql_expr_new (NULL); E->param_spec = P;}
+pvalue(E) ::= UNSPECVAL LSBRACKET paramspec(P) RSBRACKET. {E = gda_sql_expr_new (NULL); E->param_spec = P;}
 pvalue(E) ::= value(V) LSBRACKET paramspec(P) RSBRACKET. {E = gda_sql_expr_new (NULL); E->value = V; E->param_spec = P;}
 pvalue(E) ::= SIMPLEPARAM(S). {E = gda_sql_expr_new (NULL); E->param_spec = gda_sql_param_spec_new (S);}
 
@@ -1004,6 +986,7 @@
 nm(A) ::= TEXTUAL(X). {A = X;}
 
 // Fully qualified name
+fullname(A) ::= nm(X). {A = X;}
 fullname(A) ::= nm(S) DOT nm(X). {gchar *str;
 				  str = g_strdup_printf ("%s.%s", g_value_get_string (S), g_value_get_string (X));
 				  A = g_new0 (GValue, 1);

Modified: trunk/providers/mdb/Makefile.am
==============================================================================
--- trunk/providers/mdb/Makefile.am	(original)
+++ trunk/providers/mdb/Makefile.am	Sun Oct 26 21:39:57 2008
@@ -16,7 +16,7 @@
 	gda-mdb.h \
 	libmain.c 
 
-libgda_mdb_la_LDFLAGS = -export-dynamic -module -avoid-version $(NO_UNDEFINED)
+libgda_mdb_la_LDFLAGS = -export-dynamic -module -avoid-version $(NO_UNDEFINED) $(LIBTOOL_PROV_EXPORT_OPTIONS)
 libgda_mdb_la_LIBADD = \
 	$(top_builddir)/libgda/libgda-4.0.la \
 	$(LIBGDA_LIBS) \

Modified: trunk/providers/mysql/Makefile.am
==============================================================================
--- trunk/providers/mysql/Makefile.am	(original)
+++ trunk/providers/mysql/Makefile.am	Sun Oct 26 21:39:57 2008
@@ -45,7 +45,7 @@
         parser.c \
         mysql_token_types.h
 
-libgda_mysql_la_LDFLAGS = -export-dynamic -module -avoid-version $(NO_UNDEFINED)
+libgda_mysql_la_LDFLAGS = -export-dynamic -module -avoid-version $(NO_UNDEFINED) $(LIBTOOL_PROV_EXPORT_OPTIONS)
 libgda_mysql_la_LIBADD = \
 	$(top_builddir)/libgda/libgda-4.0.la \
 	$(LIBGDA_LIBS) $(MYSQL_LIBS)

Modified: trunk/providers/mysql/parser.y
==============================================================================
--- trunk/providers/mysql/parser.y	(original)
+++ trunk/providers/mysql/parser.y	Sun Oct 26 21:39:57 2008
@@ -7,9 +7,11 @@
 %token_type {GValue *}
 %default_type {GValue *}
 %token_destructor {if ($$) {
+#ifdef GDA_DEBUG_NO
 		 gchar *str = gda_sql_value_stringify ($$);
-		 DEBUG ("token destructor /%s/", str);
+		 g_print ("___ token destructor /%s/\n", str)
 		 g_free (str);
+#endif
 		 g_value_unset ($$); g_free ($$);}}
 
 // The generated parser function takes a 4th argument as follows:
@@ -47,12 +49,6 @@
 #include <libgda/sql-parser/gda-statement-struct-parts.h>
 #include <assert.h>
 
-#ifdef GDA_DEBUG_NO
-#define DEBUG(format, ...) g_print ("___" format "\n", __VA_ARGS__)
-#else
-#define DEBUG(format, ...)
-#endif
-
 typedef struct {
 	GValue *fname;
 	GdaSqlExpr *expr;
@@ -104,6 +100,8 @@
 	case '<':
 		if (op[1] == '=')
 			return GDA_SQL_OPERATOR_TYPE_LEQ;
+		else if (op[1] == '>')
+			return GDA_SQL_OPERATOR_TYPE_DIFF;
 		else if (op[1] == 0)
 			return GDA_SQL_OPERATOR_TYPE_LT;
 		break;
@@ -888,43 +886,27 @@
 					    GDA_SQL_ANY_PART (R)->parent = GDA_SQL_ANY_PART (cond);
 }
 expr(E) ::= expr(R) NOT IN LP exprlist(L) RP. {GdaSqlOperation *cond;
-					       GdaSqlExpr *expr;
 					       GSList *list;
-					       expr = gda_sql_expr_new (NULL);
-					       cond = gda_sql_operation_new (GDA_SQL_ANY_PART (expr));
-					       expr->cond = cond;
-					       cond->operator_type = GDA_SQL_OPERATOR_TYPE_IN;
+					       E = gda_sql_expr_new (NULL);
+					       cond = gda_sql_operation_new (GDA_SQL_ANY_PART (E));
+					       E->cond = cond;
+					       cond->operator_type = GDA_SQL_OPERATOR_TYPE_NOTIN;
 					       cond->operands = g_slist_prepend (L, R);
 					       for (list = cond->operands; list; list = list->next)
 						       GDA_SQL_ANY_PART (list->data)->parent = GDA_SQL_ANY_PART (cond);
-					       
+}
+expr(E) ::= expr(R) NOT IN LP compound(S) RP. {GdaSqlOperation *cond;
+					       GdaSqlExpr *expr;
 					       E = gda_sql_expr_new (NULL);
 					       cond = gda_sql_operation_new (GDA_SQL_ANY_PART (E));
 					       E->cond = cond;
-					       cond->operator_type = GDA_SQL_OPERATOR_TYPE_NOT;
+					       cond->operator_type = GDA_SQL_OPERATOR_TYPE_NOTIN;
+					       
+					       expr = gda_sql_expr_new (GDA_SQL_ANY_PART (cond));
+					       gda_sql_expr_take_select (expr, S);
 					       cond->operands = g_slist_prepend (NULL, expr);
-					       GDA_SQL_ANY_PART (expr)->parent = GDA_SQL_ANY_PART (cond);
-}
-expr(E) ::= expr(R) NOT IN LP compound(S) RP. {GdaSqlOperation *cond;
-						GdaSqlExpr *expr1, *expr2;
-						expr1 = gda_sql_expr_new (NULL);
-						cond = gda_sql_operation_new (GDA_SQL_ANY_PART (expr1));
-						expr1->cond = cond;
-						cond->operator_type = GDA_SQL_OPERATOR_TYPE_IN;
-						
-						expr2 = gda_sql_expr_new (NULL);
-						gda_sql_expr_take_select (expr2, S);
-						cond->operands = g_slist_prepend (NULL, expr2);
-						GDA_SQL_ANY_PART (expr2)->parent = GDA_SQL_ANY_PART (cond);
-						cond->operands = g_slist_prepend (cond->operands, R);
-						GDA_SQL_ANY_PART (R)->parent = GDA_SQL_ANY_PART (cond);
-						
-						E = gda_sql_expr_new (NULL);
-						cond = gda_sql_operation_new (GDA_SQL_ANY_PART (E));
-						E->cond = cond;
-						cond->operator_type = GDA_SQL_OPERATOR_TYPE_NOT;
-						cond->operands = g_slist_prepend (NULL, expr1);
-						GDA_SQL_ANY_PART (expr1)->parent = GDA_SQL_ANY_PART (cond);
+					       cond->operands = g_slist_prepend (cond->operands, R);
+					       GDA_SQL_ANY_PART (R)->parent = GDA_SQL_ANY_PART (cond);
 }
 expr(A) ::= CASE case_operand(X) case_exprlist(Y) case_else(Z) END. {
 	GdaSqlCase *sc;
@@ -973,14 +955,14 @@
 // Values: for all constants (G_TYPE_STRING GValue)
 value(V) ::= NULL. {V = NULL;}
 value(V) ::= STRING(S). {V = S;}
-value(V) ::= TEXTUAL(T). {V = T;}
+//value(V) ::= TEXTUAL(T). {V = T;}
 value(V) ::= INTEGER(I). {V = I;}
 value(V) ::= FLOAT(F). {V = F;}
 
 // pvalue: values which are parameters (GdaSqlExpr)
 %type pvalue {GdaSqlExpr *}
 %destructor pvalue {gda_sql_expr_free ($$);}
-	pvalue(E) ::= UNSPECVAL LSBRACKET paramspec(P) RSBRACKET. {E = gda_sql_expr_new (NULL); E->param_spec = P;}
+pvalue(E) ::= UNSPECVAL LSBRACKET paramspec(P) RSBRACKET. {E = gda_sql_expr_new (NULL); E->param_spec = P;}
 pvalue(E) ::= value(V) LSBRACKET paramspec(P) RSBRACKET. {E = gda_sql_expr_new (NULL); E->value = V; E->param_spec = P;}
 pvalue(E) ::= SIMPLEPARAM(S). {E = gda_sql_expr_new (NULL); E->param_spec = gda_sql_param_spec_new (S);}
 
@@ -1001,6 +983,7 @@
 //
 nm(A) ::= JOIN(X).       {A = X;}
 nm(A) ::= ID(X).       {A = X;}
+nm(A) ::= TEXTUAL(X). {A = X;}
 
 // Fully qualified name
 fullname(A) ::= nm(X). {A = X;}

Modified: trunk/providers/postgres/Makefile.am
==============================================================================
--- trunk/providers/postgres/Makefile.am	(original)
+++ trunk/providers/postgres/Makefile.am	Sun Oct 26 21:39:57 2008
@@ -44,7 +44,7 @@
         parser.c \
         postgres_token_types.h
 
-libgda_postgres_la_LDFLAGS = -export-dynamic -module -avoid-version $(NO_UNDEFINED)
+libgda_postgres_la_LDFLAGS = -export-dynamic -module -avoid-version $(NO_UNDEFINED) $(LIBTOOL_PROV_EXPORT_OPTIONS)
 libgda_postgres_la_LIBADD = \
 	$(top_builddir)/libgda/libgda-4.0.la \
 	$(LIBGDA_LIBS) $(POSTGRES_LIBS)

Modified: trunk/providers/postgres/parser.y
==============================================================================
--- trunk/providers/postgres/parser.y	(original)
+++ trunk/providers/postgres/parser.y	Sun Oct 26 21:39:57 2008
@@ -7,9 +7,11 @@
 %token_type {GValue *}
 %default_type {GValue *}
 %token_destructor {if ($$) {
+#ifdef GDA_DEBUG_NO
 		 gchar *str = gda_sql_value_stringify ($$);
-		 DEBUG ("token destructor /%s/", str);
+		 g_print ("___ token destructor /%s/\n", str)
 		 g_free (str);
+#endif
 		 g_value_unset ($$); g_free ($$);}}
 
 // The generated parser function takes a 4th argument as follows:
@@ -47,12 +49,6 @@
 #include <libgda/sql-parser/gda-statement-struct-parts.h>
 #include <assert.h>
 
-#ifdef GDA_DEBUG_NO
-#define DEBUG(format, ...) g_print ("___" format "\n", __VA_ARGS__)
-#else
-#define DEBUG(format, ...)
-#endif
-
 typedef struct {
 	GValue *fname;
 	GdaSqlExpr *expr;
@@ -966,7 +962,7 @@
 // pvalue: values which are parameters (GdaSqlExpr)
 %type pvalue {GdaSqlExpr *}
 %destructor pvalue {gda_sql_expr_free ($$);}
-	pvalue(E) ::= UNSPECVAL LSBRACKET paramspec(P) RSBRACKET. {E = gda_sql_expr_new (NULL); E->param_spec = P;}
+pvalue(E) ::= UNSPECVAL LSBRACKET paramspec(P) RSBRACKET. {E = gda_sql_expr_new (NULL); E->param_spec = P;}
 pvalue(E) ::= value(V) LSBRACKET paramspec(P) RSBRACKET. {E = gda_sql_expr_new (NULL); E->value = V; E->param_spec = P;}
 pvalue(E) ::= SIMPLEPARAM(S). {E = gda_sql_expr_new (NULL); E->param_spec = gda_sql_param_spec_new (S);}
 

Modified: trunk/providers/skel-implementation/capi/Makefile.am
==============================================================================
--- trunk/providers/skel-implementation/capi/Makefile.am	(original)
+++ trunk/providers/skel-implementation/capi/Makefile.am	Sun Oct 26 21:39:57 2008
@@ -44,7 +44,7 @@
         parser.c \
         capi_token_types.h
 
-libgda_capi_la_LDFLAGS = -export-dynamic -module -avoid-version $(NO_UNDEFINED)
+libgda_capi_la_LDFLAGS = -export-dynamic -module -avoid-version $(NO_UNDEFINED) $(LIBTOOL_PROV_EXPORT_OPTIONS)
 libgda_capi_la_LIBADD = \
 	$(top_builddir)/libgda/libgda-4.0.la \
 	$(LIBGDA_LIBS) #$(CAPI_LIBS)

Modified: trunk/providers/skel-implementation/capi/parser.y
==============================================================================
--- trunk/providers/skel-implementation/capi/parser.y	(original)
+++ trunk/providers/skel-implementation/capi/parser.y	Sun Oct 26 21:39:57 2008
@@ -7,9 +7,11 @@
 %token_type {GValue *}
 %default_type {GValue *}
 %token_destructor {if ($$) {
+#ifdef GDA_DEBUG_NO
 		 gchar *str = gda_sql_value_stringify ($$);
-		 DEBUG ("token destructor /%s/", str);
+		 g_print ("___ token destructor /%s/\n", str)
 		 g_free (str);
+#endif
 		 g_value_unset ($$); g_free ($$);}}
 
 // The generated parser function takes a 4th argument as follows:
@@ -47,12 +49,6 @@
 #include <libgda/sql-parser/gda-statement-struct-parts.h>
 #include <assert.h>
 
-#ifdef GDA_DEBUG_NO
-#define DEBUG(format, ...) g_print ("___" format "\n", __VA_ARGS__)
-#else
-#define DEBUG(format, ...)
-#endif
-
 typedef struct {
 	GValue *fname;
 	GdaSqlExpr *expr;
@@ -104,6 +100,8 @@
 	case '<':
 		if (op[1] == '=')
 			return GDA_SQL_OPERATOR_TYPE_LEQ;
+		else if (op[1] == '>')
+			return GDA_SQL_OPERATOR_TYPE_DIFF;
 		else if (op[1] == 0)
 			return GDA_SQL_OPERATOR_TYPE_LT;
 		break;
@@ -888,43 +886,27 @@
 					    GDA_SQL_ANY_PART (R)->parent = GDA_SQL_ANY_PART (cond);
 }
 expr(E) ::= expr(R) NOT IN LP exprlist(L) RP. {GdaSqlOperation *cond;
-					       GdaSqlExpr *expr;
 					       GSList *list;
-					       expr = gda_sql_expr_new (NULL);
-					       cond = gda_sql_operation_new (GDA_SQL_ANY_PART (expr));
-					       expr->cond = cond;
-					       cond->operator_type = GDA_SQL_OPERATOR_TYPE_IN;
+					       E = gda_sql_expr_new (NULL);
+					       cond = gda_sql_operation_new (GDA_SQL_ANY_PART (E));
+					       E->cond = cond;
+					       cond->operator_type = GDA_SQL_OPERATOR_TYPE_NOTIN;
 					       cond->operands = g_slist_prepend (L, R);
 					       for (list = cond->operands; list; list = list->next)
 						       GDA_SQL_ANY_PART (list->data)->parent = GDA_SQL_ANY_PART (cond);
-					       
+}
+expr(E) ::= expr(R) NOT IN LP compound(S) RP. {GdaSqlOperation *cond;
+					       GdaSqlExpr *expr;
 					       E = gda_sql_expr_new (NULL);
 					       cond = gda_sql_operation_new (GDA_SQL_ANY_PART (E));
 					       E->cond = cond;
-					       cond->operator_type = GDA_SQL_OPERATOR_TYPE_NOT;
+					       cond->operator_type = GDA_SQL_OPERATOR_TYPE_NOTIN;
+					       
+					       expr = gda_sql_expr_new (GDA_SQL_ANY_PART (cond));
+					       gda_sql_expr_take_select (expr, S);
 					       cond->operands = g_slist_prepend (NULL, expr);
-					       GDA_SQL_ANY_PART (expr)->parent = GDA_SQL_ANY_PART (cond);
-}
-expr(E) ::= expr(R) NOT IN LP compound(S) RP. {GdaSqlOperation *cond;
-						GdaSqlExpr *expr1, *expr2;
-						expr1 = gda_sql_expr_new (NULL);
-						cond = gda_sql_operation_new (GDA_SQL_ANY_PART (expr1));
-						expr1->cond = cond;
-						cond->operator_type = GDA_SQL_OPERATOR_TYPE_IN;
-						
-						expr2 = gda_sql_expr_new (NULL);
-						gda_sql_expr_take_select (expr2, S);
-						cond->operands = g_slist_prepend (NULL, expr2);
-						GDA_SQL_ANY_PART (expr2)->parent = GDA_SQL_ANY_PART (cond);
-						cond->operands = g_slist_prepend (cond->operands, R);
-						GDA_SQL_ANY_PART (R)->parent = GDA_SQL_ANY_PART (cond);
-						
-						E = gda_sql_expr_new (NULL);
-						cond = gda_sql_operation_new (GDA_SQL_ANY_PART (E));
-						E->cond = cond;
-						cond->operator_type = GDA_SQL_OPERATOR_TYPE_NOT;
-						cond->operands = g_slist_prepend (NULL, expr1);
-						GDA_SQL_ANY_PART (expr1)->parent = GDA_SQL_ANY_PART (cond);
+					       cond->operands = g_slist_prepend (cond->operands, R);
+					       GDA_SQL_ANY_PART (R)->parent = GDA_SQL_ANY_PART (cond);
 }
 expr(A) ::= CASE case_operand(X) case_exprlist(Y) case_else(Z) END. {
 	GdaSqlCase *sc;
@@ -973,14 +955,14 @@
 // Values: for all constants (G_TYPE_STRING GValue)
 value(V) ::= NULL. {V = NULL;}
 value(V) ::= STRING(S). {V = S;}
-value(V) ::= TEXTUAL(T). {V = T;}
+//value(V) ::= TEXTUAL(T). {V = T;}
 value(V) ::= INTEGER(I). {V = I;}
 value(V) ::= FLOAT(F). {V = F;}
 
 // pvalue: values which are parameters (GdaSqlExpr)
 %type pvalue {GdaSqlExpr *}
 %destructor pvalue {gda_sql_expr_free ($$);}
-	pvalue(E) ::= UNSPECVAL LSBRACKET paramspec(P) RSBRACKET. {E = gda_sql_expr_new (NULL); E->param_spec = P;}
+pvalue(E) ::= UNSPECVAL LSBRACKET paramspec(P) RSBRACKET. {E = gda_sql_expr_new (NULL); E->param_spec = P;}
 pvalue(E) ::= value(V) LSBRACKET paramspec(P) RSBRACKET. {E = gda_sql_expr_new (NULL); E->value = V; E->param_spec = P;}
 pvalue(E) ::= SIMPLEPARAM(S). {E = gda_sql_expr_new (NULL); E->param_spec = gda_sql_param_spec_new (S);}
 
@@ -1004,6 +986,7 @@
 nm(A) ::= TEXTUAL(X). {A = X;}
 
 // Fully qualified name
+fullname(A) ::= nm(X). {A = X;}
 fullname(A) ::= nm(S) DOT nm(X). {gchar *str;
 				  str = g_strdup_printf ("%s.%s", g_value_get_string (S), g_value_get_string (X));
 				  A = g_new0 (GValue, 1);

Modified: trunk/providers/skel-implementation/models/Makefile.am
==============================================================================
--- trunk/providers/skel-implementation/models/Makefile.am	(original)
+++ trunk/providers/skel-implementation/models/Makefile.am	Sun Oct 26 21:39:57 2008
@@ -15,7 +15,7 @@
 	gda-models.h \
 	libmain.c
 
-libgda_models_la_LDFLAGS = -export-dynamic -module -avoid-version $(NO_UNDEFINED)
+libgda_models_la_LDFLAGS = -export-dynamic -module -avoid-version $(NO_UNDEFINED) $(LIBTOOL_PROV_EXPORT_OPTIONS)
 libgda_models_la_LIBADD = \
 	$(top_builddir)/libgda/libgda-4.0.la \
 	$(LIBGDA_LIBS) 

Modified: trunk/providers/sqlite/Makefile.am
==============================================================================
--- trunk/providers/sqlite/Makefile.am	(original)
+++ trunk/providers/sqlite/Makefile.am	Sun Oct 26 21:39:57 2008
@@ -14,7 +14,7 @@
 libgda_sqlite_la_SOURCES = \
 	libmain.c
 
-libgda_sqlite_la_LDFLAGS = -export-dynamic -module -avoid-version $(NO_UNDEFINED)
+libgda_sqlite_la_LDFLAGS = -export-dynamic -module -avoid-version $(NO_UNDEFINED) $(LIBTOOL_PROV_EXPORT_OPTIONS)
 libgda_sqlite_la_LIBADD = \
 	$(top_builddir)/libgda/libgda-4.0.la \
 	$(sqlitelibs) \



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]