find_package(BISON REQUIRED)
find_package(FLEX REQUIRED)

BISON_TARGET(parsery ast.y "${CMAKE_CURRENT_BINARY_DIR}/y.ast.c")
FLEX_TARGET(parserl ast.l "${CMAKE_CURRENT_BINARY_DIR}/lex.ast.c")
ADD_FLEX_BISON_DEPENDENCY(parserl parsery)
