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

  1.  
  2.  
  3.  
  4. PCCTS - The Purdue Compiler Construction Tool Set
  5.  
  6.  
  7.      PCCTS is a set of public domain software tools designed to facil-
  8. itate  the  implementation of compilers and other translation systems.
  9. These tools currently include antlr, dlg and support  code.   In  many
  10. ways,  PCCTS is similar to a highly integrated version of YACC [Joh78]
  11. and LEX [Les75]; where antlr (ANother Tool for  Language  Recognition)
  12. corresponds  to  YACC  and  dlg (DFA-based Lexical analyzer Generator)
  13. functions like LEX.  However, PCCTS has many additional features which
  14. make it easier to use for a wider range of translation problems.
  15.  
  16.      PCCTS grammars contain specifications for lexical  and  syntactic
  17. analysis,  intermediate-form  construction and error reporting.  Rules
  18. may employ Extended Backus Naur Form (EBNF) grammar constructs and may
  19. define  parameters,  return  values  and  local  variables.  Languages
  20. described in PCCTS are recognized via Strong LL(k) parsers constructed
  21. in  pure,  human-readable,  C  code.   As a result, standard debugging
  22. tools can be used to trace and debug PCCTS parsers.   Breakpoints  can
  23. be  set  so  that parser execution stops before or after grammar frag-
  24. ments of interest have been recognized.
  25.  
  26.      PCCTS grammars may contain predicates which allow parsing to be a
  27. function  of semantics as well as syntax - context-sensitive grammars.
  28. Backtracking can also be specified to recognized  non-LL(k)  and  non-
  29. LALR(k)  constructs.   In  addition,  PCCTS supports intermediate-form
  30. (such as expression-trees) construction via a flexible Abstract-Syntax
  31. Tree  (AST)  mechanism  which  allows  trees to be built explicitly or
  32. automatically.  The user explicitly creates trees via a LISP-like tree
  33. constructor  or  directs  the automatic tree construction facility via
  34. simple grammar directives.  AST nodes are user-defined  and  are  gen-
  35. erally a function of attributes.  A default transformation from attri-
  36. butes ($-variables) to AST nodes  can  be  specified.   Alternatively,
  37. each tree node can be defined explicitly via an AST node constructor.
  38.  
  39.  
  40.      PCCTS includes a number of different programs and examples in the
  41. software  release  package-most  of  which  like  to live in their own
  42. directories.  The install script will build a standard hierarchy.  The
  43. PCCTS  executables (antlr, dlg) may be placed anywhere the user wishes
  44. but the install script places them in the bin directory created during
  45. installation.
  46.  
  47.      To begin installation, the user should create a  directory  (usu-
  48. ally  called  pccts)  where the PCCTS source subtree is to be created.
  49. If you have the pccts.tar file, then simply place  it  into  the  sub-
  50. directory and untar with:
  51.  
  52. tar xvf pccts.tar
  53.  
  54. Then say "make".  If you have the pccts.bag as sent via email  by  our
  55. mail  server,  place  it and the install script into the subdirectory.
  56. To install PCCTS, simply type
  57.  
  58.  
  59.  
  60.  
  61.                                                                 Page 1
  62.  
  63.                                                                  PCCTS
  64.  
  65.  
  66. sh install
  67.  
  68. which will build the standard PCCTS  directory  hierarchy  (under  the
  69. directory  where  you  ran the install script), unbag all of the files
  70. and build executable versions of antlr and dlg.
  71.  
  72.      The examples associated with PCCTS have makefile variables called
  73. ANTLR,  DLG etc... which must be set according to your personal direc-
  74. tory structure before make'ing.  Some variables  point  to  the  PCCTS
  75. executables if the PATH environment variable does not include your bin
  76. directory.  Also, there are variables  that  point  to  PCCTS  include
  77. directories and must be changed if you deviate from the standard PCCTS
  78. installation hierarchy.  antlr and dlg can be built without executable
  79. versions of themselves (antlr and dlg are written in themselves).
  80.  
  81.  
  82.      A C program called genmk.c is available in the support  directory
  83. of the PCCTS release which has the following usage:
  84.  
  85. genmk project f1.g f2.g ... fn.g
  86.  
  87. It generates a makefile that creates an executable,  project,  from  a
  88. set of grammar files.  Typing make will create the executable once the
  89. makefile has been modified to indicate where the antlr and dlg execut-
  90. ables reside.
  91.  
  92.  
  93. dlg(1), antlr(1)
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.                                                                 Page 2
  124.  
  125.