Parser/unparser generator for Common Lisp
Zebu is part of a set of tools for the translation of formal languages. Zebu contains a LALR(1) parser generator like Yacc does. Aside from generating a parser, Zebu will also generate the inverse of a parser (unparser). In contrast to Yacc, the semantics is not given in terms of ``routines'' but declaratively in terms of typed feature structures. Syntax is specified using BNF-like productions and lexical categories are specified using regular expressions. Zebu generates a LALR(1) parsing table. To parse a string with a grammar, only this table and a driver need to be loaded. The present version of Zebu contains the ability to define several grammars and parsers simultaneously, a declarative framework for specifying the semantics, capabilities to define and use meta-grammars (grammars to express a grammar in), as well as efficiency related improvements. The current version compiles a grammar with 300 productions (including dumping of the tables to disk) in approx 2 minutes and 30 seconds on a HP 9000/370. The current version can also produce a generator using a 'reversible grammar' notation, in addition to a parser.
Documentation is included with the distribution.
|Source code repository|
The Zebu page on CLiki for a discussion on the licensing
A "nano-howto", with a patch, to install and run zebu-3.5.5 on clisp-2.30, and two example grammars can be found at http://informatimago.free.fr/archives/develop/lisp/pjb-zebu-clisp.tar.gz.
You must be logged to add a note
You must be logged to add a comment