Strafunski-Sdf2Haskell: Converts SDF to Haskell

[ bsd3, language, program ] [ Propose Tags ] [ Report a vulnerability ]

Generates code for using SDF grammars in Haskell. See http://www.syntax-definition.org/ for more information about SDF.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 1.0.0.1, 1.0.0.2
Change log ChangeLog
Dependencies base (<=4.6.0.1), directory (<=1.2.0.1), haskell-src (<=1.0.2), mtl (<=2.1.2), pretty (<=1.1.1.0), process (<=1.1.0.2), Strafunski-ATermLib (<=1.6.1), Strafunski-StrategyLib (<=5.0.1), template-haskell [details]
License BSD-3-Clause
Author Ralf Laemmel, Joost Visser
Maintainer darmanithird@gmail.com
Category Language
Source repo head: git clone https://github.com/jkoppel/Strafunski-Sdf2Haskell
Uploaded by JamesKoppel at 2013-05-03T10:02:27Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Executables Sdf2Haskell
Downloads 2007 total (4 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2016-10-26 [all 10 reports]

Readme for Strafunski-Sdf2Haskell-1.0.0.2

[back to package description]
------------------------------------------------------------------------------

              GENERATION OF HASKELL DATATYPES FROM SDF GRAMMARS

                   Sdf2Haskell version 1.0, November 2002

                   Ralf Laemmel                Joost Visser
               CWI & VU, Amsterdam            CWI, Amsterdam

This package contains Sdf2Haskell, a generator that takes an SDF
grammar as input and produces a corresponding set of Haskell datatype
definitions as output.


--- GENERAL ------------------------------------------------------------------

For information see:

  http://www.cs.vu.nl/Strafunski

Contents of this package:

  - generator	Directory with the files that make up the generator
  - examples	Directory with examples of using the generator
  - scripts     Directory with sets of reusable make rules


--- PREREQUISITES ------------------------------------------------------------

Prerequisites:

 I. Your path must contain the following programs:
 
   - GHC (version 6.4 or higher)
   - DrIFT (version 2.1.2)
   - sdf2table (version 1.10)
   - sglr (version 3.4.1 or higher)
   - implodePT (version 1.1 is known to work)
   
 II. The following Strafunski packages must be available:
 
   - StrategyLib-5.0
   - haterm-1.5
   
   Preferably, these packages should be placed in the same directory
   as this Sdf2Haskell package.
   

GHC and DrIFT can easily be found via the Haskell organization home
page at: http://www.haskell.org/.

The programs sdf2haskell, sglr, and implodePT can be obtained in various
ways:
   
   - by installing the "sdf2" package from the Online Package Base at
     http://www.program-transformation.org/package-base/ (source
     distribution only).
   
   - by installing StrategoXT's prerequisite package "sdf2-bundle"
     from http://www.stratego-language.org/ (source and bindary
     distributions available).
     
   - by installing the ASF+SDF Meta-Environment, which can be obtained
     as "asfsdf-meta" from http://www.cwi.nl/projects/MetaEnv/

The required Strafunski packages can be downloaded from the
Strafunfski home page http://www.cs.vu.nl/Strafunski/.


--- INSTALL ------------------------------------------------------------------

The Sdf2Haskell generator can be configured, built, and installed IN PLACE,
as follows:

  ./configure [flags]
  gmake
  
For help on the configuration flags, type:

  ./configure --help

In particular, you might want to use the --with-haterm and --with-StrategyLib
flags to point out where the required Strafunksi packages are.  


--- RUN ----------------------------------------------------------------------
  
After configuration and builing, the Sdf2Haskell generator is available in:

  ./generator/Sdf2Haskell
  
You may want to extend your PATH to include ./generator.

You can now run the generator as follows:

  sdf2haskell -i <grammarfile> -m <modulename> -o <haskellfile>
  
where the <grammarfile> is a file containing the SDF grammar you want to feed
to the generator as input, <modulename> is the name of the Haskell module
you want to be generated, and <haskellfile> is the name of the file into which
you want the generated Haskell file to be written. Use the -p option if you
want to generate customizable pretty-print functions instead of datatypes
that represent abstract syntax trees.


--- EXAMPLES -----------------------------------------------------------------

To see the examples in action, you can type:

  gmake check

Do this in the top level directory to run all examples, or in a
specific example directory to run a single one. The example in
examples/twosorts is the most simple one which only invokes the
generator. The other examples (for Java and Cobol) also involve
compilation of code depending on the generated Haskell datatypes
as well as parser generation and parser invocation.


------------------------------------------------------------------------------