Xref: utzoo comp.lang.c:26123 comp.misc:8241 Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!rutgers!mcnc!rti!xyzzy!kan From: kan@dg-rtp.dg.com (Victor Kan) Newsgroups: comp.lang.c,comp.misc Subject: Re: Legal uses of lex & yacc Message-ID: <271@xyzzy.UUCP> Date: 21 Feb 90 01:24:21 GMT References: <90049.104719MCCABE@MTUS5.BITNET> Sender: usenet@xyzzy.UUCP Reply-To: kan@tom.dg.com () Organization: Data General Corporation, Research Triangle Park, NC Lines: 38 In article <90049.104719MCCABE@MTUS5.BITNET> MCCABE@MTUS5.BITNET (Jim McCabe) writes: >I've recently become familiar with lex and yacc, and am wondering about >the legal status of the code generated by these programs. Is it legal to >use a yacc-generated compiler (and a lex-generated lexical analyzer) >for part of a public-domain software package? For example, if I used lex >and yacc in a language interpreter I wrote, would it be permissable to >distribute my program freely over networks and such? In the Sun lex and >yacc manuals, they never mention this at all, so I'm worried. ;) It all depends on how you distribute your program. If you release the source code as PD before you pass it through Lex and Yacc, there's probably nothing anyone can do to stop you. People who want to use your software can just use their licensed copies of Lex and Yacc. Or they may use Bison or Bob Corbett's Berkeley Yacc. There may be a PD Lex out there, or someone my convert your Lex code to Flex. 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). If you pass the Yacc grammar through Bison for distribution, your parser, and perhaps your entire program will fall under the Free Software Foundation's COPYLEFT. For true PD status, you'd have to use Bob Corbett's Berkeley Yacc which has been made PD by the author, I believe. The same thing goes for your Lex code. > Jim McCabe > MCCABE @ MTUS5.BITNET | Victor Kan | I speak only for myself. | *** | Data General Corporation | Edito cum Emacs, ergo sum. | **** | 62 T.W. Alexander Drive | Columbia Lions Win, 9 October 1988 for | **** %%%% | RTP, NC 27709 | a record of 1-44. Way to go, Lions! | *** %%%