<commit_before>find_package(LLVM REQUIRED)
find_package(BISON REQUIRED)
find_package(FLEX REQUIRED)

if(${BISON_EXECUTABLE} MATCHES ".*bison")
    set(BISON_GLR "%glr-parser")
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/parser.y.in ${CMAKE_CURRENT_BINARY_DIR}/parser.y)


include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(SYSTEM ${CMAKE_CURRENT_BINARY_DIR})
include_directories(SYSTEM ${LLVM_INCLUDE_DIR})

BISON_TARGET(MyParser ${CMAKE_CURRENT_BINARY_DIR}/parser.y ${CMAKE_CURRENT_BINARY_DIR}/parser.cpp
             COMPILE_FLAGS "-r solved")
FLEX_TARGET(MyScanner lexer.l  ${CMAKE_CURRENT_BINARY_DIR}/lexer.cpp)
ADD_FLEX_BISON_DEPENDENCY(MyScanner MyParser)

add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/parser.cpp.h
  COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/parser.hpp ${CMAKE_CURRENT_BINARY_DIR}/parser.cpp.h
  DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/parser.hpp)

add_executable(aplc main print ${BISON_MyParser_OUTPUTS} ${FLEX_MyScanner_OUTPUTS} ${CMAKE_CURRENT_BINARY_DIR}/parser.cpp.h)
set_target_properties(aplc PROPERTIES
  COMPILE_FLAGS ${LLVM_CFLAGS}
  LINK_FLAGS ${LLVM_LD_FLAGS})
target_link_libraries(aplc
  LLVMCore LLVMSupport)<commit_msg>remove custom command for copying parser.hpp<commit_after>find_package(LLVM REQUIRED)
find_package(BISON REQUIRED)
find_package(FLEX REQUIRED)

if(${BISON_EXECUTABLE} MATCHES ".*bison")
    set(BISON_GLR "%glr-parser")
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/parser.y.in ${CMAKE_CURRENT_BINARY_DIR}/parser.y)


include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(SYSTEM ${CMAKE_CURRENT_BINARY_DIR})
include_directories(SYSTEM ${LLVM_INCLUDE_DIR})

BISON_TARGET(MyParser ${CMAKE_CURRENT_BINARY_DIR}/parser.y ${CMAKE_CURRENT_BINARY_DIR}/parser.cpp
             COMPILE_FLAGS "-v")
FLEX_TARGET(MyScanner lexer.l  ${CMAKE_CURRENT_BINARY_DIR}/lexer.cpp)
ADD_FLEX_BISON_DEPENDENCY(MyScanner MyParser)

add_executable(aplc main print ${BISON_MyParser_OUTPUTS} ${FLEX_MyScanner_OUTPUTS})
set_target_properties(aplc PROPERTIES
  COMPILE_FLAGS ${LLVM_CFLAGS}
  LINK_FLAGS ${LLVM_LD_FLAGS})
target_link_libraries(aplc
  LLVMCore LLVMSupport)
{'fraction_non_alphanumeric': 0.10572483841181902, 'fraction_numerical': 0.0, 'mean_word_length': 9.31904761904762, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1259566', 'n_tokens_mistral': 874, 'n_tokens_neox': 825, 'n_words': 102}