From ce45347561490f88965bec219a21f755bc096622 Mon Sep 17 00:00:00 2001 From: Pedro Date: Thu, 16 Oct 2014 15:35:38 +0200 Subject: [PATCH] minor renaming --- src/.gitignore | 8 ++++---- src/Makefile | 12 ++++++------ src/{lex_parser.y => bison_parser.y} | 8 ++++---- src/{build_and_run.sh => build_and_run_tests.sh} | 0 src/{lex_lexer.l => flex_lexer.l} | 4 ++-- src/lib/SQLParser.cpp | 4 ++-- 6 files changed, 18 insertions(+), 18 deletions(-) rename src/{lex_parser.y => bison_parser.y} (96%) rename src/{build_and_run.sh => build_and_run_tests.sh} (100%) rename src/{lex_lexer.l => flex_lexer.l} (91%) diff --git a/src/.gitignore b/src/.gitignore index a048789..2d305a0 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -1,5 +1,5 @@ -lex_lexer.c -lex_lexer.h -lex_parser.c -lex_parser.h +flex_lexer.c +flex_lexer.h +bison_parser.c +bison_parser.h *.o \ No newline at end of file diff --git a/src/Makefile b/src/Makefile index 4e553a5..15fbf11 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,6 +1,6 @@ # Makefile -LIB_FILES = lex_lexer.c lex_parser.c lib/Statement.cpp lib/Expr.cpp lib/SQLParser.cpp +LIB_FILES = flex_lexer.c bison_parser.c lib/Statement.cpp lib/Expr.cpp lib/SQLParser.cpp TESTS_MAIN = sql_tests.cpp @@ -21,13 +21,13 @@ execution: $(LIB_FILES) $(EXECUTION_MAIN) $(CC) $(CFLAGS) $(LIB_FILES) $(EXECUTION_MAIN) -o $(EXECUTION_BIN) -lex_lexer.c: lex_lexer.l - flex lex_lexer.l +flex_lexer.c: flex_lexer.l + flex flex_lexer.l -lex_parser.c: lex_parser.y lex_lexer.c - bison lex_parser.y +bison_parser.c: bison_parser.y flex_lexer.c + bison bison_parser.y clean: - rm -f *.o *~ lex_lexer.c lex_lexer.h lex_parser.c lex_parser.h $(EXECUTION_BIN) $(TESTS_BIN) \ No newline at end of file + rm -f *.o *~ flex_lexer.c flex_lexer.h bison_parser.c bison_parser.h $(EXECUTION_BIN) $(TESTS_BIN) \ No newline at end of file diff --git a/src/lex_parser.y b/src/bison_parser.y similarity index 96% rename from src/lex_parser.y rename to src/bison_parser.y index d04887a..bd4b574 100644 --- a/src/lex_parser.y +++ b/src/bison_parser.y @@ -7,8 +7,8 @@ #include "Statement.h" #include "List.h" -#include "lex_parser.h" -#include "lex_lexer.h" +#include "bison_parser.h" +#include "flex_lexer.h" #include @@ -27,8 +27,8 @@ typedef void* yyscan_t; } -%output "lex_parser.c" -%defines "lex_parser.h" +%output "bison_parser.c" +%defines "bison_parser.h" %define api.pure %lex-param { yyscan_t scanner } diff --git a/src/build_and_run.sh b/src/build_and_run_tests.sh similarity index 100% rename from src/build_and_run.sh rename to src/build_and_run_tests.sh diff --git a/src/lex_lexer.l b/src/flex_lexer.l similarity index 91% rename from src/lex_lexer.l rename to src/flex_lexer.l index e47d8bc..036eb05 100644 --- a/src/lex_lexer.l +++ b/src/flex_lexer.l @@ -7,7 +7,7 @@ #include "Statement.h" #include "List.h" -#include "lex_parser.h" +#include "bison_parser.h" #include #include @@ -18,7 +18,7 @@ using namespace std; %} -%option outfile="lex_lexer.c" header-file="lex_lexer.h" +%option outfile="flex_lexer.c" header-file="flex_lexer.h" %option warn nodefault %option reentrant noyywrap never-interactive nounistd %option bison-bridge diff --git a/src/lib/SQLParser.cpp b/src/lib/SQLParser.cpp index 4b5f430..7860582 100644 --- a/src/lib/SQLParser.cpp +++ b/src/lib/SQLParser.cpp @@ -1,6 +1,6 @@ #include "SQLParser.h" -#include "lex_parser.h" -#include "lex_lexer.h" +#include "bison_parser.h" +#include "flex_lexer.h" #include int yyparse(Statement **expression, yyscan_t scanner);