Prev | Up | Next | Back | Forward
TOC -- / --.-- / --.--.-- | Index | Search | Syntax | Help


1.1.4 Method of Description and Syntax Notation

(1)
The form of an Ada program is described by means of a context-free syntax together with context-dependent requirements expressed by narrative rules.
(2)
The meaning of Ada programs is described by means of narrative rules defining both the effects of each construct and the composition rules for constructs.
(3)
The context-free syntax of the language is described using a simple variant of Backus-Naur Form. In particular:
(4)
(5)
            case_statement
(6)
(7)
            array
(8)
(9)
              return_statement ::= return [expression];
              return_statement ::= return; | return expression;
(10)
(11)
              term ::= factor {multiplying_operator factor}
              term ::= factor | term multiplying_operator factor
(12)
(13)
              constraint ::= scalar_constraint | composite_constraint
              discrete_choice_list ::= discrete_choice {| discrete_choice}
(14)
(15)
A syntactic category is a nonterminal in the grammar defined in BNF under ``Syntax.'' Names of syntactic categories are set in a different font, like_this.
(16)
A construct is a piece of text (explicit or implicit) that is an instance of a syntactic category defined under ``Syntax.''
(17)
A constituent of a construct is the construct itself, or any construct appearing within it.
(18)
Whenever the run-time semantics defines certain actions to happen in an arbitrary order, this means that the implementation shall arrange for these actions to occur in a way that is equivalent to some sequential order, following the rules that result from that sequential order. When evaluations are defined to happen in an arbitrary order, with conversion of the results to some subtypes, or with some run-time checks, the evaluations, conversions, and checks may be arbitrarily interspersed, so long as each expression is evaluated before converting or checking its value. Note that the effect of a program can depend on the order chosen by the implementation. This can happen, for example, if two actual parameters of a given call have side effects.

(19)
(20)
            if_statement ::=
                if condition then
                  sequence_of_statements
               {elsif condition then
                  sequence_of_statements}
               [else
                  sequence_of_statements]
                end if;
(21)

Prev | Up | Next | Back | Forward
TOC -- / --.-- / --.--.-- | Index | Search | Syntax | Help

Ada WWW Home -- Email comments, additions, corrections, gripes, kudos, etc. to:

Magnus Kempe -- Magnus.Kempe@di.epfl.ch
Copyright statement
Page last generated: 95-03-12