add cleanall task

This commit is contained in:
Pedro 2015-12-23 17:00:41 +01:00
parent d5fad5ea56
commit 3719745fb4
2 changed files with 4 additions and 2 deletions

View File

@ -42,6 +42,7 @@ clean:
cleanparser:
make -C $(SRCPARSER)/ clean
cleanall: clean cleanparser
############
### Test ###

View File

@ -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());