Difference between revisions of "Syntax diagrams"

From Liberty Eiffel Wiki
Jump to navigation Jump to search
(typos)
 
(Reverted edit of Cadrian, changed back to last version by Colnet)
Line 1: Line 1:
  +
[[Category:Book]]
  +
Syntax diagrams for the whole Eiffel language.
  +
  +
All items in alphabetical order:
  +
[[#Assignment|Assignment]],
  +
[[#Binary|Binary]],
  +
[[#Call|Call]],
  +
[[#ClassDeclaration|Class_declaration]],
  +
[[#ClassName|Class_name]],
  +
[[#Clients|Clients]],
  +
[[#Comment|Comment]],
  +
[[#Compound|Compound]],
  +
[[#CreationClause|Creation_clause]],
  +
[[#ElsePart|Else_part]],
  +
[[#EntityDeclarationList|Entity_declaration_list]],
  +
[[#Expression|Expression]],
  +
[[#FeatureClause|Feature_clause]],
  +
[[#FeatureDeclaration|Feature_declaration]],
  +
[[#FeatureName|Feature_name]],
  +
[[#FormalGenericList|Formal_generic_list]],
  +
[[#InfixOperator|Infix_operator]],
  +
[[#Instruction|Instruction]],
  +
[[#Loop|Loop]],
  +
[[#ManifestString|Manifest_string]],
  +
[[#NewExportItem|New_export_item]],
  +
[[#ParentList|Parent_list]],
  +
[[#PrefixOperator|Prefix_operator]],
  +
[[#Routine|Routine]],
  +
[[#RoutineBody|Routine_body]],
  +
[[#Type|Type]],
  +
[[#Unary|Unary]],
  +
[[#UnqualifiedCall|Unqualified_call]],
  +
[[#WhenPart|When_part]].
  +
  +
<HR><BR>
  +
  +
<div id="Comment">
  +
==Comment==
  +
</div>
  +
A comment is made of one or more line segments, each beginning with two consecutive
  +
dash characters <TT>--</TT> and extending to the end of the line:
  +
  +
[[Image:SyntaxDiagramOf_Comment.png|Comment]]
  +
  +
Inside the comment, the convention to denote Eiffel entities (i.e. variables,
  +
arguments or other features as well) is to enclose the corresponding name
  +
between ` and ' as follow:
  +
-- Here `my_variable' is supposed to be bla bla bla ...
  +
This convention allows some tools like [[Eiffeldoc]] or [[Short]] or emacs
  +
as well to use a different character font or color to emphasize the fact that
  +
<TT>my_variable</TT> refer to some existing entity of the Eiffel code.
  +
  +
Also note that an URL inside the comment is also made automatically clickable
  +
by [[Eiffeldoc]].
  +
This way, each time some class of our library needs a long explanation that does
  +
not reasonably fit in the Eiffel comment itself, we just add the URL into the
  +
comment.
  +
As an example, the following comment displayed by Eiffeldoc would
  +
bring you back here :
  +
-- See also http://smarteiffel.loria.fr/wiki/en/index.php/Syntax_diagrams#Comment
  +
  +
<div id="ClassDeclaration">
  +
  +
==Class declaration==
  +
</div>
  +
[[Image:SyntaxDiagramOf_Class_declaration.png|Class_declaration]]
  +
  +
'''Related items''':
  +
[[#Assertion|Assertion]],
  +
[[#Class_name|Class_name]],
  +
[[#Creation_clause|Creation_clause]],
  +
[[#Feature_clause|Feature_clause]],
  +
[[#Formal_generic_list|Formal_generic_list]],
  +
[[#Manifest_string|Manifest_string]],
  +
[[#Parent_list|Parent_list]].
  +
  +
<div id="ParentList">
  +
  +
==Parent list==
  +
</div>
  +
[[Image:SyntaxDiagramOf_Parent_list.png|Parent_list]]
  +
  +
<div id="NewExportItem">
  +
==New export item==
  +
</div>
  +
[[Image:SyntaxDiagramOf_New_export_item.png|New_export_item]]
  +
  +
<div id="CreationClause">
  +
==Creation clause==
  +
</div>
  +
[[Image:SyntaxDiagramOf_Creation_clause.png|Creation_clause]]
  +
  +
<div id="FeatureClause">
  +
==Feature clause==
  +
</div>
  +
[[Image:SyntaxDiagramOf_Feature_clause.png|Feature_clause]]
  +
  +
<div id="Clients">
  +
==Clients==
  +
</div>
  +
[[Image:SyntaxDiagramOf_Clients.png|Clients]]
  +
  +
<div id="FeatureDeclaration">
  +
==Feature declaration==
  +
</div>
  +
[[Image:SyntaxDiagramOf_Feature_declaration.png|Feature_declaration]]
  +
  +
<div id="Routine">
  +
==Routine==
  +
</div>
  +
[[Image:SyntaxDiagramOf_Routine.png|Routine]]
  +
  +
<div id="EntityDeclarationList">
  +
==Entity declaration list==
  +
</div>
  +
[[Image:SyntaxDiagramOf_Entity_declaration_list.png|Entity_declaration_list]]
  +
  +
<div id="Class_name">
  +
==Class name==
  +
</div>
  +
A class name must use '''only upper case letters''' plus the '_' underscore character.
  +
A class name must start with a letter, an upper case letter as all other letters used in
  +
that name.
  +
The usage is not to use two consecutive '_' underscore character.
  +
Some examples of valid class name:
  +
<TT>ARRAY</TT>,
  +
<TT>ANY</TT>,
  +
<TT>LINKED_LIST</TT>.
  +
  +
<div id="Type">
  +
  +
==Type==
  +
</div>
  +
[[Image:SyntaxDiagramOf_Type.png|Type]]
  +
  +
<div id="Binary">
  +
==Binary==
  +
</div>
  +
[[Image:SyntaxDiagramOf_Binary.png|Binary]]
  +
  +
  +
<div id="Instruction">
  +
==Instruction==
  +
</div>
  +
[[Image:SyntaxDiagramOf_Instruction.png|Instruction]]
  +
  +
  +
<div id="InfixOperator">
  +
==Infix operator==
  +
</div>
  +
[[Image:SyntaxDiagramOf_Infix_operator.png|Infix_operator]]
  +
  +
  +
<div id="PrefixOperator">
  +
==Prefix operator==
  +
</div>
  +
[[Image:SyntaxDiagramOf_Prefix_operator.png|Prefix_operator]]
  +
  +
  +
<div id="Unary">
  +
==Unary==
  +
</div>
  +
[[Image:SyntaxDiagramOf_Unary.png|Unary]]
  +
  +
<div id="Compound">
  +
==Compound==
  +
</div>
  +
[[Image:SyntaxDiagramOf_Compound.png|Compound]]
  +
  +
<div id="Assignment">
  +
==Assignment==
  +
</div>
  +
[[Image:SyntaxDiagramOf_Assignment.png|Assignment]]
  +
  +
<div id="WhenPart">
  +
==When part==
  +
</div>
  +
[[Image:SyntaxDiagramOf_When_part.png|When_part]]
  +
  +
<div id="ElsePart">
  +
==Else part==
  +
</div>
  +
[[Image:SyntaxDiagramOf_Else_part.png|Else_part]]
  +
  +
<div id="FormalGenericList">
  +
==Formal generic list==
  +
</div>
  +
[[Image:SyntaxDiagramOf_Formal_generic_list.png|Formal_generic_list]]
  +
  +
<div id="FeatureName">
  +
==Feature name==
  +
</div>
  +
[[Image:SyntaxDiagramOf_Feature_name.png|Feature_name]]
  +
  +
<div id="RoutineBody">
  +
==Routine body==
  +
</div>
  +
[[Image:SyntaxDiagramOf_Routine_body.png|Routine_body]]
  +
  +
<div id="Call">
  +
==Call==
  +
</div>
  +
[[Image:SyntaxDiagramOf_Call.png|Call]]
  +
  +
<div id="Loop">
  +
==Loop==
  +
</div>
  +
[[Image:SyntaxDiagramOf_Loop.png|Loop]]
  +
  +
<div id="Expression">
  +
==Expression==
  +
</div>
  +
[[Image:SyntaxDiagramOf_Expression.png|Expression]]
  +
  +
<div id="ManifestString">
  +
==Manifest string==
  +
</div>
  +
[[Image:SyntaxDiagramOf_Manifest_string.png|Manifest_string]]
  +
  +
<div id="UnqualifiedCall">
  +
==Unqualified call==
  +
</div>
  +
[[Image:SyntaxDiagramOf_Unqualified_call.png|Unqualified_call]]

Revision as of 10:08, 24 June 2005

Syntax diagrams for the whole Eiffel language.

All items in alphabetical order: Assignment, Binary, Call, Class_declaration, Class_name, Clients, Comment, Compound, Creation_clause, Else_part, Entity_declaration_list, Expression, Feature_clause, Feature_declaration, Feature_name, Formal_generic_list, Infix_operator, Instruction, Loop, Manifest_string, New_export_item, Parent_list, Prefix_operator, Routine, Routine_body, Type, Unary, Unqualified_call, When_part.



A comment is made of one or more line segments, each beginning with two consecutive dash characters -- and extending to the end of the line:

Comment

Inside the comment, the convention to denote Eiffel entities (i.e. variables, arguments or other features as well) is to enclose the corresponding name between ` and ' as follow:

-- Here `my_variable' is supposed to be bla bla bla ...

This convention allows some tools like Eiffeldoc or Short or emacs as well to use a different character font or color to emphasize the fact that my_variable refer to some existing entity of the Eiffel code.

Also note that an URL inside the comment is also made automatically clickable by Eiffeldoc. This way, each time some class of our library needs a long explanation that does not reasonably fit in the Eiffel comment itself, we just add the URL into the comment. As an example, the following comment displayed by Eiffeldoc would bring you back here :

-- See also http://smarteiffel.loria.fr/wiki/en/index.php/Syntax_diagrams#Comment

Class declaration

Class_declaration

Related items: Assertion, Class_name, Creation_clause, Feature_clause, Formal_generic_list, Manifest_string, Parent_list.

Parent list

Parent_list

New export item

New_export_item

Creation clause

Creation_clause

Feature clause

Feature_clause

Clients

Clients

Feature declaration

Feature_declaration

Routine

Routine

Entity declaration list

Entity_declaration_list

Class name

A class name must use only upper case letters plus the '_' underscore character. A class name must start with a letter, an upper case letter as all other letters used in that name. The usage is not to use two consecutive '_' underscore character. Some examples of valid class name: ARRAY, ANY, LINKED_LIST.

Type

Type

Binary

Binary


Instruction

Instruction


Infix operator

Infix_operator


Prefix operator

Prefix_operator


Unary

Unary

Compound

Compound

Assignment

Assignment

When part

When_part

Else part

Else_part

Formal generic list

Formal_generic_list

Feature name

Feature_name

Routine body

Routine_body

Call

Call

Loop

Loop

Expression

Expression

Manifest string

Manifest_string

Unqualified call

Unqualified_call