From 57676bfc9697ba851a2d86b12926f2cd5d763a2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20D=C3=A9camps?= Date: Wed, 17 Oct 2018 01:09:16 +0200 Subject: [PATCH] use cup.bzl from bazeel rules --- WORKSPACE | 2 +- cup/BUILD | 14 -------------- cup/sample-project/BUILD | 1 + jflex/BUILD | 3 ++- 4 files changed, 4 insertions(+), 16 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index e5aadacc1..0ce790b05 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -6,7 +6,7 @@ load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") git_repository( name = "jflex_rules", - tag = "stable", + tag = "v3", remote = "https://github.com/jflex-de/bazel_rules.git", ) diff --git a/cup/BUILD b/cup/BUILD index ff7e3c245..0f8e4e046 100644 --- a/cup/BUILD +++ b/cup/BUILD @@ -2,20 +2,6 @@ package(default_visibility = ["//visibility:public"]) licenses(["notice"]) # GPL-compatible -java_binary( - name = "cup_bin", - main_class = "java_cup.Main", - runtime_deps = [ - ":cup", - ], -) - -# This is the full Java CUP (with runtime) -java_import( - name = "cup", - jars = ["cup/java-cup-11b.jar"], -) - alias( name = "cup_runtime", actual = "//cup/cup_runtime", diff --git a/cup/sample-project/BUILD b/cup/sample-project/BUILD index dc94dbf39..58e941586 100644 --- a/cup/sample-project/BUILD +++ b/cup/sample-project/BUILD @@ -3,4 +3,5 @@ load("@jflex_rules//cup:cup.bzl", "cup") cup( name = "gen_parser", src = "src/main/cup/calculator.cup", + cup_bin = "@jflex_rules//cup:cup_bin", ) diff --git a/jflex/BUILD b/jflex/BUILD index 82e05a3a6..d64013308 100644 --- a/jflex/BUILD +++ b/jflex/BUILD @@ -21,7 +21,7 @@ java_library( resources = glob(["src/main/resources/**"]), visibility = ["//visibility:public"], deps = [ - "//cup", + "//cup:cup_runtime", "//third_party/org/apache/ant", ], ) @@ -29,6 +29,7 @@ java_library( cup( name = "gen_parser", src = "src/main/cup/LexParse.cup", + cup_bin = "@jflex_rules//cup:cup_bin", interface = True, parser = "LexParse", symbols = "sym",