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

  1. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  2. --read.me
  3. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  4. To build the compile order tool:
  5.  
  6.  1. Compile all the abstractions into a program library (see READ.ME in
  7.     abstractions directory for details).
  8.  
  9.  2. Compile everything named in the COMPORD.CO file into the program 
  10.     library containing the abstractions or a sublibrary whose parent 
  11.     library contains all the abstractions.  COMPORD.CO lists file names 
  12.     in the correct compilation order.
  13.  
  14.  3. Link compile_order with the program library where everything was 
  15.     compiled.  To do this using the DEC Ada compiler type:
  16.     $ acs link compile_order
  17.  
  18. To run the tool on VMS:
  19.  
  20.  1. Define a logical symbol for the executable of compile_order.
  21.     For example,
  22.  
  23.     compile_order :== $DRB1:[NOSC.TOOLS.COMPORD]COMPORD.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 
  27.      example and will be different on your system.
  28.  
  29.  2. Enter the command with appropriate parameters.
  30.  
  31.     compile_order ( Source_list=>("test_filename") [, Output=>"output_file"] 
  32.           [, Units_File=>"unit_file"] [, Which_Report=>report_type] );
  33.  
  34.     Entering the command compile_order with no parameters gives a brief
  35.     description of how to use the tool.
  36.  
  37.     For example,
  38.  
  39.     compile_order ( Source_List=>("test1.tst"), Which_Report=>raw);
  40.  
  41.  -- In this case the input file is test1.tst, and the output will go to the
  42.  -- default output.  The report will be in raw form.
  43.  -- More than one file is allowed in the Source_List, as are wildcards.
  44.  
  45.     compile_order ( Source_List=>("test1.tst", "test.*"), Output=>"report.rpt")
  46.  
  47.  -- In this case there are a list of files for input and the report defaults
  48.  -- to be in full format.
  49.  
  50. Files contained in this directory:
  51.  
  52. COMPORD.CO   -- Compilation order for compile order sources
  53. COMPORD.EXE  -- VMS 4.0 compile order executable
  54.  
  55. The [.SOURCE] subdirectory contains most of the sources that make up the 
  56. compile order tool.  Other sources are contained in the abstractions
  57. directory.
  58.  
  59. Files in [.SOURCE]:
  60.  
  61. The source files that make up the compile order tool are as follows:
  62.  
  63. CDRIVER.ADA -- the driver which deals with the command line
  64. COMPORD.SPC -- the main procedure of the program
  65. COMPORD.BDY
  66. CMPUTIL.SPC -- the procedures which control the actions done by the parser
  67. MPUTIL.BDY 
  68. REPORT.SPC  -- the procedures which output the reports from the information
  69. REPORT.BDY  -- gathered
  70. LOOKUP.SPC  -- the data structure and procedures for looking up additional
  71. LOOKUP.BDY  -- file information supplied in units_file.
  72. UNITDAG.SPC -- instantiations of the dags and other things used by the dags
  73.             -- like the node types, and hash function
  74. MINIDAG.SPC -- instantiation of another dag
  75. COPKG.DAT   -- global variables for the program
  76.  
  77. The tool runs using the parser.  Most of the sources needed for the parser 
  78. are in the parser abstraction.  The four units that are unique to this tool
  79. are as follows:
  80.  
  81. APPLYACT.SUB -- A subunit of the parser which calls the action routines.
  82. GETNEXT.SUB  -- A subunit of the lexer which gets each token and only
  83.          -- returns non comment tokens to the lexer.
  84. PTBLS.BDY    -- The parse tables body.
  85. GRMCONST.BDY -- Grammar constants for the parse tables.
  86.  
  87. The [.TEST] subdirectory contains the tests used in testing compile order.
  88.  
  89. Files in [.TEST]:
  90.  
  91. Test files end in the extension ".tst"
  92.  
  93. TEST1.TST:    tests wrap around by nesting withs very deeply.
  94. TEST2.TST:    tests handling of a syntax error.
  95. TEST3.TST:    has no errors tests normal operation.
  96. TEST4.TST:    tests handling of separate bodies and inlines.
  97. TEST5.TST:    tests the handling of incorrect order within a file.
  98. TEST6.TST:    tests handling of a cycle between units.
  99. TEST7.TST:      test7, and test8 together test units having the
  100. TEST8.TST:        same name.
  101. CYCLE1.TST:    together with fcycle2 tests handling of a cycle
  102. FCYCLE2.TST:      between files.
  103.  
  104. The result files that were generated have an extension ".rpt"
  105. Report files using everything other than full report format were
  106. generated from test3.tst (the normal input).
  107. These are: raw.rpt, depend.rpt, rawdep.rpt, comp.rpt, rawcomp.rpt,
  108. file.rpt, units.rpt.
  109.  
  110. In the cases of files which tested errors the output files may be empty or
  111. incomplete.
  112.  
  113. The [.DOC] subdirectory contains the documentation for compile order.
  114.  
  115. Files in [.DOC]:
  116.  
  117.     USERMAN.MEM -- Compile order user's manual
  118.     USERMAN.RNO -- Runoff input for user's manual
  119.     RELEASE.NTS -- Release notes
  120.     COMPGRM.LIS -- Listing of compile order grammar.  The rule numbers
  121.                    in this file may be used to make changes to the case
  122.                    statement in the Apply_Actions subunit.
  123.     COMPORD.CNT -- Statement counts and line counts of compile order 
  124.                    source files.
  125. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  126. --userman.mem
  127. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  128.  
  129.  
  130.  
  131.    COMPILATION ORDER REPORT
  132.    ___________ _____ ______
  133.    ___________ _____ ______
  134. 1  COMPILATION ORDER REPORT
  135.  
  136.  
  137.      ___________
  138. 1.1  Description
  139.  
  140.  
  141.      This tool produces a pair of  reports.   One  report  shows  both
  142.  
  143. _____       _________
  144. withs  and  withed-by dependencies between library units for the files
  145.  
  146. in the Source_List.  The other report lists library units,  and  files
  147.  
  148. in their compilation order.  In general, when there is one compilation
  149.  
  150. unit per file these two lists would tend to be the same, but there may
  151.  
  152. be  more  than  one compilation unit within a file, and in these cases
  153.  
  154. the two lists will differ and we need to be able to tell when there is
  155.  
  156. a problem in one of these files.
  157.  
  158.  
  159.  
  160.  
  161.      _______ ______
  162. 1.2  Command Format
  163.  
  164.  
  165.  
  166. type REPORT_TYPE is (FULL, RAW, DEPENDENCY, RAW_DEPENDENCY, COMPILATION,
  167.  
  168.                      RAW_COMPILATION, RAW_COMPILATION, UNITS_ORDER,
  169.  
  170.                       FILE_ORDER);
  171.  
  172.  
  173.  
  174.      COMPILE_ORDER     (   SOURCE_LIST  : in STRING_ARRAY;
  175.  
  176.                            OUTPUT       : in STRING := "";
  177.  
  178.                            UNITS_FILE   : in STRING := "";
  179.  
  180.                            WHICH_REPORT : in REPORT_TYPE := FULL );
  181.  
  182.  
  183.      Source_List    This is the  list  of  files  to  be  scanned  for
  184.  
  185.                     dependencies.   They should be names of Ada source
  186.  
  187.                     code files.  There must be at least one input file
  188.  
  189.                     in  the  list.  Also wild cards are allowed in the
  190.  
  191.                                                                 .
  192.                     named, so a valid input is Source_List =>  (.ada).
  193.  
  194.                     The format of the list is the names of input files
  195.  
  196.                     enclosed in parenthesis with commas separating the
  197.  
  198.                     names.
  199.  
  200.      Output         This is the name of an  output  file  to  put  the
  201.  
  202.                     report in.  If there is no name the report will go
  203.  
  204.                     to standard output.
  205.  
  206.      Units_File     This  is  the  name  of  a  file  which   contains
  207.  
  208.                     information about the file name corresponding to a
  209.  
  210.                     particular unit.  If there is no name  it  assumes
  211.  
  212.                     there  is no additional input and no look ups will
  213.  
  214.                     be done.  See the  description  of  a  units  file
  215.  
  216.                     below.
  217.  
  218.      Which_Report   This indicates which of the output options to use.
  219.  
  220.                     The  default is to print out the full report.  The
  221.  
  222.                     possible values for Which_Report are:  FULL,  RAW,
  223.  
  224.                     DEPENDENCY,      RAW_DEPENDENCY,      COMPILATION,
  225.  
  226.                     RAW_COMPILATION, RAW_COMPILATION, UNITS_ORDER  and
  227.  
  228.                     FILE_ORDER.
  229.  
  230.                                                                 Page 2
  231.  
  232.  
  233.  
  234.      ___ __________ ______
  235. 1.3  The Dependency Report
  236.  
  237.  
  238.      The dependency report shows the withs and withed-by  dependencies
  239.  
  240. between units.  The first half is the withs dependencies.  Units which
  241.  
  242. are at the top of a withs tree (i.e.  they are not withed-by any other
  243.  
  244. unit) are written at the left margin.  Each level of withs relative to
  245.  
  246. these units is indented two spaces to the right.  To avoid  repetition
  247.  
  248. of  a  unit  and any dependencies it has that have already been shown,
  249.  
  250. the name of a unit enclosed in braces indicates that  the  information
  251.  
  252. has  already  been printed in the report.  The name will be written in
  253.  
  254. braces in all places except the first use.  If the dependencies become
  255.  
  256. so  deeply  nested  that a name would go off the edge of the page, the
  257.  
  258. output wraps around.   To  indicate  a  wrap  around  there  are  four
  259.  
  260. asterisks  at  the  beginning of the line and the last name printed is
  261.  
  262. repeated for context.
  263.  
  264.  
  265.      The withed-by list is similar to the withs list so  there  is  no
  266.  
  267. need  to  describe  it  in  detail.   The withed-by list is useful for
  268.  
  269. determining the potential expense of making a change to a  unit  which
  270.  
  271. is  being  used by other units in the library.  At the very least, all
  272.  
  273. dependent (withed-by)  units  will  require  recompilation;  some  may
  274.  
  275. require  modification,  depending  upon  what  kind  of  a  change  is
  276.  
  277. contemplated.
  278.  
  279.  
  280.  
  281.  
  282.      ___ ____________ ________
  283. 1.4  The Dependencies Analyzed
  284.  
  285.  
  286.      Most of the dependecies in the report will be  the  obvious  ones
  287.  
  288. where one unit withs another in a with clause.  Other dependencies are
  289.  
  290. possible however, and handled by this tool.  These other  dependencies
  291.  
  292. are  in  the  cases  of pragma inlines and generic instantiations.  If
  293.  
  294. there is a pragma inline an implicit dependency on the  body  of  that
  295.  
  296. unit is created.  In the case of generic instantiations some compilers
  297.  
  298. create a dependency on the body of the generic unit.   Both  of  these
  299.  
  300. types  of  dependencies are reflected in the reports generated by this
  301.  
  302. tool.   See  the  installation  note  for  how  to  turn  the  generic
  303.  
  304. dependencies on.
  305.  
  306.  
  307.  
  308.  
  309.      ___ ___________ _____ ____
  310. 1.5  The Compilation Order List
  311.  
  312.  
  313.      By analyzing the dependencies gathered for the dependency  report
  314.  
  315. we  will  create a compilation order list which will work.  Obviously,
  316.  
  317. in the case of many units which are independent there are  any  number
  318.  
  319. of  orders  that will work, but this report will only produce one.  It
  320.  
  321. produces  two  different  compilation  lists.   One   based   on   the
  322.  
  323. compilation  units, the other based on the file names.  Where the file
  324.  
  325. name is known it is also reported in the unit list.   In  cases  where
  326.  
  327. the  file  is  not known (e.g.  a with of TEXT_IO) the file name field
  328.  
  329. contains "(not found)".  File names supplied  in  the  Units_file  are
  330.  
  331. marked  with  a "#" before the name so they would not be confused with
  332.  
  333. files analysed.
  334.  
  335.                                                                 Page 3
  336.  
  337.  
  338.  
  339.      When there are cycles in the dependencies (either  between  units
  340.  
  341. or  files) the dependencies that caused the cycles will be reported at
  342.  
  343. the begining of the output.  The tables and compilation lists  reflect
  344.  
  345. the  dependencies  ignoring  the ones which caused the cycles.  So any
  346.  
  347. tables generated when there are cycles should  not  be  used  to  with
  348.  
  349. other tools until the problem is fixed.
  350.  
  351.  
  352.      It is also possible that the order of units within a  file  could
  353.  
  354. cause  a  problem when a file contains more that one compilation unit.
  355.  
  356. These units are flagged with an asterisk at the end of the unit  name.
  357.  
  358. Reversing  the  order  of the compilation units within the file should
  359.  
  360. solve this problem.
  361.  
  362.  
  363.      When there is a syntax error in the file, the tool will  indicate
  364.  
  365. where  the  error  is  and  continue with the next file.  Units in any
  366.  
  367. files which are skipped this way will not be in the report.  Also,  if
  368.  
  369. two  files  contain  compilation units with the same name the error is
  370.  
  371. flagged and the second file is ignored.  The report continues with the
  372.  
  373. next file in the source list.
  374.  
  375.  
  376.  
  377.  
  378.      _____ __ ___ ____
  379. 1.6  Input To The Tool
  380.  
  381.  
  382.      The input is a list of source files to  scan  for  the  necessary
  383.  
  384. information.   It  will  scan  for  withs  clauses  and  the  package,
  385.  
  386. procedure or function associated with the withs.  For tool to scan the
  387.  
  388. file properly the contents of the input files must be Ada.  Additional
  389.  
  390. input to the tool can be supplied through the Units_File.   This  file
  391.  
  392. will  be  scanned for the file names fo units which would otherwise be
  393.  
  394. listed as "not found".  The format of this file is first the file name
  395.  
  396. followed  by  the  unit name, followed by the unit type (i.e.  (spec),
  397.  
  398. (body) or (separate body) ).  There should be the information for  one
  399.  
  400. unit  on  each  line.   In  the report file names found by look up are
  401.  
  402. marked with a "#" before the name.  A Units_File  in  the  form  of  a
  403.  
  404. units_order  previously generated is accepted by the tool with the "#"
  405.  
  406. in front of any file name being ignored if there is one.
  407.  
  408.  
  409.  
  410.  
  411.      ___ ______ _______
  412. 1.7  The Output Options
  413.  
  414.  
  415.      There are eight different forms for the output.  The default form
  416.  
  417. is the full form where both dependencies and compilation order reports
  418.  
  419. will be written with the output paginated and headers at  the  top  of
  420.  
  421. columns.  Another form is raw mode, where the same information will be
  422.  
  423. printed, but the output will not be paginated and  there  will  be  no
  424.  
  425. headers.   This  is  to  allow  the  output  to be fed as the input to
  426.  
  427. another tool.
  428.  
  429.  
  430.      The other forms are a combination of these two.  The next is just
  431.  
  432. the dependency report with nice formatting, and related to this is the
  433.  
  434. dependency report in raw form.  There are four different forms of  the
  435.  
  436. compilation  order  report.   The  first  one is the compilation order
  437.  
  438. report with nice output.  The next is the same information, but in raw
  439.  
  440.                                                                 Page 4
  441.  
  442.  
  443.  
  444. form.   The  final  two  options are just the compilation units in raw
  445.  
  446. form, and just the file order in raw form.
  447.  
  448.  
  449.  
  450.  
  451.      _______
  452. 1.8  Example
  453.  
  454.  
  455.      The following is an example of  invoking  the  compilation  order
  456.  
  457. report.
  458.  
  459.     Compile_order (SOURCE_LIST =>("driver.spc", "graphs.spc", "scanner.spc"),
  460.  
  461.      OUTPUT=> "report.co", 
  462.  
  463.      UNITS_FILE=>"file.txt", 
  464.  
  465.      WHICH_REPORT=>FULL);
  466.  
  467.  
  468. If the files given contained the example compilation units below,  the
  469.  
  470. report generated from this call would look like this:
  471.  
  472.                                                                 Page 5
  473.  
  474.  
  475.  
  476. Compilation Report                                       April 5, 1985  page 1
  477.  
  478.  
  479.  
  480.  Dependency Report:
  481.  
  482.  
  483. Withs dependencies:
  484.  
  485.  
  486. driver (spec)
  487.  
  488.   graph (spec)
  489.  
  490.     tables (spec)
  491.  
  492.   scanner (spec)
  493.  
  494.     Error_Message (spec)
  495.  
  496.       TEXT_IO (spec)
  497.  
  498.     {TEXT_IO (spec)}
  499.  
  500.  
  501. flowgraph (spec)
  502.  
  503.   {graph (spec)}
  504.  
  505.   {tables (spec)}
  506.  
  507.  
  508.  
  509. Withed-by Dependencies:
  510.  
  511.  
  512. tables (spec)
  513.  
  514.   flowgraph (spec)
  515.  
  516.   graph (spec)
  517.  
  518.     driver (spec)
  519.  
  520.  
  521. TEXT_IO (spec)
  522.  
  523.   Error_Message (spec)
  524.  
  525.     scanner (spec)
  526.  
  527.       {driver (spec)}
  528.  
  529.   {scanner (spec)}
  530.  
  531.  
  532. Compilation List:
  533.  
  534.  
  535. File Name       Compilation Unit
  536.  
  537.  
  538. (not found)           TEXT_IO (spec)      
  539.  
  540. # table.spc           tables  (spec)      
  541.  
  542. scanner.spc           Error_Message (spec)
  543.  
  544. scanner.spc           scanner (spec)      
  545.  
  546. graphs.spc            graph (spec)        
  547.  
  548. driver.spc            driver (spec)       
  549.  
  550. graphs.spc            flowgraph (spec)    
  551.  
  552.  
  553.  
  554.  
  555. File Order:
  556.  
  557. scanner.spc
  558.  
  559. graphs.spc
  560.  
  561. driver.ada
  562.  
  563.  
  564.  
  565. This goes directly to the file given  as  Output  or  to  the  default
  566.  
  567. output.
  568.  
  569.                                                                 Page 6
  570.  
  571.  
  572.  
  573. Note that units which are not in the files given are  shown,  and  any
  574.  
  575. information know is also given.  For example, tables.spc was not given
  576.  
  577. as an input file, but if file.txt had contained the record:
  578.  
  579. table.spc    tables   (spec)
  580.  
  581. the report would come out as shown with "#  table.spc"  in  the  units
  582.  
  583. compilation  order.  It should be remembered that these files were not
  584.  
  585. scanned for withs and any dependencies they may have are not reflected
  586.  
  587. in  the report.  Units that are not in one of the input files or named
  588.  
  589. in the Units file are still shown as "not found".
  590.  
  591.  
  592.  
  593.  
  594.      ____________ ____
  595. 1.9  Installation Note
  596.  
  597.  
  598.      Generic instantiations may be handled  differently  by  different
  599.  
  600. compilers  since  it  is  left  open to interpretation by the Language
  601.  
  602. Reference Manual.  Some compilers  may  create  a  dependency  on  the
  603.  
  604. generic's  body when the generic is instantiated while others may not.
  605.  
  606. Always adding this dependency would not be wrong but  it  would  cause
  607.  
  608. somethimes  unnecessary  dependencies  which should be avoided.  So to
  609.  
  610. have  generic  instantiations  create  a  dependency,   the   variable
  611.  
  612. do_generics  in  compile_order_declarations  should  be set true.  One
  613.  
  614. minor problem with adding these dependencies is that  syntactically  a
  615.  
  616. the  instantiation  of  a  local  generic  looks  no different from an
  617.  
  618. external one.  This results in local generics being treated  the  same
  619.  
  620. way as an external one, and showing up in the report as distinct units
  621.  
  622. which they are not.  They can, however, be ignored and do  not  effect
  623.  
  624. the ordering in any other way.
  625.  
  626. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  627. --userman.rno
  628. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  629. .FLAG BOLD
  630. .HEADER LEVEL 1^*^&COMPILATION ORDER REPORT\&\*
  631. .HEADER LEVEL 2^&Description\&
  632. .PARAGRAPH
  633. This tool produces a pair of reports. One
  634. report shows both ^&withs\& and
  635. ^&withed-by\& dependencies between library units for the files
  636. in the Source__List.
  637. The other report lists library units, and files in their compilation
  638. order. In general, when there is one compilation unit per file these
  639. two lists would tend to be the same, but there may be more than one
  640. compilation unit within a file, and in these cases the two lists will
  641. differ and we need to be able to tell when there is a problem in one of
  642. these files.
  643. .HEADER LEVEL 2^&Command Format\&
  644. .LITERAL
  645.  
  646. type REPORT_TYPE is (FULL, RAW, DEPENDENCY, RAW_DEPENDENCY, COMPILATION,
  647.                      RAW_COMPILATION, RAW_COMPILATION, UNITS_ORDER,
  648.               FILE_ORDER);
  649.  
  650.  
  651.      COMPILE_ORDER     (   SOURCE_LIST  : in STRING_ARRAY;
  652.                            OUTPUT       : in STRING := "";
  653.                UNITS_FILE   : in STRING := "";
  654.                            WHICH_REPORT : in REPORT_TYPE := FULL );
  655. .END LITERAL
  656. .BLANK
  657. .LEFT MARGIN 20
  658. .TAB STOP 20
  659. .INDENT -15
  660. Source__List    This is the list of files to be scanned for dependencies.
  661. They should be names of Ada source code files.  There must be at least one
  662. input file in the list.  Also wild cards are allowed in the named, so a valid
  663. input is Source__List => (*.ada).  The format of the list is the names of input
  664. files enclosed in parenthesis with commas separating the names.
  665. .INDENT -15
  666. Output    This is the name of an output file to put the report in.  If there is
  667. no name the report will go to standard output.
  668. .INDENT -15
  669. Units__File    This is the name of a file which contains information about
  670. the file name corresponding to a particular unit.  If there is
  671. no name it assumes there is no additional input and no look ups will be done.
  672. See the description of a units file below.
  673. .INDENT -15
  674. Which__Report    This indicates which of the output options to use.
  675. The default is to print out the full report.  The possible values for
  676. Which__Report are: FULL, RAW, DEPENDENCY, RAW__DEPENDENCY, COMPILATION,
  677. RAW__COMPILATION, RAW__COMPILATION, UNITS__ORDER and FILE__ORDER.
  678. .TAB STOP 0
  679. .LEFT MARGIN 0
  680. .HEADER LEVEL 2^&The Dependency Report\&
  681. .PARAGRAPH
  682. The dependency report shows the withs and withed-by dependencies
  683. between units.  The first half is the withs dependencies.
  684. Units which are at the top of a withs tree (i.e. they are not withed-by
  685. any other unit) are written at the left margin.  Each level of withs
  686. relative to these units is indented two spaces to the right.
  687. To avoid repetition of a unit and any dependencies it has that have
  688. already been shown, the name of a unit enclosed in braces
  689. indicates that the information has already been printed in the report.
  690. The name will be written in braces in all places except the
  691. first use.  If the dependencies become so deeply nested that a name would
  692. go off the edge of the page, the output wraps around.  To indicate a 
  693. wrap around there are four asterisks at the beginning of the line and the
  694. last name printed is repeated for context.
  695. .PARAGRAPH
  696. The withed-by list is similar to the  withs list so there is no need to
  697. describe it in detail.
  698. The withed-by list is useful for determining the potential
  699. expense of making a change to a unit which is being used by other
  700. units in the library.  At the very least, all dependent
  701. (withed-by) units will require recompilation; some may require
  702. modification, depending upon what kind of a change is
  703. contemplated.
  704. .HEADER LEVEL 2^&The Dependencies Analyzed\&
  705. .PARAGRAPH
  706. Most of the dependecies in the report will be the obvious ones where one
  707. unit withs another in a with clause.  Other dependencies are possible however,
  708. and handled by this tool.  These other dependencies are in the cases of 
  709. pragma inlines and generic instantiations.  If there is a pragma inline 
  710. an implicit dependency  on the body of that unit is created.  In the case
  711. of generic instantiations some compilers create a dependency on the body
  712. of the generic unit.  Both of these types of dependencies are reflected
  713. in the reports generated by this tool.  See the installation note for how to
  714. turn the generic dependencies on.
  715. .HEADER LEVEL 2^&The Compilation Order List\&
  716. .PARAGRAPH
  717. By analyzing the dependencies gathered for the dependency report we will
  718. create a compilation order list which will work.  Obviously, in the case
  719. of many units which are independent there are any number of orders
  720. that will work,
  721. but this report will only produce one.
  722. It produces two different compilation lists.  One based on the compilation
  723. units, the other based on the file names. Where the file name is known it
  724. is also reported in the unit list.  In cases where the file is not known
  725. (e.g. a with of TEXT__IO) the file name field contains "(not found)".
  726. File names supplied in the Units__file are marked with a "_#" before the
  727. name so they would not be confused with files analysed.
  728. .PARAGRAPH
  729. When there are cycles in the dependencies (either between units or files)
  730. the dependencies that caused the cycles will be reported at the begining
  731. of the output.  The tables and compilation lists reflect the dependencies
  732. ignoring the ones which caused the cycles.  So any tables generated
  733. when there are cycles should not be used to with other tools until the
  734. problem is fixed.
  735. .PARAGRAPH
  736. It is also possible that the order of units within a file could cause
  737. a problem when a file contains more that one compilation unit.
  738. These units are flagged with an asterisk at the end of the unit name.
  739. Reversing the order of the compilation units within the file should
  740. solve this problem.
  741. .PARAGRAPH
  742. When there is a syntax error in the file, the tool will indicate
  743. where the error is and continue with the next file.   Units in any files
  744. which are skipped this way will not be in the report.
  745. Also, if two files contain compilation units with the same name the
  746. error is flagged and the second file is ignored.  The report continues
  747. with the next file in the source list.
  748. .HEADER LEVEL 2^&Input to the Tool\&
  749. .PARAGRAPH
  750. The input is a list of source files to scan for the necessary information.
  751. It will scan for withs clauses and the package, procedure or function
  752. associated with the withs.  For tool to scan the file properly the contents
  753. of the input files must be Ada.
  754. Additional input to the tool can be supplied through the Units__File.  This
  755. file will be scanned for the file names fo units which would otherwise be
  756. listed as "not found".  The format of this file is first the file name 
  757. followed by the unit name, followed by the unit type (i.e. (spec), (body)
  758. or (separate body) ).  There should be the information for one unit on
  759. each line.  In the report file names found by look up are marked with a
  760. "_#" before the name.  A Units__File in the form of a units__order previously
  761. generated is
  762. accepted by the tool with the "_#" in front of any file name being ignored
  763. if there is one.
  764. .HEADER LEVEL 2^&The Output Options\&
  765. .PARAGRAPH
  766. There are eight different forms for the output.  The default form is
  767. the full form where both dependencies and compilation order reports
  768. will be written with the output paginated and headers at the top
  769. of columns.  Another form is raw mode, where the same information
  770. will be printed, but the output will not be paginated and there will
  771. be no headers.  This is to allow the output to be fed as the input
  772. to another tool.
  773. .PARAGRAPH
  774. The other forms are a combination of these two.  The next is just
  775. the dependency report with nice formatting, and related to this
  776. is the dependency report in raw form.  There are four different
  777. forms of the compilation order report.  The first one is the compilation
  778. order report with nice output.  The next is the same information, but
  779. in raw form.  The final two options are just the compilation units in
  780. raw form, and just the file order in raw form.
  781. .HEADER LEVEL 2^&Example\&
  782. .PARAGRAPH
  783. The following is an example of invoking the compilation order
  784. report.
  785. .LITERAL
  786.     Compile_order (SOURCE_LIST =>("driver.spc", "graphs.spc", "scanner.spc"),
  787.            OUTPUT=> "report.co", 
  788.            UNITS_FILE=>"file.txt", 
  789.            WHICH_REPORT=>FULL);
  790. .END LITERAL
  791. .BLANK
  792. If the files given contained the example compilation units below, 
  793. the report generated from this call would look like this:
  794. .PAGE
  795. .LITERAL
  796. Compilation Report                                       April 5, 1985  page 1
  797.  
  798.  
  799.  Dependency Report:
  800.  
  801. Withs dependencies:
  802.  
  803. driver (spec)
  804.   graph (spec)
  805.     tables (spec)
  806.   scanner (spec)
  807.     Error_Message (spec)
  808.       TEXT_IO (spec)
  809.     {TEXT_IO (spec)}
  810.  
  811. flowgraph (spec)
  812.   {graph (spec)}
  813.   {tables (spec)}
  814.  
  815.  
  816. Withed-by Dependencies:
  817.  
  818. tables (spec)
  819.   flowgraph (spec)
  820.   graph (spec)
  821.     driver (spec)
  822.  
  823. TEXT_IO (spec)
  824.   Error_Message (spec)
  825.     scanner (spec)
  826.       {driver (spec)}
  827.   {scanner (spec)}
  828.  
  829. Compilation List:
  830.  
  831. File Name          Compilation Unit
  832.  
  833. (not found)           TEXT_IO (spec)      
  834. # table.spc           tables  (spec)      
  835. scanner.spc           Error_Message (spec)
  836. scanner.spc           scanner (spec)      
  837. graphs.spc            graph (spec)        
  838. driver.spc            driver (spec)       
  839. graphs.spc            flowgraph (spec)    
  840.  
  841.  
  842.  
  843. File Order:
  844. scanner.spc
  845. graphs.spc
  846. driver.ada
  847.  
  848. .END LITERAL
  849. .BLANK  
  850. This goes directly to the file given as Output or to the default output.
  851. .BLANK
  852. Note that units which are not in the files given are shown, and any
  853. information know is also given.  For example, tables.spc was not
  854. given as an input file, but if file.txt had contained the record:
  855. .LITERAL
  856. table.spc    tables   (spec)
  857. .END LITERAL
  858. the report would come out as shown with "_# table.spc" in the units compilation
  859. order.  It should be remembered that these files were not scanned for withs
  860. and any dependencies they may have are not reflected in the report.  Units
  861. that are not in one of the input files or named in the Units file are still
  862. shown as "not found".
  863. .HEADER LEVEL 2^&Installation Note\&
  864. .PARAGRAPH
  865. Generic instantiations may be handled differently by different compilers since 
  866. it is left open to interpretation by the Language Reference Manual.  Some
  867. compilers may create a dependency on the generic's body when the generic is
  868. instantiated while others may not.  Always adding this dependency would not be
  869. wrong but it would cause somethimes unnecessary  dependencies which should be
  870. avoided.  So to have generic instantiations create a dependency, the variable
  871. do__generics in compile__order__declarations should be set true.  One minor
  872. problem with adding these dependencies is that syntactically a the 
  873. instantiation of a local generic looks no different from an external one.
  874. This results in local generics being treated the same way as an external one,
  875. and showing up in the report as distinct units which they are not.  They
  876. can, however, be ignored and do not effect the ordering in any other way.
  877. .PAGE
  878. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  879. --release.nts
  880. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  881.     Release Notes for the compord tool (May 1985)
  882.  
  883. 1. Implementation changes:
  884.    The lower level of the tool changed completely in implementation, and
  885.    the other units were restructured to make more sense with the new
  886.    implementation.  So, all code previously shipped is completely out
  887.    of date as everything changed in one way or another.
  888.  
  889. 2. Interface changes:
  890.    An additional parameter was added as requested.  It is called UNITS_FILE.
  891.    The use of this file is that when producing a report if the file name
  892.    field is not known for a unit before saying "(not found)" it will try
  893.    to look it up in the units file.  Any files found this way will be marked
  894.    with a '#' in the first column.  
  895.    The contents of this file are a lists of files and their contents in
  896.    the following format:
  897.    [#] <filename>    <unit name> <unit type>
  898.    <filename> is the name of the file which contains the unit <unit name>
  899.    <unit name> is the name of the unit.
  900.    <unit type> is one of (spec), (body), (separate body).
  901.    The unit type is necessary since compord does not think of a unit simply
  902.    in terms of its name, but in terms of the name and the type because the
  903.    type effects the types of dependecies it has.
  904.    Using the above format allows the user to use a units_order report as
  905.    a unit_file input.  It accepts both a plain units_order and also
  906.    one with '#' signs in the first column indicating that the name was
  907.    looked up previously in a units file.
  908.  
  909. 3. Driver changes:
  910.    It now accepts full Ada syntax on the command line (including ';').
  911.    The command is echoed back if no errors were found on the command line.
  912.  
  913. 4. Dependency changes:
  914.    In addtions to implicits withs generated by bodies and pragma inlines,
  915.    an implicit with can be generated for instantiations of generics. 
  916.    Some compilers will create a dependency from the unit where the 
  917.    instantiation is to the body of the generic unit, but not all compilers.
  918.    In order to only do this when it is needed there is a variable in 
  919.    the package compile_order_declarations called do_generics which should
  920.    be set according to the type of compiler the user has.  It is alright to
  921.    always have it on, but some anomalies might creep into the report.
  922.    These result from the fact that in a body (where the instantiation 
  923.    would be) compord cannot tell from syntax alone whether the generic
  924.    is an external one which creates a real dependency, or a generic
  925.    that was declared in the spec of the present unit.  In the second
  926.    case it decides to put in the extra dependency since it seemed better
  927.    to put in all the dependecies it thinks are there rather than none.
  928.    These 'local' generics will not have an associated filename and
  929.    will not effect the correctnes of any of the other reports.
  930. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  931. --compgrm.lis
  932. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  933. Options in Effect
  934.      
  935.  DEFAULT
  936.  TABLES
  937.  DEFMARK = %
  938.  ORMARK = |
  939.  BLOCKB = /.
  940.  BLOCKE = ./
  941.  COMMB = --
  942.  COMME =
  943.  LOADF =   70
  944. Grammar Constants
  945.      
  946.  Number of Terminals   94
  947.  Number of Non Terminals  222
  948.  Number of Rules  477
  949.  Number of Items 1637
  950.  Number of states  949
  951.  Number of shift entries 1548
  952.  Number of goto entries 2156
  953.  Number of reduce entries  158
  954.  Number of entries saved by default reductions 5809
  955.  Number of shift/reduce conflicts    0
  956.  Number of reduce/reduce conflicts    0
  957. The following symbols are not used in any right hand side
  958.      
  959.  comment_literal
  960.  
  961.  Terminalss
  962.      
  963.  ABORT
  964.  ABS
  965.  ACCEPT
  966.  ACCESS
  967.  ALL
  968.  AND
  969.  ARRAY
  970.  AT
  971.  BEGIN
  972.  BODY
  973.  CASE
  974.  CONSTANT
  975.  DECLARE
  976.  DELAY
  977.  DELTA
  978.  DIGITS
  979.  DO
  980.  ELSE
  981.  ELSIF
  982.  END
  983.  ENTRY
  984.  EXCEPTION
  985.  EXIT
  986.  FOR
  987.  FUNCTION
  988.  GENERIC
  989.  GOTO
  990.  IF
  991.  IN
  992.  IS
  993.  LIMITED
  994.  LOOP
  995.  MOD
  996.  NEW
  997.  NOT
  998.  NULL
  999.  OF
  1000.  OR
  1001.  OTHERS
  1002.  OUT
  1003.  PACKAGE
  1004.  PRAGMA
  1005.  PRIVATE
  1006.  PROCEDURE
  1007.  RAISE
  1008.  RANGE
  1009.  RECORD
  1010.  REM
  1011.  RENAMES
  1012.  RETURN
  1013.  REVERSE
  1014.  SELECT
  1015.  SEPARATE
  1016.  SUBTYPE
  1017.  TASK
  1018.  TERMINATE
  1019.  THEN
  1020.  TYPE
  1021.  USE
  1022.  WHEN
  1023.  WHILE
  1024.  WITH
  1025.  XOR
  1026.  identifier
  1027.  numeric_literal
  1028.  string_literal
  1029.  character_literal
  1030.  &
  1031.  '
  1032.  (
  1033.  )
  1034.  *
  1035.  +
  1036.  ,
  1037.  -
  1038.  .
  1039.  /
  1040.  :
  1041.  ;
  1042.  <
  1043.  =
  1044.  >
  1045.  '|'
  1046.  =>
  1047.  ..
  1048.  **
  1049.  :=
  1050.  /=
  1051.  >=
  1052.  <=
  1053.  <<
  1054.  >>
  1055.  <>
  1056.  comment_literal
  1057.  
  1058.  Rules
  1059.      
  1060.     1 pragma ::= PRAGMA pragma_id ( general_component_associations ) ;
  1061.      
  1062.     2 pragma ::= PRAGMA identifier ;
  1063.      
  1064.     3 pragma_id ::= identifier
  1065.      
  1066.     4 basic_declaration ::= object_declaration
  1067.      
  1068.     5 basic_declaration ::= number_declaration
  1069.      
  1070.     6 basic_declaration ::= type_declaration
  1071.      
  1072.     7 basic_declaration ::= subtype_declaration
  1073.      
  1074.     8 basic_declaration ::= subprogram_declaration
  1075.      
  1076.     9 basic_declaration ::= package_declaration
  1077.      
  1078.    10 basic_declaration ::= task_declaration
  1079.      
  1080.    11 basic_declaration ::= generic_declaration
  1081.      
  1082.    12 basic_declaration ::= exception_declaration
  1083.      
  1084.    13 basic_declaration ::= generic_instantiation
  1085.      
  1086.    14 basic_declaration ::= renaming_declaration
  1087.      
  1088.    15 object_declaration ::= identifier_list : subtype_indication [:=expression]
  1089.      
  1090.       ;
  1091.      
  1092.    16 object_declaration ::= identifier_list : CONSTANT subtype_indication
  1093.       [:=expression] ;
  1094.      
  1095.    17 object_declaration ::= identifier_list : constrained_array_definition
  1096.       [:=expression] ;
  1097.      
  1098.    18 object_declaration ::= identifier_list : CONSTANT
  1099.       constrained_array_definition [:=expression] ;
  1100.      
  1101.    19 number_declaration ::= identifier_list : CONSTANT := expression ;
  1102.      
  1103.    20 identifier_list ::= identifier {,identifier}
  1104.      
  1105.    21 type_declaration ::= full_type_declaration
  1106.      
  1107.    22 type_declaration ::= incomplete_type_declaration
  1108.      
  1109.    23 type_declaration ::= private_type_declaration
  1110.      
  1111.    24 full_type_declaration ::= TYPE identifier IS type_definition ;
  1112.      
  1113.    25 full_type_declaration ::= TYPE identifier ( discriminant_specification
  1114.       {;discriminant_specification} ) IS type_definition ;
  1115.      
  1116.    26 type_definition ::= enumeration_type_definition
  1117.      
  1118.    27 type_definition ::= integer_type_definition
  1119.      
  1120.    28 type_definition ::= real_type_definition
  1121.      
  1122.    29 type_definition ::= array_type_definition
  1123.      
  1124.    30 type_definition ::= record_type_definition
  1125.      
  1126.    31 type_definition ::= access_type_definition
  1127.      
  1128.    32 type_definition ::= derived_type_definition
  1129.      
  1130.    33 subtype_declaration ::= SUBTYPE identifier IS subtype_indication ;
  1131.      
  1132.    34 subtype_indication ::= type_mark
  1133.      
  1134.    35 subtype_indication ::= type_mark constraint
  1135.      
  1136.    36 type_mark ::= type_name|subtype_name
  1137.      
  1138.    37 constraint ::= range_constraint
  1139.      
  1140.    38 constraint ::= floating_point_constraint
  1141.      
  1142.    39 constraint ::= fixed_point_constraint
  1143.      
  1144.    40 constraint ::= ( general_component_associations )
  1145.      
  1146.    41 derived_type_definition ::= NEW subtype_indication
  1147.      
  1148.    42 range_constraint ::= RANGE simple_expression
  1149.      
  1150.    43 range_constraint ::= RANGE simple_expression .. simple_expression
  1151.      
  1152.    44 enumeration_type_definition ::= ( enumeration_literal_specification
  1153.       {,enumeration_literal_specification} )
  1154.      
  1155.    45 enumeration_literal_specification ::= enumeration_literal
  1156.      
  1157.    46 enumeration_literal ::= identifier
  1158.      
  1159.    47 enumeration_literal ::= character_literal
  1160.      
  1161.    48 integer_type_definition ::= range_constraint
  1162.      
  1163.    49 real_type_definition ::= floating_point_constraint
  1164.      
  1165.    50 real_type_definition ::= fixed_point_constraint
  1166.      
  1167.    51 floating_point_constraint ::= floating_accuracy_definition
  1168.       [range_constraint]
  1169.      
  1170.    52 floating_accuracy_definition ::= DIGITS simple_expression
  1171.      
  1172.    53 fixed_point_constraint ::= fixed_accuracy_definition [range_constraint]
  1173.      
  1174.    54 fixed_accuracy_definition ::= DELTA simple_expression
  1175.      
  1176.    55 array_type_definition ::= unconstrained_array_definition
  1177.      
  1178.    56 array_type_definition ::= constrained_array_definition
  1179.      
  1180.    57 unconstrained_array_definition ::= ARRAY ( index_subtype_definition
  1181.       {,index_subtype_definition} ) OF subtype_indication
  1182.      
  1183.    58 constrained_array_definition ::= ARRAY index_constraint OF
  1184.       subtype_indication
  1185.      
  1186.    59 index_subtype_definition ::= name RANGE <>
  1187.      
  1188.    60 index_constraint ::= ( discrete_range {,discrete_range} )
  1189.      
  1190.    61 discrete_range ::= name range_constraint
  1191.      
  1192.    62 discrete_range ::= range
  1193.      
  1194.    63 range ::= simple_expression
  1195.      
  1196.    64 range ::= simple_expression .. simple_expression
  1197.      
  1198.    65 record_type_definition ::= RECORD component_list END RECORD
  1199.      
  1200.    66 component_list ::= {pragma_decl} {component_declaration}
  1201.       component_declaration {pragma_decl}
  1202.      
  1203.    67 component_list ::= {pragma_decl} {component_declaration} variant_part
  1204.       {pragma_decl}
  1205.      
  1206.    68 component_list ::= NULL ; {pragma_decl}
  1207.      
  1208.    69 component_declaration ::= identifier_list : subtype_indication
  1209.       [:=expression] ;
  1210.      
  1211.    70 discriminant_specification ::= identifier_list : type_mark [:=expression]
  1212.      
  1213.    71 variant_part ::= CASE identifier IS {pragma_variant} variant {variant} END
  1214.      
  1215.       CASE ;
  1216.      
  1217.    72 variant ::= WHEN choice {|choice} => component_list
  1218.      
  1219.    73 variant ::= WHEN OTHERS => component_list
  1220.      
  1221.    74 choice ::= simple_expression
  1222.      
  1223.    75 choice ::= simple_expression .. simple_expression
  1224.      
  1225.    76 choice ::= name range_constraint
  1226.      
  1227.    77 access_type_definition ::= ACCESS subtype_indication
  1228.      
  1229.    78 incomplete_type_declaration ::= TYPE identifier ;
  1230.      
  1231.    79 incomplete_type_declaration ::= TYPE identifier (
  1232.       discriminant_specification {;discriminant_specification} ) ;
  1233.      
  1234.    80 declarative_part ::= {basic_declarative_item}
  1235.      
  1236.    81 declarative_part ::= {basic_declarative_item} body {later_declarative_item
  1237. }
  1238.      
  1239.    82 basic_declarative_item ::= basic_declaration
  1240.      
  1241.    83 basic_declarative_item ::= representation_clause
  1242.      
  1243.    84 basic_declarative_item ::= use_clause
  1244.      
  1245.    85 later_declarative_item ::= body
  1246.      
  1247.    86 later_declarative_item ::= subprogram_declaration
  1248.      
  1249.    87 later_declarative_item ::= package_declaration
  1250.      
  1251.    88 later_declarative_item ::= task_declaration
  1252.      
  1253.    89 later_declarative_item ::= generic_declaration
  1254.      
  1255.    90 later_declarative_item ::= use_clause
  1256.      
  1257.    91 later_declarative_item ::= generic_instantiation
  1258.      
  1259.    92 body ::= proper_body
  1260.      
  1261.    93 body ::= body_stub
  1262.      
  1263.    94 proper_body ::= subprogram_body
  1264.      
  1265.    95 proper_body ::= package_body
  1266.      
  1267.    96 proper_body ::= task_body
  1268.      
  1269.    97 name ::= identifier
  1270.      
  1271.    98 name ::= character_literal
  1272.      
  1273.    99 name ::= string_literal
  1274.      
  1275.   100 name ::= indexed_component
  1276.      
  1277.   101 name ::= selected_component
  1278.      
  1279.   102 name ::= attribute
  1280.      
  1281.   103 indexed_component ::= name ( general_component_associations )
  1282.      
  1283.   104 selected_component ::= name . selector
  1284.      
  1285.   105 selected_component ::= name . ALL
  1286.      
  1287.   106 selector ::= identifier
  1288.      
  1289.   107 selector ::= character_literal
  1290.      
  1291.   108 selector ::= string_literal
  1292.      
  1293.   109 attribute ::= name ' attribute_designator
  1294.      
  1295.   110 attribute_designator ::= identifier
  1296.      
  1297.   111 attribute_designator ::= DIGITS
  1298.      
  1299.   112 attribute_designator ::= DELTA
  1300.      
  1301.   113 attribute_designator ::= RANGE
  1302.      
  1303.   114 aggregate ::= ( component_associations )
  1304.      
  1305.   115 component_associations ::= expression,expression{,expression}
  1306.       [,others=>expression]
  1307.      
  1308.   116 component_associations ::= expression,expression{,expression} ,
  1309.       choice{|choice}=>expression {,choice{|choice}=>expression}
  1310.       [,others=>expression]
  1311.      
  1312.   117 component_associations ::= expression , choice{|choice}=>expression
  1313.       {,choice{|choice}=>expression} [,others=>expression]
  1314.      
  1315.   118 component_associations ::= choice{|choice}=>expression
  1316.       {,choice{|choice}=>expression} [,others=>expression]
  1317.      
  1318.   119 component_associations ::= expression , others=>expression
  1319.      
  1320.   120 component_associations ::= others=>expression
  1321.      
  1322.   121 general_component_associations ::= ga_expression{,ga_expression}
  1323.      
  1324.   122 general_component_associations ::= ga_expression{,ga_expression} ,
  1325.       identifier{|identifier}=>expression {,identifier{|identifier}=>expression}
  1326.      
  1327.      
  1328.   123 general_component_associations ::= identifier{|identifier}=>expression
  1329.       {,identifier{|identifier}=>expression}
  1330.      
  1331.   124 expression ::= relation
  1332.      
  1333.   125 expression ::= relation{AND__relation}
  1334.      
  1335.   126 expression ::= relation{OR__relation}
  1336.      
  1337.   127 expression ::= relation{XOR__relation}
  1338.      
  1339.   128 expression ::= relation{AND__THEN__relation}
  1340.      
  1341.   129 expression ::= relation{OR__ELSE__relation}
  1342.      
  1343.   130 relation ::= simple_expression [relational_operator__simple_expression]
  1344.      
  1345.   131 relation ::= simple_expression [NOT]IN range
  1346.      
  1347.   132 simple_expression ::=
  1348.       [unary_adding_operator]term{binary_adding_operator__term}
  1349.      
  1350.   133 term ::= factor{multiplying_operator__factor}
  1351.      
  1352.   134 factor ::= primary [exponentiating_operator__primary]
  1353.      
  1354.   135 factor ::= high_precedence_unary_operator primary
  1355.      
  1356.   136 parenthesized_expression ::= ( expression )
  1357.      
  1358.   137 primary ::= numeric_literal
  1359.      
  1360.   138 primary ::= NULL
  1361.      
  1362.   139 primary ::= name
  1363.      
  1364.   140 primary ::= allocator
  1365.      
  1366.   141 primary ::= qualified_expression
  1367.      
  1368.   142 primary ::= aggregate
  1369.      
  1370.   143 primary ::= parenthesized_expression
  1371.      
  1372.   144 relational_operator ::= =
  1373.      
  1374.   145 relational_operator ::= /=
  1375.      
  1376.   146 relational_operator ::= <
  1377.      
  1378.   147 relational_operator ::= <=
  1379.      
  1380.   148 relational_operator ::= >
  1381.      
  1382.   149 relational_operator ::= >=
  1383.      
  1384.   150 binary_adding_operator ::= +
  1385.      
  1386.   151 binary_adding_operator ::= -
  1387.      
  1388.   152 binary_adding_operator ::= &
  1389.      
  1390.   153 unary_adding_operator ::= +
  1391.      
  1392.   154 unary_adding_operator ::= -
  1393.      
  1394.   155 high_precedence_unary_operator ::= ABS
  1395.      
  1396.   156 high_precedence_unary_operator ::= NOT
  1397.      
  1398.   157 multiplying_operator ::= *
  1399.      
  1400.   158 multiplying_operator ::= /
  1401.      
  1402.   159 multiplying_operator ::= MOD
  1403.      
  1404.   160 multiplying_operator ::= REM
  1405.      
  1406.   161 exponentiating_operator ::= **
  1407.      
  1408.   162 qualified_expression ::= name ' aggregate
  1409.      
  1410.   163 qualified_expression ::= name ' parenthesized_expression
  1411.      
  1412.   164 allocator ::= NEW type_mark
  1413.      
  1414.   165 allocator ::= NEW type_mark ( general_component_associations )
  1415.      
  1416.   166 allocator ::= NEW expanded_name ' parenthesized_expression
  1417.      
  1418.   167 allocator ::= NEW expanded_name ' aggregate
  1419.      
  1420.   168 sequence_of_statements ::= {pragma_stm} statement {statement}
  1421.      
  1422.   169 statement ::= simple_statement
  1423.      
  1424.   170 statement ::= compound_statement
  1425.      
  1426.   171 statement ::= {label}+ simple_statement
  1427.      
  1428.   172 statement ::= {label}+ compound_statement
  1429.      
  1430.   173 simple_statement ::= null_statement
  1431.      
  1432.   174 simple_statement ::= assignment_statement
  1433.      
  1434.   175 simple_statement ::= exit_statement
  1435.      
  1436.   176 simple_statement ::= return_statement
  1437.      
  1438.   177 simple_statement ::= goto_statement
  1439.      
  1440.   178 simple_statement ::= delay_statement
  1441.      
  1442.   179 simple_statement ::= abort_statement
  1443.      
  1444.   180 simple_statement ::= raise_statement
  1445.      
  1446.   181 simple_statement ::= code_statement
  1447.      
  1448.   182 simple_statement ::= call_statement
  1449.      
  1450.   183 compound_statement ::= if_statement
  1451.      
  1452.   184 compound_statement ::= case_statement
  1453.      
  1454.   185 compound_statement ::= loop_statement
  1455.      
  1456.   186 compound_statement ::= block_statement
  1457.      
  1458.   187 compound_statement ::= accept_statement
  1459.      
  1460.   188 compound_statement ::= select_statement
  1461.      
  1462.   189 label ::= << identifier >>
  1463.      
  1464.   190 null_statement ::= NULL ;
  1465.      
  1466.   191 assignment_statement ::= name := expression ;
  1467.      
  1468.   192 if_statement ::= IF condition_THEN__sequence_of_statements
  1469.       {ELSIF__condition__THEN__sequence_of_statements}
  1470.       [ELSE__sequence_of_statements] END IF ;
  1471.      
  1472.   193 condition ::= expression
  1473.      
  1474.   194 case_statement ::= CASE expression IS {pragma_alt}
  1475.       case_statement_alternative {case_statement_alternative} END CASE ;
  1476.      
  1477.   195 case_statement_alternative ::= WHEN choice {|choice} =>
  1478.       sequence_of_statements
  1479.      
  1480.   196 case_statement_alternative ::= WHEN OTHERS => sequence_of_statements
  1481.      
  1482.   197 loop_statement ::= [loop_identifier:] LOOP sequence_of_statements END LOOP
  1483.      
  1484.       [identifier] ;
  1485.      
  1486.   198 loop_statement ::= [loop_identifier:] iteration_rule LOOP
  1487.       sequence_of_statements END LOOP [identifier] ;
  1488.      
  1489.   199 iteration_rule ::= WHILE condition
  1490.      
  1491.   200 iteration_rule ::= FOR identifier IN discrete_range
  1492.      
  1493.   201 iteration_rule ::= FOR identifier IN REVERSE discrete_range
  1494.      
  1495.   202 declarative_part__begin_end_block ::= declarative_part begin_end_block
  1496.      
  1497.   203 begin_end_block ::= BEGIN sequence_of_statements END
  1498.      
  1499.   204 begin_end_block ::= BEGIN sequence_of_statements EXCEPTION
  1500.       {pragma_alt}__exception_handler_list END
  1501.      
  1502.   205 block_statement ::= [block_identifier:] DECLARE
  1503.       declarative_part__begin_end_block [identifier] ;
  1504.      
  1505.   206 block_statement ::= [block_identifier:] begin_end_block [identifier] ;
  1506.      
  1507.   207 exit_statement ::= EXIT ;
  1508.      
  1509.   208 exit_statement ::= EXIT WHEN condition ;
  1510.      
  1511.   209 exit_statement ::= EXIT expanded_name ;
  1512.      
  1513.   210 exit_statement ::= EXIT expanded_name WHEN condition ;
  1514.      
  1515.   211 return_statement ::= RETURN ;
  1516.      
  1517.   212 return_statement ::= RETURN expression ;
  1518.      
  1519.   213 goto_statement ::= GOTO expanded_name ;
  1520.      
  1521.   214 subprogram_declaration ::= subprogram_specification ;
  1522.      
  1523.   215 subprogram_specification ::= PROCEDURE unit_identifier
  1524.      
  1525.   216 subprogram_specification ::= PROCEDURE unit_identifier (
  1526.       parameter_specification {;parameter_specification} )
  1527.      
  1528.   217 subprogram_specification ::= FUNCTION designator RETURN type_mark
  1529.      
  1530.   218 subprogram_specification ::= FUNCTION designator ( parameter_specification
  1531.      
  1532.       {;parameter_specification} ) RETURN type_mark
  1533.      
  1534.   219 unit_identifier ::= identifier
  1535.      
  1536.   220 designator ::= identifier
  1537.      
  1538.   221 designator ::= string_literal
  1539.      
  1540.   222 parameter_specification ::= identifier_list mode type_mark [:=expression]
  1541.      
  1542.   223 mode ::= generic_parameter_mode
  1543.      
  1544.   224 mode ::= : OUT
  1545.      
  1546.   225 generic_parameter_mode ::= :
  1547.      
  1548.   226 generic_parameter_mode ::= : IN
  1549.      
  1550.   227 generic_parameter_mode ::= : IN OUT
  1551.      
  1552.   228 subprogram_body ::= subprogram_specification IS
  1553.       declarative_part__begin_end_block [end_designator] ;
  1554.      
  1555.   229 call_statement ::= name ;
  1556.      
  1557.   230 package_declaration ::= package_specification ;
  1558.      
  1559.   231 package_specification ::= package__unit_identifier IS
  1560.       {basic_declarative_item} END [identifier]
  1561.      
  1562.   232 package_specification ::= package__unit_identifier IS
  1563.       {basic_declarative_item} PRIVATE {basic_declarative_item} END [identifier]
  1564.      
  1565.      
  1566.   233 package_body ::= package__body__unit_identifier IS declarative_part END
  1567.       [identifier] ;
  1568.      
  1569.   234 package_body ::= package__body__unit_identifier IS
  1570.       declarative_part__begin_end_block [identifier] ;
  1571.      
  1572.   235 package__unit_identifier ::= PACKAGE unit_identifier
  1573.      
  1574.   236 package__body__unit_identifier ::= PACKAGE BODY unit_identifier
  1575.      
  1576.   237 private_type_declaration ::= TYPE identifier IS LIMITED PRIVATE ;
  1577.      
  1578.   238 private_type_declaration ::= TYPE identifier ( discriminant_specification
  1579.       {;discriminant_specification} ) IS LIMITED PRIVATE ;
  1580.      
  1581.   239 private_type_declaration ::= TYPE identifier IS PRIVATE ;
  1582.      
  1583.   240 private_type_declaration ::= TYPE identifier ( discriminant_specification
  1584.       {;discriminant_specification} ) IS PRIVATE ;
  1585.      
  1586.   241 use_clause ::= USE expanded_name {,expanded_name} ;
  1587.      
  1588.   242 renaming_declaration ::= identifier_list : type_mark RENAMES name ;
  1589.      
  1590.   243 renaming_declaration ::= identifier_list : EXCEPTION RENAMES expanded_name
  1591.      
  1592.       ;
  1593.      
  1594.   244 renaming_declaration ::= PACKAGE identifier RENAMES expanded_name ;
  1595.      
  1596.   245 renaming_declaration ::= subprogram_specification RENAMES name ;
  1597.      
  1598.   246 task_declaration ::= task_specification ;
  1599.      
  1600.   247 task_specification ::= TASK identifier
  1601.      
  1602.   248 task_specification ::= TASK TYPE identifier
  1603.      
  1604.   249 task_specification ::= TASK identifier IS {entry_declaration}
  1605.       {representation_clause} END [identifier]
  1606.      
  1607.   250 task_specification ::= TASK TYPE identifier IS {entry_declaration}
  1608.       {representation_clause} END [identifier]
  1609.      
  1610.   251 task_body ::= TASK BODY unit_identifier IS
  1611.       declarative_part__begin_end_block [identifier] ;
  1612.      
  1613.   252 entry_declaration ::= ENTRY identifier [(discrete_range)][formal_part] ;
  1614.      
  1615.   253 accept_statement ::= ACCEPT identifier [(expression)][formal_part] ;
  1616.      
  1617.   254 accept_statement ::= ACCEPT identifier [(expression)][formal_part] DO
  1618.       sequence_of_statements END [identifier] ;
  1619.      
  1620.   255 delay_statement ::= DELAY simple_expression ;
  1621.      
  1622.   256 select_statement ::= selective_wait
  1623.      
  1624.   257 select_statement ::= conditional_entry_call
  1625.      
  1626.   258 select_statement ::= timed_entry_call
  1627.      
  1628.   259 selective_wait ::= SELECT select_alternative {OR__select_alternative}
  1629.       [ELSE__sequence_of_statements] END SELECT ;
  1630.      
  1631.   260 select_alternative ::= {pragma_stm} WHEN condition =>
  1632.       selective_wait_alternative
  1633.      
  1634.   261 select_alternative ::= {pragma_stm} selective_wait_alternative
  1635.      
  1636.   262 selective_wait_alternative ::= accept_alternative
  1637.      
  1638.   263 selective_wait_alternative ::= delay_alternative
  1639.      
  1640.   264 selective_wait_alternative ::= terminate_alternative
  1641.      
  1642.   265 accept_alternative ::= accept_statement [sequence_of_statements]
  1643.      
  1644.   266 delay_alternative ::= delay_statement [sequence_of_statements]
  1645.      
  1646.   267 terminate_alternative ::= TERMINATE ; {pragma_stm}
  1647.      
  1648.   268 conditional_entry_call ::= SELECT {pragma_stm} call_statement
  1649.       [sequence_of_statements] ELSE sequence_of_statements END SELECT ;
  1650.      
  1651.   269 timed_entry_call ::= SELECT {pragma_stm} call_statement
  1652.       [sequence_of_statements] OR {pragma_stm} delay_alternative END SELECT ;
  1653.      
  1654.   270 abort_statement ::= ABORT name {,name} ;
  1655.      
  1656.   271 compilation ::= {compilation_unit}
  1657.      
  1658.   272 pragma_header ::= PRAGMA pragma_id
  1659.      
  1660.   273 compilation_unit ::= pragma_header ( general_component_associations ) ;
  1661.      
  1662.   274 compilation_unit ::= pragma_header ;
  1663.      
  1664.   275 compilation_unit ::= context_clause library_or_secondary_unit
  1665.      
  1666.   276 library_or_secondary_unit ::= subprogram_declaration
  1667.      
  1668.   277 library_or_secondary_unit ::= package_declaration
  1669.      
  1670.   278 library_or_secondary_unit ::= generic_declaration
  1671.      
  1672.   279 library_or_secondary_unit ::= generic_instantiation
  1673.      
  1674.   280 library_or_secondary_unit ::= subprogram_body
  1675.      
  1676.   281 library_or_secondary_unit ::= package_body
  1677.      
  1678.   282 library_or_secondary_unit ::= subunit
  1679.      
  1680.   283 context_clause ::= {with_clause{use_clause}}
  1681.      
  1682.   284 with_clause ::= WITH with_id {,with_id_list} ;
  1683.      
  1684.   285 with_id ::= identifier
  1685.      
  1686.   286 {,with_id_list} ::= EMPTY
  1687.      
  1688.   287 {,with_id_list} ::= {,with_id_list} , with_id
  1689.      
  1690.   288 body_stub ::= subprogram_specification IS SEPARATE ;
  1691.      
  1692.   289 body_stub ::= package__body__unit_identifier IS SEPARATE ;
  1693.      
  1694.   290 body_stub ::= TASK BODY unit_identifier IS SEPARATE ;
  1695.      
  1696.   291 subunit ::= SEPARATE ( body_name ) proper_body
  1697.      
  1698.   292 exception_declaration ::= identifier_list : EXCEPTION ;
  1699.      
  1700.   293 exception_handler ::= WHEN exception_choice {|exception_choice} =>
  1701.       sequence_of_statements
  1702.      
  1703.   294 exception_choice ::= expanded_name
  1704.      
  1705.   295 exception_choice ::= OTHERS
  1706.      
  1707.   296 raise_statement ::= RAISE ;
  1708.      
  1709.   297 raise_statement ::= RAISE expanded_name ;
  1710.      
  1711.   298 generic_declaration ::= generic_specification ;
  1712.      
  1713.   299 generic_specification ::= generic_formal_part subprogram_specification
  1714.      
  1715.   300 generic_specification ::= generic_formal_part package_specification
  1716.      
  1717.   301 generic_formal_part ::= GENERIC {generic_parameter_declaration}
  1718.      
  1719.   302 generic_parameter_declaration ::= identifier_list generic_parameter_mode
  1720.       type_mark [:=expression] ;
  1721.      
  1722.   303 generic_parameter_declaration ::= TYPE identifier IS
  1723.       generic_type_definition ;
  1724.      
  1725.   304 generic_parameter_declaration ::= TYPE identifier (
  1726.       discriminant_specification {;discriminant_specification} ) IS
  1727.       generic_type_definition ;
  1728.      
  1729.   305 generic_parameter_declaration ::= WITH subprogram_specification
  1730.       [IS__name__or__<>] ;
  1731.      
  1732.   306 generic_type_definition ::= ( <> )
  1733.      
  1734.   307 generic_type_definition ::= RANGE <>
  1735.      
  1736.   308 generic_type_definition ::= DIGITS <>
  1737.      
  1738.   309 generic_type_definition ::= DELTA <>
  1739.      
  1740.   310 generic_type_definition ::= LIMITED PRIVATE
  1741.      
  1742.   311 generic_type_definition ::= PRIVATE
  1743.      
  1744.   312 generic_type_definition ::= array_type_definition
  1745.      
  1746.   313 generic_type_definition ::= access_type_definition
  1747.      
  1748.   314 generic_instantiation ::= package__unit_identifier IS NEW generic_name ;
  1749.      
  1750.   315 generic_instantiation ::= package__unit_identifier IS NEW generic_name (
  1751.       generic_association {,generic_association} ) ;
  1752.      
  1753.   316 generic_instantiation ::= FUNCTION designator IS NEW generic_name ;
  1754.      
  1755.   317 generic_instantiation ::= FUNCTION designator IS NEW generic_name (
  1756.       generic_association {,generic_association} ) ;
  1757.      
  1758.   318 generic_instantiation ::= subprogram_specification IS NEW generic_name ;
  1759.      
  1760.   319 generic_instantiation ::= subprogram_specification IS NEW generic_name (
  1761.       generic_association {,generic_association} ) ;
  1762.      
  1763.   320 generic_association ::=
  1764.       [generic_formal_parameter=>]generic_actual_parameter
  1765.      
  1766.   321 generic_formal_parameter ::= identifier
  1767.      
  1768.   322 generic_formal_parameter ::= string_literal
  1769.      
  1770.   323 generic_actual_parameter ::= expression
  1771.      
  1772.   324 representation_clause ::= length_clause
  1773.      
  1774.   325 representation_clause ::= enumeration_representation_clause
  1775.      
  1776.   326 representation_clause ::= address_clause
  1777.      
  1778.   327 representation_clause ::= record_representation_clause
  1779.      
  1780.   328 length_clause ::= FOR attribute USE simple_expression ;
  1781.      
  1782.   329 enumeration_representation_clause ::= FOR identifier USE aggregate ;
  1783.      
  1784.   330 record_representation_clause ::= FOR identifier USE RECORD
  1785.       {component_clause} END RECORD ;
  1786.      
  1787.   331 record_representation_clause ::= FOR identifier USE RECORD alignment_claus
  1788. e
  1789.       {component_clause} END RECORD ;
  1790.      
  1791.   332 component_clause ::= name AT simple_expression range_constraint ;
  1792.      
  1793.   333 alignment_clause ::= AT MOD simple_expression ;
  1794.      
  1795.   334 address_clause ::= FOR identifier USE AT simple_expression ;
  1796.      
  1797.   335 code_statement ::= name ' aggregate ;
  1798.      
  1799.   336 {pragma_decl} ::= EMPTY
  1800.      
  1801.   337 {pragma_decl} ::= {pragma_decl} pragma
  1802.      
  1803.   338 {pragma_variant} ::= EMPTY
  1804.      
  1805.   339 {pragma_variant} ::= {pragma_variant} pragma
  1806.      
  1807.   340 {pragma_stm} ::= EMPTY
  1808.      
  1809.   341 {pragma_stm} ::= {pragma_stm} pragma
  1810.      
  1811.   342 {pragma_alt} ::= EMPTY
  1812.      
  1813.   343 {pragma_alt} ::= {pragma_alt} pragma
  1814.      
  1815.   344 [:=expression] ::= EMPTY
  1816.      
  1817.   345 [:=expression] ::= := expression
  1818.      
  1819.   346 {,identifier} ::= EMPTY
  1820.      
  1821.   347 {,identifier} ::= {,identifier} , identifier
  1822.      
  1823.   348 type_name|subtype_name ::= expanded_name
  1824.      
  1825.   349 expanded_name ::= identifier
  1826.      
  1827.   350 expanded_name ::= expanded_name . identifier
  1828.      
  1829.   351 body_name ::= identifier
  1830.      
  1831.   352 body_name ::= body_name . identifier
  1832.      
  1833.   353 generic_name ::= identifier
  1834.      
  1835.   354 generic_name ::= generic_name . identifier
  1836.      
  1837.   355 {,enumeration_literal_specification} ::= EMPTY
  1838.      
  1839.   356 {,enumeration_literal_specification} ::=
  1840.       {,enumeration_literal_specification} , enumeration_literal_specification
  1841.      
  1842.   357 [range_constraint] ::= EMPTY
  1843.      
  1844.   358 [range_constraint] ::= range_constraint
  1845.      
  1846.   359 {,index_subtype_definition} ::= EMPTY
  1847.      
  1848.   360 {,index_subtype_definition} ::= {,index_subtype_definition} ,
  1849.       index_subtype_definition
  1850.      
  1851.   361 {,discrete_range} ::= EMPTY
  1852.      
  1853.   362 {,discrete_range} ::= {,discrete_range} , discrete_range
  1854.      
  1855.   363 {component_declaration} ::= EMPTY
  1856.      
  1857.   364 {component_declaration} ::= {component_declaration} component_declaration
  1858.       {pragma_decl}
  1859.      
  1860.   365 {;discriminant_specification} ::= EMPTY
  1861.      
  1862.   366 {;discriminant_specification} ::= {;discriminant_specification} ;
  1863.       discriminant_specification
  1864.      
  1865.   367 {variant} ::= EMPTY
  1866.      
  1867.   368 {variant} ::= {variant} variant
  1868.      
  1869.   369 {|choice} ::= EMPTY
  1870.      
  1871.   370 {|choice} ::= {|choice} '|' choice
  1872.      
  1873.   371 {basic_declarative_item} ::= {pragma_decl}
  1874.      
  1875.   372 {basic_declarative_item} ::= {basic_declarative_item}
  1876.       basic_declarative_item {pragma_decl}
  1877.      
  1878.   373 {later_declarative_item} ::= {pragma_decl}
  1879.      
  1880.   374 {later_declarative_item} ::= {later_declarative_item}
  1881.       later_declarative_item {pragma_decl}
  1882.      
  1883.   375 expression,expression{,expression} ::= expression , expression
  1884.      
  1885.   376 expression,expression{,expression} ::= expression,expression{,expression}
  1886. ,
  1887.       expression
  1888.      
  1889.   377 choice{|choice}=>expression ::= choice {|choice} => expression
  1890.      
  1891.   378 {,choice{|choice}=>expression} ::= EMPTY
  1892.      
  1893.   379 {,choice{|choice}=>expression} ::= {,choice{|choice}=>expression} ,
  1894.       choice{|choice}=>expression
  1895.      
  1896.   380 [,others=>expression] ::= EMPTY
  1897.      
  1898.   381 [,others=>expression] ::= , others=>expression
  1899.      
  1900.   382 others=>expression ::= OTHERS => expression
  1901.      
  1902.   383 ga_expression ::= expression
  1903.      
  1904.   384 ga_expression ::= simple_expression .. simple_expression
  1905.      
  1906.   385 ga_expression ::= name range_constraint
  1907.      
  1908.   386 ga_expression{,ga_expression} ::= ga_expression
  1909.      
  1910.   387 ga_expression{,ga_expression} ::= ga_expression{,ga_expression} ,
  1911.       ga_expression
  1912.      
  1913.   388 identifier{|identifier}=>expression ::= identifier {|identifier} =>
  1914.       expression
  1915.      
  1916.   389 {,identifier{|identifier}=>expression} ::= EMPTY
  1917.      
  1918.   390 {,identifier{|identifier}=>expression} ::=
  1919.       {,identifier{|identifier}=>expression} ,
  1920.       identifier{|identifier}=>expression
  1921.      
  1922.   391 {|identifier} ::= EMPTY
  1923.      
  1924.   392 {|identifier} ::= {|identifier} '|' identifier
  1925.      
  1926.   393 relation{AND__relation} ::= relation AND relation
  1927.      
  1928.   394 relation{AND__relation} ::= relation{AND__relation} AND relation
  1929.      
  1930.   395 relation{OR__relation} ::= relation OR relation
  1931.      
  1932.   396 relation{OR__relation} ::= relation{OR__relation} OR relation
  1933.      
  1934.   397 relation{XOR__relation} ::= relation XOR relation
  1935.      
  1936.   398 relation{XOR__relation} ::= relation{XOR__relation} XOR relation
  1937.      
  1938.   399 relation{AND__THEN__relation} ::= relation AND THEN relation
  1939.      
  1940.   400 relation{AND__THEN__relation} ::= relation{AND__THEN__relation} AND THEN
  1941.       relation
  1942.      
  1943.   401 relation{OR__ELSE__relation} ::= relation OR ELSE relation
  1944.      
  1945.   402 relation{OR__ELSE__relation} ::= relation{OR__ELSE__relation} OR ELSE
  1946.       relation
  1947.      
  1948.   403 [relational_operator__simple_expression] ::= EMPTY
  1949.      
  1950.   404 [relational_operator__simple_expression] ::= relational_operator
  1951.       simple_expression
  1952.      
  1953.   405 [NOT]IN ::= IN
  1954.      
  1955.   406 [NOT]IN ::= NOT IN
  1956.      
  1957.   407 [unary_adding_operator]term{binary_adding_operator__term} ::= term
  1958.      
  1959.   408 [unary_adding_operator]term{binary_adding_operator__term} ::=
  1960.       unary_adding_operator term
  1961.      
  1962.   409 [unary_adding_operator]term{binary_adding_operator__term} ::=
  1963.       [unary_adding_operator]term{binary_adding_operator__term}
  1964.       binary_adding_operator term
  1965.      
  1966.   410 factor{multiplying_operator__factor} ::= factor
  1967.      
  1968.   411 factor{multiplying_operator__factor} ::=
  1969.       factor{multiplying_operator__factor} multiplying_operator factor
  1970.      
  1971.   412 [exponentiating_operator__primary] ::= EMPTY
  1972.      
  1973.   413 [exponentiating_operator__primary] ::= exponentiating_operator primary
  1974.      
  1975.   414 {statement} ::= {pragma_stm}
  1976.      
  1977.   415 {statement} ::= {statement} statement {pragma_stm}
  1978.      
  1979.   416 {label}+ ::= label
  1980.      
  1981.   417 {label}+ ::= {label}+ label
  1982.      
  1983.   418 condition_THEN__sequence_of_statements ::= condition THEN
  1984.       sequence_of_statements
  1985.      
  1986.   419 {ELSIF__condition__THEN__sequence_of_statements} ::= EMPTY
  1987.      
  1988.   420 {ELSIF__condition__THEN__sequence_of_statements} ::=
  1989.       {ELSIF__condition__THEN__sequence_of_statements} ELSIF condition THEN
  1990.       sequence_of_statements
  1991.      
  1992.   421 [ELSE__sequence_of_statements] ::= EMPTY
  1993.      
  1994.   422 [ELSE__sequence_of_statements] ::= ELSE sequence_of_statements
  1995.      
  1996.   423 {case_statement_alternative} ::= EMPTY
  1997.      
  1998.   424 {case_statement_alternative} ::= {case_statement_alternative}
  1999.       case_statement_alternative
  2000.      
  2001.   425 [loop_identifier:] ::= EMPTY
  2002.      
  2003.   426 [loop_identifier:] ::= identifier :
  2004.      
  2005.   427 [identifier] ::= EMPTY
  2006.      
  2007.   428 [identifier] ::= identifier
  2008.      
  2009.   429 [block_identifier:] ::= EMPTY
  2010.      
  2011.   430 [block_identifier:] ::= identifier :
  2012.      
  2013.   431 {pragma_alt}__exception_handler_list ::= {pragma_alt}
  2014.       exception_handler_list
  2015.      
  2016.   432 exception_handler_list ::= exception_handler
  2017.      
  2018.   433 exception_handler_list ::= exception_handler_list exception_handler
  2019.      
  2020.   434 {;parameter_specification} ::= EMPTY
  2021.      
  2022.   435 {;parameter_specification} ::= {;parameter_specification} ;
  2023.       parameter_specification
  2024.      
  2025.   436 [end_designator] ::= EMPTY
  2026.      
  2027.   437 [end_designator] ::= identifier
  2028.      
  2029.   438 [end_designator] ::= string_literal
  2030.      
  2031.   439 {,expanded_name} ::= EMPTY
  2032.      
  2033.   440 {,expanded_name} ::= {,expanded_name} , expanded_name
  2034.      
  2035.   441 {entry_declaration} ::= {pragma_decl}
  2036.      
  2037.   442 {entry_declaration} ::= {entry_declaration} entry_declaration {pragma_decl
  2038. }
  2039.      
  2040.   443 {representation_clause} ::= EMPTY
  2041.      
  2042.   444 {representation_clause} ::= {representation_clause} representation_clause
  2043.       {pragma_decl}
  2044.      
  2045.   445 [(discrete_range)][formal_part] ::= EMPTY
  2046.      
  2047.   446 [(discrete_range)][formal_part] ::= ( parameter_specification
  2048.       {;parameter_specification} )
  2049.      
  2050.   447 [(discrete_range)][formal_part] ::= ( discrete_range )
  2051.      
  2052.   448 [(discrete_range)][formal_part] ::= ( discrete_range ) (
  2053.       parameter_specification {;parameter_specification} )
  2054.      
  2055.   449 [(expression)][formal_part] ::= EMPTY
  2056.      
  2057.   450 [(expression)][formal_part] ::= ( parameter_specification
  2058.       {;parameter_specification} )
  2059.      
  2060.   451 [(expression)][formal_part] ::= ( expression )
  2061.      
  2062.   452 [(expression)][formal_part] ::= ( expression ) ( parameter_specification
  2063.       {;parameter_specification} )
  2064.      
  2065.   453 {OR__select_alternative} ::= EMPTY
  2066.      
  2067.   454 {OR__select_alternative} ::= {OR__select_alternative} OR select_alternativ
  2068. e
  2069.      
  2070.   455 [sequence_of_statements] ::= {pragma_stm}
  2071.      
  2072.   456 [sequence_of_statements] ::= sequence_of_statements
  2073.      
  2074.   457 {,name} ::= EMPTY
  2075.      
  2076.   458 {,name} ::= {,name} , name
  2077.      
  2078.   459 {compilation_unit} ::= compilation_unit
  2079.      
  2080.   460 {compilation_unit} ::= {compilation_unit} compilation_unit
  2081.      
  2082.   461 {with_clause{use_clause}} ::= EMPTY
  2083.      
  2084.   462 {with_clause{use_clause}} ::= {with_clause{use_clause}} with_clause
  2085.       use_clause_list
  2086.      
  2087.   463 use_clause_list ::= {pragma_decl}
  2088.      
  2089.   464 use_clause_list ::= use_clause_list use_clause {pragma_decl}
  2090.      
  2091.   465 {|exception_choice} ::= EMPTY
  2092.      
  2093.   466 {|exception_choice} ::= {|exception_choice} '|' exception_choice
  2094.      
  2095.   467 {generic_parameter_declaration} ::= EMPTY
  2096.      
  2097.   468 {generic_parameter_declaration} ::= {generic_parameter_declaration}
  2098.       generic_parameter_declaration
  2099.      
  2100.   469 [IS__name__or__<>] ::= EMPTY
  2101.      
  2102.   470 [IS__name__or__<>] ::= IS name
  2103.      
  2104.   471 [IS__name__or__<>] ::= IS <>
  2105.      
  2106.   472 {,generic_association} ::= EMPTY
  2107.      
  2108.   473 {,generic_association} ::= {,generic_association} , generic_association
  2109.      
  2110.   474 [generic_formal_parameter=>]generic_actual_parameter ::=
  2111.       generic_actual_parameter
  2112.      
  2113.   475 [generic_formal_parameter=>]generic_actual_parameter ::=
  2114.       generic_formal_parameter => generic_actual_parameter
  2115.      
  2116.   476 {component_clause} ::= {pragma_decl}
  2117.      
  2118.   477 {component_clause} ::= {component_clause} component_clause {pragma_decl}
  2119.      
  2120. Non terminalss
  2121.      
  2122.  $ACC
  2123.  compilation
  2124.  pragma_id
  2125.  general_component_associations
  2126.  pragma
  2127.  object_declaration
  2128.  basic_declaration
  2129.  number_declaration
  2130.  type_declaration
  2131.  subtype_declaration
  2132.  subprogram_declaration
  2133.  package_declaration
  2134.  task_declaration
  2135.  generic_declaration
  2136.  exception_declaration
  2137.  generic_instantiation
  2138.  renaming_declaration
  2139.  identifier_list
  2140.  subtype_indication
  2141.  [:=expression]
  2142.  constrained_array_definition
  2143.  expression
  2144.  {,identifier}
  2145.  full_type_declaration
  2146.  incomplete_type_declaration
  2147.  private_type_declaration
  2148.  type_definition
  2149.  discriminant_specification
  2150.  {;discriminant_specification}
  2151.  enumeration_type_definition
  2152.  integer_type_definition
  2153.  real_type_definition
  2154.  array_type_definition
  2155.  record_type_definition
  2156.  access_type_definition
  2157.  derived_type_definition
  2158.  type_mark
  2159.  constraint
  2160.  type_name|subtype_name
  2161.  range_constraint
  2162.  floating_point_constraint
  2163.  fixed_point_constraint
  2164.  simple_expression
  2165.  enumeration_literal_specification
  2166.  {,enumeration_literal_specification}
  2167.  enumeration_literal
  2168.  floating_accuracy_definition
  2169.  [range_constraint]
  2170.  fixed_accuracy_definition
  2171.  unconstrained_array_definition
  2172.  index_subtype_definition
  2173.  {,index_subtype_definition}
  2174.  index_constraint
  2175.  name
  2176.  discrete_range
  2177.  {,discrete_range}
  2178.  range
  2179.  component_list
  2180.  {pragma_decl}
  2181.  {component_declaration}
  2182.  component_declaration
  2183.  variant_part
  2184.  {pragma_variant}
  2185.  variant
  2186.  {variant}
  2187.  choice
  2188.  {|choice}
  2189.  {basic_declarative_item}
  2190.  declarative_part
  2191.  body
  2192.  {later_declarative_item}
  2193.  basic_declarative_item
  2194.  representation_clause
  2195.  use_clause
  2196.  later_declarative_item
  2197.  proper_body
  2198.  body_stub
  2199.  subprogram_body
  2200.  package_body
  2201.  task_body
  2202.  indexed_component
  2203.  selected_component
  2204.  attribute
  2205.  selector
  2206.  attribute_designator
  2207.  component_associations
  2208.  aggregate
  2209.  expression,expression{,expression}
  2210.  [,others=>expression]
  2211.  choice{|choice}=>expression
  2212.  {,choice{|choice}=>expression}
  2213.  others=>expression
  2214.  ga_expression{,ga_expression}
  2215.  identifier{|identifier}=>expression
  2216.  {,identifier{|identifier}=>expression}
  2217.  relation
  2218.  relation{AND__relation}
  2219.  relation{OR__relation}
  2220.  relation{XOR__relation}
  2221.  relation{AND__THEN__relation}
  2222.  relation{OR__ELSE__relation}
  2223.  [relational_operator__simple_expression]
  2224.  [NOT]IN
  2225.  [unary_adding_operator]term{binary_adding_operator__term}
  2226.  factor{multiplying_operator__factor}
  2227.  term
  2228.  primary
  2229.  [exponentiating_operator__primary]
  2230.  factor
  2231.  high_precedence_unary_operator
  2232.  parenthesized_expression
  2233.  allocator
  2234.  qualified_expression
  2235.  relational_operator
  2236.  binary_adding_operator
  2237.  unary_adding_operator
  2238.  multiplying_operator
  2239.  exponentiating_operator
  2240.  expanded_name
  2241.  {pragma_stm}
  2242.  statement
  2243.  {statement}
  2244.  sequence_of_statements
  2245.  simple_statement
  2246.  compound_statement
  2247.  {label}+
  2248.  null_statement
  2249.  assignment_statement
  2250.  exit_statement
  2251.  return_statement
  2252.  goto_statement
  2253.  delay_statement
  2254.  abort_statement
  2255.  raise_statement
  2256.  code_statement
  2257.  call_statement
  2258.  if_statement
  2259.  case_statement
  2260.  loop_statement
  2261.  block_statement
  2262.  accept_statement
  2263.  select_statement
  2264.  label
  2265.  condition_THEN__sequence_of_statements
  2266.  {ELSIF__condition__THEN__sequence_of_statements}
  2267.  [ELSE__sequence_of_statements]
  2268.  condition
  2269.  {pragma_alt}
  2270.  case_statement_alternative
  2271.  {case_statement_alternative}
  2272.  [loop_identifier:]
  2273.  [identifier]
  2274.  iteration_rule
  2275.  begin_end_block
  2276.  declarative_part__begin_end_block
  2277.  {pragma_alt}__exception_handler_list
  2278.  [block_identifier:]
  2279.  subprogram_specification
  2280.  unit_identifier
  2281.  parameter_specification
  2282.  {;parameter_specification}
  2283.  designator
  2284.  mode
  2285.  generic_parameter_mode
  2286.  [end_designator]
  2287.  package_specification
  2288.  package__unit_identifier
  2289.  package__body__unit_identifier
  2290.  {,expanded_name}
  2291.  task_specification
  2292.  {entry_declaration}
  2293.  {representation_clause}
  2294.  [(discrete_range)][formal_part]
  2295.  entry_declaration
  2296.  [(expression)][formal_part]
  2297.  selective_wait
  2298.  conditional_entry_call
  2299.  timed_entry_call
  2300.  select_alternative
  2301.  {OR__select_alternative}
  2302.  selective_wait_alternative
  2303.  accept_alternative
  2304.  delay_alternative
  2305.  terminate_alternative
  2306.  [sequence_of_statements]
  2307.  {,name}
  2308.  {compilation_unit}
  2309.  pragma_header
  2310.  compilation_unit
  2311.  context_clause
  2312.  library_or_secondary_unit
  2313.  subunit
  2314.  {with_clause{use_clause}}
  2315.  with_id
  2316.  {,with_id_list}
  2317.  with_clause
  2318.  body_name
  2319.  exception_choice
  2320.  {|exception_choice}
  2321.  exception_handler
  2322.  generic_specification
  2323.  generic_formal_part
  2324.  {generic_parameter_declaration}
  2325.  generic_parameter_declaration
  2326.  generic_type_definition
  2327.  [IS__name__or__<>]
  2328.  generic_name
  2329.  generic_association
  2330.  {,generic_association}
  2331.  [generic_formal_parameter=>]generic_actual_parameter
  2332.  generic_formal_parameter
  2333.  generic_actual_parameter
  2334.  length_clause
  2335.  enumeration_representation_clause
  2336.  address_clause
  2337.  record_representation_clause
  2338.  {component_clause}
  2339.  alignment_clause
  2340.  component_clause
  2341.  ga_expression
  2342.  {|identifier}
  2343.  exception_handler_list
  2344.  use_clause_list
  2345. Information about Action Tables
  2346.      
  2347.  Number of Entries   3862
  2348.  Origin Table Size   5519
  2349.  Action Table Size   8225
  2350.  Number Unused   2685
  2351.  Distribution of entries   1995    678    134     26      1      0      0      0
  2352. Timing Statistics
  2353.      
  2354.                   Cpu Time   Elapsed  LG Reads LG Writes
  2355.  Parse:                147     11975         0       144
  2356.  Preliminary:          175       499         0       296
  2357.  First Map:             46      2428         0        25
  2358.  Item Creation:         27      1564         0        40
  2359.  Follow Map:            13      1314         0         0
  2360.  Closure:               11      1296         0         0
  2361.  States:              1514     14222        93      2263
  2362.  Reductions:          9384     19704      3833      2589
  2363.  Summary:               80      1932        39         0
  2364.  Compress:            2901      5393      1500       950
  2365.  Table Dump:           165      3448       240         5
  2366. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  2367. --compord.cnt
  2368. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  2369. [NOSC.RELEASES.V0101.COMPORD.SOURCE]UNITDAG.SPC                        34    44
  2370. [NOSC.RELEASES.V0101.COMPORD.SOURCE]MINIDAG.SPC                        15     9
  2371. [NOSC.RELEASES.V0101.COMPORD.SOURCE]COPKG.DAT                          77    94
  2372. [NOSC.RELEASES.V0101.COMPORD.SOURCE]COMPORD.SPC                        13    55
  2373. [NOSC.RELEASES.V0101.COMPORD.SOURCE]CDRIVER.ADA                       370   243
  2374. [NOSC.RELEASES.V0101.COMPORD.SOURCE]REPORT.SPC                          6    56
  2375. [NOSC.RELEASES.V0101.COMPORD.SOURCE]LOOKUP.SPC                         12    46
  2376. [NOSC.RELEASES.V0101.COMPORD.SOURCE]COMPORD.BDY                       353   367
  2377. [NOSC.RELEASES.V0101.COMPORD.SOURCE]GRMCONST.BDY                       32    31
  2378. [NOSC.RELEASES.V0101.COMPORD.SOURCE]PTBLS.BDY                       31758  3529
  2379. [NOSC.RELEASES.V0101.COMPORD.SOURCE]REPORT.BDY                        689   576
  2380. [NOSC.RELEASES.V0101.COMPORD.SOURCE]LOOKUP.BDY                        113    87
  2381. [NOSC.RELEASES.V0101.COMPORD.SOURCE]CMPUTIL.SPC                         6   114
  2382. [NOSC.RELEASES.V0101.COMPORD.SOURCE]CMPUTIL.BDY                       512   539
  2383. [NOSC.RELEASES.V0101.COMPORD.SOURCE]APPLYACT.SUB                       40   306
  2384. [NOSC.RELEASES.V0101.COMPORD.SOURCE]GETNEXT.SUB                        16    22
  2385.  
  2386.