/contrib/one-true-awk/README

https://bitbucket.org/freebsd/freebsd-head/ · #! · 94 lines · 80 code · 14 blank · 0 comment · 0 complexity · d735f05dfef6a2d340d292614b8b3bd2 MD5 · raw file

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