>From eaf67c17273bf82faad4aba1105418a9a5c04435 Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Thu, 13 Apr 2017 20:03:54 +0200 Subject: [PATCH 2/4] gnu: Add antlr2. * gnu/packages/java.scm (antlr2): New variable. --- gnu/packages/java.scm | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 1d18a0b06..fc9e137b8 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1178,3 +1178,45 @@ testing frameworks, mocking libraries and UI validation rules.") JUnit provides assertions for testing expected results, test fixtures for sharing common test data, and test runners for running tests.") (license license:epl1.0))) + +(define-public antlr2 + (package + (name "antlr2") + (version "2.7.7") + (source (origin + (method url-fetch) + (uri (string-append "http://www.antlr2.org/download/antlr-" + version ".tar.gz")) + (sha256 + (base32 + "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5")) + (modules '((guix build utils))) + (snippet + '(begin + (delete-file "antlr.jar") + (substitute* "configure" + (("/bin/sh") "sh")))))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (add-after 'configure 'fix-bin-ls + (lambda _ + (for-each (lambda (file) + (substitute* file + (("/bin/ls") "ls"))) + (find-files "Makefile"))))))) + (native-inputs + `(("which" ,which) + ("java" ,icedtea "jdk"))) + (inputs + `(("java" ,icedtea))) + (home-page "http://www.antlr2.org") + (synopsis "Framework for constructing recognizers, compilers, and translators") + (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) +is a language tool that provides a framework for constructing recognizers, +compilers, and translators from grammatical descriptions containing Java, C#, +C++, or Python actions. ANTLR provides excellent support for tree construction, +tree walking, and translation.") + (license license:public-domain))) -- 2.12.2