From 8366b82fc43b5e2e04396f95c7032b68b2295826 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 16 Apr 2013 16:28:09 +0200 Subject: [PATCH] cql2pqf: option -S for strict mode --- util/cql2pqf.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/util/cql2pqf.c b/util/cql2pqf.c index c2a404d..13c62b0 100644 --- a/util/cql2pqf.c +++ b/util/cql2pqf.c @@ -15,7 +15,8 @@ static void usage(void) { - fprintf(stderr, "usage\n cql2pqf [-n ] [-r] []\n"); + fprintf(stderr, "usage\n cql2pqf [-n ] [-r] [-S] " + "[]\n"); exit(1); } @@ -27,11 +28,12 @@ int main(int argc, char **argv) char *fname = 0; int reverse = 0; int verbose = 1; + int do_strict = 0; int ret; char *arg; - while ((ret = options("n:rv", argv, argc, &arg)) != -2) + while ((ret = options("n:rSv", argv, argc, &arg)) != -2) { switch (ret) { @@ -47,6 +49,9 @@ int main(int argc, char **argv) case 'r': reverse = 1; break; + case 'S': + do_strict = 1; + break; case 'v': verbose = 1; break; @@ -102,6 +107,7 @@ int main(int argc, char **argv) CQL_parser cp = cql_parser_create(); int r = 0; + cql_parser_strict(cp, do_strict); if (query) { if (verbose) -- 1.7.10.4