English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Announce: Ocaml-Packrat 0.1.0
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-01-27 (10:04)
From: Bardur Arantsson <list-caml-list@s...>
Subject: Announce: Ocaml-Packrat 0.1.0
Hello all,

I'd like to announce the availability of version 0.1.0 of my Packrat
parser generator for OCaml, unimaginatively named OCaml-Packrat. The
tarball can be fecthed from


The following page provides a good overview of what packrat parsers are
(and how they are implemented):


The README includes usage notes, and an example grammar for parsing
simple expressions (with precedence) is included.

The following are prerequisites for building:

  - ExtLib>=1.3 is required, but the generated parsers do not depend on
  ExtLib. Removing the ExtLib dependency is one of the first things on my
  TODO list.
  - Findlib>=1.0.4 and OMake>=0.9.4 are used to build/install. You can
  do it without these, but you'd have to compile everything manually.

The current incarnation uses OCaml itself for specifying the grammars and
'actions' and generates an ML AST with the parser module as output. The
grammars are specified as lists and actions are specified using ML ASTs.
See the included example for details.

Finally, I should point out I haven't done any memory/time profiling yet,
so the current implementation is probably quite ineffcient.

Comments and suggestions welcomed.


Bardur Arantsson

- Oh, I always feared he would run off like this! Why...? WHY...?
WHY didn't I break his legs?
                                  Professor Farnsworth | Futurama