mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-07 23:32:42 +01:00
Update wikipage Eiffel programming language syntax. (Signed-off-by:jocelyn).
git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@1603 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -121,16 +121,24 @@ Class_name ::= [[#Identfiers|Identifier]]
|
|||||||
|
|
||||||
===Class declarations ===
|
===Class declarations ===
|
||||||
Class_declaration ::= <nowiki>[</nowiki>[[#Notes|Notes]]<nowiki>]</nowiki>
|
Class_declaration ::= <nowiki>[</nowiki>[[#Notes|Notes]]<nowiki>]</nowiki>
|
||||||
[[#Class headers|Class_header]]
|
[[#Class headers|Class_header]] <nowiki>[</nowiki>[[#Formal generic parameters|Formal_generics]]<nowiki>]</nowiki>
|
||||||
<nowiki>[</nowiki>[[#Formal generic parameters|Formal_generics]]<nowiki>]</nowiki>
|
|
||||||
<nowiki>[</nowiki>[[#Obsolete marks|Obsolete]]<nowiki>]</nowiki>
|
<nowiki>[</nowiki>[[#Obsolete marks|Obsolete]]<nowiki>]</nowiki>
|
||||||
|
|
||||||
<nowiki>[</nowiki>[[#Inheritance parts|Inheritance]]<nowiki>]</nowiki>
|
<nowiki>[</nowiki>[[#Inheritance parts|Inheritance]]<nowiki>]</nowiki>
|
||||||
|
|
||||||
<nowiki>[</nowiki>[[#Creators parts|Creators]]<nowiki>]</nowiki>
|
<nowiki>[</nowiki>[[#Creators parts|Creators]]<nowiki>]</nowiki>
|
||||||
|
|
||||||
<nowiki>[</nowiki>[[#Converter clauses|Converters]]<nowiki>]</nowiki>
|
<nowiki>[</nowiki>[[#Converter clauses|Converters]]<nowiki>]</nowiki>
|
||||||
|
|
||||||
<nowiki>[</nowiki>[[#Feature parts|Features]]<nowiki>]</nowiki>
|
<nowiki>[</nowiki>[[#Feature parts|Features]]<nowiki>]</nowiki>
|
||||||
|
|
||||||
<nowiki>[</nowiki>[[#Notes|Notes]]<nowiki>]</nowiki>
|
<nowiki>[</nowiki>[[#Notes|Notes]]<nowiki>]</nowiki>
|
||||||
|
|
||||||
<nowiki>[</nowiki>[[#Assertions|Invariant]]<nowiki>]</nowiki>
|
<nowiki>[</nowiki>[[#Assertions|Invariant]]<nowiki>]</nowiki>
|
||||||
|
|
||||||
<nowiki>[</nowiki>[[#Notes|Notes]]<nowiki>]</nowiki>
|
<nowiki>[</nowiki>[[#Notes|Notes]]<nowiki>]</nowiki>
|
||||||
|
|
||||||
<code>end</code>
|
<code>end</code>
|
||||||
|
|
||||||
===Notes ===
|
===Notes ===
|
||||||
@@ -143,32 +151,43 @@ Note_item ::= [[#Identifiers|Identifier]] | [[#Manifest constants|Manifest_const
|
|||||||
|
|
||||||
===Class headers ===
|
===Class headers ===
|
||||||
Class_header ::= <nowiki>[Header_mark]</nowiki> <code>class</code> [[#Class names|Class_name]]
|
Class_header ::= <nowiki>[Header_mark]</nowiki> <code>class</code> [[#Class names|Class_name]]
|
||||||
|
|
||||||
Header_mark ::= <code>deferred</code> | <code>expanded</code> | <code>frozen</code>
|
Header_mark ::= <code>deferred</code> | <code>expanded</code> | <code>frozen</code>
|
||||||
|
|
||||||
===Obsolete marks ===
|
===Obsolete marks ===
|
||||||
Obsolete ::= <code>obsolete</code> Message
|
Obsolete ::= <code>obsolete</code> Message
|
||||||
|
|
||||||
Message ::= [[#Manifest strings|Manifest_string]]
|
Message ::= [[#Manifest strings|Manifest_string]]
|
||||||
|
|
||||||
===Feature parts ===
|
===Feature parts ===
|
||||||
Features ::= Feature_clause+
|
Features ::= Feature_clause+
|
||||||
|
|
||||||
Feature_clause ::= <code>feature</code> <nowiki>[</nowiki>[[#Clients|Clients]]<nowiki>]</nowiki> <nowiki>[</nowiki>[[#Feature parts|Header_comment]]<nowiki>]</nowiki> Feature_declaration_list
|
Feature_clause ::= <code>feature</code> <nowiki>[</nowiki>[[#Clients|Clients]]<nowiki>]</nowiki> <nowiki>[</nowiki>[[#Feature parts|Header_comment]]<nowiki>]</nowiki> Feature_declaration_list
|
||||||
|
|
||||||
Feature_declaration_list ::= {[[#Feature declarations|Feature_declaration]] ";" ...}*
|
Feature_declaration_list ::= {[[#Feature declarations|Feature_declaration]] ";" ...}*
|
||||||
|
|
||||||
Header_comment ::= [[#Comments|Comment]]
|
Header_comment ::= [[#Comments|Comment]]
|
||||||
|
|
||||||
===Feature declarations ===
|
===Feature declarations ===
|
||||||
Feature_declaration ::= [[#New feature lists|New_feature_list]] Declaration_body
|
Feature_declaration ::= [[#New feature lists|New_feature_list]] Declaration_body
|
||||||
|
|
||||||
Declaration_body ::= <nowiki>[</nowiki>[[#Formal argument and entity declarations|Formal_arguments]]<nowiki>] [Query_mark] [Feature_value] </nowiki>
|
Declaration_body ::= <nowiki>[</nowiki>[[#Formal argument and entity declarations|Formal_arguments]]<nowiki>] [Query_mark] [Feature_value] </nowiki>
|
||||||
|
|
||||||
Query_mark ::= Type_mark <nowiki>[</nowiki>[[#Assigner marks|Assigner_mark]]<nowiki>]</nowiki>
|
Query_mark ::= Type_mark <nowiki>[</nowiki>[[#Assigner marks|Assigner_mark]]<nowiki>]</nowiki>
|
||||||
|
|
||||||
Type_mark ::= ":" [[#Types|Type]]
|
Type_mark ::= ":" [[#Types|Type]]
|
||||||
|
|
||||||
Feature_value ::= <nowiki>[Explicit_value] </nowiki>
|
Feature_value ::= <nowiki>[Explicit_value] </nowiki>
|
||||||
<nowiki>[</nowiki>[[#Obsolete parts|Obsolete]]<nowiki>]</nowiki>
|
<nowiki>[</nowiki>[[#Obsolete parts|Obsolete]]<nowiki>]</nowiki>
|
||||||
<nowiki>[</nowiki>[[#Feature parts|Header_comment]]<nowiki>]</nowiki>
|
<nowiki>[</nowiki>[[#Feature parts|Header_comment]]<nowiki>]</nowiki>
|
||||||
<nowiki>[</nowiki>[[#Feature bodies|Attribute_or_routine]]<nowiki>]</nowiki>
|
<nowiki>[</nowiki>[[#Feature bodies|Attribute_or_routine]]<nowiki>]</nowiki>
|
||||||
|
|
||||||
Explicit_value ::= "=" [[#Manifest constants|Manifest_constant]]
|
Explicit_value ::= "=" [[#Manifest constants|Manifest_constant]]
|
||||||
|
|
||||||
|
|
||||||
===New feature lists ===
|
===New feature lists ===
|
||||||
New_feature_list ::= {New_feature "," ...}+
|
New_feature_list ::= {New_feature "," ...}+
|
||||||
|
|
||||||
New_feature ::= <nowiki>[</nowiki><code>frozen</code><nowiki>]</nowiki> [[#Feature names|Extended_feature_name]]
|
New_feature ::= <nowiki>[</nowiki><code>frozen</code><nowiki>]</nowiki> [[#Feature names|Extended_feature_name]]
|
||||||
|
|
||||||
|
|
||||||
@@ -179,20 +198,27 @@ Feature_body
|
|||||||
<nowiki>[</nowiki>[[#Assertions|Postcondition]]<nowiki>]</nowiki>
|
<nowiki>[</nowiki>[[#Assertions|Postcondition]]<nowiki>]</nowiki>
|
||||||
<nowiki>[</nowiki>[[#Rescue clauses|Rescue]]<nowiki>]</nowiki>
|
<nowiki>[</nowiki>[[#Rescue clauses|Rescue]]<nowiki>]</nowiki>
|
||||||
<code>end</code>
|
<code>end</code>
|
||||||
|
|
||||||
Feature_body ::= [[#Routine bodies|Deferred]] | [[#Routine bodies|Effective_routine]] | [[#Attribute bodies|Attribute]]
|
Feature_body ::= [[#Routine bodies|Deferred]] | [[#Routine bodies|Effective_routine]] | [[#Attribute bodies|Attribute]]
|
||||||
|
|
||||||
|
|
||||||
===Feature names ===
|
===Feature names ===
|
||||||
Extended_feature_name ::= Feature_name <nowiki>[Alias]</nowiki>
|
Extended_feature_name ::= Feature_name <nowiki>[Alias]</nowiki>
|
||||||
|
|
||||||
Feature_name ::= [[#Identfiers|Identifier]]
|
Feature_name ::= [[#Identfiers|Identifier]]
|
||||||
|
|
||||||
Alias ::= <code>alias</code> '"' Alias_name '"' <nowiki>[</nowiki><code>convert</code><nowiki>]</nowiki>
|
Alias ::= <code>alias</code> '"' Alias_name '"' <nowiki>[</nowiki><code>convert</code><nowiki>]</nowiki>
|
||||||
|
|
||||||
Alias_name ::= [[#Operators|Operator]] | Bracket
|
Alias_name ::= [[#Operators|Operator]] | Bracket
|
||||||
|
|
||||||
Bracket ::= "<nowiki>[ ]</nowiki>"
|
Bracket ::= "<nowiki>[ ]</nowiki>"
|
||||||
|
|
||||||
|
|
||||||
===Operators ===
|
===Operators ===
|
||||||
Operator ::= Unary | Binary
|
Operator ::= Unary | Binary
|
||||||
|
|
||||||
Unary ::= <code>not</code> | "+" | "-" | Free_unary
|
Unary ::= <code>not</code> | "+" | "-" | Free_unary
|
||||||
|
|
||||||
Binary ::= <nowiki>"+" | "-" | "*" | "/" | "//" | "\\" | "^" | ".." | "<" | ">" | "<=" | ">=" |</nowiki> <code>and</code> | <code>or</code> | <code>xor</code> | <code>and</code> <code>then</code> | <code>or</code> <code>else</code> | <code>implies</code> | Free_binary
|
Binary ::= <nowiki>"+" | "-" | "*" | "/" | "//" | "\\" | "^" | ".." | "<" | ">" | "<=" | ">=" |</nowiki> <code>and</code> | <code>or</code> | <code>xor</code> | <code>and</code> <code>then</code> | <code>or</code> <code>else</code> | <code>implies</code> | Free_binary
|
||||||
|
|
||||||
{{note| Free_unary and Free_binary are free operators that are distinct from (respectively) the ''standard'' unary and binary operators (one- or two-character symbols) explicitly listed in the Unary and Binary productions. See ''Definition: Free operator'' in the standard for more precision.}}
|
{{note| Free_unary and Free_binary are free operators that are distinct from (respectively) the ''standard'' unary and binary operators (one- or two-character symbols) explicitly listed in the Unary and Binary productions. See ''Definition: Free operator'' in the standard for more precision.}}
|
||||||
@@ -204,10 +230,15 @@ Assigner_mark ::= <code>assign</code> [[#Feature names|Feature_name]]
|
|||||||
|
|
||||||
===Inheritance parts ===
|
===Inheritance parts ===
|
||||||
Inheritance ::= Inherit_clause+
|
Inheritance ::= Inherit_clause+
|
||||||
|
|
||||||
Inherit_clause ::= <code>inherit</code> <nowiki>[Non_conformance]</nowiki> Parent_list
|
Inherit_clause ::= <code>inherit</code> <nowiki>[Non_conformance]</nowiki> Parent_list
|
||||||
|
|
||||||
Non_conformance ::= "{" NONE "}"
|
Non_conformance ::= "{" NONE "}"
|
||||||
|
|
||||||
Parent_list ::= {Parent ";" ...}+
|
Parent_list ::= {Parent ";" ...}+
|
||||||
|
|
||||||
Parent ::= [[#Types|Class_type]] <nowiki>[Feature_adaptation]</nowiki>
|
Parent ::= [[#Types|Class_type]] <nowiki>[Feature_adaptation]</nowiki>
|
||||||
|
|
||||||
Feature_adaptation ::= <nowiki>[</nowiki>[[#Undefine clauses|Undefine]]<nowiki>]</nowiki>
|
Feature_adaptation ::= <nowiki>[</nowiki>[[#Undefine clauses|Undefine]]<nowiki>]</nowiki>
|
||||||
<nowiki>[</nowiki>[[#Redefinition|Redefine]]<nowiki>]</nowiki>
|
<nowiki>[</nowiki>[[#Redefinition|Redefine]]<nowiki>]</nowiki>
|
||||||
<nowiki>[</nowiki>[[#Rename clauses|Rename]]<nowiki>]</nowiki>
|
<nowiki>[</nowiki>[[#Rename clauses|Rename]]<nowiki>]</nowiki>
|
||||||
@@ -219,38 +250,53 @@ Feature_adaptation ::= <nowiki>[</nowiki>[[#Undefine clauses|Undefine]]<nowiki>]
|
|||||||
|
|
||||||
===Rename clauses ===
|
===Rename clauses ===
|
||||||
Rename ::= <code>rename</code> Rename_list
|
Rename ::= <code>rename</code> Rename_list
|
||||||
|
|
||||||
Rename_list ::= {Rename_pair "," ...}+
|
Rename_list ::= {Rename_pair "," ...}+
|
||||||
|
|
||||||
Rename_pair ::= [[#Feature names|Feature_name]] <code>as</code> [[#Feature names|Extended_feature_name]]
|
Rename_pair ::= [[#Feature names|Feature_name]] <code>as</code> [[#Feature names|Extended_feature_name]]
|
||||||
|
|
||||||
|
|
||||||
===Clients ===
|
===Clients ===
|
||||||
Clients ::= "{" Class_list "}"
|
Clients ::= "{" Class_list "}"
|
||||||
|
|
||||||
Class_list ::= {[[#Class names|Class_name]] "," ...}+
|
Class_list ::= {[[#Class names|Class_name]] "," ...}+
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
===Export adaptation ===
|
===Export adaptation ===
|
||||||
New_exports ::= <code>export</code> New_export_list
|
New_exports ::= <code>export</code> New_export_list
|
||||||
|
|
||||||
New_export_list ::= {New_export_item ";" ...}+
|
New_export_list ::= {New_export_item ";" ...}+
|
||||||
|
|
||||||
New_export_item ::= [[#Clients|Clients]] <nowiki>[</nowiki>[[#Feature parts|Header_comment]]<nowiki>]</nowiki> Feature_set
|
New_export_item ::= [[#Clients|Clients]] <nowiki>[</nowiki>[[#Feature parts|Header_comment]]<nowiki>]</nowiki> Feature_set
|
||||||
|
|
||||||
Feature_set ::= Feature_list | <code>all</code>
|
Feature_set ::= Feature_list | <code>all</code>
|
||||||
|
|
||||||
Feature_list ::= {[[#Feature names|Feature_name]] "," ...}+
|
Feature_list ::= {[[#Feature names|Feature_name]] "," ...}+
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
===Formal argument and entity declarations ===
|
===Formal argument and entity declarations ===
|
||||||
Formal_arguments ::= "(" [[#Formal argument and entity declarations|Entity_declaration_list]] ")"
|
Formal_arguments ::= "(" [[#Formal argument and entity declarations|Entity_declaration_list]] ")"
|
||||||
|
|
||||||
Entity_declaration_list ::= {Entity_declaration_group ";" ...}+
|
Entity_declaration_list ::= {Entity_declaration_group ";" ...}+
|
||||||
|
|
||||||
Entity_declaration_group ::= Identifier_list [[#Feature declarations|Type_mark]]
|
Entity_declaration_group ::= Identifier_list [[#Feature declarations|Type_mark]]
|
||||||
|
|
||||||
Identifier_list ::= {[[#Identfiers|Identifier]] "," ...}+
|
Identifier_list ::= {[[#Identfiers|Identifier]] "," ...}+
|
||||||
|
|
||||||
|
|
||||||
===Routine bodies ===
|
===Routine bodies ===
|
||||||
Deferred ::= <code>deferred</code>
|
Deferred ::= <code>deferred</code>
|
||||||
|
|
||||||
Effective_routine ::= Internal | [[#External routines|External]]
|
Effective_routine ::= Internal | [[#External routines|External]]
|
||||||
|
|
||||||
Internal ::= Routine_mark [[#Instructions|Compound]]
|
Internal ::= Routine_mark [[#Instructions|Compound]]
|
||||||
|
|
||||||
Routine_mark ::= <code>do</code> | Once
|
Routine_mark ::= <code>do</code> | Once
|
||||||
|
|
||||||
Once ::= <code>once</code> <nowiki>[</nowiki> "("Key_list ")" <nowiki>]</nowiki>
|
Once ::= <code>once</code> <nowiki>[</nowiki> "("Key_list ")" <nowiki>]</nowiki>
|
||||||
|
|
||||||
Key_list ::= {[[#Manifest strings|Manifest_string]] "," ...}+
|
Key_list ::= {[[#Manifest strings|Manifest_string]] "," ...}+
|
||||||
|
|
||||||
|
|
||||||
@@ -260,18 +306,26 @@ Local_declarations ::= <code>local</code> <nowiki>[</nowiki>[[#Formal argument a
|
|||||||
|
|
||||||
===Instructions ===
|
===Instructions ===
|
||||||
Compound ::= {Instruction ";" ...}*
|
Compound ::= {Instruction ";" ...}*
|
||||||
|
|
||||||
Instruction ::= [[#Creation instructions|Creation_instruction]] | [[#Feature calls|Call]] | [[#Assignments|Assignment]] | [[#Assigner calls|Assigner_call]] | [[#Conditionals|Conditional]] | [[#Multi-branch instructions|Multi_branch]]
|
Instruction ::= [[#Creation instructions|Creation_instruction]] | [[#Feature calls|Call]] | [[#Assignments|Assignment]] | [[#Assigner calls|Assigner_call]] | [[#Conditionals|Conditional]] | [[#Multi-branch instructions|Multi_branch]]
|
||||||
| [[#Loops|Loop]] | [[#Debug instructions|Debug]] | [[#Precursor|Precursor]] | [[#Check instructions|Check]] | [[#Rescue clauses|Retry]]
|
| [[#Loops|Loop]] | [[#Debug instructions|Debug]] | [[#Precursor|Precursor]] | [[#Check instructions|Check]] | [[#Rescue clauses|Retry]]
|
||||||
|
|
||||||
|
|
||||||
===Assertions ===
|
===Assertions ===
|
||||||
Precondition ::= <code>require</code> [<code>else</code>] Assertion
|
Precondition ::= <code>require</code> [<code>else</code>] Assertion
|
||||||
|
|
||||||
Postcondition ::= <code>ensure</code> [<code>then</code>] Assertion <nowiki>[</nowiki>[[#"Only" postcondition clauses|Only]]<nowiki>]</nowiki>
|
Postcondition ::= <code>ensure</code> [<code>then</code>] Assertion <nowiki>[</nowiki>[[#"Only" postcondition clauses|Only]]<nowiki>]</nowiki>
|
||||||
|
|
||||||
Invariant ::= <code>invariant</code> Assertion
|
Invariant ::= <code>invariant</code> Assertion
|
||||||
|
|
||||||
Assertion ::= {Assertion_clause ";" ...}*
|
Assertion ::= {Assertion_clause ";" ...}*
|
||||||
|
|
||||||
Assertion_clause ::= [Tag_mark] Unlabeled_assertion_clause
|
Assertion_clause ::= [Tag_mark] Unlabeled_assertion_clause
|
||||||
|
|
||||||
Unlabeled_assertion_clause ::= [[#Expressions|Boolean_expression]] | [[#Comments|Comment]]
|
Unlabeled_assertion_clause ::= [[#Expressions|Boolean_expression]] | [[#Comments|Comment]]
|
||||||
|
|
||||||
Tag_mark ::= Tag ":"
|
Tag_mark ::= Tag ":"
|
||||||
|
|
||||||
Tag ::= [[#Identfiers|Identifier]]
|
Tag ::= [[#Identfiers|Identifier]]
|
||||||
|
|
||||||
|
|
||||||
@@ -293,6 +347,7 @@ Variant ::= <code>variant</code> <nowiki>[</nowiki>[[#Assertions|Tag_mark]]<nowi
|
|||||||
|
|
||||||
===Precursor ===
|
===Precursor ===
|
||||||
Precursor ::= <code>Precursor</code> [Parent_qualification] <nowiki>[</nowiki>[[#Actual arguments|Actuals]]<nowiki>]</nowiki>
|
Precursor ::= <code>Precursor</code> [Parent_qualification] <nowiki>[</nowiki>[[#Actual arguments|Actuals]]<nowiki>]</nowiki>
|
||||||
|
|
||||||
Parent_qualification ::= "{" [[#Class names|Class_name]] "}"
|
Parent_qualification ::= "{" [[#Class names|Class_name]] "}"
|
||||||
|
|
||||||
|
|
||||||
@@ -306,51 +361,73 @@ Undefine ::= <code>undefine</code> [[#Export adaptation|Feature_list]]
|
|||||||
|
|
||||||
===Types ===
|
===Types ===
|
||||||
Type ::= Class_or_tuple_type | [[#Formal generic parameters|Formal_generic_name]] | Anchored
|
Type ::= Class_or_tuple_type | [[#Formal generic parameters|Formal_generic_name]] | Anchored
|
||||||
|
|
||||||
Class_or_tuple_type ::= Class_type | [[#Tuple types|Tuple_type]]
|
Class_or_tuple_type ::= Class_type | [[#Tuple types|Tuple_type]]
|
||||||
|
|
||||||
Class_type ::= [Attachment_mark] [[#Class names|Class_name]] <nowiki>[</nowiki>[[#Actual generic parameters|Actual_generics]]<nowiki>]</nowiki>
|
Class_type ::= [Attachment_mark] [[#Class names|Class_name]] <nowiki>[</nowiki>[[#Actual generic parameters|Actual_generics]]<nowiki>]</nowiki>
|
||||||
|
|
||||||
Attachment_mark ::= "?" | "!"
|
Attachment_mark ::= "?" | "!"
|
||||||
|
|
||||||
Anchored ::= [Attachment_mark] <code>like</code> Anchor
|
Anchored ::= [Attachment_mark] <code>like</code> Anchor
|
||||||
|
|
||||||
Anchor ::= [[#Feature names|Feature_name]] | <code>Current</code>
|
Anchor ::= [[#Feature names|Feature_name]] | <code>Current</code>
|
||||||
|
|
||||||
|
|
||||||
===Actual generic parameters ===
|
===Actual generic parameters ===
|
||||||
Actual_generics ::= <nowiki>"[" Type_list "]"</nowiki>
|
Actual_generics ::= <nowiki>"[" Type_list "]"</nowiki>
|
||||||
|
|
||||||
Type_list ::= {[[#Types|Type]] "," ...}+
|
Type_list ::= {[[#Types|Type]] "," ...}+
|
||||||
|
|
||||||
|
|
||||||
===Formal generic parameters ===
|
===Formal generic parameters ===
|
||||||
Formal_generics ::= <nowiki>"[" Formal_generic_list "]"</nowiki>
|
Formal_generics ::= <nowiki>"[" Formal_generic_list "]"</nowiki>
|
||||||
|
|
||||||
Formal_generic_list ::= {Formal_generic ","...}+
|
Formal_generic_list ::= {Formal_generic ","...}+
|
||||||
|
|
||||||
Formal_generic ::= <nowiki>[</nowiki><code>frozen</code><nowiki>]</nowiki> Formal_generic_name <nowiki>[</nowiki>[[#Generic constraints|Constraint]]<nowiki>]</nowiki>
|
Formal_generic ::= <nowiki>[</nowiki><code>frozen</code><nowiki>]</nowiki> Formal_generic_name <nowiki>[</nowiki>[[#Generic constraints|Constraint]]<nowiki>]</nowiki>
|
||||||
|
|
||||||
Formal_generic_name ::= <nowiki>[?]</nowiki> [[#Identfiers|Identifier]]
|
Formal_generic_name ::= <nowiki>[?]</nowiki> [[#Identfiers|Identifier]]
|
||||||
|
|
||||||
|
|
||||||
===Generic constraints ===
|
===Generic constraints ===
|
||||||
Constraint ::= "->" Constraining_types <nowiki>[Constraint_creators]</nowiki>
|
Constraint ::= "->" Constraining_types <nowiki>[Constraint_creators]</nowiki>
|
||||||
|
|
||||||
Constraining_types ::= Single_constraint | Multiple_constraint
|
Constraining_types ::= Single_constraint | Multiple_constraint
|
||||||
|
|
||||||
Single_constraint ::= [[#Types|Type]] [Renaming]
|
Single_constraint ::= [[#Types|Type]] [Renaming]
|
||||||
|
|
||||||
Renaming ::= [[#Rename clauses|Rename]] <code>end</code>
|
Renaming ::= [[#Rename clauses|Rename]] <code>end</code>
|
||||||
|
|
||||||
Multiple_constraint ::= "{" Constraint_list "}"
|
Multiple_constraint ::= "{" Constraint_list "}"
|
||||||
|
|
||||||
Constraint_list ::= {Single_constraint "," ...}+
|
Constraint_list ::= {Single_constraint "," ...}+
|
||||||
|
|
||||||
Constraint_creators ::= <code>create</code> [[#Export adaptation|Feature_list]] <code>end</code>
|
Constraint_creators ::= <code>create</code> [[#Export adaptation|Feature_list]] <code>end</code>
|
||||||
|
|
||||||
|
|
||||||
===Tuple types ===
|
===Tuple types ===
|
||||||
Tuple_type ::= <code>TUPLE</code> <nowiki>[Tuple_parameter_list]</nowiki>
|
Tuple_type ::= <code>TUPLE</code> <nowiki>[Tuple_parameter_list]</nowiki>
|
||||||
|
|
||||||
Tuple_parameter_list ::= <nowiki>"[" Tuple_parameters "]"</nowiki>
|
Tuple_parameter_list ::= <nowiki>"[" Tuple_parameters "]"</nowiki>
|
||||||
|
|
||||||
Tuple_parameters ::= [[#Actual generic parameters|Type_list]] | [[#Formal argument and entity declarations|Entity_declaration_list]]
|
Tuple_parameters ::= [[#Actual generic parameters|Type_list]] | [[#Formal argument and entity declarations|Entity_declaration_list]]
|
||||||
|
|
||||||
|
|
||||||
===Manifest tuples ===
|
===Manifest tuples ===
|
||||||
Manifest_tuple ::= <nowiki>"[" Expression_list "]"</nowiki>
|
Manifest_tuple ::= <nowiki>"[" Expression_list "]"</nowiki>
|
||||||
|
|
||||||
Expression_list ::= {[[#Expressions|Expression]] "," ...}*
|
Expression_list ::= {[[#Expressions|Expression]] "," ...}*
|
||||||
|
|
||||||
|
|
||||||
===Converter clauses ===
|
===Converter clauses ===
|
||||||
Converters ::= <code>convert</code> Converter_list
|
Converters ::= <code>convert</code> Converter_list
|
||||||
|
|
||||||
Converter_list ::= {Converter ","...}+
|
Converter_list ::= {Converter ","...}+
|
||||||
|
|
||||||
Converter ::= Conversion_procedure | Conversion_query
|
Converter ::= Conversion_procedure | Conversion_query
|
||||||
|
|
||||||
Conversion_procedure ::= [[#Feature names|Feature_name]] "(" "{" [[#Actual generic parameters|Type_list]] "}" ")"
|
Conversion_procedure ::= [[#Feature names|Feature_name]] "(" "{" [[#Actual generic parameters|Type_list]] "}" ")"
|
||||||
|
|
||||||
Conversion_query ::= [[#Feature names|Feature_name]] ":" "{" [[#Actual generic parameters|Type_list]] "}"
|
Conversion_query ::= [[#Feature names|Feature_name]] ":" "{" [[#Actual generic parameters|Type_list]] "}"
|
||||||
|
|
||||||
|
|
||||||
@@ -360,18 +437,27 @@ Select ::= <code>select</code> [[#Export adaptation|Feature_list]]
|
|||||||
|
|
||||||
===Conditionals ===
|
===Conditionals ===
|
||||||
Conditional ::= <code>if</code> Then_part_list <nowiki>[Else_part]</nowiki> <code>end</code>
|
Conditional ::= <code>if</code> Then_part_list <nowiki>[Else_part]</nowiki> <code>end</code>
|
||||||
|
|
||||||
Then_part_list ::= {Then_part <code>elseif</code> ...}+
|
Then_part_list ::= {Then_part <code>elseif</code> ...}+
|
||||||
|
|
||||||
Then_part ::= [[#Expressions|Boolean_expression]] <code>then</code> [[#Instructions|Compound]]
|
Then_part ::= [[#Expressions|Boolean_expression]] <code>then</code> [[#Instructions|Compound]]
|
||||||
|
|
||||||
Else_part ::= <code>else</code> [[#Instructions|Compound]]
|
Else_part ::= <code>else</code> [[#Instructions|Compound]]
|
||||||
|
|
||||||
|
|
||||||
===Multi-branch instructions ===
|
===Multi-branch instructions ===
|
||||||
Multi_branch ::= <code>inspect</code> [[#Expressions|Expression]] <nowiki>[When_part_list] [Else_part]</nowiki> <code>end</code>
|
Multi_branch ::= <code>inspect</code> [[#Expressions|Expression]] <nowiki>[When_part_list] [Else_part]</nowiki> <code>end</code>
|
||||||
|
|
||||||
When_part_list ::= When_part+
|
When_part_list ::= When_part+
|
||||||
|
|
||||||
When_part ::= <code>when</code> Choices <code>then</code> [[#Instructions|Compound]]
|
When_part ::= <code>when</code> Choices <code>then</code> [[#Instructions|Compound]]
|
||||||
|
|
||||||
Choices ::= {Choice "," ...}+
|
Choices ::= {Choice "," ...}+
|
||||||
|
|
||||||
Choice ::= [[#Constants|Constant]] | [[#Manifest constants|Manifest_type]] | Constant_interval | Type_interval
|
Choice ::= [[#Constants|Constant]] | [[#Manifest constants|Manifest_type]] | Constant_interval | Type_interval
|
||||||
|
|
||||||
Constant_interval ::= [[#Constants|Constant]] ".." [[#Constants|Constant]]
|
Constant_interval ::= [[#Constants|Constant]] ".." [[#Constants|Constant]]
|
||||||
|
|
||||||
Type_interval ::= [[#Manifest constants|Manifest_type]] ".." [[#Manifest constants|Manifest_type]]
|
Type_interval ::= [[#Manifest constants|Manifest_type]] ".." [[#Manifest constants|Manifest_type]]
|
||||||
|
|
||||||
|
|
||||||
@@ -382,8 +468,11 @@ Exit_condition
|
|||||||
Loop_body
|
Loop_body
|
||||||
<nowiki>[</nowiki>[[#Variants|Variant]]<nowiki>]</nowiki>
|
<nowiki>[</nowiki>[[#Variants|Variant]]<nowiki>]</nowiki>
|
||||||
<code>end</code>
|
<code>end</code>
|
||||||
|
|
||||||
Initialization ::= <code>from</code> [[#Instructions|Compound]]
|
Initialization ::= <code>from</code> [[#Instructions|Compound]]
|
||||||
|
|
||||||
Exit_condition ::= <code>until</code> [[#Expressions|Boolean_expression]]
|
Exit_condition ::= <code>until</code> [[#Expressions|Boolean_expression]]
|
||||||
|
|
||||||
Loop_body ::= <code>loop</code> [[#Instructions|Compound]]
|
Loop_body ::= <code>loop</code> [[#Instructions|Compound]]
|
||||||
|
|
||||||
|
|
||||||
@@ -397,25 +486,37 @@ Attribute ::= <code>attribute</code> [[#Instructions|Compound]]
|
|||||||
|
|
||||||
===Entities and variables ===
|
===Entities and variables ===
|
||||||
Entity ::= Variable | Read_only
|
Entity ::= Variable | Read_only
|
||||||
|
|
||||||
Variable ::= Variable_attribute | Local
|
Variable ::= Variable_attribute | Local
|
||||||
|
|
||||||
Variable_attribute ::= [[#Feature names|Feature_name]]
|
Variable_attribute ::= [[#Feature names|Feature_name]]
|
||||||
|
|
||||||
Local ::= [[#Identfiers|Identifier]] | <code>Result</code>
|
Local ::= [[#Identfiers|Identifier]] | <code>Result</code>
|
||||||
|
|
||||||
Read_only ::= Formal | Constant_attribute | <code>Current</code>
|
Read_only ::= Formal | Constant_attribute | <code>Current</code>
|
||||||
|
|
||||||
Formal ::= [[#Identfiers|Identifier]]
|
Formal ::= [[#Identfiers|Identifier]]
|
||||||
|
|
||||||
Constant_attribute ::= [[#Feature names|Feature_name]]
|
Constant_attribute ::= [[#Feature names|Feature_name]]
|
||||||
|
|
||||||
|
|
||||||
===Creators parts ===
|
===Creators parts ===
|
||||||
Creators ::= Creation_clause+
|
Creators ::= Creation_clause+
|
||||||
|
|
||||||
Creation_clause ::= <code>create</code> <nowiki>[</nowiki>[[#Clients|Clients]]<nowiki>]</nowiki> <nowiki>[</nowiki>[[#Feature parts|Header_comment]]<nowiki>]</nowiki> Creation_procedure_list
|
Creation_clause ::= <code>create</code> <nowiki>[</nowiki>[[#Clients|Clients]]<nowiki>]</nowiki> <nowiki>[</nowiki>[[#Feature parts|Header_comment]]<nowiki>]</nowiki> Creation_procedure_list
|
||||||
|
|
||||||
Creation_procedure_list ::= {Creation_procedure ","...}+
|
Creation_procedure_list ::= {Creation_procedure ","...}+
|
||||||
|
|
||||||
Creation_procedure ::= [[#Feature names|Feature_name]]
|
Creation_procedure ::= [[#Feature names|Feature_name]]
|
||||||
|
|
||||||
|
|
||||||
===Creation instructions ===
|
===Creation instructions ===
|
||||||
Creation_instruction ::= <code>create</code> <nowiki>[Explicit_creation_type]</nowiki> Creation_call
|
Creation_instruction ::= <code>create</code> <nowiki>[Explicit_creation_type]</nowiki> Creation_call
|
||||||
|
|
||||||
Explicit_creation_type ::= "{" [[#Types|Type]] "}"
|
Explicit_creation_type ::= "{" [[#Types|Type]] "}"
|
||||||
|
|
||||||
Creation_call ::= [[#Entities and variables|Variable]] [Explicit_creation_call]
|
Creation_call ::= [[#Entities and variables|Variable]] [Explicit_creation_call]
|
||||||
|
|
||||||
Explicit_creation_call ::= "." [[#Feature calls|Unqualified_call]]
|
Explicit_creation_call ::= "." [[#Feature calls|Unqualified_call]]
|
||||||
|
|
||||||
|
|
||||||
@@ -425,6 +526,7 @@ Creation_expression ::= <code>create</code> [[#Creation instructions|Explicit_cr
|
|||||||
|
|
||||||
===Equality expressions ===
|
===Equality expressions ===
|
||||||
Equality ::= [[#Expressions|Expression]] Comparison [[#Expressions|Expression]]
|
Equality ::= [[#Expressions|Expression]] Comparison [[#Expressions|Expression]]
|
||||||
|
|
||||||
Comparison ::= "=" | "/=" | "~" | "/~"
|
Comparison ::= "=" | "/=" | "~" | "/~"
|
||||||
|
|
||||||
|
|
||||||
@@ -438,15 +540,21 @@ Assigner_call ::= [[#Expressions|Expression]] ":=" [[#Expressions|Expression]]
|
|||||||
|
|
||||||
===Feature calls ===
|
===Feature calls ===
|
||||||
Call ::= Object_call | Non_object_call
|
Call ::= Object_call | Non_object_call
|
||||||
|
|
||||||
Object_call ::= <nowiki>[Target "."] Unqualified_call </nowiki>
|
Object_call ::= <nowiki>[Target "."] Unqualified_call </nowiki>
|
||||||
|
|
||||||
Unqualified_call ::= [[#Feature names|Feature_name]] <nowiki>[</nowiki>[[#Actual arguments|Actuals]]<nowiki>]</nowiki>
|
Unqualified_call ::= [[#Feature names|Feature_name]] <nowiki>[</nowiki>[[#Actual arguments|Actuals]]<nowiki>]</nowiki>
|
||||||
|
|
||||||
Target ::= [[#Entities and variables|Local]] | [[#Entities and variables|Read_only]] | Call | Parenthesized_target
|
Target ::= [[#Entities and variables|Local]] | [[#Entities and variables|Read_only]] | Call | Parenthesized_target
|
||||||
|
|
||||||
Parenthesized_target ::= "( |" [[#Expressions|Expression]] "| )"
|
Parenthesized_target ::= "( |" [[#Expressions|Expression]] "| )"
|
||||||
|
|
||||||
Non_object_call ::= "{" [[#Types|Type]] "}" "." Unqualified_call
|
Non_object_call ::= "{" [[#Types|Type]] "}" "." Unqualified_call
|
||||||
|
|
||||||
|
|
||||||
===Actual arguments ===
|
===Actual arguments ===
|
||||||
Actuals ::= "(" Actual_list ")"
|
Actuals ::= "(" Actual_list ")"
|
||||||
|
|
||||||
Actual_list ::= {[[#Expressions|Expression]] "," ...}+
|
Actual_list ::= {[[#Expressions|Expression]] "," ...}+
|
||||||
|
|
||||||
|
|
||||||
@@ -456,89 +564,130 @@ Object_test ::= "{" [[#Identfiers|Identifier]] ":" [[#Types|Type]] "}" [[#Expres
|
|||||||
|
|
||||||
===Rescue clauses ===
|
===Rescue clauses ===
|
||||||
Rescue ::= <code>rescue</code> [[#Instructions|Compound]]
|
Rescue ::= <code>rescue</code> [[#Instructions|Compound]]
|
||||||
|
|
||||||
Retry ::= <code>retry</code>
|
Retry ::= <code>retry</code>
|
||||||
|
|
||||||
|
|
||||||
===Agents ===
|
===Agents ===
|
||||||
Agent ::= Call_agent | Inline_agent
|
Agent ::= Call_agent | Inline_agent
|
||||||
|
|
||||||
Call_agent ::= <code>agent</code> [[#Call agent bodies|Call_agent_body]]
|
Call_agent ::= <code>agent</code> [[#Call agent bodies|Call_agent_body]]
|
||||||
|
|
||||||
Inline_agent ::= <code>agent</code> <nowiki>[</nowiki>[[#Formal argument and entity declarations|Formal_arguments]]<nowiki>]</nowiki> <nowiki>[</nowiki>[[#Feature declarations|Type_mark]]<nowiki>]</nowiki> <nowiki>[</nowiki>[[#Feature bodies|Attribute_or_routine]]<nowiki>]</nowiki> <nowiki>[</nowiki>[[#Call agent bodies|Agent_actuals]]<nowiki>]</nowiki>
|
Inline_agent ::= <code>agent</code> <nowiki>[</nowiki>[[#Formal argument and entity declarations|Formal_arguments]]<nowiki>]</nowiki> <nowiki>[</nowiki>[[#Feature declarations|Type_mark]]<nowiki>]</nowiki> <nowiki>[</nowiki>[[#Feature bodies|Attribute_or_routine]]<nowiki>]</nowiki> <nowiki>[</nowiki>[[#Call agent bodies|Agent_actuals]]<nowiki>]</nowiki>
|
||||||
|
|
||||||
|
|
||||||
===Call agent bodies ===
|
===Call agent bodies ===
|
||||||
Call_agent_body ::= Agent_qualified | Agent_unqualified
|
Call_agent_body ::= Agent_qualified | Agent_unqualified
|
||||||
|
|
||||||
Agent_qualified ::= Agent_target ". " Agent_unqualified
|
Agent_qualified ::= Agent_target ". " Agent_unqualified
|
||||||
|
|
||||||
Agent_unqualified ::= [[#Feature names|Feature_name]] [Agent_actuals]
|
Agent_unqualified ::= [[#Feature names|Feature_name]] [Agent_actuals]
|
||||||
|
|
||||||
Agent_target ::= Entity | Parenthesized | [[#Manifest constants|Manifest_type]]
|
Agent_target ::= Entity | Parenthesized | [[#Manifest constants|Manifest_type]]
|
||||||
|
|
||||||
Agent_actuals ::= "(" Agent_actual_list ")"
|
Agent_actuals ::= "(" Agent_actual_list ")"
|
||||||
|
|
||||||
Agent_actual_list ::= {Agent_actual "," ...}+
|
Agent_actual_list ::= {Agent_actual "," ...}+
|
||||||
|
|
||||||
Agent_actual ::= [[#Expressions|Expression]] | Placeholder
|
Agent_actual ::= [[#Expressions|Expression]] | Placeholder
|
||||||
|
|
||||||
Placeholder ::= <nowiki>[</nowiki>[[#Manifest constants|Manifest_type]]<nowiki>]</nowiki> "?"
|
Placeholder ::= <nowiki>[</nowiki>[[#Manifest constants|Manifest_type]]<nowiki>]</nowiki> "?"
|
||||||
|
|
||||||
|
|
||||||
===Expressions ===
|
===Expressions ===
|
||||||
Expression ::= Basic_expression | Special_expression
|
Expression ::= Basic_expression | Special_expression
|
||||||
|
|
||||||
Basic_expression ::= [[#Entities and variables|Read_only]] | [[#Entities and variables|Local]] | [[#Feature calls|Call]] | [[#Precursor|Precursor]] | [[#Equality expressions|Equality]] | Parenthesized | [[#"Old" postcondition expressions|Old]] |
|
Basic_expression ::= [[#Entities and variables|Read_only]] | [[#Entities and variables|Local]] | [[#Feature calls|Call]] | [[#Precursor|Precursor]] | [[#Equality expressions|Equality]] | Parenthesized | [[#"Old" postcondition expressions|Old]] |
|
||||||
[[#Operator expressions|Operator_expression]] | [[#Bracket expressions|Bracket_expression]] | [[#Creation expression|Creation_expression]]
|
[[#Operator expressions|Operator_expression]] | [[#Bracket expressions|Bracket_expression]] | [[#Creation expression|Creation_expression]]
|
||||||
|
|
||||||
Special_expression ::= [[#Manifest constants|Manifest_constant]] | [[#Manifest tuples|Manifest_tuple]] | [[#Agents|Agent]] | [[#Object test|Object_test]] | Once_string |
|
Special_expression ::= [[#Manifest constants|Manifest_constant]] | [[#Manifest tuples|Manifest_tuple]] | [[#Agents|Agent]] | [[#Object test|Object_test]] | Once_string |
|
||||||
Address
|
Address
|
||||||
|
|
||||||
Parenthesized ::= "(" Expression ")"
|
Parenthesized ::= "(" Expression ")"
|
||||||
|
|
||||||
Address ::= "$" [[#Entities and variables|Variable]]
|
Address ::= "$" [[#Entities and variables|Variable]]
|
||||||
|
|
||||||
Once_string ::= <code>once</code> [[#Manifest strings|Manifest_string]]
|
Once_string ::= <code>once</code> [[#Manifest strings|Manifest_string]]
|
||||||
|
|
||||||
Boolean_expression ::= Basic_expression | [[#Manifest constants|Boolean_constant]] | [[#Object test|Object_test]]
|
Boolean_expression ::= Basic_expression | [[#Manifest constants|Boolean_constant]] | [[#Object test|Object_test]]
|
||||||
|
|
||||||
|
|
||||||
===Operator expressions ===
|
===Operator expressions ===
|
||||||
Operator_expression ::= Unary_expression | Binary_expression
|
Operator_expression ::= Unary_expression | Binary_expression
|
||||||
|
|
||||||
Unary_expression ::= Unary Expression
|
Unary_expression ::= Unary Expression
|
||||||
|
|
||||||
Binary_expression ::= [[#Expressions|Expression]] [[#Operators|Binary]] [[#Expressions|Expression]]
|
Binary_expression ::= [[#Expressions|Expression]] [[#Operators|Binary]] [[#Expressions|Expression]]
|
||||||
|
|
||||||
|
|
||||||
===Bracket expressions ===
|
===Bracket expressions ===
|
||||||
Bracket_expression ::= Bracket_target "[" [[#Actual arguments|Actuals]] "]"
|
Bracket_expression ::= Bracket_target "[" [[#Actual arguments|Actuals]] "]"
|
||||||
|
|
||||||
Bracket_target ::= [[#Feature calls|Target]] | [[#Expressions|Once_string]] | [[#Manifest constants|Manifest_constant]] | [[#Manifest tuples|Manifest_tuple]]
|
Bracket_target ::= [[#Feature calls|Target]] | [[#Expressions|Once_string]] | [[#Manifest constants|Manifest_constant]] | [[#Manifest tuples|Manifest_tuple]]
|
||||||
|
|
||||||
|
|
||||||
===Constants ===
|
===Constants ===
|
||||||
Constant ::= [[#Manifest constants|Manifest_constant]] | Constant_attribute
|
Constant ::= [[#Manifest constants|Manifest_constant]] | Constant_attribute
|
||||||
|
|
||||||
Constant_attribute ::= [[#Feature names|Feature_name]]
|
Constant_attribute ::= [[#Feature names|Feature_name]]
|
||||||
|
|
||||||
|
|
||||||
===Manifest constants ===
|
===Manifest constants ===
|
||||||
Manifest_constant ::= [Manifest_type] Manifest_value
|
Manifest_constant ::= [Manifest_type] Manifest_value
|
||||||
|
|
||||||
Manifest_type ::= "{" [[#Types|Type]] "}"
|
Manifest_type ::= "{" [[#Types|Type]] "}"
|
||||||
|
|
||||||
Manifest_value ::= Boolean_constant |
|
Manifest_value ::= Boolean_constant |
|
||||||
Character_constant |
|
Character_constant |
|
||||||
Integer_constant |
|
Integer_constant |
|
||||||
Real_constant |
|
Real_constant |
|
||||||
[[#Manifest strings|Manifest_string]] |
|
[[#Manifest strings|Manifest_string]] |
|
||||||
Manifest_type
|
Manifest_type
|
||||||
|
|
||||||
Sign ::= "+" | "-"
|
Sign ::= "+" | "-"
|
||||||
|
|
||||||
Integer_constant ::= <nowiki>[Sign]</nowiki> [[#Integers|Integer]]
|
Integer_constant ::= <nowiki>[Sign]</nowiki> [[#Integers|Integer]]
|
||||||
|
|
||||||
Character_constant ::= " ' " [[#Characters|Character]] " ' "
|
Character_constant ::= " ' " [[#Characters|Character]] " ' "
|
||||||
|
|
||||||
Boolean_constant ::= <code>True</code> | <code>False</code>
|
Boolean_constant ::= <code>True</code> | <code>False</code>
|
||||||
|
|
||||||
Real_constant ::= <nowiki>[Sign]</nowiki> [[#Reals|Real]]
|
Real_constant ::= <nowiki>[Sign]</nowiki> [[#Reals|Real]]
|
||||||
|
|
||||||
|
|
||||||
===Manifest strings ===
|
===Manifest strings ===
|
||||||
Manifest_string ::= Basic_manifest_string | Verbatim_string
|
Manifest_string ::= Basic_manifest_string | Verbatim_string
|
||||||
|
|
||||||
Basic_manifest_string ::= ' " ' String_content ' " '
|
Basic_manifest_string ::= ' " ' String_content ' " '
|
||||||
|
|
||||||
String_content ::= {[[#Simple strings|Simple_string]] [[#Line wrapping parts|Line_wrapping_part]] ...}+
|
String_content ::= {[[#Simple strings|Simple_string]] [[#Line wrapping parts|Line_wrapping_part]] ...}+
|
||||||
|
|
||||||
Verbatim_string ::= Verbatim_string_opener Line_sequence Verbatim_string_closer
|
Verbatim_string ::= Verbatim_string_opener Line_sequence Verbatim_string_closer
|
||||||
|
|
||||||
Verbatim_string_opener ::= ' " ' <nowiki>[</nowiki>[[#Simple strings|Simple_string]]<nowiki>]</nowiki> Open_bracket
|
Verbatim_string_opener ::= ' " ' <nowiki>[</nowiki>[[#Simple strings|Simple_string]]<nowiki>]</nowiki> Open_bracket
|
||||||
|
|
||||||
Verbatim_string_closer ::= Close_bracket <nowiki>[</nowiki>[[#Simple strings|Simple_string]]<nowiki>]</nowiki> ' " '
|
Verbatim_string_closer ::= Close_bracket <nowiki>[</nowiki>[[#Simple strings|Simple_string]]<nowiki>]</nowiki> ' " '
|
||||||
|
|
||||||
Open_bracket ::= <nowiki>"[" | "{"</nowiki>
|
Open_bracket ::= <nowiki>"[" | "{"</nowiki>
|
||||||
|
|
||||||
Close_bracket ::= "]" | "}"Verbatim_string ::= Verbatim_string_opener Line_sequence Verbatim_string_closer
|
Close_bracket ::= "]" | "}"Verbatim_string ::= Verbatim_string_opener Line_sequence Verbatim_string_closer
|
||||||
|
|
||||||
Verbatim_string_opener ::= ' " ' <nowiki>[</nowiki>[[#Simple strings|Simple_string]]<nowiki>]</nowiki> Open_bracket
|
Verbatim_string_opener ::= ' " ' <nowiki>[</nowiki>[[#Simple strings|Simple_string]]<nowiki>]</nowiki> Open_bracket
|
||||||
|
|
||||||
Verbatim_string_closer ::= Close_bracket <nowiki>[</nowiki>[[#Simple strings|Simple_string]]<nowiki>]</nowiki> ' " '
|
Verbatim_string_closer ::= Close_bracket <nowiki>[</nowiki>[[#Simple strings|Simple_string]]<nowiki>]</nowiki> ' " '
|
||||||
|
|
||||||
Open_bracket ::= <nowiki>"[" | "{" </nowiki>
|
Open_bracket ::= <nowiki>"[" | "{" </nowiki>
|
||||||
|
|
||||||
Close_bracket ::= <nowiki>"]" | "}" </nowiki>
|
Close_bracket ::= <nowiki>"]" | "}" </nowiki>
|
||||||
|
|
||||||
|
|
||||||
===External routines ===
|
===External routines ===
|
||||||
External ::= <code>external</code> External_language <nowiki>[External_name]</nowiki>
|
External ::= <code>external</code> External_language <nowiki>[External_name]</nowiki>
|
||||||
|
|
||||||
External_language ::= Unregistered_language | [[#Registered languages|Registered_language]]
|
External_language ::= Unregistered_language | [[#Registered languages|Registered_language]]
|
||||||
|
|
||||||
Unregistered_language ::= [[#Manifest strings|Manifest_string]]
|
Unregistered_language ::= [[#Manifest strings|Manifest_string]]
|
||||||
|
|
||||||
External_name ::= <code>alias</code> [[#Manifest strings|Manifest_string]]
|
External_name ::= <code>alias</code> [[#Manifest strings|Manifest_string]]
|
||||||
{{note|If the `inline` keyword is used in the Registered_language part, then External_name part is the inline code on the specified language.}}
|
{{note|If the `inline` keyword is used in the Registered_language part, then External_name part is the inline code on the specified language.}}
|
||||||
|
|
||||||
@@ -549,16 +698,23 @@ Registered_language ::= [[#C externals|C_external]] | [[#C++ externals|C++_exter
|
|||||||
|
|
||||||
===External signatures ===
|
===External signatures ===
|
||||||
External_signature ::= <code>signature</code> <nowiki>[External_argument_types] [: External_type]</nowiki>
|
External_signature ::= <code>signature</code> <nowiki>[External_argument_types] [: External_type]</nowiki>
|
||||||
|
|
||||||
External_argument_types ::= "(" External_type_list ")"
|
External_argument_types ::= "(" External_type_list ")"
|
||||||
|
|
||||||
External_type_list ::= {External_type "," ...}*
|
External_type_list ::= {External_type "," ...}*
|
||||||
|
|
||||||
External_type ::= [[#Simple strings|Simple_string]]
|
External_type ::= [[#Simple strings|Simple_string]]
|
||||||
|
|
||||||
|
|
||||||
===External file use ===
|
===External file use ===
|
||||||
External_file_use ::= <code>use</code> External_file_list
|
External_file_use ::= <code>use</code> External_file_list
|
||||||
|
|
||||||
External_file_list ::= {External_file "," <nowiki>... }+ </nowiki>
|
External_file_list ::= {External_file "," <nowiki>... }+ </nowiki>
|
||||||
|
|
||||||
External_file ::= External_user_file | External_system_file
|
External_file ::= External_user_file | External_system_file
|
||||||
|
|
||||||
External_user_file ::= ' " ' [[#Simple strings|Simple_string]] ' " '
|
External_user_file ::= ' " ' [[#Simple strings|Simple_string]] ' " '
|
||||||
|
|
||||||
External_system_file ::= <nowiki>"<"</nowiki> [[#Simple strings|Simple_string]] <nowiki>">"</nowiki>
|
External_system_file ::= <nowiki>"<"</nowiki> [[#Simple strings|Simple_string]] <nowiki>">"</nowiki>
|
||||||
|
|
||||||
===C externals ===
|
===C externals ===
|
||||||
@@ -571,23 +727,27 @@ C++_external ::= ' " ' <code>C++</code> <code>inline</code> <nowiki>[</nowiki>
|
|||||||
|
|
||||||
===DLL externals ===
|
===DLL externals ===
|
||||||
DLL_external ::= ' " ' <code>dll</code> <nowiki>[</nowiki><code>windows</code><nowiki>] DLL_identifier [DLL_index] [[</nowiki> [[#External signatures |External_signature]] <nowiki>] [</nowiki> [[#External file use |External_file_use]] <nowiki>] ' " ' </nowiki>
|
DLL_external ::= ' " ' <code>dll</code> <nowiki>[</nowiki><code>windows</code><nowiki>] DLL_identifier [DLL_index] [[</nowiki> [[#External signatures |External_signature]] <nowiki>] [</nowiki> [[#External file use |External_file_use]] <nowiki>] ' " ' </nowiki>
|
||||||
|
|
||||||
DLL_identifier ::= [[#Simple strings|Simple_string]]
|
DLL_identifier ::= [[#Simple strings|Simple_string]]
|
||||||
|
|
||||||
DLL_index ::= [[#Integers|Integer]]
|
DLL_index ::= [[#Integers|Integer]]
|
||||||
|
|
||||||
|
|
||||||
===Comments ===
|
===Comments ===
|
||||||
Comment ::= "- -" <nowiki>{</nowiki>[[#Simple strings|Simple_string]] Comment_break ...}*
|
Comment ::= "- -" <nowiki>{</nowiki>[[#Simple strings|Simple_string]] Comment_break ...}*
|
||||||
|
|
||||||
Comment_break ::= New_line <nowiki>[Blanks_or_tabs] "- -"</nowiki>
|
Comment_break ::= New_line <nowiki>[Blanks_or_tabs] "- -"</nowiki>
|
||||||
|
|
||||||
===Integers ===
|
===Integers ===
|
||||||
Integer ::= <nowiki>[Integer_base]</nowiki> Digit_sequence
|
Integer ::= <nowiki>[Integer_base]</nowiki> Digit_sequence
|
||||||
|
|
||||||
Integer_base ::= "0" Integer_base_letter
|
Integer_base ::= "0" Integer_base_letter
|
||||||
|
|
||||||
Integer_base_letter ::= "b" | "c" | "x" | "B" | "C" | "X"
|
Integer_base_letter ::= "b" | "c" | "x" | "B" | "C" | "X"
|
||||||
|
|
||||||
Digit_sequence ::= Digit+
|
Digit_sequence ::= Digit+
|
||||||
|
|
||||||
Digit ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" |
|
Digit ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" |
|
||||||
"a" | "b" | "c" | "d" | "e" | "f" |
|
"a" | "b" | "c" | "d" | "e" | "f" |
|
||||||
"A" | "B" | "C" | "D" | "E" | "F" | "_"
|
"A" | "B" | "C" | "D" | "E" | "F" | "_"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user