Applications and libraries/Compiler tools
This page contains a list of libraries and tools in a certain category. For a comprehensive list of such pages, see Applications and libraries.
1 Compiler, parsing, lexing and regular expression tools
- Manuel Chakravarty's Compiler Toolkit
- There is a significant set of functionality that is required in each compiler like symbol table management, input-output operations, error management, and so on, which are good candidates for code reuse. The Compiler Toolkit is an attempt to provide an open collection of modules for these recurring tasks in Haskell.
- Typing Haskell in Haskell
- A Haskell program that implements a Haskell typechecker, thus providing a mathematically rigorous specification in a notation that is familiar to Haskell users.
- Hatchet is a type checking and inference tool for Haskell 98, written in (almost) Haskell 98.
- The BNF Converter
- A High-Level Tool for Implementing Well-Behaved Programming Languages.
- ATerm Library
- ATerms provide a generic format for representation and exchange of (annotated) terms. ATerms were developed in the context of the ASF+SDF Meta-Environment. They are also used by the rewriting language Stratego, by the transformation tool bundle XT, by the visitor generator JJForester, and by numerous other tools developed at CWI, Universiteit Utrecht, and elsewhere.
- Attribute Grammar
- How can attribute grammars help at the separation of concerns, at things related to the goals of aspect oriented programming? How do they relate to other concepts like monads and arrows? Why are they important for the functional programmer? See Wouter Swierstra's WhyAttributeGrammarsMatter. Utrecht University's Attribute Grammar System tools include also an attribute grammar compiler, UUAGC. The concept of attribute grammar was used in their Essential Haskell Compiler project, which gives us not only a working programming language, but also a good didactical material about using attribute grammars, e.g. in writing compilers.
2 Regular expression libraries
- Interface to the POSIX regular expression library.
- This is an alternative to Text.Regex along with some enhancements. GHC's Text.Regex marshals the data back and forth to c-arrays to call libc and this is far too slow (and strict). This module understands regular expression Strings via a Parsec parser and creates an internal data structure (Text.Regex.Lazy.Pattern). This is then transformed into a Parsec parser to process the input String, or into a DFA table for matching against the input String or FastPackedString. The input string is consumed lazily, so it may be an arbitrarily long or infinite source.
- Regular expression library
- Inspired by the Perl regular expression library, written purely in Haskell.
- A library that interfaces to both PCRE and Posix regular expressions.
- Haskell Regular Patterns
- HaRP is a Haskell extension that extends the normal pattern matching facility with the power of regular expressions. Regular expression patterns in HaRP work over ordinary Haskell lists () of arbitrary type. HaRP is as a pre-processor to ordinary Haskell.
3 Scanner and parser generators
- Happy is a parser generator system for Haskell, similar to the tool `yacc' for C. Like `yacc', it takes a file containing an annotated BNF specification of a grammar and produces a Haskell module containing a parser for the grammar.
- Frown is an LALR(k) parser generator for Haskell 98 written in Haskell 98.
- A parser generator for Haskell using monadic parser combinators. It was developed to be compatible with Happy.
- Utrecht Parser Combinator Library
- The combinators in this library analyse the grammar on the fly and build parsers that are quite efficient. An interesting aspect is that parsing results become available on the fly without hanging on to the input. The parsers will give extensive error reports of erroneous situations, and wil proceed with parsing.
- A simple, well documented monadic parser combinator library for fast parsers with good error messages.
- The Packrat Parsing and Parsing Expression Grammars Page
- Written by Bryan Ford parsing expression grammars (PEGs), an alternative to context free grammars for formally specifying syntax, and packrat parsers, or linear-time memoizing parsers for PEGs. Also a packrat parser generator in Haskell that generates Haskell parsers.
- Standalone distribution of the self-optimising lexer (i.e. regex) and parser combinators of the Compiler Toolkit (CTK).
- The Haskell Dynamic Lexer Engine
- This system is completely dynamic: the lexer may be modified at runtime, and string buffers may be lexed by different lexers at different times.
- The Zephyr Abstract Syntax Description Lanuguage (ASDL)
- ASDL is a language designed to describe the tree-like data structures in compilers. Its main goal is to provide a method for compiler components written in different languages to interoperate. ASDL makes it easier for applications written in a variety of programming languages to communicate complex recursive data structures. asdlGen is a tool that takes ASDL descriptions and produces implementations of those descriptions in C, C++, Java, Standard ML, and Haskell.
- HParser (This link is dead. Fix it or remove it.)
- A parser for Haskell written purely in Haskell (using the Happy parser generator).
- Haskell-Source with eXtensions (HSX, haskell-src-exts) is an extension of the standard haskell-src package, and handles most common syntactic extensions to Haskell.
- cpphs is a liberalised re-implementation of cpp, the C pre-processor, in Haskell.
- HaGLR provides support for Generalized LR parsing in Haskell.
4 Type systems
- The purpose of the Ruler system is to describe type rules in such a way that a partial Attribute Grammar implementation, and a pretty printed LaTeX can be generated from a description of type rules