From 1ecf30fc2b600441163d6f7b8a0c046a5ca2587d Mon Sep 17 00:00:00 2001
From: Dimitar Misev <misev@rasdaman.com>
Date: Thu, 11 Jun 2015 15:00:05 +0200
Subject: [PATCH] ticket:933 - fix bison header file generation
---
.gitignore | 2 ++
qlparser/Makefile.am | 13 +++----------
qlparser/lex.ll | 2 +-
qlparser/oql.yy | 2 ++
rasdl/Makefile.am | 13 +++----------
rasdl/lex.ll | 2 +-
rasdl/odl.yy | 2 ++
7 files changed, 14 insertions(+), 22 deletions(-)
diff --git a/.gitignore b/.gitignore
index 7ea43d1..53138d2 100644
a
|
b
|
lockmgr/ecpg_lockmanager.cc
|
20 | 20 | qlparser/lex.cc |
21 | 21 | qlparser/oql.cc |
22 | 22 | qlparser/oql.h |
| 23 | qlparser/oql.hh |
23 | 24 | rascontrol/rascontrol |
24 | 25 | rascontrol/raspasswd |
25 | 26 | rasdl/lex.cc |
26 | 27 | rasdl/odl.cc |
27 | 28 | rasdl/odl.h |
| 29 | rasdl/odl.hh |
28 | 30 | rasdl/rasdl |
29 | 31 | rasmgr/rasmgr |
30 | 32 | reladminif/adminif.cc |
diff --git a/qlparser/Makefile.am b/qlparser/Makefile.am
index d44b117..cb55123 100755
a
|
b
|
nobase_dist_pkgdata_DATA=udf/cpp.cc
|
38 | 38 | AM_LFLAGS=-i -I |
39 | 39 | |
40 | 40 | # -d generates token definitions in .h file |
41 | | AM_YFLAGS=-d -y |
| 41 | AM_YFLAGS=-y |
42 | 42 | AM_CXXFLAGS=@BASEDBCXXFLAGS@ @GDAL_CXXFLAGS@ |
43 | 43 | AM_CFLAGS=$(CXXFLAGS) |
44 | 44 | libqlparser_a_SOURCES=oql.yy lex.ll alloca.c\ |
… |
… |
libqlparser_a_SOURCES=oql.yy lex.ll alloca.c\
|
119 | 119 | |
120 | 120 | EXTRA_libqlparser_a_SOURCES = autogen_qtui.hh autogen_qtui.icc autogen_qtui.cc |
121 | 121 | |
122 | | BUILT_SOURCES=lex.cc oql.cc oql.h |
123 | | CLEANFILES=lex.cc oql.cc oql.h udf/cpp.cc |
| 122 | BUILT_SOURCES=lex.cc oql.cc oql.hh |
| 123 | CLEANFILES=lex.cc oql.cc oql.hh udf/cpp.cc |
124 | 124 | |
125 | 125 | udf/cpp.cc: udf/cpp.cc.in |
126 | 126 | $(SED) -e 's|AUTOCONF_TOKEN_FOR_SHARE_DIR|$(pkgdatadir)|g' \ |
… |
… |
udf/cpp.cc: udf/cpp.cc.in
|
128 | 128 | -e 's|AUTOCONF_TOKEN_FOR_UDFCXXFLAGS|$(UDFCXXFLAGS)|g' \ |
129 | 129 | -e 's|AUTOCONF_TOKEN_FOR_UDFLDFLAGS|$(UDFLDFLAGS)|g' \ |
130 | 130 | 'udf/cpp.cc.in' > udf/cpp.cc |
131 | | |
132 | | oql.h: correct_oql_h |
133 | | |
134 | | .PHONY: correct_oql_h |
135 | | |
136 | | correct_oql_h: |
137 | | if [ -e oql.hh ]; then mv oql.hh oql.h ; fi |
diff --git a/qlparser/lex.ll b/qlparser/lex.ll
index af9f21e..4845c3f 100755
a
|
b
|
struct QtUpdateSpecElement
|
49 | 49 | QtOperation* domain; |
50 | 50 | }; |
51 | 51 | |
52 | | #include "oql.h" |
| 52 | #include "oql.hh" |
53 | 53 | |
54 | 54 | QueryTree* parseQueryTree = NULL; |
55 | 55 | char* beginParseString = NULL; |
diff --git a/qlparser/oql.yy b/qlparser/oql.yy
index 2e9d607..293a30f 100755
a
|
b
|
struct QtUpdateSpecElement
|
114 | 114 | |
115 | 115 | %} |
116 | 116 | |
| 117 | %defines "oql.hh" |
| 118 | |
117 | 119 | // definition section |
118 | 120 | |
119 | 121 | %union { |
diff --git a/rasdl/Makefile.am b/rasdl/Makefile.am
index 475a418..fbd0616 100755
a
|
b
|
|
30 | 30 | ################################################################## |
31 | 31 | |
32 | 32 | AM_LFLAGS=-I |
33 | | AM_YFLAGS=-d -y |
| 33 | AM_YFLAGS=-y |
34 | 34 | AM_CXXFLAGS=@BASEDBCXXFLAGS@ |
35 | 35 | AM_LDFLAGS= |
36 | 36 | |
… |
… |
rasdl_LDADD = ../reladminif/libreladminif.a ../relmddif/librelmddif.a \
|
49 | 49 | |
50 | 50 | rasdl_LDFLAGS = -pthread |
51 | 51 | |
52 | | BUILT_SOURCES=lex.cc odl.cc odl.h |
53 | | CLEANFILES=lex.cc odl.cc odl.h |
| 52 | BUILT_SOURCES=lex.cc odl.cc odl.hh |
| 53 | CLEANFILES=lex.cc odl.cc odl.hh |
54 | 54 | |
55 | 55 | SUBDIRS=../reladminif ../conversion ../relmddif ../relstorageif ../relindexif ../relcatalogif \ |
56 | 56 | ../relfiletileif ../relblobif ../indexmgr ../catalogmgr ../storagemgr ../tilemgr \ |
… |
… |
SUBDIRS=../reladminif ../conversion ../relmddif ../relstorageif ../relindexif ..
|
59 | 59 | $(RECURSIVE_CLEAN_TARGETS): |
60 | 60 | @$(MAKE) $(AM_MAKEFLAGS) `echo $@ | sed s/-recursive/-am/` |
61 | 61 | |
62 | | odl.h: correct_odl_h |
63 | | |
64 | | .PHONY: correct_odl_h |
65 | | |
66 | | correct_odl_h: |
67 | | if [ -e odl.hh ]; then mv odl.hh odl.h ; fi |
68 | | |
69 | 62 | #.PHONY : doc |
70 | 63 | #doc: |
71 | 64 | # -rm $(DOCDIR)/* |
diff --git a/rasdl/lex.ll b/rasdl/lex.ll
index f34907a..16adadb 100755
a
|
b
|
rasdaman GmbH.
|
41 | 41 | #include "parse.hh" |
42 | 42 | #include "yparse.hh" |
43 | 43 | |
44 | | #include "odl.h" |
| 44 | #include "odl.hh" |
45 | 45 | |
46 | 46 | /* for error output */ |
47 | 47 | long lineNumber = 1; /* number of line in current file */ |
diff --git a/rasdl/odl.yy b/rasdl/odl.yy
index 8f109b6..25f1545 100755
a
|
b
|
extern const char *error_token;
|
65 | 65 | |
66 | 66 | %} |
67 | 67 | |
| 68 | %defines "odl.hh" |
| 69 | |
68 | 70 | %union{ |
69 | 71 | // types for LEX |
70 | 72 | struct |