Using Bison as Haskell parser generator

Hans Aberg haberg@matematik.su.se
Thu, 17 Oct 2002 16:18:46 +0200


(I am currently not on this list, so replies, please cc me.)

The later versions of the GNU parser generator Bison, like
  ftp://ftp.gnu.org/gnu/bison/bison-1.75.tar.gz       (959 KB)
  ftp://ftp.gnu.org/gnu/bison/bison-1.75.tar.bz2      (759 KB)
use the macro processing program M4 to produce the source code output.

This should make it real easy to write parser generator (skeleton) files
designed for special languages.

So I wonder if somebody may want to make an attempt to produce such
skeleton files for Haskell. Bison has now not only an LALR(1) parser
algorithm, but also a GLR parser, and more is to come.

I am aware of that there are parser generators written in Haskell (like
Happy), but the advantage with this Bison approach is that one can more
swiftly switch between different parsing algorithms and output languages.
-- The basic elements of the parser generating algorithms is language
independent, and only the implementation of the push-down automaton needs
to be done in each language.

Or so is the idea.

  Hans Aberg