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