README revision 85587
1278192Sngie/**************************************************************** 2278192SngieCopyright (C) Lucent Technologies 1997 3278192SngieAll Rights Reserved 4278192Sngie 5278192SngiePermission to use, copy, modify, and distribute this software and 6its documentation for any purpose and without fee is hereby 7granted, provided that the above copyright notice appear in all 8copies and that both that the copyright notice and this 9permission notice and warranty disclaimer appear in supporting 10documentation, and that the name Lucent Technologies or any of 11its entities not be used in advertising or publicity pertaining 12to distribution of the software without specific, written prior 13permission. 14 15LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 16INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. 17IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY 18SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 19WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER 20IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 21ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 22THIS SOFTWARE. 23****************************************************************/ 24 25This is the version of awk described in "The AWK Programming Language", 26by Al Aho, Brian Kernighan, and Peter Weinberger 27(Addison-Wesley, 1988, ISBN 0-201-07981-X). 28 29Changes, mostly bug fixes and occasional enhancements, are listed 30in FIXES. If you distribute this code further, please please please 31distribute FIXES with it. If you find errors, please report them 32to bwk@bell-labs.com. Thanks. 33 34The program itself is created by 35 make 36which should produce a sequence of messages roughly like this: 37 38 yacc -d awkgram.y 39 40conflicts: 43 shift/reduce, 85 reduce/reduce 41 mv y.tab.c ytab.c 42 mv y.tab.h ytab.h 43 cc -O -c ytab.c 44 cc -O -c b.c 45 cc -O -c main.c 46 cc -O -c parse.c 47 cc -O maketab.c -o maketab 48 ./maketab >proctab.c 49 cc -O -c proctab.c 50 cc -O -c tran.c 51 cc -O -c lib.c 52 cc -O -c run.c 53 cc -O -c lex.c 54 cc -O ytab.o b.o main.o parse.o proctab.o tran.o lib.o run.o lex.o -lm 55 56This produces an executable a.out; you will eventually want to 57move this to some place like /usr/bin/awk. 58 59If your system is does not have yacc or bison (the GNU 60equivalent), you must compile the pieces manually. We have 61included yacc output in ytab.c and ytab.h, and backup copies in 62case you overwrite them. We have also included a copy of 63proctab.c so you do not need to run maketab. 64 65NOTE: This version uses ANSI C, as you should also. We have 66compiled this without any changes using gcc -Wall and/or local C 67compilers on a variety of systems, but new systems or compilers 68may raise some new complaint; reports of difficulties are 69welcome. 70 71This also compiles with Visual C++ on Windows 95 and Windows NT, 72*if* you provide versions of popen and pclose. The file 73missing95.c contains versions that can be used to get started 74with, though the underlying support has mysterious properties, 75the symptom of which can be truncated pipe output. Beware. 76 77This is also said to compile on Macintosh systems, using the 78file "buildmac" provided by Dan Allen (danallen@microsoft.com), 79to whom many thanks. Dan also provided buildwin.bat, a simple 80script for compiling on NT if you prefer. 81 82The version of malloc that comes with some systems is sometimes 83astonishly slow. If awk seems slow, you might try fixing that. 84