Author:halw

Date:2009-09-27T22:07:15.000000Z


git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@308 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
halw
2009-09-27 22:07:15 +00:00
parent d3991e161b
commit 66904d8d06
2 changed files with 441 additions and 232 deletions

View File

@@ -0,0 +1,209 @@
[[Property:title|Eiffel language reserved words]]
[[Property:link_title|Eiffel programming language reserved words]]
[[Property:weight|1]]
[[Property:uuid|047ce062-45de-f25c-f356-ee8ec0fc2d1d]]
In the Eiffel language, there are certain words that are considered "reserved". These words have specific meanings recognized by the compiler. As such, it is invalid to attempt to use a reserved word as an ordinary language identifier.
The reserved words listed in the ISO/ECMA standard are show below with a brief explanation of their meanings.
==Reserved words==
===agent===
Used to specify an [[ET: Agents|agent]].
:[[Eiffel language syntax#Agents|Syntax.]]
===alias===
Used to identify an alternative or alias feature name.
:[[Eiffel language syntax#Feature names|Syntax.]]
[[ET: The Dynamic Structure: Execution Model#Infix and prefix notations|Usage for infix/prefix notations.]]
[[ET: The Static Picture: System Organization#External software|Usage in interfaces to external software.]]
:[[Eiffel language syntax#External routines|Syntax.]]
===all===
Used in [[ET: Inheritance#Changing the export status|export adaptation]] to indicate that a chosen export status applies to all features inherited from a given parent.
:[[Eiffel language syntax#Export adaptation|Syntax.]]
===and===
The logical conjunction [[Eiffel language syntax#Operators|operator]]. Strict when used alone, nonstrict when used with [[#then|then]].
===as===
===assign===
===attribute===
===check===
===class===
===convert===
===create===
===Current===
===debug===
===deferred===
===do===
===else===
===elseif===
===end===
===ensure===
===expanded===
===export===
===external===
===False===
===feature===
===from===
===frozen===
===if===
===implies===
===inherit===
===inspect===
===invariant===
===like===
===local===
===loop===
===not===
===note===
===obsolete===
===old===
===once===
===only===
===or===
===Precursor===
===redefine===
===rename===
===require===
===rescue===
===Result===
===retry===
===select===
===separate===
===then===
===True===
===TUPLE===
===undefine===
===until===
===variant===
===Void===
===when===
===xor===

View File

@@ -1,4 +1,4 @@
[[Property:title|Eiffel syntax specification]] [[Property:title|Eiffel language syntax]]
[[Property:link_title|Eiffel programming language syntax]] [[Property:link_title|Eiffel programming language syntax]]
[[Property:weight|0]] [[Property:weight|0]]
[[Property:uuid|d0f94270-f1e0-5545-2b1a-8cde3a6c73ab]] [[Property:uuid|d0f94270-f1e0-5545-2b1a-8cde3a6c73ab]]
@@ -7,7 +7,7 @@
The syntax specification is shown here as it is in the standard document. The format is BNF-E (Backus-Naur Form - Extended) which is also explained in the Language Specification section of the standard document. The syntax specification is shown here as it is in the standard document. The format is BNF-E. The Language Specification section of the standard document includes an overview of BNF-E.
==Eiffel Syntax== ==Eiffel Syntax==
@@ -18,16 +18,16 @@ Probably the most important to developers is the definition of an ''identifier''
===Identifiers=== ===Identifiers===
An '''Identifier''' is a sequence of one or more alpha_numeric characters of which the first is a letter. An '''identifier''' is a sequence of one or more alpha_numeric characters of which the first is a letter.
The definition is augmented by the rule that Identifiers are not valid if they are the same as one of the language's reserved words. The definition is augmented by the rule that Identifiers are not valid if they are the same as one of the language's reserved words.
===Class names === ===Class names ===
Class_name =Δ [[#Identfiers|Identifier]] <br/><br/> Class_name ::= [[#Identfiers|Identifier]] <br/><br/>
<br/> <br/>
===Class declarations === ===Class declarations ===
Class_declaration =Δ <nowiki>[</nowiki>[[#Notes|Notes]]<nowiki>]</nowiki> <br/> Class_declaration ::= <nowiki>[</nowiki>[[#Notes|Notes]]<nowiki>]</nowiki> <br/>
[[#Class headers|Class_header]] <br/> [[#Class headers|Class_header]] <br/>
<nowiki>[</nowiki>[[#Formal generic parameters|Formal_generics]]<nowiki>]</nowiki> <br/> <nowiki>[</nowiki>[[#Formal generic parameters|Formal_generics]]<nowiki>]</nowiki> <br/>
<nowiki>[</nowiki>[[#Obsolete marks|Obsolete]]<nowiki>]</nowiki> <br/> <nowiki>[</nowiki>[[#Obsolete marks|Obsolete]]<nowiki>]</nowiki> <br/>
@@ -40,82 +40,82 @@ Class_declaration =Δ <nowiki>[</nowiki>[[#Notes|Notes]]<nowiki>]</nowiki> <br/>
<code>end</code><br/> <code>end</code><br/>
<br/> <br/>
===Notes === ===Notes ===
Notes =Δ <code>note</code> Note_list<br/> Notes ::= <code>note</code> Note_list<br/>
Note_list =Δ {Note_entry ";" …}* <br/> Note_list ::= {Note_entry ";" …}* <br/>
Note_entry =Δ Note_name Note_values <br/> Note_entry ::= Note_name Note_values <br/>
Note_name =Δ [[#Identifiers|Identifier]] ":" <br/> Note_name ::= [[#Identifiers|Identifier]] ":" <br/>
Note_values =Δ {Note_item ","…}+ <br/> Note_values ::= {Note_item ","…}+ <br/>
Note_item =Δ [[#Identifiers|Identifier]] | [[#Manifest constants|Manifest_constant]] <br/> Note_item ::= [[#Identifiers|Identifier]] | [[#Manifest constants|Manifest_constant]] <br/>
<br/> <br/>
===Class headers === ===Class headers ===
Class_header =Δ [Header_mark] <code>class</code> [[#Class names|Class_name]] <br/> Class_header ::= [Header_mark] <code>class</code> [[#Class names|Class_name]] <br/>
Header_mark =Δ <code>deferred</code> | <code>expanded</code> | <code>frozen</code> <br/> Header_mark ::= <code>deferred</code> | <code>expanded</code> | <code>frozen</code> <br/>
<br/> <br/>
===Obsolete marks === ===Obsolete marks ===
Obsolete =Δ <code>obsolete</code> Message <br/> Obsolete ::= <code>obsolete</code> Message <br/>
Message =Δ [[#Manifest strings|Manifest_string]] <br/> Message ::= [[#Manifest strings|Manifest_string]] <br/>
<br/> <br/>
===Feature parts === ===Feature parts ===
Features =Δ Feature_clause+ <br/> Features ::= Feature_clause+ <br/>
Feature_clause =Δ <code>feature</code> <nowiki>[</nowiki>[[#Clients|Clients]]<nowiki>]</nowiki> [Header_comment] Feature_declaration_list <br/> Feature_clause ::= <code>feature</code> <nowiki>[</nowiki>[[#Clients|Clients]]<nowiki>]</nowiki> [Header_comment] Feature_declaration_list <br/>
Feature_declaration_list =Δ {[[#Feature declarations|Feature_declaration]] ";" …}* <br/> Feature_declaration_list ::= {[[#Feature declarations|Feature_declaration]] ";" …}* <br/>
Header_comment =Δ Comment <br/> Header_comment ::= [[#Comments|Comment]] <br/>
<br/> <br/>
===Feature declarations === ===Feature declarations ===
Feature_declaration New_feature_list Declaration_body <br/> Feature_declaration ::= [[#New feature lists|New_feature_list]] Declaration_body <br/>
Declaration_body =Δ [Formal_arguments] [Query_mark] [Feature_value] <br/> Declaration_body ::= [Formal_arguments] [Query_mark] [Feature_value] <br/>
Query_mark =Δ Type_mark [Assigner_mark] <br/> Query_mark ::= Type_mark [Assigner_mark] <br/>
Type_mark =Δ ":" Type <br/> Type_mark ::= ":" Type <br/>
Feature_value =Δ [Explicit_value] <br/> Feature_value ::= [Explicit_value] <br/>
[Obsolete] <br/> [Obsolete] <br/>
[Header_comment] <br/> [Header_comment] <br/>
[Attribute_or_routine] <br/> [Attribute_or_routine] <br/>
Explicit_value =Δ "=" Manifest_constant <br/> Explicit_value ::= "=" Manifest_constant <br/>
<br/> <br/>
<br/> <br/>
===New feature lists === ===New feature lists ===
New_feature_list =Δ {New_feature "," …}+ <br/> New_feature_list ::= {New_feature "," …}+ <br/>
New_feature =Δ [frozen] Extended_feature_name<br/> New_feature ::= [frozen] Extended_feature_name<br/>
<br/> <br/>
<br/> <br/>
===Feature bodies === ===Feature bodies ===
Attribute_or_routine =Δ [Precondition] <br/> Attribute_or_routine ::= [Precondition] <br/>
[Local_declarations] <br/> [Local_declarations] <br/>
Feature_body <br/> Feature_body <br/>
[Postcondition] <br/> [Postcondition] <br/>
[Rescue] <br/> [Rescue] <br/>
<code>end</code><br/> <code>end</code><br/>
Feature_body =Δ Deferred | Effective_routine | Attribute<br/> Feature_body ::= Deferred | Effective_routine | Attribute<br/>
<br/> <br/>
<br/> <br/>
===Feature names === ===Feature names ===
Extended_feature_name =Δ Feature_name [Alias] <br/> Extended_feature_name ::= Feature_name [Alias] <br/>
Feature_name =Δ Identifier <br/> Feature_name ::= Identifier <br/>
Alias =Δ <code>alias</code> '"' Alias_name '"' [convert] <br/> Alias ::= <code>alias</code> '"' Alias_name '"' [convert] <br/>
Alias_name =Δ Operator | Bracket <br/> Alias_name ::= Operator | Bracket <br/>
Bracket =Δ "[ ]" <br/> Bracket ::= "[ ]" <br/>
<br/> <br/>
<br/> <br/>
===Operators === ===Operators ===
Operator =Δ Unary | Binary <br/> Operator ::= Unary | Binary <br/>
Unary =Δ <code>not</code> | "+" | "" | Free_unary <br/> Unary ::= <code>not</code> | "+" | "" | Free_unary <br/>
Binary =Δ "+" | "" | "*" | "/" | "//" | "\\" | "^" | ".." | <br/> Binary ::= "+" | "" | "*" | "/" | "//" | "\\" | "^" | ".." | <br/>
"<" | ">" | "<=" | ">=" | <br/> "<" | ">" | "<=" | ">=" | <br/>
<code>and</code> | <code>or</code> | <code>xor</code> | <code>and</code> <code>then</code> | <code>or</code> <code>else</code> | <code>implies</code> | <br/> <code>and</code> | <code>or</code> | <code>xor</code> | <code>and</code> <code>then</code> | <code>or</code> <code>else</code> | <code>implies</code> | <br/>
Free_binary <br/> Free_binary <br/>
<br/> <br/>
<br/> <br/>
===Assigner marks === ===Assigner marks ===
Assigner_mark =Δ <code>assign</code> Feature_name<br/> Assigner_mark ::= <code>assign</code> Feature_name<br/>
<br/> <br/>
<br/> <br/>
===Inheritance parts === ===Inheritance parts ===
Inheritance =Δ Inherit_clause+ <br/> Inheritance ::= Inherit_clause+ <br/>
Inherit_clause =Δ <code>inherit</code> [Non_conformance] Parent_list <br/> Inherit_clause ::= <code>inherit</code> [Non_conformance] Parent_list <br/>
Non_conformance =Δ "{" NONE "}" <br/> Non_conformance ::= "{" NONE "}" <br/>
Parent_list =Δ {Parent ";" …}+ <br/> Parent_list ::= {Parent ";" …}+ <br/>
Parent =Δ Class_type [Feature_adaptation] <br/> Parent ::= Class_type [Feature_adaptation] <br/>
Feature_adaptation =Δ [Undefine] <br/> Feature_adaptation ::= [Undefine] <br/>
[Redefine] <br/> [Redefine] <br/>
[Rename] <br/> [Rename] <br/>
[New_exports] <br/> [New_exports] <br/>
@@ -125,358 +125,358 @@ Feature_adaptation =Δ [Undefine] <br/>
<br/> <br/>
<br/> <br/>
===Rename clauses === ===Rename clauses ===
Rename =Δ <code>rename</code> Rename_list <br/> Rename ::= <code>rename</code> Rename_list <br/>
Rename_list =Δ {Rename_pair "," …}+ <br/> Rename_list ::= {Rename_pair "," …}+ <br/>
Rename_pair =Δ Feature_name <code>as</code> Extended_feature_name <br/> Rename_pair ::= Feature_name <code>as</code> Extended_feature_name <br/>
<br/> <br/>
<br/> <br/>
===Clients === ===Clients ===
Clients =Δ "{" Class_list "}" <br/> Clients ::= "{" Class_list "}" <br/>
Class_list =Δ {Class_name "," …}+<br/> Class_list ::= {Class_name "," …}+<br/>
<br/> <br/>
<br/> <br/>
<br/> <br/>
===Export adaptation === ===Export adaptation ===
New_exports =Δ <code>export</code> New_export_list <br/> New_exports ::= <code>export</code> New_export_list <br/>
New_export_list =Δ {New_export_item ";" …}+ <br/> New_export_list ::= {New_export_item ";" …}+ <br/>
New_export_item =Δ Clients [Header_comment] Feature_set <br/> New_export_item ::= Clients [Header_comment] Feature_set <br/>
Feature_set =Δ Feature_list | <code>all</code> <br/> Feature_set ::= Feature_list | <code>all</code> <br/>
Feature_list =Δ {Feature_name "," …}+<br/> Feature_list ::= {Feature_name "," …}+<br/>
<br/> <br/>
<br/> <br/>
<br/> <br/>
===Formal argument and entity declarations === ===Formal argument and entity declarations ===
Formal_arguments =Δ "(" Entity_declaration_list ")" <br/> Formal_arguments ::= "(" Entity_declaration_list ")" <br/>
Entity_declaration_list =Δ {Entity_declaration_group ";" …}+ <br/> Entity_declaration_list ::= {Entity_declaration_group ";" …}+ <br/>
Entity_declaration_group =Δ Identifier_list Type_mark <br/> Entity_declaration_group ::= Identifier_list Type_mark <br/>
Identifier_list =Δ {Identifier "," …}+ <br/> Identifier_list ::= {Identifier "," …}+ <br/>
<br/> <br/>
<br/> <br/>
===Routine bodies === ===Routine bodies ===
Deferred =Δ <code>deferred</code> <br/> Deferred ::= <code>deferred</code> <br/>
Effective_routine =Δ Internal | External <br/> Effective_routine ::= Internal | External <br/>
Internal =Δ Routine_mark Compound <br/> Internal ::= Routine_mark Compound <br/>
Routine_mark =Δ <code>do</code> | Once <br/> Routine_mark ::= <code>do</code> | Once <br/>
Once =Δ <code>once</code> [ "("Key_list ")" ] <br/> Once ::= <code>once</code> [ "("Key_list ")" ] <br/>
Key_list =Δ {Manifest_string "," …}+<br/> Key_list ::= {Manifest_string "," …}+<br/>
<br/> <br/>
<br/> <br/>
===Local variable declarations === ===Local variable declarations ===
Local_declarations =Δ <code>local</code> [Entity_declaration_list]<br/> Local_declarations ::= <code>local</code> [Entity_declaration_list]<br/>
<br/> <br/>
<br/> <br/>
===Instructions === ===Instructions ===
Compound =Δ {Instruction ";" …}* <br/> Compound ::= {Instruction ";" …}* <br/>
Instruction =Δ Creation_instruction | Call | Assignment | Assigner_call | Conditional | Multi_branch <br/> Instruction ::= Creation_instruction | Call | Assignment | Assigner_call | Conditional | Multi_branch <br/>
| Loop | Debug | Precursor | Check | Retry<br/> | Loop | Debug | Precursor | Check | Retry<br/>
<br/> <br/>
<br/> <br/>
===Assertions === ===Assertions ===
Precondition =Δ <code>require</code> [else] Assertion <br/> Precondition ::= <code>require</code> [else] Assertion <br/>
Postcondition =Δ <code>ensure</code> [then] Assertion [Only] <br/> Postcondition ::= <code>ensure</code> [then] Assertion [Only] <br/>
Invariant =Δ <code>invariant</code> Assertion <br/> Invariant ::= <code>invariant</code> Assertion <br/>
Assertion =Δ {Assertion_clause ";" …}* <br/> Assertion ::= {Assertion_clause ";" …}* <br/>
Assertion_clause =Δ [Tag_mark] Unlabeled_assertion_clause <br/> Assertion_clause ::= [Tag_mark] Unlabeled_assertion_clause <br/>
Unlabeled_assertion_clause =Δ Boolean_expression | Comment <br/> Unlabeled_assertion_clause ::= Boolean_expression | Comment <br/>
Tag_mark =Δ Tag ":" <br/> Tag_mark ::= Tag ":" <br/>
Tag =Δ Identifier <br/> Tag ::= Identifier <br/>
<br/> <br/>
<br/> <br/>
===“Old” postcondition expressions === ===“Old” postcondition expressions ===
Old =Δ <code>old</code> Expression<br/> Old ::= <code>old</code> Expression<br/>
<br/> <br/>
<br/> <br/>
===“Only” postcondition clauses === ===“Only” postcondition clauses ===
Only =Δ <code>only</code> [Feature_list]<br/> Only ::= <code>only</code> [Feature_list]<br/>
<br/> <br/>
<br/> <br/>
===Check instructions === ===Check instructions ===
Check =Δ <code>check</code> Assertion [Notes] end<br/> Check ::= <code>check</code> Assertion [Notes] end<br/>
<br/> <br/>
<br/> <br/>
===Variants === ===Variants ===
Variant =Δ <code>variant</code> [Tag_mark] Expression<br/> Variant ::= <code>variant</code> [Tag_mark] Expression<br/>
<br/> <br/>
<br/> <br/>
===Precursor === ===Precursor ===
Precursor =Δ <code>Precursor</code> [Parent_qualification] [Actuals] <br/> Precursor ::= <code>Precursor</code> [Parent_qualification] [Actuals] <br/>
Parent_qualification =Δ "{" Class_name "}"<br/> Parent_qualification ::= "{" Class_name "}"<br/>
<br/> <br/>
<br/> <br/>
===Redefinition === ===Redefinition ===
Redefine =Δ <code>redefine</code> Feature_list<br/> Redefine ::= <code>redefine</code> Feature_list<br/>
<br/> <br/>
<br/> <br/>
===Undefine clauses === ===Undefine clauses ===
Undefine =Δ <code>undefine</code> Feature_list<br/> Undefine ::= <code>undefine</code> Feature_list<br/>
<br/> <br/>
<br/> <br/>
===Types === ===Types ===
Type =Δ Class_or_tuple_type | Formal_generic_name | Anchored <br/> Type ::= Class_or_tuple_type | Formal_generic_name | Anchored <br/>
Class_or_tuple_type =Δ Class_type | Tuple_type <br/> Class_or_tuple_type ::= Class_type | Tuple_type <br/>
Class_type =Δ [Attachment_mark] Class_name [Actual_generics] <br/> Class_type ::= [Attachment_mark] Class_name [Actual_generics] <br/>
Attachment_mark =Δ "?" | "!" <br/> Attachment_mark ::= "?" | "!" <br/>
Anchored =Δ [Attachment_mark] <code>like</code> Anchor <br/> Anchored ::= [Attachment_mark] <code>like</code> Anchor <br/>
Anchor =Δ Feature_name | Current<br/> Anchor ::= Feature_name | Current<br/>
<br/> <br/>
<br/> <br/>
===Actual generic parameters === ===Actual generic parameters ===
Actual_generics =Δ "[" Type_list "]" <br/> Actual_generics ::= "[" Type_list "]" <br/>
Type_list =Δ {Type "," …}+<br/> Type_list ::= {Type "," …}+<br/>
<br/> <br/>
<br/> <br/>
===Formal generic parameters === ===Formal generic parameters ===
Formal_generics =Δ "[" Formal_generic_list "]" <br/> Formal_generics ::= "[" Formal_generic_list "]" <br/>
Formal_generic_list =Δ {Formal_generic ","…}+ <br/> Formal_generic_list ::= {Formal_generic ","…}+ <br/>
Formal_generic =Δ [frozen] Formal_generic_name [Constraint] <br/> Formal_generic ::= [frozen] Formal_generic_name [Constraint] <br/>
Formal_generic_name =Δ [?] Identifier<br/> Formal_generic_name ::= [?] Identifier<br/>
<br/> <br/>
<br/> <br/>
===Generic constraints === ===Generic constraints ===
Constraint =Δ ">" Constraining_types [Constraint_creators] <br/> Constraint ::= ">" Constraining_types [Constraint_creators] <br/>
Constraining_types =Δ Single_constraint | Multiple_constraint <br/> Constraining_types ::= Single_constraint | Multiple_constraint <br/>
Single_constraint =Δ Type [Renaming] <br/> Single_constraint ::= Type [Renaming] <br/>
Renaming =Δ Rename end<br/> Renaming ::= Rename end<br/>
Multiple_constraint =Δ "{" Constraint_list "}" <br/> Multiple_constraint ::= "{" Constraint_list "}" <br/>
Constraint_list =Δ {Single_constraint "," …}+ <br/> Constraint_list ::= {Single_constraint "," …}+ <br/>
Constraint_creators =Δ <code>create</code> Feature_list end<br/> Constraint_creators ::= <code>create</code> Feature_list end<br/>
<br/> <br/>
<br/> <br/>
===Tuple types === ===Tuple types ===
Tuple_type =Δ <code>TUPLE</code> [Tuple_parameter_list] <br/> Tuple_type ::= <code>TUPLE</code> [Tuple_parameter_list] <br/>
Tuple_parameter_list =Δ "[" Tuple_parameters "]"<br/> Tuple_parameter_list ::= "[" Tuple_parameters "]"<br/>
Tuple_parameters =Δ Type_list | Entity_declaration_list<br/> Tuple_parameters ::= Type_list | Entity_declaration_list<br/>
<br/> <br/>
<br/> <br/>
===Manifest tuples === ===Manifest tuples ===
Manifest_tuple =Δ "[" Expression_list "]" <br/> Manifest_tuple ::= "[" Expression_list "]" <br/>
Expression_list =Δ {Expression "," …}*<br/> Expression_list ::= {Expression "," …}*<br/>
<br/> <br/>
<br/> <br/>
===Converter clauses === ===Converter clauses ===
Converters =Δ <code>convert</code> Converter_list <br/> Converters ::= <code>convert</code> Converter_list <br/>
Converter_list =Δ {Converter ","…}+ <br/> Converter_list ::= {Converter ","…}+ <br/>
Converter =Δ Conversion_procedure | Conversion_query <br/> Converter ::= Conversion_procedure | Conversion_query <br/>
Conversion_procedure =Δ Feature_name "(" "{" Type_list "}" ")" <br/> Conversion_procedure ::= Feature_name "(" "{" Type_list "}" ")" <br/>
Conversion_query =Δ Feature_name ":" "{" Type_list "}"<br/> Conversion_query ::= Feature_name ":" "{" Type_list "}"<br/>
<br/> <br/>
<br/> <br/>
===Select clauses === ===Select clauses ===
Select =Δ <code>select</code> Feature_list<br/> Select ::= <code>select</code> Feature_list<br/>
<br/> <br/>
<br/> <br/>
===Conditionals === ===Conditionals ===
Conditional =Δ <code>if</code> Then_part_list [Else_part] <code>end</code> <br/> Conditional ::= <code>if</code> Then_part_list [Else_part] <code>end</code> <br/>
Then_part_list =Δ {Then_part <code>elseif</code> …}+ <br/> Then_part_list ::= {Then_part <code>elseif</code> …}+ <br/>
Then_part =Δ Boolean_expression <code>then</code> Compound <br/> Then_part ::= Boolean_expression <code>then</code> Compound <br/>
Else_part =Δ <code>else</code> Compound<br/> Else_part ::= <code>else</code> Compound<br/>
<br/> <br/>
<br/> <br/>
===Multi-branch instructions === ===Multi-branch instructions ===
Multi_branch =Δ <code>inspect</code> Expression [When_part_list] [Else_part] <code>end</code> <br/> Multi_branch ::= <code>inspect</code> Expression [When_part_list] [Else_part] <code>end</code> <br/>
When_part_list =Δ When_part+ <br/> When_part_list ::= When_part+ <br/>
When_part =Δ <code>when</code> Choices <code>then</code> Compound <br/> When_part ::= <code>when</code> Choices <code>then</code> Compound <br/>
Choices =Δ {Choice "," …}+ <br/> Choices ::= {Choice "," …}+ <br/>
Choice =Δ Constant | Manifest_type | Constant_interval | Type_interval <br/> Choice ::= Constant | Manifest_type | Constant_interval | Type_interval <br/>
Constant_interval =Δ Constant ".." Constant <br/> Constant_interval ::= Constant ".." Constant <br/>
Type_interval =Δ Manifest_type ".." Manifest_type<br/> Type_interval ::= Manifest_type ".." Manifest_type<br/>
<br/> <br/>
<br/> <br/>
===Loops === ===Loops ===
Loop =Δ Initialization <br/> Loop ::= Initialization <br/>
[Invariant] <br/> [Invariant] <br/>
Exit_condition <br/> Exit_condition <br/>
Loop_body <br/> Loop_body <br/>
[Variant] <br/> [Variant] <br/>
<code>end</code> <br/> <code>end</code> <br/>
Initialization =Δ <code>from</code> Compound <br/> Initialization ::= <code>from</code> Compound <br/>
Exit_condition =Δ <code>until</code> Boolean_expression <br/> Exit_condition ::= <code>until</code> Boolean_expression <br/>
Loop_body =Δ <code>loop</code> Compound<br/> Loop_body ::= <code>loop</code> Compound<br/>
<br/> <br/>
<br/> <br/>
===Debug instructions === ===Debug instructions ===
Debug =Δ <code>debug</code> [ "("Key_list ")" ] Compound end<br/> Debug ::= <code>debug</code> [ "("Key_list ")" ] Compound end<br/>
<br/> <br/>
<br/> <br/>
===Attribute bodies === ===Attribute bodies ===
Attribute =Δ <code>attribute</code> Compound<br/> Attribute ::= <code>attribute</code> Compound<br/>
<br/> <br/>
<br/> <br/>
===Entities and variables === ===Entities and variables ===
Entity =Δ Variable | Read_only <br/> Entity ::= Variable | Read_only <br/>
Variable =Δ Variable_attribute | Local <br/> Variable ::= Variable_attribute | Local <br/>
Variable_attribute =Δ Feature_name <br/> Variable_attribute ::= Feature_name <br/>
Local =Δ Identifier | <code>Result</code> <br/> Local ::= Identifier | <code>Result</code> <br/>
Read_only =Δ Formal | Constant_attribute | <code>Current</code> <br/> Read_only ::= Formal | Constant_attribute | <code>Current</code> <br/>
Formal =Δ Identifier <br/> Formal ::= Identifier <br/>
Constant_attribute =Δ Feature_name<br/> Constant_attribute ::= Feature_name<br/>
<br/> <br/>
<br/> <br/>
===Creators parts === ===Creators parts ===
Creators =Δ Creation_clause+ <br/> Creators ::= Creation_clause+ <br/>
Creation_clause =Δ <code>create</code> [Clients] [Header_comment] Creation_procedure_list <br/> Creation_clause ::= <code>create</code> [Clients] [Header_comment] Creation_procedure_list <br/>
Creation_procedure_list =Δ {Creation_procedure ","…}+ <br/> Creation_procedure_list ::= {Creation_procedure ","…}+ <br/>
Creation_procedure =Δ Feature_name<br/> Creation_procedure ::= Feature_name<br/>
<br/> <br/>
<br/> <br/>
===Creation instructions === ===Creation instructions ===
Creation_instruction =Δ <code>create</code> [Explicit_creation_type] Creation_call <br/> Creation_instruction ::= <code>create</code> [Explicit_creation_type] Creation_call <br/>
Explicit_creation_type =Δ "{" Type "}" <br/> Explicit_creation_type ::= "{" Type "}" <br/>
Creation_call =Δ Variable [Explicit_creation_call] <br/> Creation_call ::= Variable [Explicit_creation_call] <br/>
Explicit_creation_call =Δ "." Unqualified_call<br/> Explicit_creation_call ::= "." Unqualified_call<br/>
<br/> <br/>
<br/> <br/>
===Creation expressions === ===Creation expressions ===
Creation_expression =Δ <code>create</code> Explicit_creation_type [Explicit_creation_call]<br/> Creation_expression ::= <code>create</code> Explicit_creation_type [Explicit_creation_call]<br/>
<br/> <br/>
<br/> <br/>
===Equality expressions === ===Equality expressions ===
Equality =Δ Expression Comparison Expression <br/> Equality ::= Expression Comparison Expression <br/>
Comparison =Δ "=" | "/=" | "~" | "/~"<br/> Comparison ::= "=" | "/=" | "~" | "/~"<br/>
<br/> <br/>
<br/> <br/>
===Assignments === ===Assignments ===
Assignment =Δ Variable ":=" Expression<br/> Assignment ::= Variable ":=" Expression<br/>
<br/> <br/>
<br/> <br/>
===Assigner calls === ===Assigner calls ===
Assigner_call =Δ Expression ":=" Expression<br/> Assigner_call ::= Expression ":=" Expression<br/>
<br/> <br/>
<br/> <br/>
===Feature calls === ===Feature calls ===
Call =Δ Object_call | Non_object_call <br/> Call ::= Object_call | Non_object_call <br/>
Object_call =Δ [Target "."] Unqualified_call <br/> Object_call ::= [Target "."] Unqualified_call <br/>
Unqualified_call =Δ Feature_name [Actuals] <br/> Unqualified_call ::= Feature_name [Actuals] <br/>
Target =Δ Local | Read_only | Call | Parenthesized_target <br/> Target ::= Local | Read_only | Call | Parenthesized_target <br/>
Parenthesized_target =Δ "( |" Expression "| )" <br/> Parenthesized_target ::= "( |" Expression "| )" <br/>
Non_object_call =Δ "{" Type "}" "." Unqualified_call<br/> Non_object_call ::= "{" Type "}" "." Unqualified_call<br/>
<br/> <br/>
<br/> <br/>
===Actual arguments === ===Actual arguments ===
Actuals =Δ "(" Actual_list ")" <br/> Actuals ::= "(" Actual_list ")" <br/>
Actual_list =Δ {Expression "," …}+<br/> Actual_list ::= {Expression "," …}+<br/>
<br/> <br/>
<br/> <br/>
===Object test === ===Object test ===
Object_test =Δ "{" Identifier ":" Type "}" Expression<br/> Object_test ::= "{" Identifier ":" Type "}" Expression<br/>
<br/> <br/>
<br/> <br/>
===Rescue clauses === ===Rescue clauses ===
Rescue =Δ <code>rescue</code> Compound <br/> Rescue ::= <code>rescue</code> Compound <br/>
Retry =Δ retry<br/> Retry ::= retry<br/>
<br/> <br/>
<br/> <br/>
===Agents === ===Agents ===
Agent =Δ Call_agent | Inline_agent <br/> Agent ::= Call_agent | Inline_agent <br/>
Call_agent =Δ <code>agent</code> Call_agent_body <br/> Call_agent ::= <code>agent</code> Call_agent_body <br/>
Inline_agent =Δ <code>agent</code> [Formal_arguments] [Type_mark] [Attribute_or_routine] [Agent_actuals]<br/> Inline_agent ::= <code>agent</code> [Formal_arguments] [Type_mark] [Attribute_or_routine] [Agent_actuals]<br/>
<br/> <br/>
<br/> <br/>
===Call agent bodies === ===Call agent bodies ===
Call_agent_body =Δ Agent_qualified | Agent_unqualified <br/> Call_agent_body ::= Agent_qualified | Agent_unqualified <br/>
Agent_qualified =Δ Agent_target ". " Agent_unqualified <br/> Agent_qualified ::= Agent_target ". " Agent_unqualified <br/>
Agent_unqualified =Δ Feature_name [Agent_actuals] <br/> Agent_unqualified ::= Feature_name [Agent_actuals] <br/>
Agent_target =Δ Entity | Parenthesized | Manifest_type <br/> Agent_target ::= Entity | Parenthesized | Manifest_type <br/>
Agent_actuals =Δ "(" Agent_actual_list ")" <br/> Agent_actuals ::= "(" Agent_actual_list ")" <br/>
Agent_actual_list =Δ {Agent_actual "," …}+ <br/> Agent_actual_list ::= {Agent_actual "," …}+ <br/>
Agent_actual =Δ Expression | Placeholder <br/> Agent_actual ::= Expression | Placeholder <br/>
Placeholder =Δ [Manifest_type] "?"<br/> Placeholder ::= [Manifest_type] "?"<br/>
<br/> <br/>
<br/> <br/>
===Expressions === ===Expressions ===
Expression =Δ Basic_expression | Special_expression <br/> Expression ::= Basic_expression | Special_expression <br/>
Basic_expression =Δ Read_only | Local | Call | Precursor | Equality | Parenthesized | Old | <br/> Basic_expression ::= Read_only | Local | Call | Precursor | Equality | Parenthesized | Old | <br/>
Operator_expression | Bracket_expression | Creation_expression <br/> Operator_expression | Bracket_expression | Creation_expression <br/>
Special_expression =Δ Manifest_constant | Manifest_tuple | Agent | Object_test | Once_string | <br/> Special_expression ::= Manifest_constant | Manifest_tuple | Agent | Object_test | Once_string | <br/>
Address <br/> Address <br/>
Parenthesized =Δ "(" Expression ")" <br/> Parenthesized ::= "(" Expression ")" <br/>
Address =Δ "$" Variable <br/> Address ::= "$" Variable <br/>
Once_string =Δ <code>once</code> Manifest_string <br/> Once_string ::= <code>once</code> Manifest_string <br/>
Boolean_expression =Δ Basic_expression | Boolean_constant | Object_test<br/> Boolean_expression ::= Basic_expression | Boolean_constant | Object_test<br/>
<br/> <br/>
<br/> <br/>
===Operator expressions === ===Operator expressions ===
Operator_expression =Δ Unary_expression | Binary_expression <br/> Operator_expression ::= Unary_expression | Binary_expression <br/>
Unary_expression =Δ Unary Expression <br/> Unary_expression ::= Unary Expression <br/>
Binary_expression =Δ Expression Binary Expression<br/> Binary_expression ::= Expression Binary Expression<br/>
<br/> <br/>
<br/> <br/>
===Bracket expressions === ===Bracket expressions ===
Bracket_expression =Δ Bracket_target "[" Actuals "]" <br/> Bracket_expression ::= Bracket_target "[" Actuals "]" <br/>
Bracket_target =Δ Target | Once_string | Manifest_constant | Manifest_tuple<br/> Bracket_target ::= Target | Once_string | Manifest_constant | Manifest_tuple<br/>
<br/> <br/>
<br/> <br/>
===Constants === ===Constants ===
Constant =Δ Manifest_constant | Constant_attribute <br/> Constant ::= Manifest_constant | Constant_attribute <br/>
Constant_attribute =Δ Feature_name<br/> Constant_attribute ::= Feature_name<br/>
<br/> <br/>
<br/> <br/>
===Manifest constants === ===Manifest constants ===
Manifest_constant =Δ [Manifest_type] Manifest_value <br/> Manifest_constant ::= [Manifest_type] Manifest_value <br/>
Manifest_type =Δ "{" Type "}"<br/> Manifest_type ::= "{" Type "}"<br/>
Manifest_value =Δ Boolean_constant | <br/> Manifest_value ::= Boolean_constant | <br/>
Character_constant | <br/> Character_constant | <br/>
Integer_constant | <br/> Integer_constant | <br/>
Real_constant | <br/> Real_constant | <br/>
Manifest_string | <br/> Manifest_string | <br/>
Manifest_type <br/> Manifest_type <br/>
Sign =Δ "+" | "" <br/> Sign ::= "+" | "" <br/>
Integer_constant =Δ [Sign] Integer <br/> Integer_constant ::= [Sign] Integer <br/>
Character_constant =Δ " ' " Character " ' " <br/> Character_constant ::= " ' " Character " ' " <br/>
Boolean_constant =Δ <code>True</code> | <code>False</code> <br/> Boolean_constant ::= <code>True</code> | <code>False</code> <br/>
Real_constant =Δ [Sign] Real<br/> Real_constant ::= [Sign] Real<br/>
<br/> <br/>
<br/> <br/>
===Manifest strings === ===Manifest strings ===
Manifest_string =Δ Basic_manifest_string | Verbatim_string <br/> Manifest_string ::= Basic_manifest_string | Verbatim_string <br/>
Basic_manifest_string =Δ ' " ' String_content ' " ' <br/> Basic_manifest_string ::= ' " ' String_content ' " ' <br/>
String_content =Δ {Simple_string Line_wrapping_part …}+<br/> String_content ::= {Simple_string Line_wrapping_part …}+<br/>
Verbatim_string =Δ Verbatim_string_opener Line_sequence Verbatim_string_closer <br/> Verbatim_string ::= Verbatim_string_opener Line_sequence Verbatim_string_closer <br/>
Verbatim_string_opener =Δ ' " ' [Simple_string] Open_bracket <br/> Verbatim_string_opener ::= ' " ' [Simple_string] Open_bracket <br/>
Verbatim_string_closer =Δ Close_bracket [Simple_string] ' " ' <br/> Verbatim_string_closer ::= Close_bracket [Simple_string] ' " ' <br/>
Open_bracket =Δ "[" | "{" <br/> Open_bracket ::= "[" | "{" <br/>
Close_bracket =Δ "]" | "}"Verbatim_string =Δ Verbatim_string_opener Line_sequence Verbatim_string_closer <br/> Close_bracket ::= "]" | "}"Verbatim_string ::= Verbatim_string_opener Line_sequence Verbatim_string_closer <br/>
Verbatim_string_opener =Δ ' " ' [Simple_string] Open_bracket <br/> Verbatim_string_opener ::= ' " ' [Simple_string] Open_bracket <br/>
Verbatim_string_closer =Δ Close_bracket [Simple_string] ' " ' <br/> Verbatim_string_closer ::= Close_bracket [Simple_string] ' " ' <br/>
Open_bracket =Δ "[" | "{" <br/> Open_bracket ::= "[" | "{" <br/>
Close_bracket =Δ "]" | "}" <br/> Close_bracket ::= "]" | "}" <br/>
<br/> <br/>
<br/> <br/>
===External routines === ===External routines ===
External =Δ <code>external</code> External_language [External_name] <br/> External ::= <code>external</code> External_language [External_name] <br/>
External_language =Δ Unregistered_language | Registered_language <br/> External_language ::= Unregistered_language | Registered_language <br/>
Unregistered_language =Δ Manifest_string <br/> Unregistered_language ::= Manifest_string <br/>
External_name =Δ <code>alias</code> Manifest_string<br/> External_name ::= <code>alias</code> Manifest_string<br/>
<br/> <br/>
<br/> <br/>
===Registered languages === ===Registered languages ===
Registered_language =Δ C_external | C++_external | DLL_external<br/> Registered_language ::= C_external | C++_external | DLL_external<br/>
<br/> <br/>
<br/> <br/>
===External signatures === ===External signatures ===
External_signature =Δ signature [External_argument_types] [: External_type] <br/> External_signature ::= signature [External_argument_types] [: External_type] <br/>
External_argument_types =Δ "(" External_type_list ")" <br/> External_argument_types ::= "(" External_type_list ")" <br/>
External_type_list =Δ {External_type "," …}* <br/> External_type_list ::= {External_type "," …}* <br/>
External_type =Δ Simple_string<br/> External_type ::= Simple_string<br/>
<br/> <br/>
<br/> <br/>
===External file use === ===External file use ===
External_file_use =Δ use External_file_list <br/> External_file_use ::= use External_file_list <br/>
External_file_list =Δ {External_file "," …}+ <br/> External_file_list ::= {External_file "," …}+ <br/>
External_file =Δ External_user_file | External_system_file <br/> External_file ::= External_user_file | External_system_file <br/>
External_user_file =Δ ' " ' Simple_string ' " ' <br/> External_user_file ::= ' " ' Simple_string ' " ' <br/>
External_system_file =Δ "<"Simple_string ">"<br/> External_system_file ::= "<"Simple_string ">"<br/>
<br/> <br/>
<br/> <br/>
===C externals === ===C externals ===
C_external =Δ ' " ' C <br/> C_external ::= ' " ' C <br/>
[inline] <br/> [inline] <br/>
[External_signature] [External_file_use] <br/> [External_signature] [External_file_use] <br/>
' " '<br/> ' " '<br/>
<br/> <br/>
<br/> <br/>
===C++ externals === ===C++ externals ===
C++_external =Δ ' " ' C++ <br/> C++_external ::= ' " ' C++ <br/>
inline <br/> inline <br/>
[External_signature] <br/> [External_signature] <br/>
[External_file_use] <br/> [External_file_use] <br/>
@@ -484,27 +484,27 @@ inline <br/>
<br/> <br/>
<br/> <br/>
===DLL externals === ===DLL externals ===
DLL_external =Δ ' " ' dll <br/> DLL_external ::= ' " ' dll <br/>
[windows] <br/> [windows] <br/>
DLL_identifier <br/> DLL_identifier <br/>
[DLL_index] <br/> [DLL_index] <br/>
[External_signature] <br/> [External_signature] <br/>
[External_file_use] <br/> [External_file_use] <br/>
' " ' <br/> ' " ' <br/>
DLL_identifier =Δ Simple_string <br/> DLL_identifier ::= Simple_string <br/>
DLL_index =Δ Integer<br/> DLL_index ::= Integer<br/>
<br/> <br/>
<br/> <br/>
===Comments === ===Comments ===
Comment =Δ " " {Simple_string Comment_break …}* <br/> Comment ::= " " {Simple_string Comment_break …}* <br/>
Comment_break =Δ New_line [Blanks_or_tabs] " "<br/> Comment_break ::= New_line [Blanks_or_tabs] " "<br/>
<br/> <br/>
===Integers === ===Integers ===
Integer =Δ [Integer_base] Digit_sequence <br/> Integer ::= [Integer_base] Digit_sequence <br/>
Integer_base =Δ "0" Integer_base_letter <br/> Integer_base ::= "0" Integer_base_letter <br/>
Integer_base_letter =Δ "b" | "c" | "x" | "B" | "C" | "X" <br/> Integer_base_letter ::= "b" | "c" | "x" | "B" | "C" | "X" <br/>
Digit_sequence =Δ Digit+ <br/> Digit_sequence ::= Digit+ <br/>
Digit =Δ "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | <br/> Digit ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | <br/>
"a" | "b" | "c" | "d" | "e" | "f" | <br/> "a" | "b" | "c" | "d" | "e" | "f" | <br/>
"A" | "B" | "C" | "D" | "E" | "F" | "_"<br/> "A" | "B" | "C" | "D" | "E" | "F" | "_"<br/>