From 3719745fb4faf040bdf8ac9d43041bf2fecb095a Mon Sep 17 00:00:00 2001 From: Pedro Date: Wed, 23 Dec 2015 17:00:41 +0100 Subject: [PATCH] add cleanall task --- Makefile | 1 + example/example.cpp | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e2e166c..92e97c3 100644 --- a/Makefile +++ b/Makefile @@ -42,6 +42,7 @@ clean: cleanparser: make -C $(SRCPARSER)/ clean +cleanall: clean cleanparser ############ ### Test ### diff --git a/example/example.cpp b/example/example.cpp index 66ebb9d..a77c645 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -1,4 +1,5 @@ +// include the sql parser #include "SQLParser.h" int main(int argc, char *argv[]) { @@ -6,12 +7,12 @@ int main(int argc, char *argv[]) { fprintf(stderr, "Usage: ./example \"SELECT * FROM test;\"\n"); return -1; } - - std::string query = argv[1]; + // parse a given query hsql::SQLStatementList* stmt_list = hsql::SQLParser::parseSQLString(query); + // check whether the parsing was successful if (stmt_list->isValid) { printf("Parsed successfully!\n"); printf("Number of statements: %lu\n", stmt_list->numStatements());