home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pccts1.zip / README < prev    next >
Text File  |  1993-09-01  |  9KB  |  233 lines

  1.  
  2.                             Welcome to PCCTS 1.10
  3.  
  4.                                August 1993
  5.  
  6.  
  7.                   Purdue University Electrical Engineering
  8.  
  9.                                 Terence Parr
  10.                                  Will Cohen
  11.                                  Hank Dietz
  12.  
  13.  
  14.                                 INSTALLATION
  15.  
  16.      This document describes the installation of PCCTS 1.10 on UNIX
  17. and non-UNIX machines.  The UNIX installation is trivial while the
  18. non-UNIX folks have a bit more work to do as an install script
  19. explicitly for there machine will not exist--they will have to
  20. interpret the install script.
  21.  
  22.      PCCTS 1.10 includes a number of different programs and examples
  23. in the software release package -- most of which like to live in their
  24. own directories.  The install script will build a standard hierarchy.
  25. Or, if you get the tar file off the ftp site, the hierarchy will be
  26. constructed automatically by tar.
  27.  
  28.      The PCCTS executables (antlr, dlg) may be placed anywhere the user
  29. wishes but the install script places them in the bin directory created
  30. during installation.
  31.  
  32. 1.0.  UNIX USERS
  33.  
  34. This section is for UNIX users and describes the most convenient
  35. installation procedure.
  36.  
  37. 1.1.  FORMAT: pccts.tar
  38.  
  39. To begin installation, the user should create a directory (usually
  40. called pccts) where the PCCTS source subtree is to be created.  Place
  41. the pccts.tar file into this directory and cd into it.  To install
  42. PCCTS, simply type
  43.  
  44.      make
  45.  
  46. which will build the standard PCCTS directory hierarchy (under the
  47. directory where you ran the install script) and build executable
  48. versions of antlr and dlg.
  49.  
  50. 1.2.  FORMAT: pccts.bag
  51.  
  52.      To begin installation, the user should create a directory (usually
  53. called pccts) where the PCCTS source subtree is to be created.  Place
  54. the pccts.bag file and the install script into this directory and cd
  55. into it.  To install PCCTS, simply type
  56.  
  57.      sh install
  58.  
  59. which will build the standard PCCTS directory hierarchy (under the
  60. directory where you ran the install script), "unbag" all of the files
  61. and build executable versions of antlr and dlg.
  62.  
  63. 2.0.  NON-UNIX USERS
  64.  
  65.      ANTLR was written using portable (we hope), vanilla K&R-style C,
  66. ANSI C, and C++.  It has been successfully ported to a variety of
  67. environments (see the 1.10 release notes).  We do not provide an
  68. installation script explicitly for non-Unix users.  You must interpret
  69. the install script and perform the analogous operations on your
  70. machine.
  71.  
  72. IMPORTANT NOTE:  You must create the parser.dlg and "touch" scan.c in
  73.                  antlr and dlg directories or the makefiles will try to
  74.                  execute antlr and dlg, which don't exist yet.  The first
  75.                  time, you want only to compile the C files in order to
  76.                  obtain an executable for antlr and dlg.  From this point,
  77.                  a change in antlr.g or dlg_p.g will force antlr/dlg to
  78.                  regenerate themselves.
  79.  
  80. IMPORTANT NOTE:  See the notes about WORD SIZE below.  You MUST
  81.                  "#define PC" for the preprocessor so that the word size
  82.                  will be 16bits for int's IF you have a machine with
  83.                  this size; e.g. a IBM PC clone.  Our antlr and dlg
  84.                  makefiles take care of this for you if you live on
  85.                  a PC.
  86.  
  87.      For Mac programmers using MPW (Macintosh Programmer's Workshop),
  88. an "#ifdef MPW" is included to print error messages that can be
  89. "executed" to highlight the error location.  In other words, the line
  90. in the file where the error occured will be highlighted by hitting
  91. "enter" over the error message.  Add "-d MPW" to your list of compile
  92. flags.  See generic.h in antlr directory.
  93.  
  94. 3.0.  EMAIL VERSION RECIPIENTS
  95.  
  96.      If you received PCCTS via email response from
  97. pccts@ecn.purdue.edu you have one additional installation step to
  98. perform over the ftp folks (and pccts.tar is unavailable).  You will
  99. have received a number of bite-size chunks of pccts which are small
  100. enough to be emailed (~1500 lines each).  You must reconstruct the
  101. PCCTS files before you can begin installation.  In order to rebuild an
  102. original file, you must have "one.c" which will take the chunks and
  103. pack them together.  If you are a non-UNIX type, you must have the
  104. "unbag.c" file which unbags the bags created by our mail archiver.
  105. UNIX folks use the shell to unbag as they would for shar files (this
  106. will be done automatically by the install script).
  107.  
  108.      To install PCCTS, place all PCCTS mail messages into a pccts
  109. directory, remove the mail headers from one.c.  Then compile one.c
  110. with:
  111.  
  112.      cc -o one one.c
  113.  
  114. and then type:
  115.  
  116.      ./one f1 f2 ... fn
  117.  
  118. where f1..fn are the parts of PCCTS source sent as chunks (i.e. these
  119. files will be all the files you received NOT including one.c, unbag.c,
  120. README, install and the request acknowledge banner).  There is no need
  121. to remove mail headers from the chunk files and they may appear in any
  122. order.  The subject line of the mail will identify it as a chunk and a
  123. chunk of what file.  The "one" program should be used to put pccts.bag
  124. back together.  You are now in a position to begin normal PCCTS
  125. installation.  All files you receive should go into a pccts directory.
  126.  
  127.      Note that all files which arrive in "chunks" must be put back
  128. together using "one".  Beware that you do not mix chunks from more
  129. than one original file.  For instance, do not specify all chunks that
  130. you collect from the PCCTS mailbot on the "one" command line unless
  131. you have requested only one original file that was split into multiple
  132. files.  Each chunk knows which original file it is a part of, where it
  133. goes in that file and how many total chunks are required to rebuild
  134. that original.
  135.  
  136. 4.0.  WORD SIZE AND PC USERS
  137.  
  138.      PCCTS makefiles assume 32-bit integers.  If you have 16-bit
  139. integers, you must turn on preprocessor symbol PC to change wordsize
  140. definitions.  You can add another "#ifdef" for your machine or
  141. specific wordsize (see set.h in support/set and output.c in dlg) if
  142. your machine is really weird.  PC users may simple uncomment the
  143. appropriate section of the makefiles for their PC compiler and comment
  144. out the UNIX section.
  145.  
  146.                                 TUTORIAL
  147.  
  148.      The advanced tutorial should be placed in a directory at the
  149. same level as antlr, dlg, support etc...  Do a
  150.  
  151.      sh advtut.bag
  152.  
  153. to unbag (or use the unbag program) and then type
  154.  
  155.      make -s all
  156.  
  157. which will create executables called tut1-tut4.  Naturally, if you got
  158. the tutorials from the ftp site, the tar format of the tutorials can
  159. be obtained for easier installation.
  160.  
  161. Unfortunately, the tutorials have changed little since the 1.06
  162. release.  With luck, these will be enhanced and an AST tutorial will
  163. appear.
  164.  
  165.                               NEW FEATURES
  166.  
  167. The following is a list of the section headers in the file UPDATE110.txt:
  168.  
  169. 1.  Introduction
  170. 3.  Semantic Predicates
  171. 3.1.  Visible Semantic Predicates
  172. 3.2.  Context of Semantic Predicates
  173. 3.3.  Failure of predicates
  174. 3.  Infinite lookahead and Backtracking
  175. 3.1.  Examples
  176. 3.2.  Syntactic Predicates
  177. 3.2.1.  Syntactic Predicate Form
  178. 3.2.2.  Modified LL(k) Parsing Scheme
  179. 3.2.3.  Syntactic Predicate Placement
  180. 3.2.4.  Nested Syntactic Predicate Invocation
  181. 3.2.5.  Grammar Fragments within Syntactic Predicates
  182. 3.2.6.  Efficiency
  183. 3.2.7.  Resolving Ambiguous C++ Statements
  184. 3.2.8.  Revisiting the ML Example
  185. 3.2.9.  Syntactic Predicates Effect on Grammar Analysis
  186. 3.2.10.  The Effect of Nondeterminism upon Translation and Semantic Predicates
  187. 3.2.10.1.  The Effect upon User Actions
  188. 3.2.10.2.  The Effect upon Semantic Predicates
  189. 3.2.11.  Comparing the Use of Semantic and Syntactic Predicates
  190. 3.2.12.  Implementation
  191. 4.  DLG Enhancements
  192. 5.  Linear-Approximation Lookahead
  193. 6.  Faster Compilation of ANTLR-Generated Parsers
  194. 7.  Linking Together Multiple ANTLR Parsers
  195. 8.  Creating Customized Syntax Error Routines
  196. 9.  Lexical Changes to ANTLR Input
  197. 10.  New ANTLR Options
  198. 11.  ANTLR Generates "Androgynous" Code
  199. 12.  Printing out grammars
  200. 13.  C Grammar Changes
  201. 14.  C++ Now Compiles ANTLR Itself
  202. 15.  New Preprocessor Symbol
  203. 16.  Attribute Warning
  204. 17.  Incompatibilities
  205. 18.  Portability
  206.  
  207.  
  208.                          MACHINE COMPATIBILITY
  209.  
  210. PCCTS 1.10 is known to compile "out of the box" on the following
  211. machines and/or operating systems:
  212.  
  213. o  DECSTATION 5000
  214.  
  215. o  SGI, Running IRIX 4.0.5
  216.  
  217. o  Sun SparcStation (cc, gcc, g++, Cfront)
  218.  
  219. o  DOS and OS/2, Microsft C 6.0, 16 bit
  220.  
  221. o  DOS and OS/2, Borland C/C++, 16 bit
  222.  
  223. o  OS/2, IBM C-Set/2, 32 bit
  224.  
  225. o  VAX C under VMS
  226.  
  227. o  Linux SLS 0.99, gcc/g++
  228.  
  229.  
  230.                            INCOMPATIBILITIES
  231.  
  232.      Please see the release notes.
  233.