Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!murtoa.cs.mu.oz.au!murdu!ucsvc!u5569462 From: U5569462@ucsvc.unimelb.edu.au (DAVID CLUNIE) Newsgroups: comp.os.minix Subject: Re: yacc for minix - another option Message-ID: <146@ucsvc.unimelb.edu.au> Date: 29 Jun 89 11:11:45 GMT References: <487@extro.ucc.su.oz> <18321@mimsy.UUCP> Organization: The University of Melbourne Lines: 61 > There is no `Public Domain Yacc' that I know of. Bison is a freely distri- > butable Yacc clone, but it is never refered to as `PD-Yacc'. If you see > such a thing on a BBS or somewhere, you can be 99.9% sure that it is a > decendant of this rogue DECUS Yacc. You may be surprised to learn that there is another public domain yacc. I wrote it many years ago. The only catch is that I wrote it back in the days when I used a 64k Z80 system under CPM and was stupid enough to try writing a C compiler for it (in C of course). I needed yacc, didn't have access to UNIX, so I wrote one ! Took me ages, but finally I had an incredibly slow, disk-bound, but totally complete version of yacc running under CPM. It would even handle an entire ANSI C grammar (in about half an hour) ! As my resources increased I ported it to MSDOS and even VAX/VMS, basically unchanged. Believe it or not I still use it ! It is slower than bison to process a grammar but I trust it, and I understand the parser skeleton better. I have never widely distributed it for several reasons: 1. Boy is it ugly ! DeRemer would faint if he saw what I had done to his algorithm to turn it into a piece of code that originally used multiple overlayed passes through many (at least 7) intermediate disk files. But it works tolerably on a fast AT clone with a fast hard disk and all the intermediates spooled out to a ram disk. 2. Who needs yet another yacc ? Perhaps Minix does need something that was designed from scratch to fit into a small space. 3. I was always a bit worried about the parser skeleton that I use. - I initially started out with the DECUS yacc skeleton - subsequently I cleaned it up and added fancy error handling - later I had a look at System V.2's skeleton and incorporated some of its features. Basically I wanted to stay as Unix yacc compatible as possible, even down to generating tables that would work with a genuine yacc skeleton. The worrying question is, what is the status of the genuine yacc skeleton. Does one need a licence from AT&T to spread anything derived from it around freely ? Personally I doubt it. The skeleton was always intended to be incorporated in other peoples source code anyway. It is readily accessible in source form on all Unix systems with yacc. The algorithm has been widely published and referred to (though not in its entirety). The bottom line is that I would be happy for anyone wanting a small enough yacc to run under Minix to have mine. Before publishing a ported version widely (eg. here) however, the question of the legal status of a genuine yacc derived parser skeleton must be addressed satisfactorily. Could some one in the know come up with an answer ? May be we should just straight out ask AT&T. By the way, is DECUS yacc really the real thing ? It must have been a pretty early version. Regards ... David