projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed bug #176: Dont throw diagnostics on empty SRU args.
[yaz-moved-to-github.git]
/
src
/
cql.y
diff --git
a/src/cql.y
b/src/cql.y
index
82db22c
..
d2cc5c5
100644
(file)
--- a/
src/cql.y
+++ b/
src/cql.y
@@
-1,4
+1,4
@@
-/* $Id: cql.y,v 1.3 2004-03-15 21:39:06 adam Exp $
+/* $Id: cql.y,v 1.6 2004-10-03 22:34:07 adam Exp $
Copyright (C) 2002-2004
Index Data Aps
Copyright (C) 2002-2004
Index Data Aps
@@
-9,6
+9,12
@@
See the file LICENSE.
bison parser for CQL grammar.
*/
%{
bison parser for CQL grammar.
*/
%{
+/**
+ * \file cql.c
+ * \brief Implements CQL parser.
+ *
+ * This is a YACC parser, but since it must be reentrant, Bison is required.
+ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@
-187,7
+193,8
@@
static void putb(YYSTYPE *lval, CQL_parser cp, int c)
{
if (lval->len+1 >= lval->size)
{
{
if (lval->len+1 >= lval->size)
{
- char *nb = nmem_malloc(cp->nmem, (lval->size = lval->len * 2 + 20));
+ char *nb = (char *)
+ nmem_malloc(cp->nmem, (lval->size = lval->len * 2 + 20));
memcpy (nb, lval->buf, lval->len);
lval->buf = nb;
}
memcpy (nb, lval->buf, lval->len);
lval->buf = nb;
}
@@
-205,7
+212,7
@@
int yylex(YYSTYPE *lval, void *vp)
lval->rel = 0;
lval->len = 0;
lval->size = 10;
lval->rel = 0;
lval->len = 0;
lval->size = 10;
- lval->buf = nmem_malloc(cp->nmem, lval->size);
+ lval->buf = (char *) nmem_malloc(cp->nmem, lval->size);
lval->buf[0] = '\0';
do
{
lval->buf[0] = '\0';
do
{
@@
-250,7
+257,7
@@
int yylex(YYSTYPE *lval, void *vp)
}
if (c == '"')
{
}
if (c == '"')
{
- while ((c = cp->getbyte(cp->client_data)) != EOF && c != '"')
+ while ((c = cp->getbyte(cp->client_data)) != 0 && c != '"')
{
if (c == '\\')
c = cp->getbyte(cp->client_data);
{
if (c == '\\')
c = cp->getbyte(cp->client_data);