Syntax diagrams
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.
Comment
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:
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 follows:
-- 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 refers 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
Related items: Assertion, Class_name, Creation_clause, Feature_clause, Formal_generic_list, Manifest_string, Parent_list.
Parent list
New export item
Creation clause
Feature clause
Clients
Feature declaration
Routine
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, nor to end by an underscore character (by convention we keep simple names with a trailing underscore character, like O_ as a formal parameter type of a generic type). Some examples of valid class names: ARRAY, ANY, LINKED_LIST.
Type
Binary
Instruction
Infix operator
Prefix operator