Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
ada syntax card

ada syntax card

Ratings:

4.5

(2)
|Views: 3|Likes:
Published by adrianshephard

More info:

Published by: adrianshephard on Dec 26, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

02/01/2013

pdf

text

original

bold
Ada keyword
italic
Ada 95
[]
Optional term
{ }
Repeatable
|
Alternative
\\
Choose one
...
Identical term
::=
Expansion term
LIBRARY
\u2190COMPILATION_UNIT:: =
{with library_unit_name {,...}; | use_clause} library_item
| {with library_unit_name {,...}; | use_clause} separate (parent_name)
\subprogram_body|package_body|task_body|protected_body\
\u2190USE_CLAUSE:: =
use pack_name {,...};
| use type subtype_name {,...};
\u2190LIBRARY_ITEM: :=
[private] subprogram_spec; | [private] package_spec;

| [private]ge neric {generic_formals|use_clause} subprogram_spec;
| [private]ge neric {generic_formals|use_clause} package_spec;
| [private]pa ck age [parent_name.]id is new gen_pack_name

[generic_actuals];
| [private]pr ocedu re [parent_name.]id is new gen_proc_name
[generic_actuals];
| [private]f unct ion [parent_name.]id|op is new gen_func_name
[generic_actuals];
| subprogram_body;

| package_body;
| [private]pa ck age [parent_name.]idren ames pack_name;
| [private] generic package [parent_name.]idrena me s

gen_pack_name;
| [private] generic procedure [parent_name.]idr enames
gen_proc_name;
| [private] generic function [parent_name.]idrename s
gen_func_name;
| [private] subprogram_specrena m es callable_entity_name;
DECLARATIONS
\u2190BASIC_DECLARATION: :=
typeid is ( \id|'character'\ {,...});

|ty pe id is mod static_expr;
|ty pe id is digits static_expr [rangestatic_s_expr. . static_s_expr];
|ty pe idis [delta static_expr]ra nge static_s_expr. . static_s_expr;
|ty pe idis delta static_exprd i g i ts static_expr [range

static_s_expr.. static_s_expr];
|ty pe id [discrim]is [abstract]ne w subtype_id [with record list
end record];

|ty pe id [discrim]is [abstract]ne w subtype_id [with null record];
|ty pe idis array_type_defn;
|ty pe id [discrim]is [[abstract]tagge d] [limited]rec ord list

end record;
|ty pe id [discrim]is [abstract]ta gged [limited] null record;
|ty pe id is access [all |c onsta nt] subtype_id;
|ty pe id is access [protected]proce dure [formals];
|ty pe id is access [protected]func tion [formals]ret urn
Ada SYNTAX CARD
subtype_name;

| task type id [discrim] [is
{entry id [(discrete_range)] [formals]; | rep_clause}
[p r iv ate {entry id [(discrete_range)] [formals]; | rep_clause}]

end[ i d ]];

| protected type id [discrim]i s
{ subprogram_spec |e ntry id [(discrete_range)] [formals]; | rep_clause }
[p r iv ate { subprogram_spec |ent ry id [(discrete_range)] [formals]; |

id {,id}: [aliased] subtype_id [:= expr]; | rep_clause } ]
end[ i d];

|typ e id [(<>)|discrim];
|typ e id [(<>)|discrim]is [[abstract]t agge d] [limited]privat e;
|typ e id [(<>)|discrim]is [abstract]new ancestor_subtype_id with private;
|subty pe idi s subtype_id;
| id {,id}: [aliased] [constant] subtype_id [:= expr];
| id {,id}: [aliased] [constant] array_type_defn [:= expr];
|tas k id [is

{entry id [(discrete_range)] [formals]; | rep_clause}
[p r iv ate {entry id [(discrete_range)] [formals]; | rep_clause}]
end[ i d ]];
|prote cte d idi s
{ subprogram_spec |e ntry id [(discrete_range)] [formals]; | rep_clause }
[p r iv ate { subprogram_spec |ent ry id [(discrete_range)] [formals]; |
id {,id}: [aliased] subtype_id [:= expr]; | rep_clause } ]
end[ i d];

| id {,id} : constant := static_expr;
| subprogram_spec [is abstract];
| package_spec;
| id : subtype_namere names object_name;
| id : exceptionre names exception_name;
|pack age idre names pack_name;
| subprogram_specre names callable_entity_name;
| generic package idrena m es gen_pack_name;
| generic procedure idrename s gen_proc_name;
| generic function idre names gen_func_name;

| id {,id} : exception;
|gener ic {generic_formals|use_clause} subprogram_spec;
|gener ic {generic_formals|use_clause} package_spec;

|pack age id is new gen_pack_name [generic_actuals];
|proce dure id is new gen_proc_name [generic_actuals];
|funct i on id|op is new gen_func_name [generic_actuals];

\u2190SUBTYPE_ID:: =
subtype_name
| subtype_nameran ge name'Range[(static_expr)]
| subtype_nameran ge s_expr. . s_expr
| subtype_name [digits|delta] static_expr [range name'Range[(static_expr)]
| subtype_name [digits|delta] static_expr [range s_expr.. s_expr]
| subtype_name(discrete_range {,...})
| subtype_name([selector_name {|...}=>] expr {,...})
\u2190ARRAY_TYPE_DEFN:: =
array(subtype_name range <>{,...}) of [aliased] subtype_id
|arra y(discrete_range {,...}) of [aliased] subtype_id
\u2190DISCRETE_RANGE:: =
discrete_subtype_id | name'Range[(static_expr)] | s_expr. . s_expr
\u2190DISCRIM: :=
(id {,id} : [access] subtype_name [:= expr] {;. .. })
\u2190LIST:: =
id {,id}: [aliased] subtype_id [:= expr]; | rep_clause {...}
| {id {,id}: [aliased] subtype_id [:= expr]; | rep_clause {...}}
casename is
when\e xp r|d i scre te _ra nge |others\ {| ...} =>l i s t
{...}
end case;
|null;
\u2190DECLARATIVE_ITEM: :=

basic_declarative_item
| subprogram_body | package_body | task_body | protected_body
| subprogram_spec is separate; | package body id is separate;
| task body id is separate; | protected body id is separate;

\u2190BASIC_DECLARATIVE_ITEM:: =
basic_declaration | rep_clause | use_clause
\u2190SUBPROGRAM_SPEC: :=
procedure [parent_name.]id [formals]
|fu nction [parent_name.]id|op [formals]re turn subtype_name
\u2190FORMALS::=
( id {,id} :[in| in out| out |acc ess] subtype_name [:= expr] {;. .. })
\u2190SUBPROGRAM_BODY:: =
subprogram_speci s
{declarative_item}
beginhan dled _ s ta te m e n t s
end[id ];
\u2190PACKAGE_SPEC:: =
package[parent_name. ]id is
{basic_declarative_item}
[private {basic_declarative_item}]
end[[parent_name. ]id ];
\u2190PACKAGE_BODY: :=
package body[parent_name. ]id is
{declarative_item}
[begin handled_statements]
end[[parent_name. ]id ];
\u2190TASK_BODY::=
task bodyi d is
{declarative_item}
begin
handled_statements
end[id ];
\u2190PROTECTED_BODY: :=
protected bodyi d is
{ subprogram_spec | subprogram_body |
entry id1 [(forid 2 in discrete_range)] [formals] whenb ool_ expr is
{declarative_item}
beginhan dled _ s ta te m e n t s
end[ id 1]; |

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->