Changeset: 0be49136b3a9 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0be49136b3a9
Modified Files:
monetdb5/extras/jaql/jaql.c
monetdb5/extras/jaql/parser/Makefile.ag
monetdb5/extras/jaql/parser/jaql.l
monetdb5/extras/jaql/parser/jaql.y
Branch: jacqueline
Log Message:
build-sys: use jaql prefix iso generic yy
Prepare for embedding into an M5 scenario by making the bison/flex
prefix unique.
diffs (85 lines):
diff --git a/monetdb5/extras/jaql/jaql.c b/monetdb5/extras/jaql/jaql.c
--- a/monetdb5/extras/jaql/jaql.c
+++ b/monetdb5/extras/jaql/jaql.c
@@ -34,7 +34,7 @@
#include "parser/jaql.tab.h"
#include "parser/jaql.yy.h"
-extern int yyparse(jc *j);
+extern int jaqlparse(jc *j);
void freetree(tree *j);
str getContext(Client c, jc **j);
@@ -1659,10 +1659,10 @@ JAQLexecute(Client cntxt, MalBlkPtr mb,
j->buf = jaql;
j->err[0] = '\0';
- yylex_init_extra(j, &j->scanner);
+ jaqllex_init_extra(j, &j->scanner);
do {
- yyparse(j);
+ jaqlparse(j);
if (j->err[0] != '\0')
break;
@@ -1711,7 +1711,7 @@ JAQLexecute(Client cntxt, MalBlkPtr mb,
j->explain = 0;
} while (j->buf != NULL && j->err[0] == '\0');
- yylex_destroy(j->scanner);
+ jaqllex_destroy(j->scanner);
j->scanner = NULL;
/* freevars(j->vars); should do only on client destroy */
diff --git a/monetdb5/extras/jaql/parser/Makefile.ag
b/monetdb5/extras/jaql/parser/Makefile.ag
--- a/monetdb5/extras/jaql/parser/Makefile.ag
+++ b/monetdb5/extras/jaql/parser/Makefile.ag
@@ -22,8 +22,8 @@ INCLUDES = ../ \
../../../../common/stream \
../../../../gdk
-AM_YFLAGS = -d
-AM_LFLAGS = -o$(LEX_OUTPUT_ROOT).c --header-file=$(LEX_OUTPUT_ROOT).h
+AM_YFLAGS = -d -p jaql
+AM_LFLAGS = -o$(LEX_OUTPUT_ROOT).c --header-file=$(LEX_OUTPUT_ROOT).h -P jaql
# flex' and bison's output aren't up to the strictness of our flags
X_CFLAGS = #$(X_CFLAGS:-Werror=) <- recursive
diff --git a/monetdb5/extras/jaql/parser/jaql.l
b/monetdb5/extras/jaql/parser/jaql.l
--- a/monetdb5/extras/jaql/parser/jaql.l
+++ b/monetdb5/extras/jaql/parser/jaql.l
@@ -11,7 +11,7 @@
#include "jaql.h"
YYSTYPE yylval;
-extern void yyerror(YYLTYPE* locp, jc* j, char const *msg);
+extern void jaqlerror(YYLTYPE* locp, jc* j, char const *msg);
/* set line numbers each time a token is recognised */
#define YY_USER_ACTION yylloc->first_line = yylineno;
@@ -136,7 +136,7 @@ false return _FALSE;
. {
char buf[32];
snprintf(buf, sizeof(buf), "unexpected character: %c", yytext[0]);
- yyerror(yylloc_param, yyextra, buf);
+ jaqlerror(yylloc_param, yyextra, buf);
return LEX_ERROR;
}
%%
diff --git a/monetdb5/extras/jaql/parser/jaql.y
b/monetdb5/extras/jaql/parser/jaql.y
--- a/monetdb5/extras/jaql/parser/jaql.y
+++ b/monetdb5/extras/jaql/parser/jaql.y
@@ -55,10 +55,10 @@ http://www.usualcoding.eu/post/2007/09/0
#define YYLEX_PARAM j->scanner
-int yylex(YYSTYPE* lvalp, YYLTYPE* llocp, void *scanner);
+int jaqllex(YYSTYPE* lvalp, YYLTYPE* llocp, void *scanner);
void
-yyerror(YYLTYPE* locp, struct _jc* j, char const *msg)
+jaqlerror(YYLTYPE* locp, struct _jc* j, char const *msg)
{
if (j->err[0] == '\0')
snprintf(j->err, sizeof(j->err), "%s at or around %d",
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list