Legal uses of lex & yacc

James Wilbur Lewis jwl at ernie.Berkeley.EDU
Wed Feb 21 18:06:18 AEST 1990


In article <271 at xyzzy.UUCP> kan at tom.dg.com () writes:
-In article <90049.104719MCCABE at MTUS5.BITNET> MCCABE at MTUS5.BITNET (Jim McCabe) writes:
->Is it legal to
->use a yacc-generated compiler (and a lex-generated lexical analyzer)
->for part of a public-domain software package?  
-
-But if you intend to distribute only C code, i.e. after you've run
-your work through the "Official" Lex and Yacc, you can be prosecuted
-for copyright infringement!  That's because Lex and Yacc include
-copyrighted data files into their analyzers and parsers 
-(/usr/lib/lex/n[cr]form and /usr/lib/yaccpar, respectively).

I just looked; none of these files contain copyright notices. 

It'd be silly to copyright those files, because that would
render these tools useless for commercial software development!
You couldn't even distribute the binaries because they're derivative
works (right?)  

(The Bison skeleton is another story -- the reason it's copyrighted is not 
to *prevent* copying, but to *encourage* people to share their (and FSF's!)
code.)

-- Jim Lewis
   U.C. Berkeley



More information about the Comp.lang.c mailing list