home *** CD-ROM | disk | FTP | other *** search
/ Programmer's ROM - The Computer Language Library / programmersrom.iso / ada / print / pret.doc < prev    next >
Encoding:
Text File  |  1988-05-03  |  71.8 KB  |  2,431 lines

  1. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  2. --read.me
  3. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  4.  
  5. To build the pretty printer tool:
  6.  
  7.  1. Compile all the abstractions into a program library (see READ.ME in
  8.     abstractions directory for details).
  9.  
  10.  2. Compile everything named in the PRETTY.CO file into the program library
  11.     containing the abstractions or a sublibrary whose parent library contains 
  12.     all the abstractions. PRETTY.CO lists file names in the correct compilation 
  13.     order.
  14.  
  15.  3. Link Pretty_Print_Driver with the program library where everything was 
  16.     compiled.  To do this using the DEC Ada compiler type:
  17.     $ acs link pretty_printer_driver
  18.  
  19. To run the tool on VMS:
  20.  
  21.  1. Define a logical symbol for the executable of PRETTY_PRINT.  For example,
  22.  
  23.     PRETTY_PRINT :== $DRB1:[NOSC.TOOLS.PRETTY]PRETTY.EXE
  24.  
  25.      NOTE: The full path name of the executable is required in the 
  26.      definition of the symbol.   The pathname given here is just an example
  27.      and will be different on your system.
  28.  
  29.  2. Enter the command with appropriate parameters.  For example,
  30.  
  31.     PRETTY_PRINT (SOURCE=>"test.ada", OUTPUT=>"test.out");
  32.  
  33.     Entering the command PRETTY_PRINT with no parameters gives a brief
  34.     description of how to use the tool.
  35.  
  36. Files contained in this directory:
  37.  
  38. PRETTY.CO   -- Compilation order for pretty printer sources
  39. PRETTY.EXE  -- VMS 4.0 pretty printer executable
  40.  
  41. The [.SOURCE] subdirectory contains most of the sources that make up the 
  42. pretty printer tool.  Other sources are contained in the abstractions
  43. directory.
  44.  
  45. Files in [.SOURCE]:
  46.  
  47.     Most of the sources for the parser which the pretty printer tool uses are 
  48.     in the abstractions directory. The four units which are unique to this tool
  49.     are as follows:
  50.  
  51.     PARSE.BDY    -- The body of the parser, with a call to the Put subprogram
  52.                     which outputs Tokens
  53.     APPLYACT.SUB -- A subunit of the parser which calls the action subprograms
  54.     GETNEXT.SUB  -- A subunit of the lexer which returns non-comment tokens
  55.                     to the lexer and buffers comments
  56.     GRMCONST.BDY -- Grammar constants for the parse tables
  57.     PTBLS.BDY    -- The parse tables.
  58.  
  59.     The other source files which make up the pretty printer are as follows:
  60.  
  61.     PPRDECLS.DAT -- Declarations for pretty printer
  62.     PPRUTILS.SPC -- Utilities for pretty printer, called from 
  63.                     Parser.Apply_Actions (specification)
  64.     PPRUTILS.BDY -- Utilities for pretty printer, called from 
  65.                     Parser.Apply_Actions (body)
  66.     CHANGE.SPC   -- Subprograms for the manipulation of source text 
  67.                     (specification)
  68.     CHANGE.BDY   -- Subprograms for the manipulation of source text (body)
  69.     PRETTY.SPC   -- Main procedure of pretty printer (specification) 
  70.     PRETTY.BDY   -- Main procedure of pretty printer (body)
  71.     DRIVER.ADA   -- Decodes command line and calls Pretty_Print
  72.  
  73. The [.TEST] subdirectory contains the tests used in testing the pretty printer.
  74. The ACVC A tests and the pretty printer sources were used in testing as well.
  75.  
  76. Files in [.TEST]:
  77.  
  78.     ALL.IN      -- Tests a variety of constructs
  79.     ANDTHEN.IN  -- Tests spacing of tokens for "and then" and "or else"
  80.     BINOP.IN    -- Tests binary vs. unary operators
  81.     BLANKS.IN   -- Tests that blanks in the source are printed
  82.     CLOSEID.IN  -- Tests that closing identifiers are printed out
  83.     COLON.IN    -- Tests that colons are lined up
  84.     COMMENT.IN  -- Tests handling off comments with formatting on and off
  85.     DEEPIF.IN   -- Tests nesting of very deep if statements
  86.     DELIM.IN    -- Tests basic vs. extended set delimiters
  87.     DEPTH.IN    -- Contains several levels of nested units to test the DEPTH 
  88.                    parameter
  89.     ERROR.IN    -- Tests handling of syntax errors
  90.     GENERIC.IN  -- Tests indentation of generic specifications
  91.     MULTIPLE.IN -- Tests multiple units in one file
  92.     TASK.IN     -- Tests task constructs
  93.  
  94. The [.DOC] subdirectory contains the documentation for the pretty printer.
  95.  
  96. Files in [.DOC]:
  97.  
  98.     USERMAN.MEM -- Pretty Printer user's manual
  99.     USERMAN.RNO -- Runoff input for user's manual
  100.     INSTALL.MEM -- Pretty Printer installation guide
  101.     INSTALL.RNO -- Runoff input for installation guide
  102.     RELEASE.NTS -- Release notes
  103.     PPRGRM.LIS  -- Listing of pretty printer grammar.  The rule numbers
  104.                    in this file may be used to make changes to the case
  105.                    statement in the Apply_Actions subunit.
  106.     PRETTY.CNT  -- Statement counts and line counts of pretty printer 
  107.                    source files
  108. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  109. --userman.mem
  110. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  111.  
  112.  
  113.  
  114.    ______ _______ ______ ______
  115. 1  PRETTY PRINTER USER'S MANUAL
  116.  
  117.  
  118.      ____________
  119. 1.1  Introduction
  120.  
  121.  
  122.      The pretty printer formats and prints the contents  of  a  source
  123.  
  124. file  according  to Ada Language Reference Manual (LRM) conventions as
  125.  
  126. the  default,  or  to   installation-specified   conventions.    These
  127.  
  128. conventions are described in detail in the Description section of this
  129.  
  130. manual.
  131.  
  132.  
  133.  
  134.  
  135.      _______ ______
  136. 1.2  Command Format
  137.  
  138.  
  139.      The command line call to the pretty  printer  should  follow  Ada
  140.  
  141. language  rules for procedure calls.  The parameters must therefore be
  142.  
  143. a correct combination of positional and named associations.  The typed
  144.  
  145. command  is  echoed  to  the  standard  error file before the input is
  146.  
  147. formatted, showing all parameters as named associations.
  148.  
  149.  
  150.      The specification for the command format is  shown  below.   This
  151.  
  152. specification  is  also  written  to  the standard error file when the
  153.  
  154. command with no parameters is entered.
  155.  
  156.  
  157. -- PRETTY_PRINT: Formats an Ada source file
  158.  
  159.  
  160. type SWITCH is (ON, OFF);
  161.  
  162. type DEPTH_RANGE is NATURAL RANGE 0 .. 1000;
  163.  
  164.  
  165. procedure PRETTY_PRINT (SOURCE      : STRING;
  166.  
  167.                         OUTPUT      : STRING := "";
  168.  
  169.                         COMMENTS    : SWITCH := ON;
  170.  
  171.                         PAGINATE    : SWITCH := OFF;
  172.  
  173.                         DEPTH       : DEPTH_RANGE := 0);
  174.  
  175.  
  176. -- SOURCE specifies the file to be pretty printed
  177.  
  178. -- OUTPUT specifies the result file (default is standard output)
  179.  
  180. -- COMMENTS indicates whether or not to do comment formatting
  181.  
  182. -- PAGINATE indicates whether or not to paginate the output
  183.  
  184. -- DEPTH indicates the depth of the scope of pretty printing
  185.  
  186.                                                                 Page 2
  187.  
  188.  
  189.  
  190.      ___________
  191. 1.3  Description
  192.  
  193.  
  194.      The pretty printer formats and prints the contents  of  a  source
  195.  
  196. file  according  to Ada Language Reference Manual (LRM) conventions as
  197.  
  198. the  default,  or  to  installation-specified  conventions.   See  the
  199.  
  200. installation guide for details on how to install different conventions
  201.  
  202. (i.e.capitalize identifiers instead of  printing  them  in  uppercase)
  203.  
  204. either  on  a  "per-user"  or "per-installation" level.  Note that the
  205.  
  206. items listed below refer to the default  (LRM-style)  formatting,  and
  207.  
  208. may   not  apply  if  the  pretty  printer  is  installed  with  other
  209.  
  210. conventions.
  211.  
  212.  
  213.      Colons are lined up vertically.
  214.  
  215.  
  216.      Indentation of all constructs is done as in the LRM.
  217.  
  218.  
  219.      Identifiers  and  keywords  are  printed  as  in  the  LRM  (i.e.
  220.  
  221.      keywords   are  bold  printed  and  identifiers  are  printed  in
  222.  
  223.      uppercase) Note that nothing is bold printed  when  PAGINATE=>OFF
  224.  
  225.      (the default) is specified.  See explanation below.
  226.  
  227.  
  228.      Parameter modes (in, out, or in out) are always printed, even  if
  229.  
  230.      default values were used in the source.
  231.  
  232.  
  233.      Closing identifiers (eg.  end SQRT;) are always printed, even  if
  234.  
  235.      they defaulted in the source.
  236.  
  237.  
  238.      Comment formatting is done if COMMENTS=>ON is  specified  on  the
  239.  
  240.      command line:
  241.  
  242.  
  243.           Blank  lines  between  a  declaration  and  the  descriptive
  244.  
  245.           comment following it are removed.
  246.  
  247.  
  248.           Blank lines  between  comments  and  the  action  statements
  249.  
  250.           directly following them are removed.
  251.  
  252.  
  253.           Comments are indented to the same level as the source text.
  254.  
  255.  
  256.      Output defaults to  standard  output.   An  output  file  may  be
  257.  
  258.      specified  with  the  OUTPUT  parameter.   Error messages and the
  259.  
  260.      echoed command are written to the standard error file.
  261.  
  262.  
  263.      Output is paginated if PAGINATE=>ON is specified on  the  command
  264.  
  265.      line.   If  the  output is paginated, a header and page number is
  266.  
  267.      written on each page and page breaks are inserted.  If the output
  268.  
  269.      is   not   paginated   (either   by   default  or  by  specifying
  270.  
  271.      PAGINATE=>OFF on the command line), it is  valid  as  Ada  source
  272.  
  273.      which  may  be  compiled.  Note that nothing will be bold printed
  274.  
  275.      when PAGINATE=>OFF is specified,  in  order  to  avoid  inserting
  276.  
  277.      control characters into the file.
  278.  
  279.  
  280.      Delimiters are printed using the extended  (",  #,  |)  character
  281.  
  282.      set.
  283.  
  284.  
  285.      The DEPTH parameter  specifies  what  the  scope  of  the  pretty
  286.  
  287.                                                                 Page 3
  288.  
  289.  
  290.  
  291.      printed  output  should  be.  For example, specifying DEPTH=>1 on
  292.  
  293.      the  command  line  would  result  in  output  showing  only  the
  294.  
  295.      outermost  view  of  the  source.  The portions of text not being
  296.  
  297.      printed are replaced by a  placeholder  in  angle  brackets.   If
  298.  
  299.      DEPTH is 0 (the default) then everything is pretty printed.
  300.  
  301.                                                                 Page 4
  302.  
  303.  
  304.  
  305.      ________
  306. 1.4  Examples
  307.  
  308.  
  309. To format the contents of a source file called MATHUTILS.ADA with  the
  310.  
  311. default  output,  default  comment  formatting  and no pagination, the
  312.  
  313. following command would be issued:
  314.  
  315.  
  316.     PRETTY_PRINT("MATHUTILS.ADA");
  317.  
  318.  
  319. To format the contents of MATHUTILS.ADA, put  the  output  in  a  file
  320.  
  321. called  MATHUTILS.OUT,  and paginate the output, the following command
  322.  
  323. would be issued:
  324.  
  325.  
  326.     PRETTY_PRINT("MATHUTILS.ADA", "MATHUTILS.OUT", PAGINATE=>ON);
  327.  
  328.  
  329. Note that the following command accomplishes the same purpose:
  330.  
  331.  
  332.     PRETTY_PRINT(SOURCE=>"MATHUTILS.ADA",OUTPUT=>"MATHUTILS.OUT",PAGINATE=>ON);
  333.  
  334.  
  335. To get a brief help message, the following command would be issued:
  336.  
  337.  
  338.     PRETTY_PRINT;
  339.  
  340. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  341. --userman.rno
  342. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  343. .HEADER LEVEL 1 ^&Pretty Printer User's Manual\&
  344. .HEADER LEVEL 2 ^&Introduction\&
  345. .PARAGRAPH
  346. The pretty printer formats and prints the contents of a source file
  347. according to Ada Language Reference Manual (LRM) conventions as the default,
  348. or to installation-specified conventions.  These conventions are described in
  349. detail in the Description section of this manual.
  350. .HEADER LEVEL 2 ^&Command Format\&
  351. .PARAGRAPH
  352. The command line call to the pretty printer should follow Ada language rules
  353. for procedure calls.  The parameters must therefore be a correct combination
  354. of positional and named associations.  The typed command is echoed to the
  355. standard error file before the input is formatted, showing
  356. all parameters as named associations.
  357. .PARAGRAPH
  358. The specification for the command format is shown below.  This specification
  359. is also written to the standard error file when the command with no parameters
  360. is entered.  
  361. .BLANK
  362. .LITERAL
  363. -- PRETTY_PRINT: Formats an Ada source file
  364.  
  365. type SWITCH is (ON, OFF);
  366. type DEPTH_RANGE is NATURAL RANGE 0 .. 1000;
  367.  
  368. procedure PRETTY_PRINT (SOURCE      : STRING;
  369.                         OUTPUT      : STRING := "";
  370.                         COMMENTS    : SWITCH := ON;
  371.                         PAGINATE    : SWITCH := OFF;
  372.                         DEPTH       : DEPTH_RANGE := 0);
  373.  
  374. -- SOURCE specifies the file to be pretty printed
  375. -- OUTPUT specifies the result file (default is standard output)
  376. -- COMMENTS indicates whether or not to do comment formatting
  377. -- PAGINATE indicates whether or not to paginate the output
  378. -- DEPTH indicates the depth of the scope of pretty printing
  379. .END LITERAL
  380. .PAGE
  381. .HEADER LEVEL 2 ^&Description\&
  382. .PARAGRAPH
  383. The pretty printer formats and prints the contents of a source file
  384. according to Ada Language Reference Manual (LRM) conventions as the default,
  385. or to installation-specified conventions.  See the installation guide for
  386. details on how to install different conventions (i.e.capitalize identifiers 
  387. instead of printing them in uppercase)
  388. either on a "per-user" or "per-installation" level.
  389. Note that the items listed below 
  390. refer to the default (LRM-style) formatting, and may not apply if the
  391. pretty printer is installed with other conventions.
  392. .LEFT MARGIN 5
  393. .BLANK
  394. Colons are lined up vertically.
  395. .BLANK
  396. Indentation of all constructs is done as in the LRM.
  397. .BLANK
  398. Identifiers and keywords are printed as in the LRM (i.e. keywords are bold
  399. printed and identifiers are printed in uppercase)  Note that nothing is
  400. bold printed when PAGINATE=>OFF (the default) is specified.  See explanation
  401. below.
  402. .BLANK
  403. Parameter modes (in, out, or in out) are always printed, even if default values
  404. were used in the source.
  405. .BLANK
  406. Closing identifiers (eg. end SQRT;) are always printed, even if they defaulted
  407. in the source.
  408. .BLANK
  409. Comment formatting is done if COMMENTS=>ON is specified on the command line:
  410. .LEFT MARGIN 10
  411. .BLANK
  412. Blank lines between a declaration and the descriptive comment following
  413. it are removed.
  414. .BLANK
  415. Blank lines between comments and the action statements directly following
  416. them are removed.
  417. .BLANK
  418. Comments are indented to the same level as the source text.
  419. .LEFT MARGIN 5
  420. .BLANK
  421. Output defaults to standard output.  An output file may be specified
  422. with the OUTPUT parameter.  Error messages and the echoed command are
  423. written to the standard error file.
  424. .BLANK
  425. Output is paginated if PAGINATE=>ON is specified on the command line.
  426. If the output is paginated, a header and page number is written on each
  427. page and page breaks are inserted.  If the output is not paginated
  428. (either by default or by specifying PAGINATE=>OFF on the command line), 
  429. it is valid as Ada source which may be compiled.  
  430. Note that nothing will be bold printed when PAGINATE=>OFF is specified,
  431. in order to avoid inserting control characters into the file.
  432. .BLANK
  433. Delimiters are printed using the extended (", _#, |) character set.
  434. .BLANK
  435. The DEPTH parameter specifies what the scope of the pretty printed output 
  436. should be.  For example, specifying DEPTH=>1 on the command line would
  437. result in output showing only the outermost view of the source.
  438. The portions of text not being printed are replaced by a placeholder in
  439. angle brackets.  If DEPTH is 0 (the default) then everything is pretty printed.
  440. .LEFT MARGIN 0
  441. .PAGE
  442. .HEADER LEVEL 2 ^&Examples\&
  443. To format the contents of a source file called MATHUTILS.ADA with the
  444. default output, default comment formatting and no pagination, the
  445. following command would be issued:
  446. .BLANK
  447. .LITERAL
  448.     PRETTY_PRINT("MATHUTILS.ADA");
  449. .END LITERAL
  450. .BLANK
  451. To format the contents of MATHUTILS.ADA, put the output in a file called
  452. MATHUTILS.OUT, and paginate the output, the following command would be
  453. issued:
  454. .BLANK
  455. .LITERAL
  456.     PRETTY_PRINT("MATHUTILS.ADA", "MATHUTILS.OUT", PAGINATE=>ON);
  457. .END LITERAL
  458. .BLANK
  459. Note that the following command accomplishes the same purpose:
  460. .BLANK
  461. .LITERAL
  462.     PRETTY_PRINT(SOURCE=>"MATHUTILS.ADA",OUTPUT=>"MATHUTILS.OUT",PAGINATE=>ON);
  463. .END LITERAL
  464. .BLANK
  465. To get a brief help message, the following command would be issued:
  466. .BLANK
  467. .LITERAL
  468.     PRETTY_PRINT;
  469. .END LITERAL
  470. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  471. --install.mem
  472. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  473.  
  474.  
  475.  
  476.    ______ _______ ____________ _____
  477. 1  PRETTY PRINTER INSTALLATION GUIDE
  478.  
  479.  
  480.      __________ ____ ___________ _____ ____ ___
  481. 1.1  Installing With Conventions Other Than LRM
  482.  
  483.  
  484.      The  package  Pretty_Printer_Declarations  isolates  all  of  the
  485.  
  486. values  which  "parameterize"  the pretty printer.  In order to change
  487.  
  488. the pretty printing  conventions  for  a  specific  installation,  the
  489.  
  490. values  should  be changed in this package.  It is also possible for a
  491.  
  492. user to modify the driver for the pretty printer in order  to  install
  493.  
  494. his own conventions which override the defaults given on installation.
  495.  
  496. This type of modification is described in section 1.2.
  497.  
  498.  
  499.      After      installing      the      changes      to       package
  500.  
  501. Pretty_Printer_Declarations, the tool must be recompiled and relinked,
  502.  
  503. since many of the units depend on this package.
  504.  
  505.  
  506.      The following objects in package Pretty_Printer_Declarations  may
  507.  
  508. be modified to change the pretty printing conventions.
  509.  
  510.  
  511.  
  512.      Delimiters          Extended or Basic character set
  513.  
  514.  
  515.      Page_Width          Column width of output page
  516.  
  517.  
  518.      RH_Margin           Right hand margin, beyond which no
  519.  
  520.                          indentation is performed
  521.  
  522.  
  523.      Indentation_Level   Level of indentation
  524.  
  525.  
  526.      Depth               Default depth of pretty printing, which can
  527.  
  528.                          be overriden on command line
  529.  
  530.  
  531.      Keyword             Case of keyword
  532.  
  533.  
  534.      Identifier          Case of identifier
  535.  
  536.  
  537.      Comment_Formatting  Enables or disables comment formatting as the
  538.  
  539.                          default,  which  can  be  overriden  on   the
  540.  
  541.                          command line
  542.  
  543.  
  544.      Colon_Alignment     Enables or disables colon alignment
  545.  
  546.  
  547.      Explicit_Param_Mode Enables or disables "in" to be inserted in
  548.  
  549.                          "in" parameter declarations
  550.  
  551.  
  552.      Closing_Identifiers Enables or disables whether closing
  553.  
  554.                          identifiers and  designators  which  did  not
  555.  
  556.                          appear in the source are inserted
  557.  
  558.  
  559.      Paginated_Format    Enables or disables pagination as the
  560.  
  561.                          default,  which  can  be  overriden  on   the
  562.  
  563.                          command line
  564.  
  565.  
  566.      Spacing_Table       The spacing table contains entries which
  567.  
  568.                          determine the spacing of each type of  token.
  569.  
  570.                                                                 Page 2
  571.  
  572.  
  573.  
  574.                          These entries should probably not be changed,
  575.  
  576.                          as many of the tokens are  context  dependent
  577.  
  578.                          and  additional  spacing  in  added  in  unit
  579.  
  580.                          Pretty_Printer_Utilities.Spaced_Token   given
  581.  
  582.                          the  context.   Tokens  which  are handled in
  583.  
  584.                          unit    Pretty_Printer_Utilities.Spaced_Token
  585.  
  586.                          are commented as such in the table.
  587.  
  588.  
  589.  
  590.  
  591.           ________ _ ______ ____ _____________ ___________
  592.      1.2  Creating A Driver With User-Specific Conventions
  593.  
  594.  
  595.           It is possible that a user may wish to run a pretty  printer
  596.  
  597.      with  his  own  pretty printing conventions which differ from the
  598.  
  599.      installation conventions.  This can be accomplished by  modifying
  600.  
  601.      just    the    driver   for   the   pretty   printer   (in   unit
  602.  
  603.      Pretty_Print_Driver)   to   set   the   variables   in    package
  604.  
  605.      Pretty_Printer_Declarations.   For example, if the user wishes to
  606.  
  607.      have all identifiers capitalized, he may  include  the  following
  608.  
  609.      line as the first line of his copy of Pretty_Print_Driver:
  610.  
  611.  
  612.          Pretty_Printer_Declarations.Identifier :=
  613.  
  614.              Pretty_Printer_Declarations.Capitalize1;
  615.  
  616.  
  617.      All modifications of this sort should appear as the  first  lines
  618.  
  619.      of  the  driver,  before  the working values are initialized from
  620.  
  621.      package Pretty_Printer_Declarations.  The list of  objects  which
  622.  
  623.      may  be  modified in package Pretty_Printer_Declarations may also
  624.  
  625.      be used as the list of objects which may be  modified  in  driver
  626.  
  627.      Pretty_Print_Driver.  The types for these objects may be obtained
  628.  
  629.      by looking at package Pretty_Printer_Declarations.
  630.  
  631.  
  632.           Unlike    the    recompilation    in    the    change     to
  633.  
  634.      Pretty_Printer_Declarations,  only  Pretty_Print_Driver  must  be
  635.  
  636.      recompiled for  a  user-specific  modification.   Note  that  the
  637.  
  638.      program  library  containing  this driver must be a sublibrary of
  639.  
  640.      the pretty printer library, however.
  641.  
  642. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  643. --install.rno
  644. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  645. .HEADER LEVEL 1 ^&Pretty Printer Installation Guide\&
  646. .HEADER LEVEL 2 ^&Installing with Conventions Other than LRM\&
  647. .PARAGRAPH
  648. The package Pretty__Printer__Declarations isolates all of the values which
  649. "parameterize" the pretty printer.  In order to change the pretty printing
  650. conventions for a specific installation, the values should be changed in
  651. this package.  It is also possible for a user to modify the driver for the
  652. pretty printer in order to install his own conventions which override the
  653. defaults given on installation.  This type of modification is described 
  654. in section 1.2.
  655. .PARAGRAPH
  656. After installing the changes to package Pretty__Printer__Declarations,
  657. the tool must be recompiled and relinked, since many of the units depend on
  658. this package.
  659. .PARAGRAPH
  660. The following objects in package Pretty__Printer__Declarations may be
  661. modified to change the pretty printing conventions.
  662. .BLANK
  663. .LEFT MARGIN 5
  664. .TAB STOP 25
  665. .BLANK
  666. Delimiters    Extended or Basic character set
  667. .BLANK
  668. Page__Width    Column width of output page
  669. .BLANK
  670. RH__Margin    Right hand margin, beyond which no 
  671. .LEFT MARGIN 25
  672. indentation is performed
  673. .LEFT MARGIN 5
  674. .BLANK
  675. Indentation__Level    Level of indentation
  676. .BLANK
  677. Depth    Default depth of pretty printing, which can 
  678. .LEFT MARGIN 25
  679. be overriden on command line
  680. .LEFT MARGIN 5
  681. .BLANK
  682. Keyword    Case of keyword
  683. .BLANK
  684. Identifier    Case of identifier
  685. .BLANK
  686. Comment__Formatting    Enables or disables comment formatting as the 
  687. .LEFT MARGIN 25
  688. default, which can be overriden on the command line
  689. .LEFT MARGIN 5
  690. .BLANK
  691. Colon__Alignment    Enables or disables colon alignment
  692. .BLANK
  693. Explicit__Param__Mode    Enables or disables "in" to be inserted in
  694. .LEFT MARGIN 25
  695. "in" parameter declarations
  696. .LEFT MARGIN 5
  697. .BLANK
  698. Closing__Identifiers    Enables or disables whether closing 
  699. .LEFT MARGIN 25
  700. identifiers and designators which did not appear in the source are inserted
  701. .LEFT MARGIN 5
  702. .BLANK
  703. Paginated__Format    Enables or disables pagination as the 
  704. .LEFT MARGIN 25
  705. default, which can be overriden on the command line
  706. .LEFT MARGIN 5
  707. .BLANK
  708. Spacing__Table    The spacing table contains entries which 
  709. .LEFT MARGIN 25
  710. determine the spacing
  711. of each type of token.  These entries should probably not be changed, as many
  712. of the tokens are context dependent and additional spacing in added in
  713. unit Pretty__Printer__Utilities.Spaced__Token given the context.  Tokens which
  714. are handled in unit Pretty__Printer__Utilities.Spaced__Token are commented as
  715. such in the table.
  716. .LEFT MARGIN 5
  717. .HEADER LEVEL 2 ^&Creating a Driver with User-Specific Conventions\&
  718. .PARAGRAPH
  719. It is possible that a user may wish to run a pretty printer with his own pretty
  720. printing conventions which differ from the installation conventions.  This can
  721. be accomplished by modifying just the driver for the pretty printer (in unit
  722. Pretty__Print__Driver)  to set the variables in package 
  723. Pretty__Printer__Declarations.  For example, if the user wishes to have all
  724. identifiers capitalized, he may include the following line as the first
  725. line of his copy of Pretty__Print__Driver:
  726. .BLANK
  727. .LITERAL
  728.     Pretty_Printer_Declarations.Identifier :=
  729.         Pretty_Printer_Declarations.Capitalize1;
  730. .END LITERAL
  731. .BLANK
  732. All modifications of this sort should appear as the first lines of the driver,
  733. before the working values are initialized from package 
  734. Pretty__Printer__Declarations.
  735. The list of objects which may be modified in package 
  736. Pretty__Printer__Declarations may also be used as the list of objects which may
  737. be modified in driver Pretty__Print__Driver.  The types for these objects may
  738. be obtained by looking at package Pretty__Printer__Declarations.
  739. .PARAGRAPH
  740. Unlike the recompilation in the change to Pretty__Printer__Declarations, only 
  741. Pretty__Print__Driver must be recompiled for a user-specific modification.  
  742. Note that the program library containing this driver must be a sublibrary 
  743. of the pretty printer library, however.
  744. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  745. --release.nts
  746. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  747. This is the first release of the Pretty Printer.
  748. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  749. --pprgrm.lis
  750. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  751. Options in Effect
  752.      
  753.  DEFAULT
  754.  ACTIONS
  755.  DEFMARK = %
  756.  ORMARK = |
  757.  BLOCKB = /.
  758.  BLOCKE = ./
  759.  COMMB = --
  760.  COMME =
  761.  LOADF =   70
  762. Grammar Constants
  763.      
  764.  Number of Terminals   94
  765.  Number of Non Terminals  266
  766.  Number of Rules  521
  767.  Number of Items 1726
  768.  Number of states  996
  769.  Number of shift entries 1540
  770.  Number of goto entries 2249
  771.  Number of reduce entries  204
  772.  Number of entries saved by default reductions 6336
  773.  Number of shift/reduce conflicts    0
  774.  Number of reduce/reduce conflicts    0
  775. The following symbols are not used in any right hand side
  776.      
  777.  comment_literal
  778.  
  779.  Terminalss
  780.      
  781.  ABORT
  782.  ABS
  783.  ACCEPT
  784.  ACCESS
  785.  ALL
  786.  AND
  787.  ARRAY
  788.  AT
  789.  BEGIN
  790.  BODY
  791.  CASE
  792.  CONSTANT
  793.  DECLARE
  794.  DELAY
  795.  DELTA
  796.  DIGITS
  797.  DO
  798.  ELSE
  799.  ELSIF
  800.  END
  801.  ENTRY
  802.  EXCEPTION
  803.  EXIT
  804.  FOR
  805.  FUNCTION
  806.  GENERIC
  807.  GOTO
  808.  IF
  809.  IN
  810.  IS
  811.  LIMITED
  812.  LOOP
  813.  MOD
  814.  NEW
  815.  NOT
  816.  NULL
  817.  OF
  818.  OR
  819.  OTHERS
  820.  OUT
  821.  PACKAGE
  822.  PRAGMA
  823.  PRIVATE
  824.  PROCEDURE
  825.  RAISE
  826.  RANGE
  827.  RECORD
  828.  REM
  829.  RENAMES
  830.  RETURN
  831.  REVERSE
  832.  SELECT
  833.  SEPARATE
  834.  SUBTYPE
  835.  TASK
  836.  TERMINATE
  837.  THEN
  838.  TYPE
  839.  USE
  840.  WHEN
  841.  WHILE
  842.  WITH
  843.  XOR
  844.  identifier
  845.  numeric_literal
  846.  string_literal
  847.  character_literal
  848.  &
  849.  '
  850.  (
  851.  )
  852.  *
  853.  +
  854.  ,
  855.  -
  856.  .
  857.  /
  858.  :
  859.  ;
  860.  <
  861.  =
  862.  >
  863.  '|'
  864.  =>
  865.  ..
  866.  **
  867.  :=
  868.  /=
  869.  >=
  870.  <=
  871.  <<
  872.  >>
  873.  <>
  874.  comment_literal
  875.  
  876.  Rules
  877.      
  878.     1 pragma ::= PRAGMA identifier ( general_component_associations ) ;
  879.      
  880.     2 pragma ::= PRAGMA identifier ;
  881.      
  882.     3 basic_declaration ::= type_declaration
  883.      
  884.     4 basic_declaration ::= subtype_declaration
  885.      
  886.     5 basic_declaration ::= subprogram_declaration
  887.      
  888.     6 basic_declaration ::= package_declaration
  889.      
  890.     7 basic_declaration ::= task_specification
  891.      
  892.     8 basic_declaration ::= generic_specification
  893.      
  894.     9 basic_declaration ::= generic_instantiation
  895.      
  896.    10 basic_declaration ::= renaming_declaration
  897.      
  898.    11 basic_colon_declaration ::= object_declaration
  899.      
  900.    12 basic_colon_declaration ::= number_declaration
  901.      
  902.    13 basic_colon_declaration ::= exception_declaration
  903.      
  904.    14 basic_colon_declaration ::= renaming_colon_declaration
  905.      
  906.    15 object_declaration ::= identifier_list : subtype_indication [:=expression]
  907.      
  908.       ;
  909.      
  910.    16 object_declaration ::= identifier_list : CONSTANT subtype_indication
  911.       [:=expression] ;
  912.      
  913.    17 object_declaration ::= identifier_list : constrained_array_definition
  914.       [:=expression] ;
  915.      
  916.    18 object_declaration ::= identifier_list : CONSTANT
  917.       constrained_array_definition [:=expression] ;
  918.      
  919.    19 number_declaration ::= identifier_list : CONSTANT := expression ;
  920.      
  921.    20 identifier_list ::= identifier {,identifier}
  922.      
  923.    21 type_declaration ::= full_type_declaration
  924.      
  925.    22 type_declaration ::= incomplete_type_declaration
  926.      
  927.    23 type_declaration ::= private_type_declaration
  928.      
  929.    24 full_type_declaration ::= TYPE identifier IS type_definition
  930.      
  931.    25 full_type_declaration ::= TYPE identifier left_paren
  932.       discriminant_specification {;discriminant_specification} right_paren IS
  933.       type_definition
  934.      
  935.    26 type_definition ::= enumeration_type_definition ;
  936.      
  937.    27 type_definition ::= integer_type_definition ;
  938.      
  939.    28 type_definition ::= real_type_definition ;
  940.      
  941.    29 type_definition ::= array_type_definition ;
  942.      
  943.    30 type_definition ::= record_type_definition ;
  944.      
  945.    31 type_definition ::= access_type_definition ;
  946.      
  947.    32 type_definition ::= derived_type_definition ;
  948.      
  949.    33 subtype_declaration ::= SUBTYPE identifier IS subtype_indication ;
  950.      
  951.    34 subtype_indication ::= type_mark
  952.      
  953.    35 subtype_indication ::= type_mark constraint
  954.      
  955.    36 type_mark ::= type_name|subtype_name
  956.      
  957.    37 constraint ::= range_constraint
  958.      
  959.    38 constraint ::= floating_point_constraint
  960.      
  961.    39 constraint ::= fixed_point_constraint
  962.      
  963.    40 constraint ::= ( general_component_associations )
  964.      
  965.    41 derived_type_definition ::= NEW subtype_indication
  966.      
  967.    42 range_constraint ::= RANGE simple_expression
  968.      
  969.    43 range_constraint ::= RANGE simple_expression .. simple_expression
  970.      
  971.    44 enumeration_type_definition ::= ( enumeration_literal_specification
  972.       {,enumeration_literal_specification} )
  973.      
  974.    45 enumeration_literal_specification ::= enumeration_literal
  975.      
  976.    46 enumeration_literal ::= identifier
  977.      
  978.    47 enumeration_literal ::= character_literal
  979.      
  980.    48 integer_type_definition ::= range_constraint
  981.      
  982.    49 real_type_definition ::= floating_point_constraint
  983.      
  984.    50 real_type_definition ::= fixed_point_constraint
  985.      
  986.    51 floating_point_constraint ::= floating_accuracy_definition
  987.       [range_constraint]
  988.      
  989.    52 floating_accuracy_definition ::= DIGITS simple_expression
  990.      
  991.    53 fixed_point_constraint ::= fixed_accuracy_definition [range_constraint]
  992.      
  993.    54 fixed_accuracy_definition ::= DELTA simple_expression
  994.      
  995.    55 array_type_definition ::= unconstrained_array_definition
  996.      
  997.    56 array_type_definition ::= constrained_array_definition
  998.      
  999.    57 unconstrained_array_definition ::= ARRAY ( index_subtype_definition
  1000.       {,index_subtype_definition} ) OF subtype_indication
  1001.      
  1002.    58 constrained_array_definition ::= ARRAY index_constraint OF
  1003.       subtype_indication
  1004.      
  1005.    59 index_subtype_definition ::= name RANGE <>
  1006.      
  1007.    60 index_constraint ::= ( discrete_range {,discrete_range} )
  1008.      
  1009.    61 discrete_range ::= name range_constraint
  1010.      
  1011.    62 discrete_range ::= range
  1012.      
  1013.    63 range ::= simple_expression
  1014.      
  1015.    64 range ::= simple_expression .. simple_expression
  1016.      
  1017.    65 record_type_definition ::= start_of_record_type record_terminal
  1018.       component_list END RECORD
  1019.      
  1020.    66 component_list ::= {pragma_decl} {component_declaration}
  1021.       component_declaration closing_{pragma_decl}
  1022.      
  1023.    67 component_list ::= {pragma_decl} {component_declaration}' variant_part
  1024.       {pragma_decl}
  1025.      
  1026.    68 component_list ::= null_statement {pragma_decl}
  1027.      
  1028.    69 component_declaration ::= identifier_list : subtype_indication
  1029.       [:=expression] ;
  1030.      
  1031.    70 discriminant_specification ::= identifier_list : type_mark [:=expression]
  1032.      
  1033.    71 variant_part ::= CASE__identifier__IS {pragma_variant}__variant__{variant}
  1034.      
  1035.       END CASE ;
  1036.      
  1037.    72 variant ::= WHEN__variant_choice__{|variant_choice}__=> component_list
  1038.      
  1039.    73 variant ::= WHEN__variant_OTHERS__=> component_list
  1040.      
  1041.    74 choice ::= simple_expression
  1042.      
  1043.    75 choice ::= simple_expression .. simple_expression
  1044.      
  1045.    76 choice ::= name range_constraint
  1046.      
  1047.    77 access_type_definition ::= ACCESS subtype_indication
  1048.      
  1049.    78 incomplete_type_declaration ::= TYPE identifier ;
  1050.      
  1051.    79 incomplete_type_declaration ::= TYPE identifier left_paren
  1052.       discriminant_specification {;discriminant_specification} right_paren ;
  1053.      
  1054.    80 declarative_part ::= {basic_declarative_item}
  1055.      
  1056.    81 declarative_part ::= {basic_declarative_item} body {later_declarative_item
  1057. }
  1058.      
  1059.    82 basic_declarative_item ::= basic_declaration
  1060.      
  1061.    83 basic_declarative_item ::= representation_clause
  1062.      
  1063.    84 basic_declarative_item ::= use_clause
  1064.      
  1065.    85 later_declarative_item ::= body
  1066.      
  1067.    86 later_declarative_item ::= subprogram_declaration
  1068.      
  1069.    87 later_declarative_item ::= package_declaration
  1070.      
  1071.    88 later_declarative_item ::= task_specification
  1072.      
  1073.    89 later_declarative_item ::= generic_specification
  1074.      
  1075.    90 later_declarative_item ::= use_clause
  1076.      
  1077.    91 later_declarative_item ::= generic_instantiation
  1078.      
  1079.    92 body ::= proper_body
  1080.      
  1081.    93 body ::= body_stub
  1082.      
  1083.    94 proper_body ::= subprogram_body
  1084.      
  1085.    95 proper_body ::= package_body
  1086.      
  1087.    96 proper_body ::= task_body
  1088.      
  1089.    97 name ::= identifier
  1090.      
  1091.    98 name ::= character_literal
  1092.      
  1093.    99 name ::= string_literal
  1094.      
  1095.   100 name ::= indexed_component
  1096.      
  1097.   101 name ::= selected_component
  1098.      
  1099.   102 name ::= attribute
  1100.      
  1101.   103 indexed_component ::= name ( general_component_associations )
  1102.      
  1103.   104 selected_component ::= name . selector
  1104.      
  1105.   105 selected_component ::= name . ALL
  1106.      
  1107.   106 selector ::= identifier
  1108.      
  1109.   107 selector ::= character_literal
  1110.      
  1111.   108 selector ::= string_literal
  1112.      
  1113.   109 attribute ::= name ' attribute_designator
  1114.      
  1115.   110 attribute_designator ::= identifier
  1116.      
  1117.   111 attribute_designator ::= DIGITS
  1118.      
  1119.   112 attribute_designator ::= DELTA
  1120.      
  1121.   113 attribute_designator ::= RANGE
  1122.      
  1123.   114 aggregate ::= ( component_associations )
  1124.      
  1125.   115 component_associations ::= expression,expression{,expression}
  1126.       [,others=>expression]
  1127.      
  1128.   116 component_associations ::= expression,expression{,expression} ,
  1129.       choice{|choice}=>expression {,choice{|choice}=>expression}
  1130.       [,others=>expression]
  1131.      
  1132.   117 component_associations ::= expression , choice{|choice}=>expression
  1133.       {,choice{|choice}=>expression} [,others=>expression]
  1134.      
  1135.   118 component_associations ::= choice{|choice}=>expression
  1136.       {,choice{|choice}=>expression} [,others=>expression]
  1137.      
  1138.   119 component_associations ::= expression , others=>expression
  1139.      
  1140.   120 component_associations ::= others=>expression
  1141.      
  1142.   121 general_component_associations ::= ga_expression{,ga_expression}
  1143.      
  1144.   122 general_component_associations ::= ga_expression{,ga_expression} ,
  1145.       identifier{|identifier}=>expression {,identifier{|identifier}=>expression}
  1146.      
  1147.      
  1148.   123 general_component_associations ::= identifier{|identifier}=>expression
  1149.       {,identifier{|identifier}=>expression}
  1150.      
  1151.   124 expression ::= relation
  1152.      
  1153.   125 expression ::= relation{AND__relation}
  1154.      
  1155.   126 expression ::= relation{OR__relation}
  1156.      
  1157.   127 expression ::= relation{XOR__relation}
  1158.      
  1159.   128 expression ::= relation{AND__THEN__relation}
  1160.      
  1161.   129 expression ::= relation{OR__ELSE__relation}
  1162.      
  1163.   130 relation ::= simple_expression [relational_operator__simple_expression]
  1164.      
  1165.   131 relation ::= simple_expression [NOT]IN range
  1166.      
  1167.   132 simple_expression ::=
  1168.       [unary_adding_operator]term{binary_adding_operator__term}
  1169.      
  1170.   133 term ::= factor{multiplying_operator__factor}
  1171.      
  1172.   134 factor ::= primary [exponentiating_operator__primary]
  1173.      
  1174.   135 factor ::= high_precedence_unary_operator primary
  1175.      
  1176.   136 parenthesized_expression ::= ( expression )
  1177.      
  1178.   137 primary ::= numeric_literal
  1179.      
  1180.   138 primary ::= NULL
  1181.      
  1182.   139 primary ::= name
  1183.      
  1184.   140 primary ::= allocator
  1185.      
  1186.   141 primary ::= qualified_expression
  1187.      
  1188.   142 primary ::= aggregate
  1189.      
  1190.   143 primary ::= parenthesized_expression
  1191.      
  1192.   144 relational_operator ::= =
  1193.      
  1194.   145 relational_operator ::= /=
  1195.      
  1196.   146 relational_operator ::= <
  1197.      
  1198.   147 relational_operator ::= <=
  1199.      
  1200.   148 relational_operator ::= >
  1201.      
  1202.   149 relational_operator ::= >=
  1203.      
  1204.   150 binary_adding_operator ::= +
  1205.      
  1206.   151 binary_adding_operator ::= -
  1207.      
  1208.   152 binary_adding_operator ::= &
  1209.      
  1210.   153 unary_adding_operator ::= +
  1211.      
  1212.   154 unary_adding_operator ::= -
  1213.      
  1214.   155 high_precedence_unary_operator ::= ABS
  1215.      
  1216.   156 high_precedence_unary_operator ::= NOT
  1217.      
  1218.   157 multiplying_operator ::= *
  1219.      
  1220.   158 multiplying_operator ::= /
  1221.      
  1222.   159 multiplying_operator ::= MOD
  1223.      
  1224.   160 multiplying_operator ::= REM
  1225.      
  1226.   161 exponentiating_operator ::= **
  1227.      
  1228.   162 qualified_expression ::= name ' aggregate
  1229.      
  1230.   163 qualified_expression ::= name ' parenthesized_expression
  1231.      
  1232.   164 allocator ::= NEW type_mark
  1233.      
  1234.   165 allocator ::= NEW type_mark ( general_component_associations )
  1235.      
  1236.   166 allocator ::= NEW expanded_name ' parenthesized_expression
  1237.      
  1238.   167 allocator ::= NEW expanded_name ' aggregate
  1239.      
  1240.   168 sequence_of_statements ::= {pragma_stm} statement {statement}
  1241.      
  1242.   169 statement ::= simple_statement
  1243.      
  1244.   170 statement ::= compound_statement
  1245.      
  1246.   171 statement ::= {label}+ simple_statement
  1247.      
  1248.   172 statement ::= {label}+ compound_statement
  1249.      
  1250.   173 simple_statement ::= null_statement
  1251.      
  1252.   174 simple_statement ::= assignment_statement
  1253.      
  1254.   175 simple_statement ::= exit_statement
  1255.      
  1256.   176 simple_statement ::= return_statement
  1257.      
  1258.   177 simple_statement ::= goto_statement
  1259.      
  1260.   178 simple_statement ::= delay_statement
  1261.      
  1262.   179 simple_statement ::= abort_statement
  1263.      
  1264.   180 simple_statement ::= raise_statement
  1265.      
  1266.   181 simple_statement ::= code_statement
  1267.      
  1268.   182 simple_statement ::= call_statement
  1269.      
  1270.   183 compound_statement ::= if_statement
  1271.      
  1272.   184 compound_statement ::= case_statement
  1273.      
  1274.   185 compound_statement ::= loop_statement
  1275.      
  1276.   186 compound_statement ::= block_statement
  1277.      
  1278.   187 compound_statement ::= accept_statement
  1279.      
  1280.   188 compound_statement ::= select_statement
  1281.      
  1282.   189 label ::= << identifier >>
  1283.      
  1284.   190 null_statement ::= NULL ;
  1285.      
  1286.   191 assignment_statement ::= name := expression ;
  1287.      
  1288.   192 if_statement ::= IF condition__THEN__sequence_of_statements
  1289.       {ELSIF__condition__THEN__sequence_of_statements}
  1290.       [ELSE__sequence_of_statements] END IF ;
  1291.      
  1292.   193 condition ::= expression
  1293.      
  1294.   194 case_statement ::= CASE__expression__IS
  1295.       {pragma_alt}__case_statement_alternative__{case_statement_alternative} END
  1296.      
  1297.       CASE ;
  1298.      
  1299.   195 case_statement_alternative ::= WHEN__choice__{|choice}__=>
  1300.       sequence_of_statements
  1301.      
  1302.   196 case_statement_alternative ::= WHEN__OTHERS__=> sequence_of_statements
  1303.      
  1304.   197 loop_statement ::= [loop_identifier:] loop_terminal sequence_of_statements
  1305.      
  1306.       END LOOP [identifier] ;
  1307.      
  1308.   198 loop_statement ::= [loop_identifier:] iteration_rule loop_terminal
  1309.       sequence_of_statements END LOOP [identifier] ;
  1310.      
  1311.   199 iteration_rule ::= WHILE condition
  1312.      
  1313.   200 iteration_rule ::= FOR identifier IN discrete_range
  1314.      
  1315.   201 iteration_rule ::= FOR identifier IN REVERSE discrete_range
  1316.      
  1317.   202 declarative_part__begin_end_block ::= declarative_part begin_end_block
  1318.      
  1319.   203 begin_end_block ::= begin_terminal sequence_of_statements END
  1320.      
  1321.   204 begin_end_block ::= begin_terminal sequence_of_statements
  1322.       exception_terminal {pragma_alt}__exception_handler_list END
  1323.      
  1324.   205 block_statement ::= [block_identifier:] declare_terminal
  1325.       declarative_part__begin_end_block [identifier] ;
  1326.      
  1327.   206 block_statement ::= [block_identifier:] begin_end_block [identifier] ;
  1328.      
  1329.   207 exit_statement ::= EXIT ;
  1330.      
  1331.   208 exit_statement ::= EXIT WHEN condition ;
  1332.      
  1333.   209 exit_statement ::= EXIT expanded_name ;
  1334.      
  1335.   210 exit_statement ::= EXIT expanded_name WHEN condition ;
  1336.      
  1337.   211 return_statement ::= RETURN ;
  1338.      
  1339.   212 return_statement ::= RETURN expression ;
  1340.      
  1341.   213 goto_statement ::= GOTO expanded_name ;
  1342.      
  1343.   214 subprogram_declaration ::= subprogram_specification ;
  1344.      
  1345.   215 subprogram_specification ::= PROCEDURE start_identifier
  1346.      
  1347.   216 subprogram_specification ::= PROCEDURE start_identifier left_paren
  1348.       parameter_specification {;parameter_specification} right_paren
  1349.      
  1350.   217 subprogram_specification ::= FUNCTION designator RETURN type_mark
  1351.      
  1352.   218 subprogram_specification ::= FUNCTION designator left_paren
  1353.       parameter_specification {;parameter_specification} right_paren RETURN
  1354.       type_mark
  1355.      
  1356.   219 designator ::= identifier
  1357.      
  1358.   220 designator ::= string_literal
  1359.      
  1360.   221 parameter_specification ::= identifier_list mode type_mark [:=expression]
  1361.      
  1362.   222 mode ::= generic_parameter_mode
  1363.      
  1364.   223 mode ::= : OUT
  1365.      
  1366.   224 generic_parameter_mode ::= :
  1367.      
  1368.   225 generic_parameter_mode ::= : IN
  1369.      
  1370.   226 generic_parameter_mode ::= : IN OUT
  1371.      
  1372.   227 subprogram_body ::= subprogram_specification__IS
  1373.       declarative_part__begin_end_block [end_designator] ;
  1374.      
  1375.   228 call_statement ::= name ;
  1376.      
  1377.   229 package_declaration ::= package_specification ;
  1378.      
  1379.   230 package_specification ::= PACKAGE__start_identifier__IS
  1380.       {basic_declarative_item}' END [identifier]
  1381.      
  1382.   231 package_specification ::= PACKAGE__start_identifier__IS
  1383.       {basic_declarative_item}' private_terminal {basic_declarative_item}' END
  1384.       [identifier]
  1385.      
  1386.   232 package_body ::= PACKAGE__BODY__start_identifier__IS declarative_part END
  1387.       [identifier] ;
  1388.      
  1389.   233 package_body ::= PACKAGE__BODY__start_identifier__IS
  1390.       declarative_part__begin_end_block [identifier] ;
  1391.      
  1392.   234 private_type_declaration ::= TYPE identifier IS LIMITED PRIVATE ;
  1393.      
  1394.   235 private_type_declaration ::= TYPE identifier left_paren
  1395.       discriminant_specification {;discriminant_specification} right_paren IS
  1396.       LIMITED PRIVATE ;
  1397.      
  1398.   236 private_type_declaration ::= TYPE identifier IS PRIVATE ;
  1399.      
  1400.   237 private_type_declaration ::= TYPE identifier left_paren
  1401.       discriminant_specification {;discriminant_specification} right_paren IS
  1402.       PRIVATE ;
  1403.      
  1404.   238 use_clause ::= USE expanded_name {,expanded_name} ;
  1405.      
  1406.   239 renaming_colon_declaration ::= identifier_list : type_mark RENAMES name ;
  1407.      
  1408.   240 renaming_colon_declaration ::= identifier_list : EXCEPTION RENAMES
  1409.       expanded_name ;
  1410.      
  1411.   241 renaming_declaration ::= PACKAGE start_identifier RENAMES expanded_name ;
  1412.      
  1413.   242 renaming_declaration ::= subprogram_specification RENAMES name ;
  1414.      
  1415.   243 task_specification ::= TASK start_identifier ;
  1416.      
  1417.   244 task_specification ::= TASK TYPE start_identifier ;
  1418.      
  1419.   245 task_specification ::= TASK__start_identifier__IS
  1420.       {entry_declaration}__{representation_clause} END [identifier] ;
  1421.      
  1422.   246 task_specification ::= TASK__TYPE__start_identifier__IS
  1423.       {entry_declaration}__{representation_clause} END [identifier] ;
  1424.      
  1425.   247 task_body ::= TASK__BODY__start_identifier__IS
  1426.       declarative_part__begin_end_block [identifier] ;
  1427.      
  1428.   248 entry_declaration ::= ENTRY identifier [(discrete_range)][formal_part] ;
  1429.      
  1430.   249 accept_statement ::= ACCEPT start_identifier [(expression)][formal_part] ;
  1431.      
  1432.      
  1433.   250 accept_statement ::=
  1434.       ACCEPT__start_identifier__[(expression)][formal_part]__DO
  1435.       sequence_of_statements END [identifier] ;
  1436.      
  1437.   251 delay_statement ::= DELAY simple_expression ;
  1438.      
  1439.   252 select_statement ::= selective_wait
  1440.      
  1441.   253 select_statement ::= conditional_entry_call
  1442.      
  1443.   254 select_statement ::= timed_entry_call
  1444.      
  1445.   255 selective_wait ::= select_terminal select_alternative
  1446.       {OR__select_alternative} [ELSE__sequence_of_statements] END SELECT ;
  1447.      
  1448.   256 select_alternative ::= {pragma_stm}
  1449.       WHEN__condition__=>__selective_wait_alternative
  1450.      
  1451.   257 select_alternative ::= {pragma_stm} selective_wait_alternative
  1452.      
  1453.   258 selective_wait_alternative ::= accept_alternative
  1454.      
  1455.   259 selective_wait_alternative ::= delay_alternative
  1456.      
  1457.   260 selective_wait_alternative ::= terminate_alternative
  1458.      
  1459.   261 accept_alternative ::= accept_statement [sequence_of_statements]
  1460.      
  1461.   262 delay_alternative ::= delay_statement [sequence_of_statements]
  1462.      
  1463.   263 terminate_alternative ::= TERMINATE__; {pragma_stm}
  1464.      
  1465.   264 TERMINATE__; ::= TERMINATE ;
  1466.      
  1467.   265 conditional_entry_call ::= select_terminal {pragma_stm}
  1468.       call_statement__[sequence_of_statements] else_terminal
  1469.       sequence_of_statements END SELECT ;
  1470.      
  1471.   266 timed_entry_call ::= select_terminal {pragma_stm}
  1472.       call_statement__[sequence_of_statements] or_terminal {pragma_stm}
  1473.       delay_alternative_in_timed_entry END SELECT ;
  1474.      
  1475.   267 abort_statement ::= ABORT name {,name} ;
  1476.      
  1477.   268 compilation ::= {compilation_unit}
  1478.      
  1479.   269 pragma_header ::= PRAGMA identifier
  1480.      
  1481.   270 compilation_unit ::= pragma_header ( general_component_associations ) ;
  1482.      
  1483.   271 compilation_unit ::= pragma_header ;
  1484.      
  1485.   272 compilation_unit ::= context_clause library_or_secondary_unit
  1486.      
  1487.   273 library_or_secondary_unit ::= subprogram_declaration
  1488.      
  1489.   274 library_or_secondary_unit ::= package_declaration
  1490.      
  1491.   275 library_or_secondary_unit ::= generic_specification
  1492.      
  1493.   276 library_or_secondary_unit ::= generic_instantiation
  1494.      
  1495.   277 library_or_secondary_unit ::= subprogram_body
  1496.      
  1497.   278 library_or_secondary_unit ::= package_body
  1498.      
  1499.   279 library_or_secondary_unit ::= subunit
  1500.      
  1501.   280 context_clause ::= {with_clause{use_clause}}
  1502.      
  1503.   281 with_clause ::= WITH identifier {,used_identifier} ;
  1504.      
  1505.   282 body_stub ::= subprogram_specification IS SEPARATE ;
  1506.      
  1507.   283 body_stub ::= PACKAGE BODY start_identifier IS SEPARATE ;
  1508.      
  1509.   284 body_stub ::= TASK BODY start_identifier IS SEPARATE ;
  1510.      
  1511.   285 subunit ::= SEPARATE__(__expanded_name__) proper_body
  1512.      
  1513.   286 exception_declaration ::= identifier_list : EXCEPTION ;
  1514.      
  1515.   287 exception_handler ::= WHEN__exception_choice__{|exception_choice}__=>
  1516.       sequence_of_statements
  1517.      
  1518.   288 exception_choice ::= expanded_name
  1519.      
  1520.   289 exception_choice ::= OTHERS
  1521.      
  1522.   290 raise_statement ::= RAISE ;
  1523.      
  1524.   291 raise_statement ::= RAISE expanded_name ;
  1525.      
  1526.   292 generic_specification ::= generic_formal_part subprogram_specification ;
  1527.      
  1528.   293 generic_specification ::= generic_formal_part package_specification ;
  1529.      
  1530.   294 generic_formal_part ::= generic_terminal {generic_parameter_declaration}
  1531.      
  1532.   295 generic_parameter_declaration ::= identifier_list generic_parameter_mode
  1533.       type_mark [:=expression] ;
  1534.      
  1535.   296 generic_parameter_declaration ::= TYPE identifier IS
  1536.       generic_type_definition ;
  1537.      
  1538.   297 generic_parameter_declaration ::= TYPE identifier left_paren
  1539.       discriminant_specification {;discriminant_specification} right_paren IS
  1540.       generic_type_definition ;
  1541.      
  1542.   298 generic_parameter_declaration ::= WITH subprogram_specification
  1543.       [IS__name__or__<>] ;
  1544.      
  1545.   299 generic_type_definition ::= ( <> )
  1546.      
  1547.   300 generic_type_definition ::= RANGE <>
  1548.      
  1549.   301 generic_type_definition ::= DIGITS <>
  1550.      
  1551.   302 generic_type_definition ::= DELTA <>
  1552.      
  1553.   303 generic_type_definition ::= LIMITED PRIVATE
  1554.      
  1555.   304 generic_type_definition ::= PRIVATE
  1556.      
  1557.   305 generic_type_definition ::= array_type_definition
  1558.      
  1559.   306 generic_type_definition ::= access_type_definition
  1560.      
  1561.   307 generic_instantiation ::= PACKAGE__start_identifier__IS NEW expanded_name
  1562. ;
  1563.      
  1564.   308 generic_instantiation ::= PACKAGE__start_identifier__IS NEW expanded_name
  1565. (
  1566.       generic_association {,generic_association} ) ;
  1567.      
  1568.   309 generic_instantiation ::= FUNCTION__designator__IS NEW expanded_name ;
  1569.      
  1570.   310 generic_instantiation ::= FUNCTION__designator__IS NEW expanded_name (
  1571.       generic_association {,generic_association} ) ;
  1572.      
  1573.   311 generic_instantiation ::= subprogram_specification__IS NEW expanded_name ;
  1574.      
  1575.      
  1576.   312 generic_instantiation ::= subprogram_specification__IS NEW expanded_name (
  1577.      
  1578.       generic_association {,generic_association} ) ;
  1579.      
  1580.   313 generic_association ::=
  1581.       [generic_formal_parameter=>]generic_actual_parameter
  1582.      
  1583.   314 generic_formal_parameter ::= identifier
  1584.      
  1585.   315 generic_formal_parameter ::= string_literal
  1586.      
  1587.   316 generic_actual_parameter ::= expression
  1588.      
  1589.   317 representation_clause ::= length_clause
  1590.      
  1591.   318 representation_clause ::= enumeration_representation_clause
  1592.      
  1593.   319 representation_clause ::= address_clause
  1594.      
  1595.   320 representation_clause ::= record_representation_clause
  1596.      
  1597.   321 length_clause ::= FOR attribute USE simple_expression ;
  1598.      
  1599.   322 enumeration_representation_clause ::= FOR identifier USE aggregate ;
  1600.      
  1601.   323 record_representation_clause ::= FOR identifier USE start_of_record_type
  1602.       record_terminal {component_clause}' END RECORD ;
  1603.      
  1604.   324 record_representation_clause ::= FOR identifier USE start_of_record_type
  1605.       RECORD alignment_clause {component_clause}' END RECORD ;
  1606.      
  1607.   325 component_clause ::= name AT simple_expression range_constraint ;
  1608.      
  1609.   326 alignment_clause ::= AT MOD simple_expression ;
  1610.      
  1611.   327 address_clause ::= FOR identifier USE AT simple_expression ;
  1612.      
  1613.   328 code_statement ::= name ' aggregate ;
  1614.      
  1615.   329 {pragma_decl} ::= EMPTY
  1616.      
  1617.   330 {pragma_decl} ::= {pragma_decl} pragma
  1618.      
  1619.   331 {pragma_variant} ::= EMPTY
  1620.      
  1621.   332 {pragma_variant} ::= {pragma_variant} pragma
  1622.      
  1623.   333 {pragma_stm} ::= EMPTY
  1624.      
  1625.   334 {pragma_stm} ::= {pragma_stm} pragma
  1626.      
  1627.   335 {pragma_alt} ::= EMPTY
  1628.      
  1629.   336 {pragma_alt} ::= {pragma_alt} pragma
  1630.      
  1631.   337 [:=expression] ::= EMPTY
  1632.      
  1633.   338 [:=expression] ::= := expression
  1634.      
  1635.   339 {,identifier} ::= EMPTY
  1636.      
  1637.   340 {,identifier} ::= {,identifier} , identifier
  1638.      
  1639.   341 type_name|subtype_name ::= expanded_name
  1640.      
  1641.   342 expanded_name ::= identifier
  1642.      
  1643.   343 expanded_name ::= expanded_name . identifier
  1644.      
  1645.   344 {,enumeration_literal_specification} ::= EMPTY
  1646.      
  1647.   345 {,enumeration_literal_specification} ::=
  1648.       {,enumeration_literal_specification} , enumeration_literal_specification
  1649.      
  1650.   346 [range_constraint] ::= EMPTY
  1651.      
  1652.   347 [range_constraint] ::= range_constraint
  1653.      
  1654.   348 {,index_subtype_definition} ::= EMPTY
  1655.      
  1656.   349 {,index_subtype_definition} ::= {,index_subtype_definition} ,
  1657.       index_subtype_definition
  1658.      
  1659.   350 {,discrete_range} ::= EMPTY
  1660.      
  1661.   351 {,discrete_range} ::= {,discrete_range} , discrete_range
  1662.      
  1663.   352 {component_declaration} ::= EMPTY
  1664.      
  1665.   353 {component_declaration} ::= {component_declaration} component_declaration
  1666.       {pragma_decl}
  1667.      
  1668.   354 {;discriminant_specification} ::= EMPTY
  1669.      
  1670.   355 {;discriminant_specification} ::= {;discriminant_specification}
  1671.       discriminant_; discriminant_specification
  1672.      
  1673.   356 {variant} ::= EMPTY
  1674.      
  1675.   357 {variant} ::= {variant} variant
  1676.      
  1677.   358 {|choice} ::= EMPTY
  1678.      
  1679.   359 {|choice} ::= {|choice} '|' choice
  1680.      
  1681.   360 {basic_declarative_item} ::= {pragma_decl}
  1682.      
  1683.   361 {basic_declarative_item} ::= {basic_declarative_item}
  1684.       basic_declarative_item {pragma_decl}
  1685.      
  1686.   362 {basic_declarative_item} ::=
  1687.       {basic_declarative_item}__basic_declarative_item|EMPTY
  1688.       {basic_colon_declaration}
  1689.      
  1690.   363 {later_declarative_item} ::= {pragma_decl}
  1691.      
  1692.   364 {later_declarative_item} ::= {later_declarative_item}
  1693.       later_declarative_item {pragma_decl}
  1694.      
  1695.   365 expression,expression{,expression} ::= expression , expression
  1696.      
  1697.   366 expression,expression{,expression} ::= expression,expression{,expression}
  1698. ,
  1699.       expression
  1700.      
  1701.   367 choice{|choice}=>expression ::= choice {|choice} => expression
  1702.      
  1703.   368 {,choice{|choice}=>expression} ::= EMPTY
  1704.      
  1705.   369 {,choice{|choice}=>expression} ::= {,choice{|choice}=>expression} ,
  1706.       choice{|choice}=>expression
  1707.      
  1708.   370 [,others=>expression] ::= EMPTY
  1709.      
  1710.   371 [,others=>expression] ::= , others=>expression
  1711.      
  1712.   372 others=>expression ::= OTHERS => expression
  1713.      
  1714.   373 ga_expression ::= expression
  1715.      
  1716.   374 ga_expression ::= simple_expression .. simple_expression
  1717.      
  1718.   375 ga_expression ::= name range_constraint
  1719.      
  1720.   376 ga_expression{,ga_expression} ::= ga_expression
  1721.      
  1722.   377 ga_expression{,ga_expression} ::= ga_expression{,ga_expression} ,
  1723.       ga_expression
  1724.      
  1725.   378 identifier{|identifier}=>expression ::= identifier {|identifier} =>
  1726.       expression
  1727.      
  1728.   379 {,identifier{|identifier}=>expression} ::= EMPTY
  1729.      
  1730.   380 {,identifier{|identifier}=>expression} ::=
  1731.       {,identifier{|identifier}=>expression} ,
  1732.       identifier{|identifier}=>expression
  1733.      
  1734.   381 {|identifier} ::= EMPTY
  1735.      
  1736.   382 {|identifier} ::= {|identifier} '|' identifier
  1737.      
  1738.   383 relation{AND__relation} ::= relation AND relation
  1739.      
  1740.   384 relation{AND__relation} ::= relation{AND__relation} AND relation
  1741.      
  1742.   385 relation{OR__relation} ::= relation OR relation
  1743.      
  1744.   386 relation{OR__relation} ::= relation{OR__relation} OR relation
  1745.      
  1746.   387 relation{XOR__relation} ::= relation XOR relation
  1747.      
  1748.   388 relation{XOR__relation} ::= relation{XOR__relation} XOR relation
  1749.      
  1750.   389 relation{AND__THEN__relation} ::= relation AND THEN relation
  1751.      
  1752.   390 relation{AND__THEN__relation} ::= relation{AND__THEN__relation} AND THEN
  1753.       relation
  1754.      
  1755.   391 relation{OR__ELSE__relation} ::= relation OR ELSE relation
  1756.      
  1757.   392 relation{OR__ELSE__relation} ::= relation{OR__ELSE__relation} OR ELSE
  1758.       relation
  1759.      
  1760.   393 [relational_operator__simple_expression] ::= EMPTY
  1761.      
  1762.   394 [relational_operator__simple_expression] ::= relational_operator
  1763.       simple_expression
  1764.      
  1765.   395 [NOT]IN ::= IN
  1766.      
  1767.   396 [NOT]IN ::= NOT IN
  1768.      
  1769.   397 [unary_adding_operator]term{binary_adding_operator__term} ::= term
  1770.      
  1771.   398 [unary_adding_operator]term{binary_adding_operator__term} ::=
  1772.       unary_adding_operator term
  1773.      
  1774.   399 [unary_adding_operator]term{binary_adding_operator__term} ::=
  1775.       [unary_adding_operator]term{binary_adding_operator__term}
  1776.       binary_adding_operator term
  1777.      
  1778.   400 factor{multiplying_operator__factor} ::= factor
  1779.      
  1780.   401 factor{multiplying_operator__factor} ::=
  1781.       factor{multiplying_operator__factor} multiplying_operator factor
  1782.      
  1783.   402 [exponentiating_operator__primary] ::= EMPTY
  1784.      
  1785.   403 [exponentiating_operator__primary] ::= exponentiating_operator primary
  1786.      
  1787.   404 {statement} ::= {pragma_stm}
  1788.      
  1789.   405 {statement} ::= {statement} statement {pragma_stm}
  1790.      
  1791.   406 {label}+ ::= label
  1792.      
  1793.   407 {label}+ ::= {label}+ label
  1794.      
  1795.   408 condition__THEN__sequence_of_statements ::= condition__THEN
  1796.       sequence_of_statements
  1797.      
  1798.   409 {ELSIF__condition__THEN__sequence_of_statements} ::= EMPTY
  1799.      
  1800.   410 {ELSIF__condition__THEN__sequence_of_statements} ::=
  1801.       {ELSIF__condition__THEN__sequence_of_statements} ELSIF__condition__THEN
  1802.       sequence_of_statements
  1803.      
  1804.   411 [ELSE__sequence_of_statements] ::= EMPTY
  1805.      
  1806.   412 [ELSE__sequence_of_statements] ::= else_terminal sequence_of_statements
  1807.      
  1808.   413 {case_statement_alternative} ::= EMPTY
  1809.      
  1810.   414 {case_statement_alternative} ::= {case_statement_alternative}
  1811.       case_statement_alternative
  1812.      
  1813.   415 [loop_identifier:] ::= EMPTY
  1814.      
  1815.   416 [loop_identifier:] ::= identifier :
  1816.      
  1817.   417 [identifier] ::= EMPTY
  1818.      
  1819.   418 [identifier] ::= identifier
  1820.      
  1821.   419 [block_identifier:] ::= EMPTY
  1822.      
  1823.   420 [block_identifier:] ::= identifier :
  1824.      
  1825.   421 {pragma_alt}__exception_handler_list ::= {pragma_alt}
  1826.       exception_handler_list
  1827.      
  1828.   422 exception_handler_list ::= exception_handler
  1829.      
  1830.   423 exception_handler_list ::= exception_handler_list exception_handler
  1831.      
  1832.   424 {;parameter_specification} ::= EMPTY
  1833.      
  1834.   425 {;parameter_specification} ::= {;parameter_specification} parameter_;
  1835.       parameter_specification
  1836.      
  1837.   426 [end_designator] ::= EMPTY
  1838.      
  1839.   427 [end_designator] ::= identifier
  1840.      
  1841.   428 [end_designator] ::= string_literal
  1842.      
  1843.   429 {,expanded_name} ::= EMPTY
  1844.      
  1845.   430 {,expanded_name} ::= {,expanded_name} , expanded_name
  1846.      
  1847.   431 {entry_declaration} ::= {pragma_decl}
  1848.      
  1849.   432 {entry_declaration} ::= {entry_declaration} entry_declaration {pragma_decl
  1850. }
  1851.      
  1852.   433 {representation_clause} ::= EMPTY
  1853.      
  1854.   434 {representation_clause} ::= {representation_clause} representation_clause
  1855.       {pragma_decl}
  1856.      
  1857.   435 [(discrete_range)][formal_part] ::= EMPTY
  1858.      
  1859.   436 [(discrete_range)][formal_part] ::= left_paren parameter_specification
  1860.       {;parameter_specification} right_paren
  1861.      
  1862.   437 [(discrete_range)][formal_part] ::= left_paren discrete_range right_paren
  1863.      
  1864.   438 [(discrete_range)][formal_part] ::= left_paren discrete_range right_paren
  1865.       left_paren parameter_specification {;parameter_specification} right_paren
  1866.      
  1867.   439 [(expression)][formal_part] ::= EMPTY
  1868.      
  1869.   440 [(expression)][formal_part] ::= left_paren parameter_specification
  1870.       {;parameter_specification} right_paren
  1871.      
  1872.   441 [(expression)][formal_part] ::= left_paren expression right_paren
  1873.      
  1874.   442 [(expression)][formal_part] ::= left_paren expression right_paren
  1875.       left_paren parameter_specification {;parameter_specification} right_paren
  1876.      
  1877.   443 {OR__select_alternative} ::= EMPTY
  1878.      
  1879.   444 {OR__select_alternative} ::= {OR__select_alternative} or_terminal
  1880.       select_alternative
  1881.      
  1882.   445 [sequence_of_statements] ::= {pragma_stm}
  1883.      
  1884.   446 [sequence_of_statements] ::= optional_sequence_of_statements
  1885.      
  1886.   447 {,name} ::= EMPTY
  1887.      
  1888.   448 {,name} ::= {,name} , name
  1889.      
  1890.   449 {compilation_unit} ::= compilation_unit
  1891.      
  1892.   450 {compilation_unit} ::= {compilation_unit} compilation_unit
  1893.      
  1894.   451 {with_clause{use_clause}} ::= EMPTY
  1895.      
  1896.   452 {with_clause{use_clause}} ::= {with_clause{use_clause}} with_clause
  1897.       use_clause_list
  1898.      
  1899.   453 use_clause_list ::= {pragma_decl}
  1900.      
  1901.   454 use_clause_list ::= use_clause_list use_clause {pragma_decl}
  1902.      
  1903.   455 {,used_identifier} ::= EMPTY
  1904.      
  1905.   456 {,used_identifier} ::= {,used_identifier} , identifier
  1906.      
  1907.   457 {|exception_choice} ::= EMPTY
  1908.      
  1909.   458 {|exception_choice} ::= {|exception_choice} '|' exception_choice
  1910.      
  1911.   459 {generic_parameter_declaration} ::= EMPTY
  1912.      
  1913.   460 {generic_parameter_declaration} ::= {generic_parameter_declaration}
  1914.       generic_parameter_declaration
  1915.      
  1916.   461 [IS__name__or__<>] ::= EMPTY
  1917.      
  1918.   462 [IS__name__or__<>] ::= IS name
  1919.      
  1920.   463 [IS__name__or__<>] ::= IS <>
  1921.      
  1922.   464 {,generic_association} ::= EMPTY
  1923.      
  1924.   465 {,generic_association} ::= {,generic_association} , generic_association
  1925.      
  1926.   466 [generic_formal_parameter=>]generic_actual_parameter ::=
  1927.       generic_actual_parameter
  1928.      
  1929.   467 [generic_formal_parameter=>]generic_actual_parameter ::=
  1930.       generic_formal_parameter => generic_actual_parameter
  1931.      
  1932.   468 {component_clause} ::= {pragma_decl}
  1933.      
  1934.   469 {component_clause} ::= {component_clause} component_clause {pragma_decl}
  1935.      
  1936.   470 record_terminal ::= RECORD
  1937.      
  1938.   471 closing_{pragma_decl} ::= {pragma_decl}
  1939.      
  1940.   472 {component_declaration}' ::= {component_declaration}
  1941.      
  1942.   473 start_of_record_type ::= EMPTY
  1943.      
  1944.   474 CASE__identifier__IS ::= CASE identifier IS
  1945.      
  1946.   475 WHEN__variant_choice__{|variant_choice}__=> ::= WHEN__choice__{|choice}__=
  1947. >
  1948.      
  1949.   476 WHEN__variant_OTHERS__=> ::= WHEN__OTHERS__=>
  1950.      
  1951.   477 WHEN__choice__{|choice}__=> ::= WHEN choice {|choice} =>
  1952.      
  1953.   478 WHEN__OTHERS__=> ::= WHEN OTHERS =>
  1954.      
  1955.   479 generic_terminal ::= GENERIC
  1956.      
  1957.   480 CASE__expression__IS ::= CASE expression IS
  1958.      
  1959.   481 {pragma_alt}__case_statement_alternative__{case_statement_alternative} ::=
  1960.      
  1961.       {pragma_alt} case_statement_alternative {case_statement_alternative}
  1962.      
  1963.   482 loop_terminal ::= LOOP
  1964.      
  1965.   483 begin_terminal ::= BEGIN
  1966.      
  1967.   484 {pragma_variant}__variant__{variant} ::= {pragma_variant} variant {variant
  1968. }
  1969.      
  1970.   485 exception_terminal ::= EXCEPTION
  1971.      
  1972.   486 declare_terminal ::= DECLARE
  1973.      
  1974.   487 PACKAGE__start_identifier__IS ::= PACKAGE start_identifier IS
  1975.      
  1976.   488 start_identifier ::= identifier
  1977.      
  1978.   489 {basic_declarative_item}' ::= {basic_declarative_item}
  1979.      
  1980.   490 {entry_declaration}__{representation_clause} ::= {entry_declaration}
  1981.       {representation_clause}
  1982.      
  1983.   491 private_terminal ::= PRIVATE
  1984.      
  1985.   492 PACKAGE__BODY__start_identifier__IS ::= PACKAGE BODY start_identifier IS
  1986.      
  1987.   493 TASK__start_identifier__IS ::= TASK start_identifier IS
  1988.      
  1989.   494 TASK__TYPE__start_identifier__IS ::= TASK TYPE start_identifier IS
  1990.      
  1991.   495 TASK__BODY__start_identifier__IS ::= TASK BODY start_identifier IS
  1992.      
  1993.   496 ACCEPT__start_identifier__[(expression)][formal_part]__DO ::= ACCEPT
  1994.       start_identifier [(expression)][formal_part] DO
  1995.      
  1996.   497 select_terminal ::= SELECT
  1997.      
  1998.   498 call_statement__[sequence_of_statements] ::= call_statement
  1999.       [sequence_of_statements]
  2000.      
  2001.   499 optional_sequence_of_statements ::= {pragma_stm} statement {statement}
  2002.      
  2003.   500 delay_alternative_in_timed_entry ::= delay_alternative
  2004.      
  2005.   501 WHEN__condition__=>__selective_wait_alternative ::= WHEN__condition__=>
  2006.       selective_wait_alternative
  2007.      
  2008.   502 WHEN__condition__=> ::= WHEN condition =>
  2009.      
  2010.   503 WHEN__exception_choice__{|exception_choice}__=> ::= WHEN exception_choice
  2011.       {|exception_choice} =>
  2012.      
  2013.   504 FUNCTION__designator__IS ::= FUNCTION designator IS
  2014.      
  2015.   505 subprogram_specification__IS ::= subprogram_specification IS
  2016.      
  2017.   506 {component_clause}' ::= {component_clause}
  2018.      
  2019.   507 SEPARATE__(__expanded_name__) ::= SEPARATE ( expanded_name )
  2020.      
  2021.   508 {basic_colon_declaration} ::= start_{basic_colon_declaration}
  2022.       {basic_colon_declaration}' basic_colon_declaration {pragma_decl}
  2023.      
  2024.   509 start_{basic_colon_declaration} ::= EMPTY
  2025.      
  2026.   510 {basic_colon_declaration}' ::= {basic_colon_declaration}'
  2027.       basic_colon_declaration {pragma_decl}
  2028.      
  2029.   511 {basic_colon_declaration}' ::= EMPTY
  2030.      
  2031.   512 {basic_declarative_item}__basic_declarative_item|EMPTY ::=
  2032.       {basic_declarative_item} basic_declarative_item {pragma_decl}
  2033.      
  2034.   513 {basic_declarative_item}__basic_declarative_item|EMPTY ::= {pragma_decl}
  2035.      
  2036.   514 condition__THEN ::= condition THEN
  2037.      
  2038.   515 ELSIF__condition__THEN ::= ELSIF condition THEN
  2039.      
  2040.   516 else_terminal ::= ELSE
  2041.      
  2042.   517 or_terminal ::= OR
  2043.      
  2044.   518 discriminant_; ::= ;
  2045.      
  2046.   519 parameter_; ::= ;
  2047.      
  2048.   520 left_paren ::= (
  2049.      
  2050.   521 right_paren ::= )
  2051.      
  2052. Non terminalss
  2053.      
  2054.  $ACC
  2055.  compilation
  2056.  general_component_associations
  2057.  pragma
  2058.  type_declaration
  2059.  basic_declaration
  2060.  subtype_declaration
  2061.  subprogram_declaration
  2062.  package_declaration
  2063.  task_specification
  2064.  generic_specification
  2065.  generic_instantiation
  2066.  renaming_declaration
  2067.  object_declaration
  2068.  basic_colon_declaration
  2069.  number_declaration
  2070.  exception_declaration
  2071.  renaming_colon_declaration
  2072.  identifier_list
  2073.  subtype_indication
  2074.  [:=expression]
  2075.  constrained_array_definition
  2076.  expression
  2077.  {,identifier}
  2078.  full_type_declaration
  2079.  incomplete_type_declaration
  2080.  private_type_declaration
  2081.  type_definition
  2082.  left_paren
  2083.  discriminant_specification
  2084.  {;discriminant_specification}
  2085.  right_paren
  2086.  enumeration_type_definition
  2087.  integer_type_definition
  2088.  real_type_definition
  2089.  array_type_definition
  2090.  record_type_definition
  2091.  access_type_definition
  2092.  derived_type_definition
  2093.  type_mark
  2094.  constraint
  2095.  type_name|subtype_name
  2096.  range_constraint
  2097.  floating_point_constraint
  2098.  fixed_point_constraint
  2099.  simple_expression
  2100.  enumeration_literal_specification
  2101.  {,enumeration_literal_specification}
  2102.  enumeration_literal
  2103.  floating_accuracy_definition
  2104.  [range_constraint]
  2105.  fixed_accuracy_definition
  2106.  unconstrained_array_definition
  2107.  index_subtype_definition
  2108.  {,index_subtype_definition}
  2109.  index_constraint
  2110.  name
  2111.  discrete_range
  2112.  {,discrete_range}
  2113.  range
  2114.  start_of_record_type
  2115.  record_terminal
  2116.  component_list
  2117.  {pragma_decl}
  2118.  {component_declaration}
  2119.  component_declaration
  2120.  closing_{pragma_decl}
  2121.  {component_declaration}'
  2122.  variant_part
  2123.  null_statement
  2124.  CASE__identifier__IS
  2125.  {pragma_variant}__variant__{variant}
  2126.  WHEN__variant_choice__{|variant_choice}__=>
  2127.  variant
  2128.  WHEN__variant_OTHERS__=>
  2129.  choice
  2130.  {basic_declarative_item}
  2131.  declarative_part
  2132.  body
  2133.  {later_declarative_item}
  2134.  basic_declarative_item
  2135.  representation_clause
  2136.  use_clause
  2137.  later_declarative_item
  2138.  proper_body
  2139.  body_stub
  2140.  subprogram_body
  2141.  package_body
  2142.  task_body
  2143.  indexed_component
  2144.  selected_component
  2145.  attribute
  2146.  selector
  2147.  attribute_designator
  2148.  component_associations
  2149.  aggregate
  2150.  expression,expression{,expression}
  2151.  [,others=>expression]
  2152.  choice{|choice}=>expression
  2153.  {,choice{|choice}=>expression}
  2154.  others=>expression
  2155.  ga_expression{,ga_expression}
  2156.  identifier{|identifier}=>expression
  2157.  {,identifier{|identifier}=>expression}
  2158.  relation
  2159.  relation{AND__relation}
  2160.  relation{OR__relation}
  2161.  relation{XOR__relation}
  2162.  relation{AND__THEN__relation}
  2163.  relation{OR__ELSE__relation}
  2164.  [relational_operator__simple_expression]
  2165.  [NOT]IN
  2166.  [unary_adding_operator]term{binary_adding_operator__term}
  2167.  factor{multiplying_operator__factor}
  2168.  term
  2169.  primary
  2170.  [exponentiating_operator__primary]
  2171.  factor
  2172.  high_precedence_unary_operator
  2173.  parenthesized_expression
  2174.  allocator
  2175.  qualified_expression
  2176.  relational_operator
  2177.  binary_adding_operator
  2178.  unary_adding_operator
  2179.  multiplying_operator
  2180.  exponentiating_operator
  2181.  expanded_name
  2182.  {pragma_stm}
  2183.  statement
  2184.  {statement}
  2185.  sequence_of_statements
  2186.  simple_statement
  2187.  compound_statement
  2188.  {label}+
  2189.  assignment_statement
  2190.  exit_statement
  2191.  return_statement
  2192.  goto_statement
  2193.  delay_statement
  2194.  abort_statement
  2195.  raise_statement
  2196.  code_statement
  2197.  call_statement
  2198.  if_statement
  2199.  case_statement
  2200.  loop_statement
  2201.  block_statement
  2202.  accept_statement
  2203.  select_statement
  2204.  label
  2205.  condition__THEN__sequence_of_statements
  2206.  {ELSIF__condition__THEN__sequence_of_statements}
  2207.  [ELSE__sequence_of_statements]
  2208.  condition
  2209.  CASE__expression__IS
  2210.  {pragma_alt}__case_statement_alternative__{case_statement_alternative}
  2211.  WHEN__choice__{|choice}__=>
  2212.  case_statement_alternative
  2213.  WHEN__OTHERS__=>
  2214.  [loop_identifier:]
  2215.  loop_terminal
  2216.  [identifier]
  2217.  iteration_rule
  2218.  begin_end_block
  2219.  declarative_part__begin_end_block
  2220.  begin_terminal
  2221.  exception_terminal
  2222.  {pragma_alt}__exception_handler_list
  2223.  [block_identifier:]
  2224.  declare_terminal
  2225.  subprogram_specification
  2226.  start_identifier
  2227.  parameter_specification
  2228.  {;parameter_specification}
  2229.  designator
  2230.  mode
  2231.  generic_parameter_mode
  2232.  subprogram_specification__IS
  2233.  [end_designator]
  2234.  package_specification
  2235.  PACKAGE__start_identifier__IS
  2236.  {basic_declarative_item}'
  2237.  private_terminal
  2238.  PACKAGE__BODY__start_identifier__IS
  2239.  {,expanded_name}
  2240.  TASK__start_identifier__IS
  2241.  {entry_declaration}__{representation_clause}
  2242.  TASK__TYPE__start_identifier__IS
  2243.  TASK__BODY__start_identifier__IS
  2244.  [(discrete_range)][formal_part]
  2245.  entry_declaration
  2246.  [(expression)][formal_part]
  2247.  ACCEPT__start_identifier__[(expression)][formal_part]__DO
  2248.  selective_wait
  2249.  conditional_entry_call
  2250.  timed_entry_call
  2251.  select_terminal
  2252.  select_alternative
  2253.  {OR__select_alternative}
  2254.  WHEN__condition__=>__selective_wait_alternative
  2255.  selective_wait_alternative
  2256.  accept_alternative
  2257.  delay_alternative
  2258.  terminate_alternative
  2259.  [sequence_of_statements]
  2260.  TERMINATE__;
  2261.  call_statement__[sequence_of_statements]
  2262.  else_terminal
  2263.  or_terminal
  2264.  delay_alternative_in_timed_entry
  2265.  {,name}
  2266.  {compilation_unit}
  2267.  pragma_header
  2268.  compilation_unit
  2269.  context_clause
  2270.  library_or_secondary_unit
  2271.  subunit
  2272.  {with_clause{use_clause}}
  2273.  {,used_identifier}
  2274.  with_clause
  2275.  SEPARATE__(__expanded_name__)
  2276.  WHEN__exception_choice__{|exception_choice}__=>
  2277.  exception_handler
  2278.  exception_choice
  2279.  generic_formal_part
  2280.  generic_terminal
  2281.  {generic_parameter_declaration}
  2282.  generic_parameter_declaration
  2283.  generic_type_definition
  2284.  [IS__name__or__<>]
  2285.  generic_association
  2286.  {,generic_association}
  2287.  FUNCTION__designator__IS
  2288.  [generic_formal_parameter=>]generic_actual_parameter
  2289.  generic_formal_parameter
  2290.  generic_actual_parameter
  2291.  length_clause
  2292.  enumeration_representation_clause
  2293.  address_clause
  2294.  record_representation_clause
  2295.  {component_clause}'
  2296.  alignment_clause
  2297.  component_clause
  2298.  {pragma_variant}
  2299.  {pragma_alt}
  2300.  discriminant_;
  2301.  {variant}
  2302.  {|choice}
  2303.  {basic_declarative_item}__basic_declarative_item|EMPTY
  2304.  {basic_colon_declaration}
  2305.  ga_expression
  2306.  {|identifier}
  2307.  condition__THEN
  2308.  ELSIF__condition__THEN
  2309.  {case_statement_alternative}
  2310.  exception_handler_list
  2311.  parameter_;
  2312.  {entry_declaration}
  2313.  {representation_clause}
  2314.  optional_sequence_of_statements
  2315.  use_clause_list
  2316.  {|exception_choice}
  2317.  {component_clause}
  2318.  WHEN__condition__=>
  2319.  start_{basic_colon_declaration}
  2320.  {basic_colon_declaration}'
  2321. Information about Action Tables
  2322.      
  2323.  Number of Entries      0
  2324.  Origin Table Size      0
  2325.  Action Table Size      0
  2326.  Number Unused      0
  2327.  Distribution of entries      0      0      0      0      0      0      0      0
  2328. Timing Statistics
  2329.      
  2330.                   Cpu Time   Elapsed  LG Reads LG Writes
  2331.  Parse:                286     16753         0       161
  2332.  Preliminary:          179       563         0       343
  2333.  First Map:             30      2760         0        27
  2334.  Item Creation:         32      1744         0        49
  2335.  Follow Map:            10      1486         0         0
  2336.  Closure:               10      1525         0         0
  2337.  States:              1966     15036       183      2575
  2338.  Reductions:         11196     20770      4660      2862
  2339.  Summary:              502      2359       301       120
  2340.  Compress:               0         0         0         0
  2341.  Table Dump:             0         0         0         0
  2342. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  2343. --pretty.cnt
  2344. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  2345. [NOSC.RELEASES.V0101.PRETTY.SOURCE]PPRDECLS.DAT                       142   312
  2346. [NOSC.RELEASES.V0101.PRETTY.SOURCE]PPRUTILS.SPC                        14   237
  2347. [NOSC.RELEASES.V0101.PRETTY.SOURCE]PARSE.BDY                           70   186
  2348. [NOSC.RELEASES.V0101.PRETTY.SOURCE]APPLYACT.SUB                       141   829
  2349. [NOSC.RELEASES.V0101.PRETTY.SOURCE]CHANGE.SPC                          15    93
  2350. [NOSC.RELEASES.V0101.PRETTY.SOURCE]CHANGE.BDY                         175   191
  2351. [NOSC.RELEASES.V0101.PRETTY.SOURCE]PRETTY.SPC                          11    58
  2352. [NOSC.RELEASES.V0101.PRETTY.SOURCE]DRIVER.ADA                         200   207
  2353. [NOSC.RELEASES.V0101.PRETTY.SOURCE]GETNEXT.SUB                         19    19
  2354. [NOSC.RELEASES.V0101.PRETTY.SOURCE]GRMCONST.BDY                        32    30
  2355. [NOSC.RELEASES.V0101.PRETTY.SOURCE]PPRUTILS.BDY                       869   941
  2356. [NOSC.RELEASES.V0101.PRETTY.SOURCE]PRETTY.BDY                          74    86
  2357. [NOSC.RELEASES.V0101.PRETTY.SOURCE]PTBLS.BDY                        34602  3817
  2358.  
  2359.