diff --git a/BUILD.bazel b/BUILD.bazel index 61afe5e..e291b64 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,21 +1,19 @@ load("@ai_formation_hazel//:hazel.bzl", "hazel_library") load("@io_tweag_rules_haskell//haskell:haskell.bzl", "haskell_library", "haskell_test") +load("//third_party/haskell/alex:build_defs.bzl", "alex_lexer") +load("//third_party/haskell/happy:build_defs.bzl", "happy_parser") load("//tools/project:build_defs.bzl", "project") project() -genrule( +alex_lexer( name = "Lexer", - srcs = ["src/Tokstyle/Cimple/Lexer.x"], - outs = ["src/Tokstyle/Cimple/Lexer.hs"], - cmd = "alex -o $@ $<", + src = "src/Tokstyle/Cimple/Lexer.x", ) -genrule( +happy_parser( name = "Parser", - srcs = ["src/Tokstyle/Cimple/Parser.y"], - outs = ["src/Tokstyle/Cimple/Parser.hs"], - cmd = "happy -agc -o $@ $<", + src = "src/Tokstyle/Cimple/Parser.y", ) haskell_library(