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

  1. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  2. --read.me
  3. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  4. To build the standards checker 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 STANDARDS.CO file into the program 
  10.     library containing the abstractions or a sublibrary whose parent 
  11.     library contains all the abstractions.  STANDARDS.CO lists file names 
  12.     in the correct compilation order.
  13.  
  14.  3. Link stndcheck with the program library where everything was 
  15.     compiled.  To do this using the DEC Ada compiler type:
  16.     $ acs link stndcheck
  17.  
  18. To run the tool on VMS:
  19.  
  20.  1. Define a logical symbol for the executable of stndcheck
  21.     For example,
  22.  
  23.     check :== $$DRB1:[NOSC.TOOLS.STANDARDS]STNDCHECK.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.     check ( Source=>"filename" [, Output=>"output_file"] 
  32.            [,Print=>print_type] [, 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.     check ( Source=> "testfile.ada", Print=>SOURCE);
  40.  
  41.   -- In this example the input file to be checked is testfile.ada and
  42.   -- the output will go to the default output.  The report will be
  43.   -- the source combined with the violation warnings, and all violations
  44.  
  45.     check ( Source=> "foo.ada", Output=>"report.out", Report=>FIRST);
  46.  
  47.   -- This example shows a source file of foo.ada with the report being
  48.   -- put in the file report.out.  The report will show only the violations
  49.   -- without the source code and only the first of each type of 
  50.   -- violation will be reported
  51.  
  52. Files contained in this directory:
  53.  
  54. STANDARDS.CO   -- Compilation order for standards checker sources
  55. STANDARDS.EXE  -- VMS 4.0 standards checker executable
  56.  
  57. The [.SOURCE] subdirectory contains most of the sources that make up the 
  58. standards checker tool.  Other sources are contained in the abstractions
  59. directory.
  60.  
  61. Files in [.SOURCE]:
  62.  
  63. The source files that make up the standards checker tool are as follows:
  64.  
  65. STNDCHECK.ADA     -- the driver which deals with the command line, and 
  66.         -- main procedure
  67. SCUTILS.SPC    -- the procedures which control the actions done by the parser
  68. SCUTILS.BDY
  69. SCDECLS.DAT    -- the package which contains all the structures to 
  70.         -- customize the checker
  71.  
  72. The tool runs using the parser.  Most of the sources needed for the parser 
  73. are in the parser abstraction.  The five units that are unique to this tool
  74. are below:
  75.  
  76. APPLYACT.SUB  -- A subunit of the parser which calls the action routines.
  77. GETNEXT.SUB   -- A subunit of the lexer which gets each token and only
  78.           -- returns non comment tokens to the lexer.
  79. PTBLS.BDY     -- The parse tables body.
  80. GRMCONST.BDY  -- Grammar constants for the parse tables.
  81. WRITELINE.SUB -- Writes a line of source code out as it's read in when
  82.           -- print=>source
  83.  
  84. The [.TEST] subdirectory contains the tests used in testing standards checker 
  85.  
  86. Files in [.TEST]:
  87.  
  88. Test this tool using the acvc a tests.
  89. The only construct not tested by the acvcs is a code statement and
  90. for that there is the file code.tst.
  91.  
  92. The [.DOC] subdirectory contains the documentation for standards checker.
  93.  
  94. Files in [.DOC]:
  95.  
  96.     USERMAN.MEM  -- Standards checker user's manual
  97.     USERMAN.RNO  -- Runoff input for user's manual
  98.     RELEASE.NTS  -- Release notes
  99.     STDCKGRM.LIS -- Listing of standards checker grammar.  The rule numbers
  100.                     in this file may be used to make changes to the case
  101.                     statement in the Apply_Actions subunit.
  102.     STANDARDS.CNT-- Statement counts and line counts of standards checker 
  103.                     source files.
  104. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  105. --userman.mem
  106. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.            STANDARDS CHECKER
  114.            _________ _______
  115.            _________ _______
  116.         1  STANDARDS CHECKER
  117.  
  118.  
  119.  
  120.              ___________
  121.         1.1  Description
  122.  
  123.  
  124.  
  125.              This tool checks Ada program library units for adherence  to  Ada
  126.  
  127.         programming standards.  The standards to be checked are specified in a
  128.  
  129.         predefined standards package.
  130.  
  131.  
  132.  
  133.              Note that there may be cases in which  the  use  of  non-standard
  134.  
  135.         constructs,  names, etc.  is justified; for example, it may be clearer
  136.  
  137.         to use a non-standard construct in some  cases  or  it  may  sometimes
  138.  
  139.         actually  be  necessary.  The messages produced by Check_Standards are
  140.  
  141.         only intended to point out portions of code which do  not  conform  to
  142.  
  143.         standards.   One  may  then decide whether the non-standard construct,
  144.  
  145.         organization, etc.  is justified for the particular situation.
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.              _______ ______
  154.         1.2  Command Format
  155.  
  156.  
  157.  
  158.  
  159.  
  160.         type PRINT_TYPE is (VIOLATION, SOURCE);
  161.  
  162.         type REPORT_TYPE is (EVERY, FIRST);
  163.  
  164.  
  165.  
  166.         CHECK_STANDARDS (             --| Check standards of input file
  167.  
  168.             SOURCE : in STRING;       --| Name of the source input file
  169.  
  170.             OUTPUT : in STRING := ""; --| Name of an output file 
  171.  
  172.             PRINT  : in PRINT_TYPE := --| Type of output: with source
  173.  
  174.                 VIOLATION;            --| and violations or just
  175.  
  176.                                       --| violations
  177.  
  178.             REPORT : in REPORT_TYPE:= --| Type of report: all errors
  179.  
  180.                 EVERY                 --| reported or just the first of
  181.  
  182.                                       --| each type of violation
  183.  
  184.             );
  185.  
  186.         SOURCE      The name of the source file to be  checked.   It  must  be
  187.  
  188.                     syntactically correct or the tool will stop and report the
  189.  
  190.                     syntax error.
  191.  
  192.         OUTPUT      The name of a file in which to put  the  output.   If  the
  193.  
  194.                     name  is  left  blank  the  output will go to the standard
  195.  
  196.                     output.  An invalid file name  will  result  in  an  error
  197.  
  198.                     being reported.
  199.  
  200.         PRINT       The type of output to put  in  the  report.   If  this  is
  201.  
  202.                     VIOLATION  only  the violations will be reported with line
  203.  
  204.                     numbers being indicated in the  messages.   If  the  print
  205.  
  206.                     type  is SOURCE then the output will include the text from
  207.  
  208.                     the source file with the violations being reported in  the
  209.  
  210.                     source as they occur.
  211.  
  212.         REPORT      This indicates how the violations are to be reported.   It
  213.  
  214.                     can  either  report every violation, or just the first one
  215.  
  216.                     of each kind.
  217.  
  218.                                                                 Page 2
  219.  
  220.  
  221.  
  222.  
  223.  
  224.              ____ ___ _________ ___ _______
  225.         1.3  When The Standards Are Checked
  226.  
  227.  
  228.  
  229.              Due to the character of the checks  being  performed  it  is  not
  230.  
  231.         sensible  to  do  all  of  the  checks  in  all  contexts.  Checks for
  232.  
  233.         particular constructs  can  obviously  only  be  checked  for  in  the
  234.  
  235.         contexts  on  which they are legal.  For example, a goto statement may
  236.  
  237.         only appear in a body.  The following descriptions indicate  when  the
  238.  
  239.         checks will take place if it is not already obvious.
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.            _________ ___ _________
  248.         2  RATIONALE FOR STANDARDS
  249.  
  250.  
  251.  
  252.              _________ ___ _______ ____________
  253.         2.1  Standards For Overall Organization
  254.  
  255.  
  256.  
  257.                ___________
  258.         2.1.1  Max_Nesting -
  259.  
  260.  
  261.  
  262.              Checks that procedures  and  functions  are  not  nested.   Since
  263.  
  264.         packages  may  be  nested, subprogram nesting may be avoided.  In this
  265.  
  266.         way, nesting to avoid parameter passing will be discouraged.
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.                __________________
  275.         2.1.2  Max_Ada_Statements -
  276.  
  277.  
  278.  
  279.              Checks that no single subprogram exceeds  100  statements.   Long
  280.  
  281.         subprograms  may  indicate  a lack of abstraction or misuse of control
  282.  
  283.         structures, especially in the case of exception handling,  unnecessary
  284.  
  285.         repetition  of  code or mixing of functionality.  Limiting the size of
  286.  
  287.         subprograms can help to reduce these problems.  Statements are counted
  288.  
  289.         in the same way that the Statement_Profile tool counts them.
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.                ______________________
  298.         2.1.3  Private_Types_Checking -
  299.  
  300.  
  301.  
  302.              Checks that non-scalar types defined in the  visible  part  of  a
  303.  
  304.         package  are private or limited private types.  Declaring the types as
  305.  
  306.         private introduces the concept  of  data  abstraction  by  hiding  the
  307.  
  308.         implementation  of  the  type and providing a cleaner interface to it.
  309.  
  310.         The operations on a type will then be clearly defined, the  type  will
  311.  
  312.         be easier to use and the proper use of the type will be enforced.
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.              _________ ___ __________ __________
  321.         2.2  Standards For Particular Constructs
  322.  
  323.  
  324.  
  325.                _____________
  326.         2.2.1  Goto_Checking -
  327.  
  328.  
  329.  
  330.              Checks for explicit Gotos in the library.  The harmful effects of
  331.  
  332.         Gotos are well known and need not be described here.
  333.  
  334.                                                                 Page 3
  335.  
  336.  
  337.  
  338.  
  339.  
  340.                __________________
  341.         2.2.2  Exit_When_Checking -
  342.  
  343.  
  344.  
  345.                                        _________
  346.              Checks that  "exit  when  condition"  is  used  rather  than  "if
  347.  
  348.         _________
  349.         condition exit" for exits from a loop.  Again, enforces the use of the
  350.  
  351.         appropriate construct.
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.                _____________________
  360.         2.2.3  Boolean_Test_Checking -
  361.  
  362.  
  363.  
  364.                                                         _______ _____
  365.              Checks that no expressions of the form "if boolean value =  true"
  366.  
  367.         appear.   Not only is this type of statement redundant and potentially
  368.  
  369.         confusing, but  it  may  also  cause  unintended  results  because  of
  370.  
  371.         precedence rules for equality.
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.              _________ ___ _________ _______
  380.         2.3  Standards For Parameter Passing
  381.  
  382.  
  383.  
  384.                ________
  385.         2.3.1  Max_Args -
  386.  
  387.  
  388.  
  389.              Checks that the number of arguments  to  a  subprogram  does  not
  390.  
  391.         exceed  four.   If  several  parameters  are  logically  linked, it is
  392.  
  393.         sometimes possible to encapsulate them into a single data abstraction,
  394.  
  395.         passed  as a single argument.  This standard is checked in the visible
  396.  
  397.         part of any packages and for any subprogram  body  and  specification.
  398.  
  399.         It is also necessary to check subprogram bodies because there may only
  400.  
  401.         be a body with an implicit spec, so the body will be  the  only  place
  402.  
  403.         the tool is able to check it.
  404.  
  405.                                                                 Page 4
  406.  
  407.  
  408.  
  409.  
  410.  
  411.              _________ __ _______ ___________
  412.         2.4  Standards To Enforce Portability
  413.  
  414.  
  415.  
  416.                ______________________
  417.         2.4.1  Builtin_Types_Checking -
  418.  
  419.  
  420.  
  421.              Checks for occurrences of "integer" and other builtin  types  and
  422.  
  423.         subtypes.   If builtin types are used explicitly, rather than defining
  424.  
  425.         a subtype as a subrange of the type, the code is no  longer  portable.
  426.  
  427.         In  addition, run time bounds checking is provided.  If a value is out
  428.  
  429.         of bounds, an exception will be raised.  The use of subtypes may  also
  430.  
  431.         reduce the amount of storage space necessary.  This check is performed
  432.  
  433.         on all parts of a program.
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.                __________________
  442.         2.4.2  Acceptable_Pragmas -
  443.  
  444.  
  445.  
  446.              Checks that no pragmas other than the following are used anywhere
  447.  
  448.         in the program:
  449.  
  450.  
  451.  
  452.         elaborate, page, inline
  453.  
  454.  
  455.  
  456.         Certain pragmas are not  portable,  and  should  thus  be  avoided  if
  457.  
  458.         possible.
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.                __________________
  467.         2.4.3  Rep_Specs_Checking -
  468.  
  469.  
  470.  
  471.              Checks  for  the  use  of  Rep  Specs,  which  are  not  portable
  472.  
  473.         constructs.
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.                _______________________
  482.         2.4.4  Code_Statement_Checking -
  483.  
  484.  
  485.  
  486.              Checks for the use of code statements,  which  are  not  portable
  487.  
  488.         constructs.
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.              _________ __ _______ _______________
  497.         2.5  Standards To Enforce Maintainability
  498.  
  499.  
  500.  
  501.                ______________________
  502.         2.5.1  Named_Subtype_Checking -
  503.  
  504.  
  505.  
  506.              Checks that named subtypes are defined instead of using  explicit
  507.  
  508.         range  constraints  in  parameter  or discriminant specifications.  If
  509.  
  510.         named subtypes are defined, changes to the range values need  only  be
  511.  
  512.         made  in  one  place.   The  descriptive names also provide additional
  513.  
  514.         documentation.  This is checked everywhere but in subtype definitions.
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.                ______________________
  523.         2.5.2  Named_Literal_Checking -
  524.  
  525.                                                                 Page 5
  526.  
  527.  
  528.  
  529.  
  530.  
  531.              Checks that named literals are defined.   Unnamed  literals  like
  532.  
  533.         "27"  should  only  appear  in "named number" declarations.  A comment
  534.  
  535.         should justify the particular value, indicating other possible  values
  536.  
  537.         if later adjustment is possible.  Again, if the value is to be changed
  538.  
  539.         later, it is only necessary to change it in one place.  The names also
  540.  
  541.         provide  additional  documentation.   It does however, seem reasonable
  542.  
  543.         that certain numbers like "1" can be exempt.   The  numbers  presently
  544.  
  545.         exempt  are  "0,1,2", but these can be changed.  This check is done in
  546.  
  547.         all bodies.
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.              ______ _________
  556.         2.6  Naming Standards
  557.  
  558.  
  559.  
  560.                _________
  561.         2.6.1  Type_Name -
  562.  
  563.  
  564.  
  565.              Defines conventions for naming types and checks visible parts  to
  566.  
  567.         make  sure  these  conventions  are  adhered  to for type definitions.
  568.  
  569.         Currently, no standard prefixes are defined; the standard suffixes are
  570.  
  571.         as follows:
  572.  
  573.  
  574.  
  575.         Number Name Range Task Record Specifier Descriptor Handle Array String
  576.  
  577.         Node Ptr Type
  578.  
  579.  
  580.  
  581.         Defining prefixes and suffixes for types helps to distinguish  between
  582.  
  583.         types and objects, as well as providing documentation in the names and
  584.  
  585.         standardizing style.  Note  that  certain  suffixes  are  logical  for
  586.  
  587.         different  types,  and  that  it wouldn't make sense to name something
  588.  
  589.         xRecord if it wasn't a record.  The tool does check  that  the  proper
  590.  
  591.         suffixes  are  used  with  the type of definition it is.  For a fuller
  592.  
  593.         description of the suffixes see the appendix.  This check is performed
  594.  
  595.         on all type declarations.
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.                ____________
  604.         2.6.2  Package_Name -
  605.  
  606.  
  607.  
  608.              Defines conventions for naming packages and  checks  packages  to
  609.  
  610.         make  sure  these  conventions are adhered to.  Currently, no standard
  611.  
  612.         package names are defined.  Standard names for packages make it easier
  613.  
  614.         to determine the function of a particular package from its name.  This
  615.  
  616.         check is only done on package specs as we don't want to report  things
  617.  
  618.         twice if we don't have to.
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.                ______________
  627.         2.6.3  Procedure_Name -
  628.  
  629.  
  630.  
  631.              Defines conventions for naming procedures and  checks  procedures
  632.  
  633.         to make sure these conventions are adhered to.  Currently the prefixes
  634.  
  635.         defined are as follows:
  636.  
  637.         Allocate Free Get Set Obtain Release Walkto Create Delete Add Append
  638.  
  639.         Insert Prepend Remove Replace Read Write
  640.  
  641.         The suffixes are as follows:
  642.  
  643.         Handle -- when the prefix is Obtain or Release
  644.  
  645.                                                                 Page 6
  646.  
  647.  
  648.  
  649.  
  650.  
  651.         Standard names for procedures make it easier to determine the function
  652.  
  653.         of  a  particular  procedure  from  its  name.  An explanation for the
  654.  
  655.         choice of the naming conventions is given in the Appendix.
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.                _____________
  664.         2.6.4  Function_Name -
  665.  
  666.  
  667.  
  668.              Defines  conventions  for  naming  functions   and   checks   the
  669.  
  670.         declarations  of  functions  to  make  sure  they  are adhered to.  At
  671.  
  672.         present there are no predefined function prefixes or suffixes.
  673.  
  674.                                                                 Page 7
  675.  
  676.  
  677.  
  678.  
  679.  
  680.            _________  ___________ ___ ______ ___________
  681.         3  APPENDIX:  EXPLANATION FOR NAMING CONVENTIONS
  682.  
  683.  
  684.  
  685.              ____ _____
  686.         3.1  Type Names
  687.  
  688.  
  689.  
  690.  
  691.  
  692.      "...Number"    An integer type, used to define the range of legal  values
  693.  
  694.                     for   some   kind   of  index,  etc.   For  example,  type
  695.  
  696.                     ChannelNumber is range 1..400;
  697.  
  698.      "...Name"      An enumeration type (or perhaps a string) used to identify
  699.  
  700.                     a  condition,  parameter, item, object, etc.  For example,
  701.  
  702.                     type DianaNodeName is (dn_apply,...);
  703.  
  704.      "...Range"     A subtype of one of the above.
  705.  
  706.      "...Task"      A task type
  707.  
  708.      "...Record"    A descriptor record of some kind
  709.  
  710.      "...Specifier" A descriptor record of some kind
  711.  
  712.      "...Descriptor" A descriptor record of some kind
  713.  
  714.      "...Handle"    An access type  to  one  of  the  above  composite  types,
  715.  
  716.                     generally private
  717.  
  718.      "...Array"     An array type
  719.  
  720.      "...String"    A character array type
  721.  
  722.      "...Node"      A record type used for nodes in a tree structure
  723.  
  724.      "...Ptr"       An access type to a ...Array or ...Node
  725.  
  726.      "...Type"      when none of the above
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.  
  734.              _________ _____
  735.         3.2  Procedure Names
  736.  
  737.  
  738.  
  739.      "Allocate..."  A procedure which allocates a new ...
  740.  
  741.      "Free..."      A procedure which frees an existing ...
  742.  
  743.      "Get..."       A procedure which gives its result as an out parameter
  744.  
  745.      "Set..."       A procedure which sets a value from an in parameter
  746.  
  747.      "Obtain...Handle"  A  procedure  to  return  private  handle  as  an  out
  748.  
  749.                     parameter  given  specifications  of some existing object.
  750.  
  751.                     Increment reference count.
  752.  
  753.      "Release...Handle" A procedure to decrement reference count  and  dispose
  754.  
  755.                     of handle.  Obtains and releases should match up.
  756.  
  757.      "WalkTo..."    A procedure to take handle, and return  handle  on  child,
  758.  
  759.                     parent,  sibling,  etc,  decrementing  ref  count of input
  760.  
  761.                     handle and incrementing ref count of output handle.
  762.  
  763.      "Create..."    A procedure to create a new object
  764.  
  765.      "Delete..."    A procedure to delete an object
  766.  
  767.      "Add..."       A procedure to add a new element to list, table, etc.
  768.  
  769.      "Append..."    A procedure to add a new element at the  end  of  a  list,
  770.  
  771.                     etc.
  772.  
  773.      "Insert..."    A procedure to add a new element in the middle of a  list,
  774.  
  775.                     etc.
  776.  
  777.      "Prepend..."   A procedure to add to the beginning of a list, etc.
  778.  
  779.      "Remove..."    A procedure to remove an element from a list, etc.
  780.  
  781.      "Replace..."   A procedure to replace an existing element  from  a  list,
  782.  
  783.                     etc.
  784.  
  785.      "Read..."      A procedure to read (part of) data from object
  786.  
  787.      "Write..."     A procedure to overwrite (part of) data of object
  788.  
  789. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  790. --userman.rno
  791. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  792. .FLAG BOLD
  793. .TAB STOP 8
  794. .LEFT MARGIN 8
  795. .RIGHT MARGIN 78
  796. .HEADER LEVEL 1^*^&STANDARDS CHECKER\&\*
  797. .HEADER LEVEL 2^&Description\&
  798. .PARAGRAPH
  799. This tool checks Ada program library units for adherence to Ada programming
  800. standards.  The standards to be checked are specified in a
  801. predefined standards package.
  802. .PARAGRAPH
  803. Note that there may be cases in which the use of non-standard
  804. constructs, names, etc. is justified; for example, it may be clearer
  805. to use a non-standard construct in some cases or it may sometimes
  806. actually be necessary.  The messages produced by Check__Standards are only
  807. intended to point out portions of code which do not conform to
  808. standards.  One may then decide whether the non-standard construct,
  809. organization, etc. is justified for the particular situation.
  810. .HEADER LEVEL 2^&Command Format\&
  811. .BLANK
  812. .LITERAL
  813. type PRINT_TYPE is (VIOLATION, SOURCE);
  814. type REPORT_TYPE is (EVERY, FIRST);
  815.  
  816. CHECK_STANDARDS (             --| Check standards of input file
  817.     SOURCE : in STRING;          --| Name of the source input file
  818.     OUTPUT : in STRING := ""; --| Name of an output file 
  819.     PRINT  : in PRINT_TYPE := --| Type of output: with source
  820.         VIOLATION;            --| and violations or just
  821.                               --| violations
  822.     REPORT : in REPORT_TYPE:= --| Type of report: all errors
  823.         EVERY                 --| reported or just the first of
  824.                               --| each type of violation
  825.     );
  826. .END LITERAL
  827. .LEFT MARGIN 20
  828. .TAB STOP 20
  829. .INDENT -12
  830. SOURCE    The name of the source file to be checked.  It must be syntactically
  831. correct or the tool will stop and report the syntax error.
  832. .INDENT -12
  833. OUTPUT    The name of a file in which to put the output.  If the name is left
  834. blank the output will go to the standard output.  An invalid file name will
  835. result in an error being reported.
  836. .INDENT -12
  837. PRINT    The type of output to put in the report.  If this is VIOLATION only
  838. the violations will be reported with line numbers being indicated in the 
  839. messages.  If the print type is SOURCE then the output will include the 
  840. text from the source file with the violations being reported in the source
  841. as they occur.
  842. .INDENT -12
  843. REPORT    This indicates how the violations are to be reported.  It can either
  844. report every violation, or just the first one of each kind.
  845. .TAB STOP 8
  846. .LEFT MARGIN 8
  847. .HEADER LEVEL 2^&When the Standards are checked\&
  848. .PARAGRAPH
  849. Due to the character of the checks being performed it is not sensible
  850. to do all of the checks in all contexts.
  851. Checks for particular constructs can obviously only be checked for in the 
  852. contexts on which they are legal.  For example, a goto statement may
  853. only appear in a body.  The following descriptions indicate when the checks
  854. will take place if it is not already obvious.
  855. .HEADER LEVEL 1^&Rationale for Standards\&
  856. .HEADER LEVEL 2^&Standards for Overall Organization\&
  857. .HEADER LEVEL 3^&Max__Nesting\&
  858. .PARAGRAPH
  859. Checks that procedures and functions are not nested.
  860. Since packages may be nested, subprogram nesting may be avoided.
  861. In this way, nesting to avoid parameter passing will be discouraged.
  862. .HEADER LEVEL 3^&Max__Ada__Statements\&
  863. .PARAGRAPH
  864. Checks that no single subprogram exceeds 100 statements.
  865. Long subprograms may indicate a lack of abstraction  or misuse of control
  866. structures, especially in the case of exception handling, unnecessary
  867. repetition of code or mixing of functionality.
  868. Limiting the size of subprograms can help to reduce these problems.
  869. Statements are counted in the same way that the Statement__Profile
  870. tool counts them.
  871. .HEADER LEVEL 3^&Private__Types__Checking\&
  872. .PARAGRAPH
  873. Checks that non-scalar types defined in the visible part of a package are
  874. private or limited private types.
  875. Declaring the types as private introduces the concept of data abstraction
  876. by hiding the implementation of the type and providing a cleaner interface
  877. to it.  The operations on a type will
  878. then be clearly defined, the type will be easier to use and the
  879. proper use of the type will be enforced.
  880. .HEADER LEVEL 2^&Standards for Particular Constructs\&
  881. .HEADER LEVEL 3^&Goto__Checking\&
  882. .PARAGRAPH
  883. Checks for explicit Gotos in the library.
  884. The harmful effects of Gotos are well known and need not be described here.
  885. .HEADER LEVEL 3^&Exit__When__Checking\&
  886. .PARAGRAPH
  887. Checks that "exit when ^&condition\&" is used rather than "if
  888. ^&condition\& exit" for exits from a loop.
  889. Again, enforces the use of the appropriate construct.
  890. .HEADER LEVEL 3^&Boolean__Test__Checking\&
  891. .PARAGRAPH
  892. Checks that no expressions of the form "if ^&boolean value\& = true" appear.
  893. Not only is this type of statement redundant and potentially confusing,
  894. but it may also cause unintended results because of precedence rules
  895. for equality.
  896. .HEADER LEVEL 2^&Standards for Parameter Passing\&
  897. .HEADER LEVEL 3^&Max__Args\&
  898. .PARAGRAPH
  899. Checks that the number of arguments to a subprogram does not exceed four.
  900. If several parameters are logically linked, it is sometimes possible to
  901. encapsulate them into a single data abstraction, passed as a single argument.
  902. This standard is checked in the visible part of any packages and for any
  903. subprogram body and specification.  It is also necessary to check subprogram
  904. bodies because there may only be a body with an implicit spec, so the body
  905. will be the only place the tool is able to check it.
  906. .PAGE
  907. .HEADER LEVEL 2^&Standards to Enforce Portability\&
  908. .HEADER LEVEL 3^&Builtin__Types__Checking\&
  909. .PARAGRAPH
  910. Checks for occurrences of "integer" and other builtin types and subtypes.
  911. If builtin types are used explicitly,
  912. rather than defining a subtype as a subrange of the type,
  913. the code is no longer portable.
  914. In addition, run time bounds checking is provided.  If a value is out
  915. of bounds, an exception will be raised.  The use of subtypes may also
  916. reduce the amount of storage space necessary.
  917. This check is performed on all parts of a program.
  918. .HEADER LEVEL 3^&Acceptable__Pragmas\&
  919. .PARAGRAPH
  920. Checks that no pragmas other than the following are used anywhere in the 
  921. program:
  922. .BLANK
  923. .LITERAL
  924. elaborate, page, inline
  925. .END LITERAL
  926. .BLANK
  927. Certain pragmas are not portable, and should thus be avoided if possible.
  928. .HEADER LEVEL 3^&Rep__Specs__Checking\&
  929. .PARAGRAPH
  930. Checks for the use of Rep Specs, which are not portable constructs.
  931. .HEADER LEVEL 3^&Code__Statement__Checking\&
  932. .PARAGRAPH
  933. Checks for the use of code statements, which are not portable constructs.
  934. .HEADER LEVEL 2^&Standards to Enforce Maintainability\&
  935. .HEADER LEVEL 3^&Named__Subtype__Checking\&
  936. .PARAGRAPH
  937. Checks that named subtypes are defined instead of using explicit range
  938. constraints in parameter or discriminant specifications.
  939. If named subtypes are defined, changes to the range values need only
  940. be made in one place.  The descriptive names also provide additional
  941. documentation.  This is checked everywhere but in subtype definitions.
  942. .HEADER LEVEL 3^&Named__Literal__Checking\&
  943. .PARAGRAPH
  944. Checks that named literals are defined. Unnamed literals like "27" should only
  945. appear in "named number" declarations.  A comment
  946. should justify the particular value, indicating other possible values if
  947. later adjustment is possible.
  948. Again, if the value is to be changed later, it is only necessary to
  949. change it in one place.  The names also provide additional documentation.
  950. It does however, seem reasonable that certain numbers like "1"
  951. can be exempt.
  952. The numbers presently exempt are "0,1,2", but these can be changed.
  953. This check is done in all bodies.
  954. .HEADER LEVEL 2^&Naming Standards\&
  955. .HEADER LEVEL 3^&Type__Name\&
  956. .PARAGRAPH
  957. Defines conventions for naming types and checks visible
  958. parts to make sure these
  959. conventions are adhered to for type definitions.
  960. Currently, no standard prefixes are defined; the standard suffixes are
  961. as follows:
  962. .BLANK
  963. .LITERAL
  964. Number Name Range Task Record Specifier Descriptor Handle Array String
  965. Node Ptr Type
  966. .END LITERAL
  967. .BLANK
  968. Defining prefixes and suffixes for types helps to distinguish between
  969. types and objects, as well as providing documentation in the names and
  970. standardizing style.  Note that certain suffixes are logical for different
  971. types, and that it wouldn't make sense to name something xRecord if it
  972. wasn't a record.  The tool does check that the proper suffixes are used
  973. with the type of definition it is.  For a fuller description of the 
  974. suffixes see the appendix.  This check is performed on all type declarations.
  975. .HEADER LEVEL 3^&Package__Name\&
  976. .PARAGRAPH
  977. Defines conventions for naming packages and checks packages to make sure these
  978. conventions are adhered to.  Currently, no standard package names are defined.
  979. Standard names for packages make it easier to determine the function
  980. of a particular package from its name.  This check is only done on package
  981. specs as we don't want to report things twice if we don't have to.
  982. .HEADER LEVEL 3^&Procedure__Name\&
  983. .PARAGRAPH
  984. Defines conventions for naming procedures and checks procedures to make
  985. sure these conventions are adhered to.
  986. Currently the prefixes defined are as follows:
  987. .LITERAL
  988. Allocate Free Get Set Obtain Release Walkto Create Delete Add Append
  989. Insert Prepend Remove Replace Read Write
  990. .END LITERAL
  991. The suffixes are as follows:
  992. .LITERAL
  993. Handle -- when the prefix is Obtain or Release
  994. .END LITERAL
  995. Standard names for procedures make it easier to determine the function
  996. of a particular procedure from its name.
  997. An explanation for the choice of the naming conventions is given in
  998. the Appendix.
  999. .HEADER LEVEL 3^&Function__Name\&
  1000. .PARAGRAPH
  1001. Defines conventions for naming functions and checks the declarations of 
  1002. functions to make sure they are adhered to.  At present there are no 
  1003. predefined function prefixes or suffixes.
  1004. .PAGE
  1005. .HEADER LEVEL 1^&Appendix: Explanation for Naming Conventions\&
  1006. .HEADER LEVEL 2^&Type Names\&
  1007. .BLANK
  1008. .LEFT MARGIN 20
  1009. .TAB STOP 20
  1010. .INDENT -15
  1011. "...Number"    An integer type, used to define
  1012. the range of legal values for some
  1013. kind of index, etc.  For example, type ChannelNumber is range 1..400;
  1014. .INDENT -15
  1015. "...Name"    An enumeration type (or perhaps
  1016. a string) used to identify a condition,
  1017. parameter, item, object, etc.  For example, type DianaNodeName is
  1018. (dn__apply,...);
  1019. .INDENT -15
  1020. "...Range"    A subtype of one of the above.
  1021. .INDENT -15
  1022. "...Task"    A task type
  1023. .INDENT -15
  1024. "...Record"    A descriptor record of some kind
  1025. .INDENT -15
  1026. "...Specifier"    A descriptor record of some kind
  1027. .INDENT -15
  1028. "...Descriptor"    A descriptor record of some kind
  1029. .INDENT -15
  1030. "...Handle"    An access type to one of the above composite types, generally private
  1031. .INDENT -15
  1032. "...Array"    An array type
  1033. .INDENT -15
  1034. "...String"    A character array type
  1035. .INDENT -15
  1036. "...Node"    A record type used for nodes in a tree structure
  1037. .INDENT -15
  1038. "...Ptr"    An access type to a ...Array or ...Node
  1039. .INDENT -15
  1040. "...Type"    when none of the above
  1041. .TAB STOP 8
  1042. .LEFT MARGIN 8
  1043. .HEADER LEVEL 2^&Procedure Names\&
  1044. .LEFT MARGIN 20
  1045. .TAB STOP 20
  1046. .INDENT -15
  1047. "Allocate..."    A procedure which allocates a new ...
  1048. .INDENT -15
  1049. "Free..."    A procedure which frees an existing ...
  1050. .INDENT -15
  1051. "Get..."    A procedure which gives its result as an out parameter
  1052. .INDENT -15
  1053. "Set..."    A procedure which sets a value from an in parameter
  1054. .INDENT -15
  1055. "Obtain...Handle"    A procedure to return private
  1056. handle as an out parameter given
  1057. specifications of some existing object.  Increment reference count.
  1058. .INDENT -15
  1059. "Release...Handle"    A procedure to decrement
  1060. reference count and dispose of handle.
  1061. Obtains and releases should match up.
  1062. .INDENT -15
  1063. "WalkTo..."    A procedure to take handle, and return handle on child, parent,
  1064. sibling, etc, decrementing ref count of input handle and incrementing
  1065. ref count of output handle.
  1066. .INDENT -15
  1067. "Create..."    A procedure to create a new object
  1068. .INDENT -15
  1069. "Delete..."    A procedure to delete an object
  1070. .INDENT -15
  1071. "Add..."    A procedure to add a new element to list, table, etc.
  1072. .INDENT -15
  1073. "Append..."    A procedure to add a new element at the end of a list, etc.
  1074. .INDENT -15
  1075. "Insert..."    A procedure to add a new element in the middle of a list, etc.
  1076. .INDENT -15
  1077. "Prepend..."    A procedure to add to the beginning of a list, etc.
  1078. .INDENT -15
  1079. "Remove..."    A procedure to remove an element from a list, etc.
  1080. .INDENT -15
  1081. "Replace..."    A procedure to replace an existing element from a list, etc.
  1082. .INDENT -15
  1083. "Read..."    A procedure to read (part of) data from object
  1084. .INDENT -15
  1085. "Write..."    A procedure to overwrite (part of) data of object
  1086. .TAB STOP 8
  1087. .LEFT MARGIN 8
  1088. .PAGE
  1089. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  1090. --release.nts
  1091. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  1092. This is the first release of the standards checker.
  1093. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  1094. --stdckgrm.lis
  1095. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  1096. 1Options in Effect
  1097.  
  1098.  DEFAULT
  1099.  ACTIONS
  1100.  TABLES
  1101.  DEFMARK = %
  1102.  ORMARK = |
  1103.  BLOCKB = /.
  1104.  BLOCKE = ./
  1105.  COMMB = --
  1106.  COMME = 
  1107.  LOADF =   70
  1108. 1Grammar Constants
  1109.  
  1110.  Number of Terminals   94
  1111.  Number of Non Terminals  235
  1112.  Number of Rules  488
  1113.  Number of Items 1648
  1114.  Number of states   949
  1115.  Number of shift entries  1540
  1116.  Number of goto entries  2173
  1117.  Number of reduce entries   158
  1118.  Number of entries saved by default reductions 5681
  1119.  Number of shift/reduce conflicts    0
  1120.  Number of reduce/reduce conflicts    0
  1121. 1The following symbols are not used in any right hand side
  1122.  
  1123.  comment_literal 
  1124. 1
  1125.  Terminalss
  1126.  
  1127.  ABORT
  1128.  ABS
  1129.  ACCEPT
  1130.  ACCESS
  1131.  ALL
  1132.  AND
  1133.  ARRAY
  1134.  AT
  1135.  BEGIN
  1136.  BODY
  1137.  CASE
  1138.  CONSTANT
  1139.  DECLARE
  1140.  DELAY
  1141.  DELTA
  1142.  DIGITS
  1143.  DO
  1144.  ELSE
  1145.  ELSIF
  1146.  END
  1147.  ENTRY
  1148.  EXCEPTION
  1149.  EXIT
  1150.  FOR
  1151.  FUNCTION
  1152.  GENERIC
  1153.  GOTO
  1154.  IF
  1155.  IN
  1156.  IS
  1157.  LIMITED
  1158.  LOOP
  1159.  MOD
  1160.  NEW
  1161.  NOT
  1162.  NULL
  1163.  OF
  1164.  OR
  1165.  OTHERS
  1166.  OUT
  1167.  PACKAGE
  1168.  PRAGMA
  1169.  PRIVATE
  1170.  PROCEDURE
  1171.  RAISE
  1172.  RANGE
  1173.  RECORD
  1174.  REM
  1175.  RENAMES
  1176.  RETURN
  1177.  REVERSE
  1178.  SELECT
  1179.  SEPARATE
  1180.  SUBTYPE
  1181.  TASK
  1182.  TERMINATE
  1183.  THEN
  1184.  TYPE
  1185.  USE
  1186.  WHEN
  1187.  WHILE
  1188.  WITH
  1189.  XOR
  1190.  identifier
  1191.  numeric_literal
  1192.  string_literal
  1193.  character_literal
  1194.  &
  1195.  '
  1196.  (
  1197.  )
  1198.  *
  1199.  +
  1200.  ,
  1201.  -
  1202.  .
  1203.  /
  1204.  :
  1205.  ;
  1206.  <
  1207.  =
  1208.  >
  1209.  '|'
  1210.  =>
  1211.  ..
  1212.  **
  1213.  :=
  1214.  /=
  1215.  >=
  1216.  <=
  1217.  <<
  1218.  >>
  1219.  <>
  1220.  comment_literal
  1221. 1
  1222.  Rules
  1223.  
  1224.     1 pragma ::= PRAGMA pragma_identifier ( general_component_associations ) ; 
  1225.  
  1226.     2 pragma ::= PRAGMA pragma_identifier ; 
  1227.  
  1228.     3 pragma_identifier ::= identifier 
  1229.  
  1230.     4 basic_declaration ::= object_declaration 
  1231.  
  1232.     5 basic_declaration ::= number_declaration 
  1233.  
  1234.     6 basic_declaration ::= type_declaration 
  1235.  
  1236.     7 basic_declaration ::= subtype_declaration 
  1237.  
  1238.     8 basic_declaration ::= subprogram_declaration 
  1239.  
  1240.     9 basic_declaration ::= package_declaration 
  1241.  
  1242.    10 basic_declaration ::= task_declaration 
  1243.  
  1244.    11 basic_declaration ::= generic_declaration 
  1245.  
  1246.    12 basic_declaration ::= exception_declaration 
  1247.  
  1248.    13 basic_declaration ::= generic_instantiation 
  1249.  
  1250.    14 basic_declaration ::= renaming_declaration 
  1251.  
  1252.    15 object_declaration ::= object_item ; 
  1253.  
  1254.    16 object_item ::= identifier_list : subtype_indication [:=expression] 
  1255.  
  1256.    17 object_item ::= identifier_list : CONSTANT subtype_indication 
  1257.       [:=expression] 
  1258.  
  1259.    18 object_item ::= identifier_list : constrained_array_definition 
  1260.       [:=expression] 
  1261.  
  1262.    19 object_item ::= identifier_list : CONSTANT constrained_array_definition 
  1263.       [:=expression] 
  1264.  
  1265.    20 number_declaration ::= identifier_list : CONSTANT := expression ; 
  1266.  
  1267.    21 identifier_list ::= identifier {,identifier} 
  1268.  
  1269.    22 type_declaration ::= full_type_declaration 
  1270.  
  1271.    23 type_declaration ::= incomplete_type_declaration 
  1272.  
  1273.    24 type_declaration ::= private_type_declaration 
  1274.  
  1275.    25 full_type_declaration ::= TYPE type_identifier is__type_definition ; 
  1276.  
  1277.    26 full_type_declaration ::= TYPE type_identifier ( discriminant_specification
  1278.       {;discriminant_specification} ) is__type_definition ; 
  1279.  
  1280.    27 is__type_definition ::= IS type_definition 
  1281.  
  1282.    28 type_identifier ::= identifier 
  1283.  
  1284.    29 type_definition ::= enumeration_type_definition 
  1285.  
  1286.    30 type_definition ::= integer_type_definition 
  1287.  
  1288.    31 type_definition ::= real_type_definition 
  1289.  
  1290.    32 type_definition ::= array_type_definition 
  1291.  
  1292.    33 type_definition ::= record_type_definition 
  1293.  
  1294.    34 type_definition ::= access_type_definition 
  1295.  
  1296.    35 type_definition ::= derived_type_definition 
  1297.  
  1298.    36 subtype_declaration ::= SUBTYPE type_identifier is__subtype_indication ; 
  1299.  
  1300.    37 is__subtype_indication ::= IS subtype_indication 
  1301.  
  1302.    38 subtype_indication ::= type_mark 
  1303.  
  1304.    39 subtype_indication ::= type_mark constraint 
  1305.  
  1306.    40 type_mark ::= type_name|subtype_name 
  1307.  
  1308.    41 constraint ::= range_constraint 
  1309.  
  1310.    42 constraint ::= floating_point_constraint 
  1311.  
  1312.    43 constraint ::= fixed_point_constraint 
  1313.  
  1314.    44 constraint ::= ( general_component_associations ) 
  1315.  
  1316.    45 derived_type_definition ::= NEW subtype_indication 
  1317.  
  1318.    46 range_constraint ::= RANGE simple_expression 
  1319.  
  1320.    47 range_constraint ::= RANGE simple_expression .. simple_expression 
  1321.  
  1322.    48 enumeration_type_definition ::= ( enumeration_literal_specification 
  1323.       {,enumeration_literal_specification} ) 
  1324.  
  1325.    49 enumeration_literal_specification ::= enumeration_literal 
  1326.  
  1327.    50 enumeration_literal ::= identifier 
  1328.  
  1329.    51 enumeration_literal ::= character_literal 
  1330.  
  1331.    52 integer_type_definition ::= range_constraint 
  1332.  
  1333.    53 real_type_definition ::= floating_point_constraint 
  1334.  
  1335.    54 real_type_definition ::= fixed_point_constraint 
  1336.  
  1337.    55 floating_point_constraint ::= floating_accuracy_definition 
  1338.       [range_constraint] 
  1339.  
  1340.    56 floating_accuracy_definition ::= DIGITS simple_expression 
  1341.  
  1342.    57 fixed_point_constraint ::= fixed_accuracy_definition [range_constraint] 
  1343.  
  1344.    58 fixed_accuracy_definition ::= DELTA simple_expression 
  1345.  
  1346.    59 array_type_definition ::= unconstrained_array_definition 
  1347.  
  1348.    60 array_type_definition ::= constrained_array_definition 
  1349.  
  1350.    61 unconstrained_array_definition ::= ARRAY ( index_subtype_definition 
  1351.       {,index_subtype_definition} ) OF subtype_indication 
  1352.  
  1353.    62 constrained_array_definition ::= ARRAY index_constraint OF 
  1354.       subtype_indication 
  1355.  
  1356.    63 index_subtype_definition ::= name RANGE <> 
  1357.  
  1358.    64 index_constraint ::= ( discrete_range {,discrete_range} ) 
  1359.  
  1360.    65 discrete_range ::= name range_constraint 
  1361.  
  1362.    66 discrete_range ::= range 
  1363.  
  1364.    67 range ::= simple_expression 
  1365.  
  1366.    68 range ::= simple_expression .. simple_expression 
  1367.  
  1368.    69 record_type_definition ::= RECORD component_list END RECORD 
  1369.  
  1370.    70 component_list ::= {pragma_decl} {component_declaration} 
  1371.       component_declaration {pragma_decl} 
  1372.  
  1373.    71 component_list ::= {pragma_decl} {component_declaration} variant_part 
  1374.       {pragma_decl} 
  1375.  
  1376.    72 component_list ::= NULL ; {pragma_decl} 
  1377.  
  1378.    73 component_declaration ::= component_item ; 
  1379.  
  1380.    74 component_item ::= identifier_list : subtype_indication [:=expression] 
  1381.  
  1382.    75 discriminant_specification ::= identifier_list : type_mark [:=expression] 
  1383.  
  1384.    76 variant_part ::= CASE identifier IS {pragma_variant} variant {variant} END 
  1385.       CASE ; 
  1386.  
  1387.    77 variant ::= WHEN choice {|choice} => component_list 
  1388.  
  1389.    78 variant ::= WHEN OTHERS => component_list 
  1390.  
  1391.    79 choice ::= simple_expression 
  1392.  
  1393.    80 choice ::= simple_expression .. simple_expression 
  1394.  
  1395.    81 choice ::= name range_constraint 
  1396.  
  1397.    82 access_type_definition ::= ACCESS subtype_indication 
  1398.  
  1399.    83 incomplete_type_declaration ::= TYPE type_identifier ; 
  1400.  
  1401.    84 incomplete_type_declaration ::= TYPE type_identifier ( 
  1402.       discriminant_specification {;discriminant_specification} ) ; 
  1403.  
  1404.    85 declarative_part ::= {basic_declarative_item} 
  1405.  
  1406.    86 declarative_part ::= {basic_declarative_item} body {later_declarative_item}
  1407.  
  1408.    87 basic_declarative_item ::= basic_declaration 
  1409.  
  1410.    88 basic_declarative_item ::= representation_clause 
  1411.  
  1412.    89 basic_declarative_item ::= use_clause 
  1413.  
  1414.    90 later_declarative_item ::= body 
  1415.  
  1416.    91 later_declarative_item ::= subprogram_declaration 
  1417.  
  1418.    92 later_declarative_item ::= package_declaration 
  1419.  
  1420.    93 later_declarative_item ::= task_declaration 
  1421.  
  1422.    94 later_declarative_item ::= generic_declaration 
  1423.  
  1424.    95 later_declarative_item ::= use_clause 
  1425.  
  1426.    96 later_declarative_item ::= generic_instantiation 
  1427.  
  1428.    97 body ::= proper_body 
  1429.  
  1430.    98 body ::= body_stub 
  1431.  
  1432.    99 proper_body ::= subprogram_body 
  1433.  
  1434.   100 proper_body ::= package_body 
  1435.  
  1436.   101 proper_body ::= task_body 
  1437.  
  1438.   102 name ::= identifier 
  1439.  
  1440.   103 name ::= character_literal 
  1441.  
  1442.   104 name ::= string_literal 
  1443.  
  1444.   105 name ::= indexed_component 
  1445.  
  1446.   106 name ::= selected_component 
  1447.  
  1448.   107 name ::= attribute 
  1449.  
  1450.   108 indexed_component ::= name ( general_component_associations ) 
  1451.  
  1452.   109 selected_component ::= name . selector 
  1453.  
  1454.   110 selected_component ::= name . ALL 
  1455.  
  1456.   111 selector ::= identifier 
  1457.  
  1458.   112 selector ::= character_literal 
  1459.  
  1460.   113 selector ::= string_literal 
  1461.  
  1462.   114 attribute ::= name ' attribute_designator 
  1463.  
  1464.   115 attribute_designator ::= identifier 
  1465.  
  1466.   116 attribute_designator ::= DIGITS 
  1467.  
  1468.   117 attribute_designator ::= DELTA 
  1469.  
  1470.   118 attribute_designator ::= RANGE 
  1471.  
  1472.   119 aggregate ::= ( component_associations ) 
  1473.  
  1474.   120 component_associations ::= expression,expression{,expression} 
  1475.       [,others=>expression] 
  1476.  
  1477.   121 component_associations ::= expression,expression{,expression} , 
  1478.       choice{|choice}=>expression {,choice{|choice}=>expression} 
  1479.       [,others=>expression] 
  1480.  
  1481.   122 component_associations ::= expression , choice{|choice}=>expression 
  1482.       {,choice{|choice}=>expression} [,others=>expression] 
  1483.  
  1484.   123 component_associations ::= choice{|choice}=>expression 
  1485.       {,choice{|choice}=>expression} [,others=>expression] 
  1486.  
  1487.   124 component_associations ::= expression , others=>expression 
  1488.  
  1489.   125 component_associations ::= others=>expression 
  1490.  
  1491.   126 general_component_associations ::= ga_expression{,ga_expression} 
  1492.  
  1493.   127 general_component_associations ::= ga_expression{,ga_expression} , 
  1494.       identifier{|identifier}=>expression {,identifier{|identifier}=>expression} 
  1495.  
  1496.   128 general_component_associations ::= identifier{|identifier}=>expression 
  1497.       {,identifier{|identifier}=>expression} 
  1498.  
  1499.   129 expression ::= relation 
  1500.  
  1501.   130 expression ::= relation{AND__relation} 
  1502.  
  1503.   131 expression ::= relation{OR__relation} 
  1504.  
  1505.   132 expression ::= relation{XOR__relation} 
  1506.  
  1507.   133 expression ::= relation{AND__THEN__relation} 
  1508.  
  1509.   134 expression ::= relation{OR__ELSE__relation} 
  1510.  
  1511.   135 relation ::= simple_expression [relational_operator__simple_expression] 
  1512.  
  1513.   136 relation ::= simple_expression [NOT]IN range 
  1514.  
  1515.   137 simple_expression ::= 
  1516.       [unary_adding_operator]term{binary_adding_operator__term} 
  1517.  
  1518.   138 term ::= factor{multiplying_operator__factor} 
  1519.  
  1520.   139 factor ::= primary [exponentiating_operator__primary] 
  1521.  
  1522.   140 factor ::= high_precedence_unary_operator primary 
  1523.  
  1524.   141 parenthesized_expression ::= ( expression ) 
  1525.  
  1526.   142 primary ::= numeric_literal 
  1527.  
  1528.   143 primary ::= NULL 
  1529.  
  1530.   144 primary ::= name 
  1531.  
  1532.   145 primary ::= allocator 
  1533.  
  1534.   146 primary ::= qualified_expression 
  1535.  
  1536.   147 primary ::= aggregate 
  1537.  
  1538.   148 primary ::= parenthesized_expression 
  1539.  
  1540.   149 relational_operator ::= = 
  1541.  
  1542.   150 relational_operator ::= /= 
  1543.  
  1544.   151 relational_operator ::= < 
  1545.  
  1546.   152 relational_operator ::= <= 
  1547.  
  1548.   153 relational_operator ::= > 
  1549.  
  1550.   154 relational_operator ::= >= 
  1551.  
  1552.   155 binary_adding_operator ::= + 
  1553.  
  1554.   156 binary_adding_operator ::= - 
  1555.  
  1556.   157 binary_adding_operator ::= & 
  1557.  
  1558.   158 unary_adding_operator ::= + 
  1559.  
  1560.   159 unary_adding_operator ::= - 
  1561.  
  1562.   160 high_precedence_unary_operator ::= ABS 
  1563.  
  1564.   161 high_precedence_unary_operator ::= NOT 
  1565.  
  1566.   162 multiplying_operator ::= * 
  1567.  
  1568.   163 multiplying_operator ::= / 
  1569.  
  1570.   164 multiplying_operator ::= MOD 
  1571.  
  1572.   165 multiplying_operator ::= REM 
  1573.  
  1574.   166 exponentiating_operator ::= ** 
  1575.  
  1576.   167 qualified_expression ::= name ' aggregate 
  1577.  
  1578.   168 qualified_expression ::= name ' parenthesized_expression 
  1579.  
  1580.   169 allocator ::= NEW type_mark 
  1581.  
  1582.   170 allocator ::= NEW type_mark ( general_component_associations ) 
  1583.  
  1584.   171 allocator ::= NEW expanded_name ' parenthesized_expression 
  1585.  
  1586.   172 allocator ::= NEW expanded_name ' aggregate 
  1587.  
  1588.   173 sequence_of_statements ::= {pragma_stm} statement {statement} 
  1589.  
  1590.   174 statement ::= simple_statement 
  1591.  
  1592.   175 statement ::= compound_statement 
  1593.  
  1594.   176 statement ::= {label}+ simple_statement 
  1595.  
  1596.   177 statement ::= {label}+ compound_statement 
  1597.  
  1598.   178 simple_statement ::= null_statement 
  1599.  
  1600.   179 simple_statement ::= assignment_statement 
  1601.  
  1602.   180 simple_statement ::= exit_statement 
  1603.  
  1604.   181 simple_statement ::= return_statement 
  1605.  
  1606.   182 simple_statement ::= goto_statement 
  1607.  
  1608.   183 simple_statement ::= delay_statement 
  1609.  
  1610.   184 simple_statement ::= abort_statement 
  1611.  
  1612.   185 simple_statement ::= raise_statement 
  1613.  
  1614.   186 simple_statement ::= code_statement 
  1615.  
  1616.   187 simple_statement ::= call_statement 
  1617.  
  1618.   188 compound_statement ::= if_statement 
  1619.  
  1620.   189 compound_statement ::= case_statement 
  1621.  
  1622.   190 compound_statement ::= loop_statement 
  1623.  
  1624.   191 compound_statement ::= block_statement 
  1625.  
  1626.   192 compound_statement ::= accept_statement 
  1627.  
  1628.   193 compound_statement ::= select_statement 
  1629.  
  1630.   194 label ::= << identifier >> 
  1631.  
  1632.   195 null_statement ::= NULL ; 
  1633.  
  1634.   196 assignment_statement ::= name := expression ; 
  1635.  
  1636.   197 if_statement ::= IF condition_THEN__sequence_of_statements 
  1637.       {ELSIF__condition__THEN__sequence_of_statements} 
  1638.       [ELSE__sequence_of_statements] END IF ; 
  1639.  
  1640.   198 condition ::= expression 
  1641.  
  1642.   199 case_statement ::= CASE expression IS {pragma_alt} 
  1643.       case_statement_alternative {case_statement_alternative} END CASE ; 
  1644.  
  1645.   200 case_statement_alternative ::= WHEN choice {|choice} => 
  1646.       sequence_of_statements 
  1647.  
  1648.   201 case_statement_alternative ::= WHEN OTHERS => sequence_of_statements 
  1649.  
  1650.   202 loop_statement ::= [loop_identifier:] LOOP sequence_of_statements END LOOP 
  1651.       [identifier] ; 
  1652.  
  1653.   203 loop_statement ::= [loop_identifier:] iteration_rule LOOP 
  1654.       sequence_of_statements END LOOP [identifier] ; 
  1655.  
  1656.   204 iteration_rule ::= WHILE condition 
  1657.  
  1658.   205 iteration_rule ::= FOR identifier IN discrete_range 
  1659.  
  1660.   206 iteration_rule ::= FOR identifier IN REVERSE discrete_range 
  1661.  
  1662.   207 declarative_part__begin_end_block ::= declarative_part begin_end_block 
  1663.  
  1664.   208 begin_end_block ::= begin_end_block_head sequence_of_statements END 
  1665.  
  1666.   209 begin_end_block ::= begin_end_block_head sequence_of_statements EXCEPTION 
  1667.       {pragma_alt}__exception_handler_list END 
  1668.  
  1669.   210 begin_end_block_head ::= BEGIN 
  1670.  
  1671.   211 block_statement ::= [block_identifier:] declare_item 
  1672.       declarative_part__begin_end_block [identifier] ; 
  1673.  
  1674.   212 block_statement ::= [block_identifier:] begin_end_block [identifier] ; 
  1675.  
  1676.   213 declare_item ::= DECLARE 
  1677.  
  1678.   214 exit_statement ::= exit_item ; 
  1679.  
  1680.   215 exit_item ::= EXIT 
  1681.  
  1682.   216 exit_item ::= EXIT WHEN condition 
  1683.  
  1684.   217 exit_item ::= EXIT expanded_name 
  1685.  
  1686.   218 exit_item ::= EXIT expanded_name WHEN condition 
  1687.  
  1688.   219 return_statement ::= RETURN ; 
  1689.  
  1690.   220 return_statement ::= RETURN expression ; 
  1691.  
  1692.   221 goto_statement ::= goto_item ; 
  1693.  
  1694.   222 goto_item ::= GOTO expanded_name 
  1695.  
  1696.   223 subprogram_declaration ::= subprogram_specification ; 
  1697.  
  1698.   224 subprogram_specification ::= PROCEDURE subprogram_identifier 
  1699.  
  1700.   225 subprogram_specification ::= PROCEDURE subprogram_identifier ( 
  1701.       parameter_specification {;parameter_specification} ) 
  1702.  
  1703.   226 subprogram_specification ::= FUNCTION designator RETURN type_mark 
  1704.  
  1705.   227 subprogram_specification ::= FUNCTION designator ( parameter_specification 
  1706.       {;parameter_specification} ) RETURN type_mark 
  1707.  
  1708.   228 designator ::= identifier 
  1709.  
  1710.   229 designator ::= string_literal 
  1711.  
  1712.   230 subprogram_identifier ::= identifier 
  1713.  
  1714.   231 parameter_specification ::= identifier_list mode type_mark [:=expression] 
  1715.  
  1716.   232 mode ::= generic_parameter_mode 
  1717.  
  1718.   233 mode ::= : OUT 
  1719.  
  1720.   234 generic_parameter_mode ::= : 
  1721.  
  1722.   235 generic_parameter_mode ::= : IN 
  1723.  
  1724.   236 generic_parameter_mode ::= : IN OUT 
  1725.  
  1726.   237 subprogram_body ::= subprogram_body_head subprogram_body_tail 
  1727.  
  1728.   238 subprogram_body_head ::= subprogram_specification IS 
  1729.  
  1730.   239 subprogram_body_tail ::= declarative_part__begin_end_block [end_designator]
  1731.       ; 
  1732.  
  1733.   240 call_statement ::= name ; 
  1734.  
  1735.   241 package_declaration ::= package_specification ; 
  1736.  
  1737.   242 package_specification ::= PACKAGE package_identifier IS 
  1738.       {basic_declarative_item} END [identifier] 
  1739.  
  1740.   243 package_specification ::= PACKAGE package_identifier IS 
  1741.       {basic_declarative_item} private_part {basic_declarative_item} END 
  1742.       [identifier] 
  1743.  
  1744.   244 private_part ::= PRIVATE 
  1745.  
  1746.   245 package_identifier ::= identifier 
  1747.  
  1748.   246 package_body ::= package_body_indicator declarative_part END [identifier] ;
  1749.  
  1750.   247 package_body ::= package_body_indicator declarative_part__begin_end_block 
  1751.       [identifier] ; 
  1752.  
  1753.   248 package_body_indicator ::= PACKAGE BODY identifier IS 
  1754.  
  1755.   249 private_type_declaration ::= TYPE type_identifier IS LIMITED PRIVATE ; 
  1756.  
  1757.   250 private_type_declaration ::= TYPE type_identifier ( 
  1758.       discriminant_specification {;discriminant_specification} ) IS LIMITED 
  1759.       PRIVATE ; 
  1760.  
  1761.   251 private_type_declaration ::= TYPE type_identifier IS PRIVATE ; 
  1762.  
  1763.   252 private_type_declaration ::= TYPE type_identifier ( 
  1764.       discriminant_specification {;discriminant_specification} ) IS PRIVATE ; 
  1765.  
  1766.   253 use_clause ::= USE expanded_name {,expanded_name} ; 
  1767.  
  1768.   254 renaming_declaration ::= identifier_list : type_mark RENAMES name ; 
  1769.  
  1770.   255 renaming_declaration ::= identifier_list : EXCEPTION RENAMES expanded_name 
  1771.       ; 
  1772.  
  1773.   256 renaming_declaration ::= PACKAGE package_identifier RENAMES expanded_name ;
  1774.  
  1775.   257 renaming_declaration ::= subprogram_specification RENAMES name ; 
  1776.  
  1777.   258 task_declaration ::= task_specification ; 
  1778.  
  1779.   259 task_specification ::= TASK task_identifier 
  1780.  
  1781.   260 task_specification ::= TASK TYPE task_identifier 
  1782.  
  1783.   261 task_specification ::= TASK task_identifier IS {entry_declaration} 
  1784.       {representation_clause} END [identifier] 
  1785.  
  1786.   262 task_specification ::= TASK TYPE task_identifier IS {entry_declaration} 
  1787.       {representation_clause} END [identifier] 
  1788.  
  1789.   263 task_identifier ::= identifier 
  1790.  
  1791.   264 task_body ::= task_body_indicator declarative_part__begin_end_block 
  1792.       [identifier] ; 
  1793.  
  1794.   265 task_body_indicator ::= TASK BODY identifier IS 
  1795.  
  1796.   266 entry_declaration ::= ENTRY identifier [(discrete_range)][formal_part] ; 
  1797.  
  1798.   267 accept_statement ::= ACCEPT identifier [(expression)][formal_part] ; 
  1799.  
  1800.   268 accept_statement ::= ACCEPT identifier [(expression)][formal_part] DO 
  1801.       sequence_of_statements END [identifier] ; 
  1802.  
  1803.   269 delay_statement ::= DELAY simple_expression ; 
  1804.  
  1805.   270 select_statement ::= selective_wait 
  1806.  
  1807.   271 select_statement ::= conditional_entry_call 
  1808.  
  1809.   272 select_statement ::= timed_entry_call 
  1810.  
  1811.   273 selective_wait ::= SELECT select_alternative {OR__select_alternative} 
  1812.       [ELSE__sequence_of_statements] END SELECT ; 
  1813.  
  1814.   274 select_alternative ::= {pragma_stm} WHEN condition => 
  1815.       selective_wait_alternative 
  1816.  
  1817.   275 select_alternative ::= {pragma_stm} selective_wait_alternative 
  1818.  
  1819.   276 selective_wait_alternative ::= accept_alternative 
  1820.  
  1821.   277 selective_wait_alternative ::= delay_alternative 
  1822.  
  1823.   278 selective_wait_alternative ::= terminate_alternative 
  1824.  
  1825.   279 accept_alternative ::= accept_statement [sequence_of_statements] 
  1826.  
  1827.   280 delay_alternative ::= delay_statement [sequence_of_statements] 
  1828.  
  1829.   281 terminate_alternative ::= TERMINATE ; {pragma_stm} 
  1830.  
  1831.   282 conditional_entry_call ::= SELECT {pragma_stm} call_statement 
  1832.       [sequence_of_statements] ELSE sequence_of_statements END SELECT ; 
  1833.  
  1834.   283 timed_entry_call ::= SELECT {pragma_stm} call_statement 
  1835.       [sequence_of_statements] OR {pragma_stm} delay_alternative END SELECT ; 
  1836.  
  1837.   284 abort_statement ::= ABORT name {,name} ; 
  1838.  
  1839.   285 compilation ::= {compilation_unit} 
  1840.  
  1841.   286 pragma_header ::= PRAGMA pragma_identifier 
  1842.  
  1843.   287 compilation_unit ::= pragma_header ( general_component_associations ) ; 
  1844.  
  1845.   288 compilation_unit ::= pragma_header ; 
  1846.  
  1847.   289 compilation_unit ::= context_clause library_or_secondary_unit 
  1848.  
  1849.   290 library_or_secondary_unit ::= subprogram_declaration 
  1850.  
  1851.   291 library_or_secondary_unit ::= package_declaration 
  1852.  
  1853.   292 library_or_secondary_unit ::= generic_declaration 
  1854.  
  1855.   293 library_or_secondary_unit ::= generic_instantiation 
  1856.  
  1857.   294 library_or_secondary_unit ::= subprogram_body 
  1858.  
  1859.   295 library_or_secondary_unit ::= package_body 
  1860.  
  1861.   296 library_or_secondary_unit ::= subunit 
  1862.  
  1863.   297 context_clause ::= {with_clause{use_clause}} 
  1864.  
  1865.   298 with_clause ::= WITH identifier {,used_identifier} ; 
  1866.  
  1867.   299 body_stub ::= subprogram_specification IS SEPARATE ; 
  1868.  
  1869.   300 body_stub ::= PACKAGE BODY identifier IS SEPARATE ; 
  1870.  
  1871.   301 body_stub ::= TASK BODY identifier IS SEPARATE ; 
  1872.  
  1873.   302 subunit ::= SEPARATE ( expanded_name ) proper_body 
  1874.  
  1875.   303 exception_declaration ::= identifier_list : EXCEPTION ; 
  1876.  
  1877.   304 exception_handler ::= WHEN exception_choice {|exception_choice} => 
  1878.       sequence_of_statements 
  1879.  
  1880.   305 exception_choice ::= expanded_name 
  1881.  
  1882.   306 exception_choice ::= OTHERS 
  1883.  
  1884.   307 raise_statement ::= RAISE ; 
  1885.  
  1886.   308 raise_statement ::= RAISE expanded_name ; 
  1887.  
  1888.   309 generic_declaration ::= generic_specification ; 
  1889.  
  1890.   310 generic_specification ::= generic_formal_part subprogram_specification 
  1891.  
  1892.   311 generic_specification ::= generic_formal_part package_specification 
  1893.  
  1894.   312 generic_formal_part ::= GENERIC {generic_parameter_declaration} 
  1895.  
  1896.   313 generic_parameter_declaration ::= identifier_list generic_parameter_mode 
  1897.       type_mark [:=expression] ; 
  1898.  
  1899.   314 generic_parameter_declaration ::= TYPE type_identifier IS 
  1900.       generic_type_definition ; 
  1901.  
  1902.   315 generic_parameter_declaration ::= TYPE type_identifier ( 
  1903.       discriminant_specification {;discriminant_specification} ) IS 
  1904.       generic_type_definition ; 
  1905.  
  1906.   316 generic_parameter_declaration ::= WITH subprogram_specification 
  1907.       [IS__name__or__<>] ; 
  1908.  
  1909.   317 generic_type_definition ::= ( <> ) 
  1910.  
  1911.   318 generic_type_definition ::= RANGE <> 
  1912.  
  1913.   319 generic_type_definition ::= DIGITS <> 
  1914.  
  1915.   320 generic_type_definition ::= DELTA <> 
  1916.  
  1917.   321 generic_type_definition ::= LIMITED PRIVATE 
  1918.  
  1919.   322 generic_type_definition ::= PRIVATE 
  1920.  
  1921.   323 generic_type_definition ::= array_type_definition 
  1922.  
  1923.   324 generic_type_definition ::= access_type_definition 
  1924.  
  1925.   325 generic_instantiation ::= PACKAGE package_identifier IS NEW expanded_name ;
  1926.  
  1927.   326 generic_instantiation ::= PACKAGE package_identifier IS NEW expanded_name (
  1928.       generic_association {,generic_association} ) ; 
  1929.  
  1930.   327 generic_instantiation ::= FUNCTION designator IS NEW expanded_name ; 
  1931.  
  1932.   328 generic_instantiation ::= FUNCTION designator IS NEW expanded_name ( 
  1933.       generic_association {,generic_association} ) ; 
  1934.  
  1935.   329 generic_instantiation ::= subprogram_specification IS NEW expanded_name ; 
  1936.  
  1937.   330 generic_instantiation ::= subprogram_specification IS NEW expanded_name ( 
  1938.       generic_association {,generic_association} ) ; 
  1939.  
  1940.   331 generic_association ::= 
  1941.       [generic_formal_parameter=>]generic_actual_parameter 
  1942.  
  1943.   332 generic_formal_parameter ::= identifier 
  1944.  
  1945.   333 generic_formal_parameter ::= string_literal 
  1946.  
  1947.   334 generic_actual_parameter ::= expression 
  1948.  
  1949.   335 representation_clause ::= representation_item ; 
  1950.  
  1951.   336 representation_item ::= length_clause 
  1952.  
  1953.   337 representation_item ::= enumeration_representation_clause 
  1954.  
  1955.   338 representation_item ::= address_clause 
  1956.  
  1957.   339 representation_item ::= record_representation_clause 
  1958.  
  1959.   340 length_clause ::= FOR attribute USE simple_expression 
  1960.  
  1961.   341 enumeration_representation_clause ::= FOR identifier USE aggregate 
  1962.  
  1963.   342 record_representation_clause ::= FOR identifier USE RECORD 
  1964.       {component_clause} END RECORD 
  1965.  
  1966.   343 record_representation_clause ::= FOR identifier USE RECORD alignment_clause
  1967.       {component_clause} END RECORD 
  1968.  
  1969.   344 component_clause ::= name AT simple_expression range_constraint ; 
  1970.  
  1971.   345 alignment_clause ::= AT MOD simple_expression ; 
  1972.  
  1973.   346 address_clause ::= FOR identifier USE AT simple_expression 
  1974.  
  1975.   347 code_statement ::= code_item ; 
  1976.  
  1977.   348 code_item ::= name ' aggregate 
  1978.  
  1979.   349 {pragma_decl} ::= EMPTY
  1980.  
  1981.   350 {pragma_decl} ::= {pragma_decl} pragma 
  1982.  
  1983.   351 {pragma_variant} ::= EMPTY
  1984.  
  1985.   352 {pragma_variant} ::= {pragma_variant} pragma 
  1986.  
  1987.   353 {pragma_stm} ::= EMPTY
  1988.  
  1989.   354 {pragma_stm} ::= {pragma_stm} pragma 
  1990.  
  1991.   355 {pragma_alt} ::= EMPTY
  1992.  
  1993.   356 {pragma_alt} ::= {pragma_alt} pragma 
  1994.  
  1995.   357 [:=expression] ::= EMPTY
  1996.  
  1997.   358 [:=expression] ::= := expression 
  1998.  
  1999.   359 {,identifier} ::= EMPTY
  2000.  
  2001.   360 {,identifier} ::= {,identifier} , identifier 
  2002.  
  2003.   361 type_name|subtype_name ::= expanded_name 
  2004.  
  2005.   362 expanded_name ::= identifier 
  2006.  
  2007.   363 expanded_name ::= expanded_name . identifier 
  2008.  
  2009.   364 {,enumeration_literal_specification} ::= EMPTY
  2010.  
  2011.   365 {,enumeration_literal_specification} ::= 
  2012.       {,enumeration_literal_specification} , enumeration_literal_specification 
  2013.  
  2014.   366 [range_constraint] ::= EMPTY
  2015.  
  2016.   367 [range_constraint] ::= range_constraint 
  2017.  
  2018.   368 {,index_subtype_definition} ::= EMPTY
  2019.  
  2020.   369 {,index_subtype_definition} ::= {,index_subtype_definition} , 
  2021.       index_subtype_definition 
  2022.  
  2023.   370 {,discrete_range} ::= EMPTY
  2024.  
  2025.   371 {,discrete_range} ::= {,discrete_range} , discrete_range 
  2026.  
  2027.   372 {component_declaration} ::= EMPTY
  2028.  
  2029.   373 {component_declaration} ::= {component_declaration} component_declaration 
  2030.       {pragma_decl} 
  2031.  
  2032.   374 {;discriminant_specification} ::= EMPTY
  2033.  
  2034.   375 {;discriminant_specification} ::= {;discriminant_specification} ; 
  2035.       discriminant_specification 
  2036.  
  2037.   376 {variant} ::= EMPTY
  2038.  
  2039.   377 {variant} ::= {variant} variant 
  2040.  
  2041.   378 {|choice} ::= EMPTY
  2042.  
  2043.   379 {|choice} ::= {|choice} '|' choice 
  2044.  
  2045.   380 {basic_declarative_item} ::= {pragma_decl} 
  2046.  
  2047.   381 {basic_declarative_item} ::= {basic_declarative_item} 
  2048.       basic_declarative_item {pragma_decl} 
  2049.  
  2050.   382 {later_declarative_item} ::= {pragma_decl} 
  2051.  
  2052.   383 {later_declarative_item} ::= {later_declarative_item} 
  2053.       later_declarative_item {pragma_decl} 
  2054.  
  2055.   384 expression,expression{,expression} ::= expression , expression 
  2056.  
  2057.   385 expression,expression{,expression} ::= expression,expression{,expression} ,
  2058.       expression 
  2059.  
  2060.   386 choice{|choice}=>expression ::= choice {|choice} => expression 
  2061.  
  2062.   387 {,choice{|choice}=>expression} ::= EMPTY
  2063.  
  2064.   388 {,choice{|choice}=>expression} ::= {,choice{|choice}=>expression} , 
  2065.       choice{|choice}=>expression 
  2066.  
  2067.   389 [,others=>expression] ::= EMPTY
  2068.  
  2069.   390 [,others=>expression] ::= , others=>expression 
  2070.  
  2071.   391 others=>expression ::= OTHERS => expression 
  2072.  
  2073.   392 ga_expression ::= expression 
  2074.  
  2075.   393 ga_expression ::= simple_expression .. simple_expression 
  2076.  
  2077.   394 ga_expression ::= name range_constraint 
  2078.  
  2079.   395 ga_expression{,ga_expression} ::= ga_expression 
  2080.  
  2081.   396 ga_expression{,ga_expression} ::= ga_expression{,ga_expression} , 
  2082.       ga_expression 
  2083.  
  2084.   397 identifier{|identifier}=>expression ::= identifier {|identifier} => 
  2085.       expression 
  2086.  
  2087.   398 {,identifier{|identifier}=>expression} ::= EMPTY
  2088.  
  2089.   399 {,identifier{|identifier}=>expression} ::= 
  2090.       {,identifier{|identifier}=>expression} , 
  2091.       identifier{|identifier}=>expression 
  2092.  
  2093.   400 {|identifier} ::= EMPTY
  2094.  
  2095.   401 {|identifier} ::= {|identifier} '|' identifier 
  2096.  
  2097.   402 relation{AND__relation} ::= relation AND relation 
  2098.  
  2099.   403 relation{AND__relation} ::= relation{AND__relation} AND relation 
  2100.  
  2101.   404 relation{OR__relation} ::= relation OR relation 
  2102.  
  2103.   405 relation{OR__relation} ::= relation{OR__relation} OR relation 
  2104.  
  2105.   406 relation{XOR__relation} ::= relation XOR relation 
  2106.  
  2107.   407 relation{XOR__relation} ::= relation{XOR__relation} XOR relation 
  2108.  
  2109.   408 relation{AND__THEN__relation} ::= relation AND THEN relation 
  2110.  
  2111.   409 relation{AND__THEN__relation} ::= relation{AND__THEN__relation} AND THEN 
  2112.       relation 
  2113.  
  2114.   410 relation{OR__ELSE__relation} ::= relation OR ELSE relation 
  2115.  
  2116.   411 relation{OR__ELSE__relation} ::= relation{OR__ELSE__relation} OR ELSE 
  2117.       relation 
  2118.  
  2119.   412 [relational_operator__simple_expression] ::= EMPTY
  2120.  
  2121.   413 [relational_operator__simple_expression] ::= relational_operator 
  2122.       simple_expression 
  2123.  
  2124.   414 [NOT]IN ::= IN 
  2125.  
  2126.   415 [NOT]IN ::= NOT IN 
  2127.  
  2128.   416 [unary_adding_operator]term{binary_adding_operator__term} ::= term 
  2129.  
  2130.   417 [unary_adding_operator]term{binary_adding_operator__term} ::= 
  2131.       unary_adding_operator term 
  2132.  
  2133.   418 [unary_adding_operator]term{binary_adding_operator__term} ::= 
  2134.       [unary_adding_operator]term{binary_adding_operator__term} 
  2135.       binary_adding_operator term 
  2136.  
  2137.   419 factor{multiplying_operator__factor} ::= factor 
  2138.  
  2139.   420 factor{multiplying_operator__factor} ::= 
  2140.       factor{multiplying_operator__factor} multiplying_operator factor 
  2141.  
  2142.   421 [exponentiating_operator__primary] ::= EMPTY
  2143.  
  2144.   422 [exponentiating_operator__primary] ::= exponentiating_operator primary 
  2145.  
  2146.   423 {statement} ::= {pragma_stm} 
  2147.  
  2148.   424 {statement} ::= {statement} statement {pragma_stm} 
  2149.  
  2150.   425 {label}+ ::= label 
  2151.  
  2152.   426 {label}+ ::= {label}+ label 
  2153.  
  2154.   427 condition_THEN__sequence_of_statements ::= condition THEN 
  2155.       sequence_of_statements 
  2156.  
  2157.   428 {ELSIF__condition__THEN__sequence_of_statements} ::= EMPTY
  2158.  
  2159.   429 {ELSIF__condition__THEN__sequence_of_statements} ::= 
  2160.       {ELSIF__condition__THEN__sequence_of_statements} ELSIF condition THEN 
  2161.       sequence_of_statements 
  2162.  
  2163.   430 [ELSE__sequence_of_statements] ::= EMPTY
  2164.  
  2165.   431 [ELSE__sequence_of_statements] ::= ELSE sequence_of_statements 
  2166.  
  2167.   432 {case_statement_alternative} ::= EMPTY
  2168.  
  2169.   433 {case_statement_alternative} ::= {case_statement_alternative} 
  2170.       case_statement_alternative 
  2171.  
  2172.   434 [loop_identifier:] ::= EMPTY
  2173.  
  2174.   435 [loop_identifier:] ::= identifier : 
  2175.  
  2176.   436 [identifier] ::= EMPTY
  2177.  
  2178.   437 [identifier] ::= identifier 
  2179.  
  2180.   438 [block_identifier:] ::= EMPTY
  2181.  
  2182.   439 [block_identifier:] ::= identifier : 
  2183.  
  2184.   440 {pragma_alt}__exception_handler_list ::= {pragma_alt} 
  2185.       exception_handler_list 
  2186.  
  2187.   441 exception_handler_list ::= exception_handler 
  2188.  
  2189.   442 exception_handler_list ::= exception_handler_list exception_handler 
  2190.  
  2191.   443 {;parameter_specification} ::= EMPTY
  2192.  
  2193.   444 {;parameter_specification} ::= {;parameter_specification} ; 
  2194.       parameter_specification 
  2195.  
  2196.   445 [end_designator] ::= EMPTY
  2197.  
  2198.   446 [end_designator] ::= identifier 
  2199.  
  2200.   447 [end_designator] ::= string_literal 
  2201.  
  2202.   448 {,expanded_name} ::= EMPTY
  2203.  
  2204.   449 {,expanded_name} ::= {,expanded_name} , expanded_name 
  2205.  
  2206.   450 {entry_declaration} ::= {pragma_decl} 
  2207.  
  2208.   451 {entry_declaration} ::= {entry_declaration} entry_declaration {pragma_decl}
  2209.  
  2210.   452 {representation_clause} ::= EMPTY
  2211.  
  2212.   453 {representation_clause} ::= {representation_clause} representation_clause 
  2213.       {pragma_decl} 
  2214.  
  2215.   454 [(discrete_range)][formal_part] ::= EMPTY
  2216.  
  2217.   455 [(discrete_range)][formal_part] ::= ( parameter_specification 
  2218.       {;parameter_specification} ) 
  2219.  
  2220.   456 [(discrete_range)][formal_part] ::= ( discrete_range ) 
  2221.  
  2222.   457 [(discrete_range)][formal_part] ::= ( discrete_range ) ( 
  2223.       parameter_specification {;parameter_specification} ) 
  2224.  
  2225.   458 [(expression)][formal_part] ::= EMPTY
  2226.  
  2227.   459 [(expression)][formal_part] ::= ( parameter_specification 
  2228.       {;parameter_specification} ) 
  2229.  
  2230.   460 [(expression)][formal_part] ::= ( expression ) 
  2231.  
  2232.   461 [(expression)][formal_part] ::= ( expression ) ( parameter_specification 
  2233.       {;parameter_specification} ) 
  2234.  
  2235.   462 {OR__select_alternative} ::= EMPTY
  2236.  
  2237.   463 {OR__select_alternative} ::= {OR__select_alternative} OR select_alternative
  2238.  
  2239.   464 [sequence_of_statements] ::= {pragma_stm} 
  2240.  
  2241.   465 [sequence_of_statements] ::= sequence_of_statements 
  2242.  
  2243.   466 {,name} ::= EMPTY
  2244.  
  2245.   467 {,name} ::= {,name} , name 
  2246.  
  2247.   468 {compilation_unit} ::= compilation_unit 
  2248.  
  2249.   469 {compilation_unit} ::= {compilation_unit} compilation_unit 
  2250.  
  2251.   470 {with_clause{use_clause}} ::= EMPTY
  2252.  
  2253.   471 {with_clause{use_clause}} ::= {with_clause{use_clause}} with_clause 
  2254.       use_clause_list 
  2255.  
  2256.   472 use_clause_list ::= {pragma_decl} 
  2257.  
  2258.   473 use_clause_list ::= use_clause_list use_clause {pragma_decl} 
  2259.  
  2260.   474 {,used_identifier} ::= EMPTY
  2261.  
  2262.   475 {,used_identifier} ::= {,used_identifier} , identifier 
  2263.  
  2264.   476 {|exception_choice} ::= EMPTY
  2265.  
  2266.   477 {|exception_choice} ::= {|exception_choice} '|' exception_choice 
  2267.  
  2268.   478 {generic_parameter_declaration} ::= EMPTY
  2269.  
  2270.   479 {generic_parameter_declaration} ::= {generic_parameter_declaration} 
  2271.       generic_parameter_declaration 
  2272.  
  2273.   480 [IS__name__or__<>] ::= EMPTY
  2274.  
  2275.   481 [IS__name__or__<>] ::= IS name 
  2276.  
  2277.   482 [IS__name__or__<>] ::= IS <> 
  2278.  
  2279.   483 {,generic_association} ::= EMPTY
  2280.  
  2281.   484 {,generic_association} ::= {,generic_association} , generic_association 
  2282.  
  2283.   485 [generic_formal_parameter=>]generic_actual_parameter ::= 
  2284.       generic_actual_parameter 
  2285.  
  2286.   486 [generic_formal_parameter=>]generic_actual_parameter ::= 
  2287.       generic_formal_parameter => generic_actual_parameter 
  2288.  
  2289.   487 {component_clause} ::= {pragma_decl} 
  2290.  
  2291.   488 {component_clause} ::= {component_clause} component_clause {pragma_decl} 
  2292.  
  2293. 1Non terminalss
  2294.  
  2295.  $ACC
  2296.  compilation
  2297.  pragma_identifier
  2298.  general_component_associations
  2299.  pragma
  2300.  object_declaration
  2301.  basic_declaration
  2302.  number_declaration
  2303.  type_declaration
  2304.  subtype_declaration
  2305.  subprogram_declaration
  2306.  package_declaration
  2307.  task_declaration
  2308.  generic_declaration
  2309.  exception_declaration
  2310.  generic_instantiation
  2311.  renaming_declaration
  2312.  object_item
  2313.  identifier_list
  2314.  subtype_indication
  2315.  [:=expression]
  2316.  constrained_array_definition
  2317.  expression
  2318.  {,identifier}
  2319.  full_type_declaration
  2320.  incomplete_type_declaration
  2321.  private_type_declaration
  2322.  type_identifier
  2323.  is__type_definition
  2324.  discriminant_specification
  2325.  {;discriminant_specification}
  2326.  type_definition
  2327.  enumeration_type_definition
  2328.  integer_type_definition
  2329.  real_type_definition
  2330.  array_type_definition
  2331.  record_type_definition
  2332.  access_type_definition
  2333.  derived_type_definition
  2334.  is__subtype_indication
  2335.  type_mark
  2336.  constraint
  2337.  type_name|subtype_name
  2338.  range_constraint
  2339.  floating_point_constraint
  2340.  fixed_point_constraint
  2341.  simple_expression
  2342.  enumeration_literal_specification
  2343.  {,enumeration_literal_specification}
  2344.  enumeration_literal
  2345.  floating_accuracy_definition
  2346.  [range_constraint]
  2347.  fixed_accuracy_definition
  2348.  unconstrained_array_definition
  2349.  index_subtype_definition
  2350.  {,index_subtype_definition}
  2351.  index_constraint
  2352.  name
  2353.  discrete_range
  2354.  {,discrete_range}
  2355.  range
  2356.  component_list
  2357.  {pragma_decl}
  2358.  {component_declaration}
  2359.  component_declaration
  2360.  variant_part
  2361.  component_item
  2362.  {pragma_variant}
  2363.  variant
  2364.  {variant}
  2365.  choice
  2366.  {|choice}
  2367.  {basic_declarative_item}
  2368.  declarative_part
  2369.  body
  2370.  {later_declarative_item}
  2371.  basic_declarative_item
  2372.  representation_clause
  2373.  use_clause
  2374.  later_declarative_item
  2375.  proper_body
  2376.  body_stub
  2377.  subprogram_body
  2378.  package_body
  2379.  task_body
  2380.  indexed_component
  2381.  selected_component
  2382.  attribute
  2383.  selector
  2384.  attribute_designator
  2385.  component_associations
  2386.  aggregate
  2387.  expression,expression{,expression}
  2388.  [,others=>expression]
  2389.  choice{|choice}=>expression
  2390.  {,choice{|choice}=>expression}
  2391.  others=>expression
  2392.  ga_expression{,ga_expression}
  2393.  identifier{|identifier}=>expression
  2394.  {,identifier{|identifier}=>expression}
  2395.  relation
  2396.  relation{AND__relation}
  2397.  relation{OR__relation}
  2398.  relation{XOR__relation}
  2399.  relation{AND__THEN__relation}
  2400.  relation{OR__ELSE__relation}
  2401.  [relational_operator__simple_expression]
  2402.  [NOT]IN
  2403.  [unary_adding_operator]term{binary_adding_operator__term}
  2404.  factor{multiplying_operator__factor}
  2405.  term
  2406.  primary
  2407.  [exponentiating_operator__primary]
  2408.  factor
  2409.  high_precedence_unary_operator
  2410.  parenthesized_expression
  2411.  allocator
  2412.  qualified_expression
  2413.  relational_operator
  2414.  binary_adding_operator
  2415.  unary_adding_operator
  2416.  multiplying_operator
  2417.  exponentiating_operator
  2418.  expanded_name
  2419.  {pragma_stm}
  2420.  statement
  2421.  {statement}
  2422.  sequence_of_statements
  2423.  simple_statement
  2424.  compound_statement
  2425.  {label}+
  2426.  null_statement
  2427.  assignment_statement
  2428.  exit_statement
  2429.  return_statement
  2430.  goto_statement
  2431.  delay_statement
  2432.  abort_statement
  2433.  raise_statement
  2434.  code_statement
  2435.  call_statement
  2436.  if_statement
  2437.  case_statement
  2438.  loop_statement
  2439.  block_statement
  2440.  accept_statement
  2441.  select_statement
  2442.  label
  2443.  condition_THEN__sequence_of_statements
  2444.  {ELSIF__condition__THEN__sequence_of_statements}
  2445.  [ELSE__sequence_of_statements]
  2446.  condition
  2447.  {pragma_alt}
  2448.  case_statement_alternative
  2449.  {case_statement_alternative}
  2450.  [loop_identifier:]
  2451.  [identifier]
  2452.  iteration_rule
  2453.  begin_end_block
  2454.  declarative_part__begin_end_block
  2455.  begin_end_block_head
  2456.  {pragma_alt}__exception_handler_list
  2457.  [block_identifier:]
  2458.  declare_item
  2459.  exit_item
  2460.  goto_item
  2461.  subprogram_specification
  2462.  subprogram_identifier
  2463.  parameter_specification
  2464.  {;parameter_specification}
  2465.  designator
  2466.  mode
  2467.  generic_parameter_mode
  2468.  subprogram_body_head
  2469.  subprogram_body_tail
  2470.  [end_designator]
  2471.  package_specification
  2472.  package_identifier
  2473.  private_part
  2474.  package_body_indicator
  2475.  {,expanded_name}
  2476.  task_specification
  2477.  task_identifier
  2478.  {entry_declaration}
  2479.  {representation_clause}
  2480.  task_body_indicator
  2481.  [(discrete_range)][formal_part]
  2482.  entry_declaration
  2483.  [(expression)][formal_part]
  2484.  selective_wait
  2485.  conditional_entry_call
  2486.  timed_entry_call
  2487.  select_alternative
  2488.  {OR__select_alternative}
  2489.  selective_wait_alternative
  2490.  accept_alternative
  2491.  delay_alternative
  2492.  terminate_alternative
  2493.  [sequence_of_statements]
  2494.  {,name}
  2495.  {compilation_unit}
  2496.  pragma_header
  2497.  compilation_unit
  2498.  context_clause
  2499.  library_or_secondary_unit
  2500.  subunit
  2501.  {with_clause{use_clause}}
  2502.  {,used_identifier}
  2503.  with_clause
  2504.  exception_choice
  2505.  {|exception_choice}
  2506.  exception_handler
  2507.  generic_specification
  2508.  generic_formal_part
  2509.  {generic_parameter_declaration}
  2510.  generic_parameter_declaration
  2511.  generic_type_definition
  2512.  [IS__name__or__<>]
  2513.  generic_association
  2514.  {,generic_association}
  2515.  [generic_formal_parameter=>]generic_actual_parameter
  2516.  generic_formal_parameter
  2517.  generic_actual_parameter
  2518.  representation_item
  2519.  length_clause
  2520.  enumeration_representation_clause
  2521.  address_clause
  2522.  record_representation_clause
  2523.  {component_clause}
  2524.  alignment_clause
  2525.  component_clause
  2526.  code_item
  2527.  ga_expression
  2528.  {|identifier}
  2529.  exception_handler_list
  2530.  use_clause_list
  2531. 1Information about Action Tables
  2532.  
  2533.  Number of Entries   3871
  2534.  Origin Table Size   5531
  2535.  Action Table Size   8217
  2536.  Number Unused   2678
  2537.  Distribution of entries   2017    671    143     17      3      0      0      0
  2538. 1Timing Statistics
  2539.  
  2540.                   Cpu Time   Elapsed  LG Reads LG Writes
  2541.  Parse:              11129     11129         0        36
  2542.  Preliminary:          330       331         0        72
  2543.  First Map:           1949      1949         0         7
  2544.  Item Creation:       1325      1325         0        10
  2545.  Follow Map:          1060      1061         0         0
  2546.  Closure:             1008      1008         0         0
  2547.  States:             10192     10191         0       310
  2548.  Reductions:         10497     10497         0        88
  2549.  Summary:             1347      1347         0         0
  2550.  Compress:            2642      2642         0        77
  2551.  Table Dump:          2026      2025         0         0
  2552. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  2553. --standards.cnt
  2554. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  2555. [NOSC.RELEASES.V0101.STANDARDS]GRMCONST.BDY                            32    31
  2556. [NOSC.RELEASES.V0101.STANDARDS]PTBLS.BDY                            32102  3565
  2557. [NOSC.RELEASES.V0101.STANDARDS]SCUTILS.SPC                             43   164
  2558. [NOSC.RELEASES.V0101.STANDARDS]SCDECLS.DAT                            544   345
  2559. [NOSC.RELEASES.V0101.STANDARDS]SCUTILS.BDY                            542   472
  2560. [NOSC.RELEASES.V0101.STANDARDS]STNDCHECK.ADA                          305   224
  2561. [NOSC.RELEASES.V0101.STANDARDS]APPLYACT.SUB                           305  1090
  2562. [NOSC.RELEASES.V0101.STANDARDS]GETNEXT.SUB                             16    22
  2563. [NOSC.RELEASES.V0101.STANDARDS]WRITELINE.SUB                           34    30
  2564.  
  2565.