A Tool for Specifying Reversible LALR(1) Parsers
Zebu is a LALR(1) parser generator similar to YACC, but for Common Lisp. Its features include the ability to define several grammars and parsers simultaneously, a framework for specifying the semantics, meta-grammars management and generation of unparsers. It also contains a lexer that groks (a subset of) Emacs Lisp regexps.
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.
Note that Zebu does not seem to have a way for the user to control operator precedence and associativity, making it hard to use it to generate a parse for all but the simplest languages. Not meaning to slam Zebu, but it may be more effective to use CL-Yacc or even Bovine or Wisent running under Emacs until Zebu is made more featureful (see also my contribution to the license argument below). -- Joe Corneli
Some denizens of comp.lang.lisp have tried to contact the author, but did not succeed so far. Zebu is NOT under the GPL - sadly, it's non-free. Someone should contact both authors and get permission to re-issue it under a nicer license.
[Zebu _IS_ under the GPL. It says so explicitly in the file COPYRIGHT.]
[Just noticing that it is "(c) Copyright 1992, Hewlett-Packard Company". Perhaps HP will change the license. Anyone reading this on good terms with Bruce Perens (he works at HP)?]
[I just browsed the file COPYRIGHT included with the source of Zebu and for all I can tell it's an old version of the GPL. Ergo it's Free. - James A. Crippen]
[It is true that the GPL is cited in many places but there are a couple of dozen source files which contain the following notice and no mention of the GPL: So it is not clear what the effective legal status is.]
[It's as clear as can be! There is a file COPYRIGHT which states explicitly that permission is granted under the General Public License to use modify and redistribute. How much clearer do you want it? It is NOT required that the GPL be cited in full in every file. You can find dozens of GNU packages which have copyright messages but no GPL in some files.]
With all the license arguments, it seems that the end result is that Zebu is probably under the GPL, but even so you may not want to adopt it in your software distribution or sell it commercially. Just in case. Other than that, it's quite obvious that the original intent was to distribute Zebu, so there's certainly no reason that you can't use it all you want.
[JAC: I just had another thought. Recall that American copyright laws require that the holder of copyright defend their copyright to retain it. Is this perhaps a situation where the lack of defense or follow-through on copyright could nullify it? A question for lawyers...]
[BM: Not so, AFAIR the above is for trademarks not for copyright]
Just to throw in a little extra information. I contacted William Wells a couple years ago about the copyright notices of his, which granted permission for non-commercial use. I asked him if he would consider granting permission to use the code under GPL and on Aug 23, 2001 he responded, in part: "Souds[sic] like a fine plan to me." If it is those notices that are causing concern, then I think we are okay. -- Russell Senior
I think it would be good to repackage Zebu in a fully GPL-compliant way. Probably the right thing to do would be to get in touch with Hewlett Packard about this. Until the licensing terms are cleared up, I think Zebu will suffer badly, because people won't be willing to work on it or even use it much until it is clear that it is free software. -- Joe Corneli
What good is it to have a GPL parser generator? Is my application written using Zebu not automatically GPL'd, because I need the Zebu runtime?
Agreed that it would be better to get the licensing cleared up on this one, if possible. (Oct. 2005, just to give this a time scale) Also, ideally Zebu itself could be GPL (if that's what is desired) but the use of output wouldn't be constrained to GPL. For Modified BSD licensed code (for example) that could be a real problem. Any effort going on right now to resolve this?
library text parser