home *** CD-ROM | disk | FTP | other *** search
/ Programmer's ROM - The Computer Language Library / programmersrom.iso / ada / print / pretread.me < prev    next >
Encoding:
Text File  |  1988-05-03  |  4.5 KB  |  106 lines

  1.  
  2. To build the pretty printer tool:
  3.  
  4.  1. Compile all the abstractions into a program library (see READ.ME in
  5.     abstractions directory for details).
  6.  
  7.  2. Compile everything named in the PRETTY.CO file into the program library
  8.     containing the abstractions or a sublibrary whose parent library contains 
  9.     all the abstractions. PRETTY.CO lists file names in the correct compilation 
  10.     order.
  11.  
  12.  3. Link Pretty_Print_Driver with the program library where everything was 
  13.     compiled.  To do this using the DEC Ada compiler type:
  14.     $ acs link pretty_printer_driver
  15.  
  16. To run the tool on VMS:
  17.  
  18.  1. Define a logical symbol for the executable of PRETTY_PRINT.  For example,
  19.  
  20.     PRETTY_PRINT :== $DRB1:[NOSC.TOOLS.PRETTY]PRETTY.EXE
  21.  
  22.      NOTE: The full path name of the executable is required in the 
  23.      definition of the symbol.   The pathname given here is just an example
  24.      and will be different on your system.
  25.  
  26.  2. Enter the command with appropriate parameters.  For example,
  27.  
  28.     PRETTY_PRINT (SOURCE=>"test.ada", OUTPUT=>"test.out");
  29.  
  30.     Entering the command PRETTY_PRINT with no parameters gives a brief
  31.     description of how to use the tool.
  32.  
  33. Files contained in this directory:
  34.  
  35. PRETTY.CO   -- Compilation order for pretty printer sources
  36. PRETTY.EXE  -- VMS 4.0 pretty printer executable
  37.  
  38. The [.SOURCE] subdirectory contains most of the sources that make up the 
  39. pretty printer tool.  Other sources are contained in the abstractions
  40. directory.
  41.  
  42. Files in [.SOURCE]:
  43.  
  44.     Most of the sources for the parser which the pretty printer tool uses are 
  45.     in the abstractions directory. The four units which are unique to this tool
  46.     are as follows:
  47.  
  48.     PARSE.BDY    -- The body of the parser, with a call to the Put subprogram
  49.                     which outputs Tokens
  50.     APPLYACT.SUB -- A subunit of the parser which calls the action subprograms
  51.     GETNEXT.SUB  -- A subunit of the lexer which returns non-comment tokens
  52.                     to the lexer and buffers comments
  53.     GRMCONST.BDY -- Grammar constants for the parse tables
  54.     PTBLS.BDY    -- The parse tables.
  55.  
  56.     The other source files which make up the pretty printer are as follows:
  57.  
  58.     PPRDECLS.DAT -- Declarations for pretty printer
  59.     PPRUTILS.SPC -- Utilities for pretty printer, called from 
  60.                     Parser.Apply_Actions (specification)
  61.     PPRUTILS.BDY -- Utilities for pretty printer, called from 
  62.                     Parser.Apply_Actions (body)
  63.     CHANGE.SPC   -- Subprograms for the manipulation of source text 
  64.                     (specification)
  65.     CHANGE.BDY   -- Subprograms for the manipulation of source text (body)
  66.     PRETTY.SPC   -- Main procedure of pretty printer (specification) 
  67.     PRETTY.BDY   -- Main procedure of pretty printer (body)
  68.     DRIVER.ADA   -- Decodes command line and calls Pretty_Print
  69.  
  70. The [.TEST] subdirectory contains the tests used in testing the pretty printer.
  71. The ACVC A tests and the pretty printer sources were used in testing as well.
  72.  
  73. Files in [.TEST]:
  74.  
  75.     ALL.IN      -- Tests a variety of constructs
  76.     ANDTHEN.IN  -- Tests spacing of tokens for "and then" and "or else"
  77.     BINOP.IN    -- Tests binary vs. unary operators
  78.     BLANKS.IN   -- Tests that blanks in the source are printed
  79.     CLOSEID.IN  -- Tests that closing identifiers are printed out
  80.     COLON.IN    -- Tests that colons are lined up
  81.     COMMENT.IN  -- Tests handling off comments with formatting on and off
  82.     DEEPIF.IN   -- Tests nesting of very deep if statements
  83.     DELIM.IN    -- Tests basic vs. extended set delimiters
  84.     DEPTH.IN    -- Contains several levels of nested units to test the DEPTH 
  85.                    parameter
  86.     ERROR.IN    -- Tests handling of syntax errors
  87.     GENERIC.IN  -- Tests indentation of generic specifications
  88.     MULTIPLE.IN -- Tests multiple units in one file
  89.     TASK.IN     -- Tests task constructs
  90.  
  91. The [.DOC] subdirectory contains the documentation for the pretty printer.
  92.  
  93. Files in [.DOC]:
  94.  
  95.     USERMAN.MEM -- Pretty Printer user's manual
  96.     USERMAN.RNO -- Runoff input for user's manual
  97.     INSTALL.MEM -- Pretty Printer installation guide
  98.     INSTALL.RNO -- Runoff input for installation guide
  99.     RELEASE.NTS -- Release notes
  100.     PPRGRM.LIS  -- Listing of pretty printer grammar.  The rule numbers
  101.                    in this file may be used to make changes to the case
  102.                    statement in the Apply_Actions subunit.
  103.     PRETTY.CNT  -- Statement counts and line counts of pretty printer 
  104.                    source files
  105.  
  106.