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