Skip to content

Commit

Permalink
lab3 report
Browse files Browse the repository at this point in the history
  • Loading branch information
deevroman committed Jan 28, 2023
1 parent 078ce23 commit 6afbca1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions parser/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.21)

project(Parser LANGUAGES C CXX)
project(Parser LANGUAGES C)
set(CMAKE_CXX_STANDARD 20)

set(SRC_DIR "src")
Expand All @@ -22,8 +22,7 @@ add_library(flex_bison STATIC "${LEXER_OUT}" "${PARSER_OUT}" "${SRC_DIR}/types.h
set_target_properties(flex_bison PROPERTIES LINKER_LANGUAGE C)
target_include_directories(flex_bison PRIVATE "${SRC_DIR}")

add_executable(parser "${SRC_DIR}/main.cpp" "${LEXER_OUT}" "${PARSER_OUT}" "${PROTO_SRC}" "${SRC_DIR}/types.h")
set_target_properties(parser PROPERTIES LINKER_LANGUAGE CXX)
add_executable(parser "${SRC_DIR}/main.c" "${LEXER_OUT}" "${PARSER_OUT}" "${PROTO_SRC}" "${SRC_DIR}/types.h")
target_include_directories(parser PRIVATE "${PARSER_DIR}" "${SRC_DIR}" "${CMAKE_CURRENT_BINARY_DIR}" "${PROTOBUF_INCLUDE_DIRS}")
target_link_libraries(parser PRIVATE flex_bison)

Expand Down
3 changes: 1 addition & 2 deletions parser/src/main.cpp → parser/src/main.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
extern "C" {
#include "parser.h"
}

int main() {
int status = yyparse();
print_query(q);
Expand Down

0 comments on commit 6afbca1

Please sign in to comment.