;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2015 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
#:use-module (guix download)
#:use-module (guix build-system gnu)
#:use-module (gnu packages m4)
- #:use-module (gnu packages perl))
+ #:use-module (gnu packages perl)
+ #:use-module (gnu packages flex)
+ #:use-module (srfi srfi-1)
+ #:export (bison))
-(define-public bison
+(define bison
(package
(name "bison")
- (version "2.7.1")
+ (version "3.0.4")
(source
(origin
(method url-fetch)
version ".tar.xz"))
(sha256
(base32
- "1yx7isx67sdmyijvihgyra1f59fwdz7sqriginvavfj5yb5ss2dl"))))
+ "1qbgf6q1n2z17k8g33444m0q68kf3fbiq65q7jlrzpvvj73jh957"))))
(build-system gnu-build-system)
- (inputs `(("perl" ,perl)))
+ (native-inputs `(("perl" ,perl)
+ ;; m4 is not present in PATH when cross-building
+ ("m4" ,m4)))
+ (inputs `(("flex" ,flex)))
(propagated-inputs `(("m4" ,m4)))
(home-page "http://www.gnu.org/software/bison/")
(synopsis "Parser generator")
(description
- "Bison is a general-purpose parser generator that converts an
-annotated context-free grammar into an LALR(1) or GLR parser for
-that grammar. Once you are proficient with Bison, you can use
-it to develop a wide range of language parsers, from those used
-in simple desk calculators to complex programming languages.
-
-Bison is upward compatible with Yacc: all properly-written Yacc
-grammars ought to work with Bison with no change. Anyone
-familiar with Yacc should be able to use Bison with little
-trouble. You need to be fluent in C or C++ programming in order
-to use Bison.")
+ "GNU Bison is a general-purpose parser generator. It can build a
+deterministic or generalized LR parser from an annotated, context-free
+grammar. It is versatile enough to have many applications, from parsers for
+simple tools through complex programming languages.")
(license gpl3+)))
+
+(define-public bison-2.7
+ (package (inherit bison)
+ (version "2.7")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/bison/bison-"
+ version ".tar.xz"))
+ (sha256
+ (base32
+ "1zd77ilmpv5mi3kr55jrj6ncqlcnyhpianhrwzak2q28cv2cbn23"))))))
+