[[Property:title|Eiffel language syntax]]
[[Property:link_title|Eiffel programming language syntax]]
[[Property:weight|0]]
[[Property:uuid|d0f94270-f1e0-5545-2b1a-8cde3a6c73ab]]
The syntax specification shown here is a less complete and less formal version of that which is in the Eiffel ISO/ECMA standard document. The format is BNF-E. The Language Specification section of the standard document includes an overview of BNF-E. 

There are a few parts of the syntax that are either non-production or non-representable in BNF-E. Some of these have been omitted from the following specification. These omitted parts of the syntax definition add to the precision of the specification, but knowledge of them is not always vital for developers. 

In the BNF-E representation, generally non-terminals which are defined in the same group of productions in which they are used are not linked. However when a non-terminal is defined outside a group in which it is used, it is linked to the group in which it is defined.

__TOC__

The following section contains those non-production elements of the specification that are used later in the BNF-E specification.

==Eiffel non-production elements==

===Identifiers===

An '''identifier''' is a sequence of one or more alphanumeric [[#Characters|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.

===Characters===

Characters are either:

* All 32-bit, corresponding to Unicode and to the Eiffel type CHARACTER_32.
* All 8-bit, corresponding to 8-bit extended ASCII and to the Eiffel type CHARACTER_8

===Reals===

A real -- specimen of Real -- is made of the following elements, in the order given:

* An optional decimal [[#Integers|Integer]], giving the integral part.
* A required "." (dot).
* An optional decimal [[#Integers|Integer]], giving the fractional part.
* An optional exponent, which is the letter ''e'' or ''E'' followed by an optional [[#Manifest constants|Sign]] and a decimal [[#Integers|Integer]].

No intervening character (blank or otherwise) is permitted between these elements. The integral and fractional parts may not both be absent.

===Strings===

A string -- specimen of construct String -- is a sequence of zero or more manifest characters.

===Simple strings===

A simple string -- specimen of Simple_string -- is a [[#Strings|String]] consisting of at most one line (that is to say, containing no embedded new-line manifest character), possibly containing [[#Special characters|codes for special characters]].

===Special characters===

{| border="2"
|+ Special Characters and Their Codes
! Character || Code || Mnemonic name
|-
| @ || %A || At-sign
|-
| BS || %B || Backspace
|-
| ^ || %C || Circumflex
|-
| $ || %D || Dollar
|-
| FF || %F || Form feed
|-
| \ || %H || Backslash
|-
| ~ || %L || Tilde
|-
| NL (LF) || %N || Newline
|-
| ` || %Q || Backquote
|-
| CR || %R || Carriage return
|-
| # || %S || Sharp
|-
| HT || %T || Horizontal tab
|-
| NUL || %U || Null
|-
| <nowiki>|</nowiki> || %V || Vertical bar
|-
| % || %% || Percent
|-
| ' || %' || Single quote
|-
| " || %" || Double quote
|-
| [ || %( || Opening bracket
|-
| ] || %) || Closing bracket
|-
| { || %< || Opening brace
|-
| } || %> || Closing brace
|}

===Line wrapping parts===

A sequence of characters consisting of the following, in order:
* % (percent character)
* Zero or more blanks or tabs
* New line (Line feed)
* Zero or more blanks or tabs
* % (percent character)

Line wrapping parts are used as separators between one [[#Simple strings|Simple_string]] and the next in a [[#Manifest strings|Basic_manifest_string]] so that the string can be split across lines.



==Eiffel BNF-E Syntax==


===Class names ===
Class_name ::= [[#Identfiers|Identifier]] <br/><br/>
<br/>
===Class declarations ===
Class_declaration ::= <nowiki>[</nowiki>[[#Notes|Notes]]<nowiki>]</nowiki> <br/>
[[#Class headers|Class_header]] <br/>
<nowiki>[</nowiki>[[#Formal generic parameters|Formal_generics]]<nowiki>]</nowiki> <br/>
<nowiki>[</nowiki>[[#Obsolete marks|Obsolete]]<nowiki>]</nowiki> <br/>
<nowiki>[</nowiki>[[#Inheritance parts|Inheritance]]<nowiki>]</nowiki> <br/>
<nowiki>[</nowiki>[[#Creators parts|Creators]]<nowiki>]</nowiki> <br/>
<nowiki>[</nowiki>[[#Converter clauses|Converters]]<nowiki>]</nowiki> <br/>
<nowiki>[</nowiki>[[#Feature parts|Features]]<nowiki>]</nowiki> <br/>
<nowiki>[</nowiki>[[#Assertions|Invariant]]<nowiki>]</nowiki> <br/>
<nowiki>[</nowiki>[[#Notes|Notes]]<nowiki>]</nowiki> <br/>
<code>end</code><br/>
<br/>
===Notes ===
Notes ::= <code>note</code> Note_list<br/>
Note_list ::= {Note_entry ";" …}* <br/>
Note_entry ::= Note_name Note_values <br/>
Note_name ::= [[#Identifiers|Identifier]] ":" <br/>
Note_values ::= {Note_item ","…}+ <br/>
Note_item ::= [[#Identifiers|Identifier]] | [[#Manifest constants|Manifest_constant]] <br/>
<br/>
===Class headers ===
Class_header ::= [Header_mark] <code>class</code> [[#Class names|Class_name]] <br/>
Header_mark ::= <code>deferred</code> | <code>expanded</code> | <code>frozen</code> <br/>
<br/>
===Obsolete marks ===
Obsolete ::= <code>obsolete</code> Message <br/>
Message ::= [[#Manifest strings|Manifest_string]] <br/>
<br/>
===Feature parts ===
Features ::= Feature_clause+ <br/>
Feature_clause ::= <code>feature</code> <nowiki>[</nowiki>[[#Clients|Clients]]<nowiki>]</nowiki> <nowiki>[</nowiki>[[#Feature parts|Header_comment]]<nowiki>]</nowiki> Feature_declaration_list <br/>
Feature_declaration_list ::= {[[#Feature declarations|Feature_declaration]] ";" …}* <br/>
Header_comment ::= [[#Comments|Comment]] <br/>
<br/>
===Feature declarations ===
Feature_declaration ::= [[#New feature lists|New_feature_list]] Declaration_body <br/>
Declaration_body ::= <nowiki>[</nowiki>[[#Formal argument and entity declarations|Formal_arguments]]<nowiki>]</nowiki> [Query_mark] [Feature_value] <br/>
Query_mark ::= Type_mark <nowiki>[</nowiki>[[#Assigner marks|Assigner_mark]]<nowiki>]</nowiki> <br/>
Type_mark ::= ":" [[#Types|Type]] <br/>
Feature_value ::= [Explicit_value] <br/>
<nowiki>[</nowiki>[[#Obsolete parts|Obsolete]]<nowiki>]</nowiki> <br/>
<nowiki>[</nowiki>[[#Feature parts|Header_comment]]<nowiki>]</nowiki> <br/>
<nowiki>[</nowiki>[[#Feature bodies|Attribute_or_routine]]<nowiki>]</nowiki> <br/>
Explicit_value ::= "=" [[#Manifest constants|Manifest_constant]] <br/>
<br/>
<br/>
===New feature lists ===
New_feature_list ::= {New_feature "," …}+ <br/>
New_feature ::= [<code>frozen</code>] [[#Feature names|Extended_feature_name]]<br/>
<br/>
<br/>
===Feature bodies ===
Attribute_or_routine ::= <nowiki>[</nowiki>[[#Assertions|Precondition]]<nowiki>]</nowiki> <br/>
<nowiki>[</nowiki>[[#Local variable declarations|Local_declarations]]<nowiki>]</nowiki> <br/>
Feature_body <br/>
<nowiki>[</nowiki>[[#Assertions|Postcondition]]<nowiki>]</nowiki> <br/>
<nowiki>[</nowiki>[[#Rescue clauses|Rescue]]<nowiki>]</nowiki> <br/>
<code>end</code><br/>
Feature_body ::= [[#Routine bodies|Deferred]] | [[#Routine bodies|Effective_routine]] | [[#Attribute bodies|Attribute]]<br/>
<br/>
<br/>
===Feature names ===
Extended_feature_name ::= Feature_name [Alias] <br/>
Feature_name ::= [[#Identfiers|Identifier]] <br/>
Alias ::= <code>alias</code> '"' Alias_name '"' [<code>convert</code>] <br/>
Alias_name ::= [[#Operators|Operator]] | Bracket <br/>
Bracket ::= "[  ]" <br/>
<br/>
<br/>
===Operators ===
Operator ::= Unary | Binary <br/>
Unary ::= <code>not</code> | "+" | "–" | Free_unary <br/>
Binary ::= "+" | "–" | "*" | "/" | "//" | "\\" | "^" | ".." | <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/>
Free_binary <br/>
{{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.}}
<br/>
<br/>
===Assigner marks ===
Assigner_mark ::= <code>assign</code> [[#Feature names|Feature_name]]<br/>
<br/>
<br/>
===Inheritance parts ===
Inheritance ::= Inherit_clause+ <br/>
Inherit_clause ::= <code>inherit</code> [Non_conformance] Parent_list <br/>
Non_conformance ::= "{" NONE "}" <br/>
Parent_list ::= {Parent ";" …}+ <br/>
Parent ::= [[#Types|Class_type]] [Feature_adaptation] <br/>
Feature_adaptation ::= <nowiki>[</nowiki>[[#Undefine clauses|Undefine]]<nowiki>]</nowiki> <br/>
<nowiki>[</nowiki>[[#Redefinition|Redefine]]<nowiki>]</nowiki> <br/>
<nowiki>[</nowiki>[[#Rename clauses|Rename]]<nowiki>]</nowiki> <br/>
<nowiki>[</nowiki>[[#Export adaptation|New_exports]]<nowiki>]</nowiki> <br/>
<nowiki>[</nowiki>[[#Select clauses|Select]]<nowiki>]</nowiki> <br/>
<code>end</code> <br/>
<br/>
<br/>
<br/>
===Rename clauses ===
Rename ::= <code>rename</code> Rename_list <br/>
Rename_list ::= {Rename_pair "," …}+ <br/>
Rename_pair ::= [[#Feature names|Feature_name]] <code>as</code> [[#Feature names|Extended_feature_name]] <br/>
<br/>
<br/>
===Clients ===
Clients ::= "{" Class_list "}" <br/>
Class_list ::= {[[#Class names|Class_name]] "," …}+<br/>
<br/>
<br/>
<br/>
===Export adaptation ===
New_exports ::= <code>export</code> New_export_list <br/>
New_export_list ::= {New_export_item ";" …}+ <br/>
New_export_item ::= [[#Clients|Clients]] <nowiki>[</nowiki>[[#Feature parts|Header_comment]]<nowiki>]</nowiki> Feature_set <br/>
Feature_set ::= Feature_list | <code>all</code> <br/>
Feature_list ::= {[[#Feature names|Feature_name]] "," …}+<br/>
<br/>
<br/>
<br/>
===Formal argument and entity declarations ===
Formal_arguments ::= "(" [[#Formal argument and entity declarations|Entity_declaration_list]] ")" <br/>
Entity_declaration_list ::= {Entity_declaration_group ";" …}+ <br/>
Entity_declaration_group ::= Identifier_list [[#Feature declarations|Type_mark]] <br/>
Identifier_list ::= {[[#Identfiers|Identifier]] "," …}+ <br/>
<br/>
<br/>
===Routine bodies ===
Deferred ::= <code>deferred</code> <br/>
Effective_routine ::= Internal | [[#External routines|External]] <br/>
Internal ::= Routine_mark [[#Instructions|Compound]] <br/>
Routine_mark ::= <code>do</code> | Once <br/>
Once ::= <code>once</code> [ "("Key_list ")" ] <br/>
Key_list ::= {[[#Manifest strings|Manifest_string]] "," …}+<br/>
<br/>
<br/>
===Local variable declarations ===
Local_declarations ::= <code>local</code> <nowiki>[</nowiki>[[#Formal argument and entity declarations|Entity_declaration_list]]<nowiki>]</nowiki><br/>
<br/>
<br/>
===Instructions ===
Compound ::= {Instruction ";" …}* <br/>
Instruction ::= [[#Creation instructions|Creation_instruction]] | [[#Feature calls|Call]] | [[#Assignments|Assignment]] | [[#Assigner calls|Assigner_call]] | [[#Conditionals|Conditional]] | [[#Multi-branch instructions|Multi_branch]] <br/>
| [[#Loops|Loop]] | [[#Debug instructions|Debug]] | [[#Precursor|Precursor]] | [[#Check instructions|Check]] | [[#Rescue clauses|Retry]]<br/>
<br/>
<br/>
===Assertions ===
Precondition ::= <code>require</code> [<code>else</code>] Assertion <br/>
Postcondition ::= <code>ensure</code> [<code>then</code>] Assertion <nowiki>[</nowiki>[[#"Only" postcondition clauses|Only]]<nowiki>]</nowiki> <br/>
Invariant ::= <code>invariant</code> Assertion <br/>
Assertion ::= {Assertion_clause ";" …}* <br/>
Assertion_clause ::= [Tag_mark] Unlabeled_assertion_clause <br/>
Unlabeled_assertion_clause ::= [[#Expressions|Boolean_expression]] | [[#Comments|Comment]] <br/>
Tag_mark ::= Tag ":" <br/>
Tag ::= [[#Identfiers|Identifier]] <br/>
<br/>
<br/>
===“Old” postcondition expressions ===
Old ::= <code>old</code> [[#Expressions|Expression]]<br/>
<br/>
<br/>
===“Only” postcondition clauses ===
Only ::= <code>only</code> <nowiki>[</nowiki>[[#Export adaptation|Feature_list]]<nowiki>]</nowiki><br/>
<br/>
<br/>
===Check instructions ===
Check ::= <code>check</code> [[#Assertions|Assertion]] <nowiki>[</nowiki>[[#Notes|Notes]]<nowiki>]</nowiki> <code>end</code><br/>
<br/>
<br/>
===Variants ===
Variant ::= <code>variant</code> <nowiki>[</nowiki>[[#Assertions|Tag_mark]]<nowiki>]</nowiki> [[#Expressions|Expression]]<br/>
<br/>
<br/>
===Precursor ===
Precursor ::= <code>Precursor</code> [Parent_qualification] <nowiki>[</nowiki>[[#Actual arguments|Actuals]]<nowiki>]</nowiki> <br/>
Parent_qualification ::= "{" [[#Class names|Class_name]] "}"<br/>
<br/>
<br/>
===Redefinition ===
Redefine ::= <code>redefine</code> [[#Export adaptation|Feature_list]]<br/>
<br/>
<br/>
===Undefine clauses ===
Undefine ::= <code>undefine</code> [[#Export adaptation|Feature_list]]<br/>
<br/>
<br/>
===Types ===
Type ::= Class_or_tuple_type | [[#Formal generic parameters|Formal_generic_name]] | Anchored <br/>
Class_or_tuple_type ::= Class_type | [[#Tuple types|Tuple_type]] <br/>
Class_type ::= [Attachment_mark] [[#Class names|Class_name]] <nowiki>[</nowiki>[[#Actual generic parameters|Actual_generics]]<nowiki>]</nowiki> <br/>
Attachment_mark ::= "?"  |  "!" <br/>
Anchored ::= [Attachment_mark] <code>like</code> Anchor <br/>
Anchor ::= [[#Feature names|Feature_name]] | <code>Current</code><br/>
<br/>
<br/>
===Actual generic parameters ===
Actual_generics ::= "[" Type_list "]" <br/>
Type_list ::= {[[#Types|Type]] "," …}+<br/>
<br/>
<br/>
===Formal generic parameters ===
Formal_generics ::= "[" Formal_generic_list "]" <br/>
Formal_generic_list ::= {Formal_generic ","…}+ <br/>
Formal_generic ::= [<code>frozen</code>] Formal_generic_name <nowiki>[</nowiki>[[#Generic constraints|Constraint]]<nowiki>]</nowiki> <br/>
Formal_generic_name ::= [?] [[#Identfiers|Identifier]]<br/>
<br/>
<br/>
===Generic constraints ===
Constraint ::= "–>" Constraining_types [Constraint_creators] <br/>
Constraining_types ::= Single_constraint | Multiple_constraint <br/>
Single_constraint ::= [[#Types|Type]] [Renaming] <br/>
Renaming ::= [[#Rename clauses|Rename]] <code>end</code><br/>
Multiple_constraint ::= "{" Constraint_list "}" <br/>
Constraint_list ::= {Single_constraint "," …}+ <br/>
Constraint_creators ::= <code>create</code> [[#Export adaptation|Feature_list]] <code>end</code><br/>
<br/>
<br/>
===Tuple types ===
Tuple_type ::= <code>TUPLE</code> [Tuple_parameter_list] <br/>
Tuple_parameter_list ::= "[" Tuple_parameters "]"<br/>
Tuple_parameters ::= [[#Actual generic parameters|Type_list]] | [[#Formal argument and entity declarations|Entity_declaration_list]]<br/>
<br/>
<br/>
===Manifest tuples ===
Manifest_tuple ::= "[" Expression_list "]" <br/>
Expression_list ::= {[[#Expressions|Expression]] "," …}*<br/>
<br/>
<br/>
===Converter clauses ===
Converters ::= <code>convert</code> Converter_list <br/>
Converter_list ::= {Converter ","…}+ <br/>
Converter ::= Conversion_procedure | Conversion_query <br/>
Conversion_procedure ::= [[#Feature names|Feature_name]] "(" "{" [[#Actual generic parameters|Type_list]] "}" ")" <br/>
Conversion_query ::= [[#Feature names|Feature_name]] ":" "{" [[#Actual generic parameters|Type_list]] "}"<br/>
<br/>
<br/>
===Select clauses ===
Select ::= <code>select</code> [[#Export adaptation|Feature_list]]<br/>
<br/>
<br/>
===Conditionals ===
Conditional ::= <code>if</code> Then_part_list [Else_part] <code>end</code> <br/>
Then_part_list ::= {Then_part <code>elseif</code> …}+ <br/>
Then_part ::= [[#Expressions|Boolean_expression]] <code>then</code> [[#Instructions|Compound]] <br/>
Else_part ::= <code>else</code> [[#Instructions|Compound]]<br/>
<br/>
<br/>
===Multi-branch instructions ===
Multi_branch ::= <code>inspect</code> [[#Expressions|Expression]] [When_part_list] [Else_part] <code>end</code> <br/>
When_part_list ::= When_part+ <br/>
When_part ::= <code>when</code> Choices <code>then</code> [[#Instructions|Compound]] <br/>
Choices ::= {Choice "," …}+ <br/>
Choice ::= [[#Constants|Constant]] | [[#Manifest constants|Manifest_type]] | Constant_interval | Type_interval <br/>
Constant_interval ::= [[#Constants|Constant]] ".." [[#Constants|Constant]] <br/>
Type_interval ::= [[#Manifest constants|Manifest_type]] ".." [[#Manifest constants|Manifest_type]]<br/>
<br/>
<br/>
===Loops ===
Loop ::= Initialization <br/>
<nowiki>[</nowiki>[[#Assertions|Invariant]]<nowiki>]</nowiki> <br/>
Exit_condition <br/>
Loop_body <br/>
<nowiki>[</nowiki>[[#Variants|Variant]]<nowiki>]</nowiki><br/>
<code>end</code> <br/>
Initialization ::= <code>from</code> [[#Instructions|Compound]] <br/>
Exit_condition ::= <code>until</code> [[#Expressions|Boolean_expression]] <br/>
Loop_body ::= <code>loop</code> [[#Instructions|Compound]]<br/>
<br/>
<br/>
===Debug instructions ===
Debug ::= <code>debug</code> [ "("[[#Routine_bodies|Key_list]] ")" ] [[#Instructions|Compound]] <code>end</code><br/>
<br/>
<br/>
===Attribute bodies ===
Attribute ::= <code>attribute</code> [[#Instructions|Compound]]<br/>
<br/>
<br/>
===Entities and variables ===
Entity ::= Variable | Read_only <br/>
Variable ::= Variable_attribute | Local <br/>
Variable_attribute ::= [[#Feature names|Feature_name]] <br/>
Local ::= [[#Identfiers|Identifier]] | <code>Result</code> <br/>
Read_only ::= Formal | Constant_attribute | <code>Current</code> <br/>
Formal ::= [[#Identfiers|Identifier]] <br/>
Constant_attribute ::= [[#Feature names|Feature_name]]<br/>
<br/>
<br/>
===Creators parts ===
Creators ::= Creation_clause+ <br/>
Creation_clause ::= <code>create</code> <nowiki>[</nowiki>[[#Clients|Clients]]<nowiki>]</nowiki> <nowiki>[</nowiki>[[#Feature parts|Header_comment]]<nowiki>]</nowiki> Creation_procedure_list <br/>
Creation_procedure_list ::= {Creation_procedure ","…}+ <br/>
Creation_procedure ::= [[#Feature names|Feature_name]]<br/>
<br/>
<br/>
===Creation instructions ===
Creation_instruction ::= <code>create</code> [Explicit_creation_type] Creation_call <br/>
Explicit_creation_type ::= "{" [[#Types|Type]] "}" <br/>
Creation_call ::= [[#Entities and variables|Variable]] [Explicit_creation_call] <br/>
Explicit_creation_call ::= "." [[#Feature calls|Unqualified_call]]<br/>
<br/>
<br/>
===Creation expressions ===
Creation_expression ::= <code>create</code> [[#Creation instructions|Explicit_creation_type]] <nowiki>[</nowiki>[[#Creation instructions|Explicit_creation_call]]<nowiki>]</nowiki><br/>
<br/>
<br/>
===Equality expressions ===
Equality ::= [[#Expressions|Expression]] Comparison [[#Expressions|Expression]] <br/>
Comparison ::= "=" | "/=" | "~" | "/~"<br/>
<br/>
<br/>
===Assignments ===
Assignment ::= [[#Entities and variables|Variable]] ":=" [[#Expressions|Expression]]<br/>
<br/>
<br/>
===Assigner calls ===
Assigner_call ::= [[#Expressions|Expression]] ":=" [[#Expressions|Expression]]<br/>
<br/>
<br/>
===Feature calls ===
Call ::= Object_call | Non_object_call <br/>
Object_call ::= [Target "."] Unqualified_call <br/>
Unqualified_call ::= [[#Feature names|Feature_name]] <nowiki>[</nowiki>[[#Actual arguments|Actuals]]<nowiki>]</nowiki> <br/>
Target ::= [[#Entities and variables|Local]] | [[#Entities and variables|Read_only]] | Call | Parenthesized_target <br/>
Parenthesized_target ::= "( |" [[#Expressions|Expression]] "| )" <br/>
Non_object_call ::= "{" [[#Types|Type]] "}" "." Unqualified_call<br/>
<br/>
<br/>
===Actual arguments ===
Actuals ::= "(" Actual_list ")" <br/>
Actual_list ::= {[[#Expressions|Expression]] "," …}+<br/>
<br/>
<br/>
===Object test ===
Object_test ::= "{" [[#Identfiers|Identifier]] ":" [[#Types|Type]] "}" [[#Expressions|Expression]]<br/>
<br/>
<br/>
===Rescue clauses ===
Rescue ::= <code>rescue</code> [[#Instructions|Compound]] <br/>
Retry ::= <code>retry</code><br/>
<br/>
<br/>
===Agents ===
Agent ::= Call_agent | Inline_agent <br/>
Call_agent ::= <code>agent</code> [[#Call agent bodies|Call_agent_body]] <br/>
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><br/>
<br/>
<br/>
===Call agent bodies ===
Call_agent_body ::= Agent_qualified | Agent_unqualified <br/>
Agent_qualified ::= Agent_target ". " Agent_unqualified <br/>
Agent_unqualified ::= [[#Feature names|Feature_name]] [Agent_actuals] <br/>
Agent_target ::= Entity | Parenthesized | [[#Manifest constants|Manifest_type]] <br/>
Agent_actuals ::= "(" Agent_actual_list ")" <br/>
Agent_actual_list ::= {Agent_actual "," …}+ <br/>
Agent_actual ::= [[#Expressions|Expression]] | Placeholder <br/>
Placeholder ::= <nowiki>[</nowiki>[[#Manifest constants|Manifest_type]]<nowiki>]</nowiki> "?"<br/>
<br/>
<br/>
===Expressions ===
Expression ::= Basic_expression | Special_expression <br/>
Basic_expression ::= [[#Entities and variables|Read_only]] | [[#Entities and variables|Local]] | [[#Feature calls|Call]] | [[#Precursor|Precursor]] | [[#Equality expressions|Equality]] | Parenthesized | [[#"Old" postcondition expressions|Old]] | <br/>
[[#Operator expressions|Operator_expression]] | [[#Bracket expressions|Bracket_expression]]  | [[#Creation expression|Creation_expression]] <br/>
Special_expression ::= [[#Manifest constants|Manifest_constant]] | [[#Manifest tuples|Manifest_tuple]] | [[#Agents|Agent]] | [[#Object test|Object_test]] | Once_string | <br/>
Address <br/>
Parenthesized ::= "(" Expression ")" <br/>
Address ::= "$" [[#Entities and variables|Variable]] <br/>
Once_string ::= <code>once</code> [[#Manifest strings|Manifest_string]] <br/>
Boolean_expression ::= Basic_expression | [[#Manifest constants|Boolean_constant]] | [[#Object test|Object_test]]<br/>
<br/>
<br/>
===Operator expressions ===
Operator_expression ::= Unary_expression | Binary_expression <br/>
Unary_expression ::= Unary Expression <br/>
Binary_expression ::= [[#Expressions|Expression]] [[#Operators|Binary]] [[#Expressions|Expression]]<br/>
<br/>
<br/>
===Bracket expressions ===
Bracket_expression ::= Bracket_target "[" [[#Actual arguments|Actuals]] "]" <br/>
Bracket_target ::= [[#Feature calls|Target]] | [[#Expressions|Once_string]] | [[#Manifest constants|Manifest_constant]] | [[#Manifest tuples|Manifest_tuple]]<br/>
<br/>
<br/>
===Constants ===
Constant ::= [[#Manifest constants|Manifest_constant]] | Constant_attribute <br/>
Constant_attribute ::= [[#Feature names|Feature_name]]<br/>
<br/>
<br/>
===Manifest constants ===
Manifest_constant ::= [Manifest_type] Manifest_value <br/>
Manifest_type ::= "{" [[#Types|Type]] "}"<br/>
Manifest_value ::= Boolean_constant |  <br/>
Character_constant |  <br/>
Integer_constant |  <br/>
Real_constant |  <br/>
[[#Manifest strings|Manifest_string]] | <br/>
Manifest_type <br/>
Sign ::= "+" | "–" <br/>
Integer_constant ::= [Sign] [[#Integers|Integer]] <br/>
Character_constant ::= " ' " [[#Characters|Character]] " ' " <br/>
Boolean_constant ::= <code>True</code> | <code>False</code> <br/>
Real_constant ::= [Sign] [[#Reals|Real]]<br/>
<br/>
<br/>
===Manifest strings ===
Manifest_string ::= Basic_manifest_string | Verbatim_string <br/>
Basic_manifest_string ::= ' " '  String_content  ' " ' <br/>
String_content ::= {[[#Simple strings|Simple_string]] [[#Line wrapping parts|Line_wrapping_part]] …}+<br/>
Verbatim_string ::= Verbatim_string_opener Line_sequence Verbatim_string_closer <br/>
Verbatim_string_opener ::= ' " ' <nowiki>[</nowiki>[[#Simple strings|Simple_string]]<nowiki>]</nowiki> Open_bracket <br/>
Verbatim_string_closer ::= Close_bracket <nowiki>[</nowiki>[[#Simple strings|Simple_string]]<nowiki>]</nowiki> ' " ' <br/>
Open_bracket ::= "[" | "{" <br/>
Close_bracket ::= "]" | "}"Verbatim_string ::= Verbatim_string_opener Line_sequence Verbatim_string_closer <br/>
Verbatim_string_opener ::= ' " ' <nowiki>[</nowiki>[[#Simple strings|Simple_string]]<nowiki>]</nowiki> Open_bracket <br/>
Verbatim_string_closer ::= Close_bracket <nowiki>[</nowiki>[[#Simple strings|Simple_string]]<nowiki>]</nowiki> ' " ' <br/>
Open_bracket ::= "[" | "{" <br/>
Close_bracket ::= "]" | "}" <br/>
<br/>
<br/>
===External routines ===
External ::= <code>external</code> External_language [External_name] <br/>
External_language ::= Unregistered_language | [[#Registered languages|Registered_language]] <br/>
Unregistered_language ::= [[#Manifest strings|Manifest_string]] <br/>
External_name ::= <code>alias</code> [[#Manifest strings|Manifest_string]]<br/>
<br/>
<br/>
===Registered languages ===
Registered_language ::= [[#C externals|C_external]] | [[#C++ externals|C++_external]] | [[#DLL externals|DLL_external]]<br/>
<br/>
<br/>
===External signatures ===
External_signature ::= <code>signature</code> [External_argument_types] [: External_type] <br/>
External_argument_types ::= "(" External_type_list ")" <br/>
External_type_list ::= {External_type "," …}* <br/>
External_type ::= [[#Simple strings|Simple_string]]<br/>
<br/>
<br/>
===External file use ===
External_file_use ::= <code>use</code> External_file_list <br/>
External_file_list ::= {External_file "," …}+ <br/>
External_file ::= External_user_file | External_system_file <br/>
External_user_file ::= ' " '  [[#Simple strings|Simple_string]]  ' " ' <br/>
External_system_file ::= "<"[[#Simple strings|Simple_string]] ">"<br/>
<br/>
<br/>
===C externals ===
C_external ::= ’' " ' <code>C</code>  <br/>
’[<code>inline</code>] <br/>
[External_signature] [External_file_use] <br/>
' " '<br/>
<br/>
<br/>
===C++ externals ===
C++_external ::= ' " '  <code>C++</code>  <br/>
<code>inline</code> <br/>
[External_signature] <br/>
[External_file_use] <br/>
' " '<br/>
<br/>
<br/>
===DLL externals ===
DLL_external ::= ' " ' <code>dll</code> <br/>
[<code>windows</code>] <br/>
DLL_identifier <br/>
[DLL_index] <br/>
[External_signature] <br/>
[External_file_use] <br/>
' " ' <br/>
DLL_identifier ::= [[#Simple strings|Simple_string]] <br/>
DLL_index ::= [[#Integers|Integer]]<br/>
<br/>
<br/>
===Comments ===
Comment ::= "– –" {[[#Simple strings|Simple_string]] Comment_break …}* <br/>
Comment_break ::= New_line [Blanks_or_tabs] "– –"<br/>
<br/>
===Integers ===
Integer ::= [Integer_base] Digit_sequence <br/>
Integer_base ::= "0" Integer_base_letter <br/>
Integer_base_letter ::= "b"  |  "c"  |  "x" |  "B"  |  "C"  |  "X" <br/>
Digit_sequence ::= Digit+ <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/>
<br/>


