Language understood by interpreter |
-
Object creation: create a new object.
Request:
[ create {<Type>} <Variable>[.<Creation_procedure_name> [<Arguments>]] ]
Response:
[ status:pass done: ]
Examples:
create {LINKED_LIST [ANY]} my_list.make create {STRING} my_string.make (0) create {DEFAULT_CREATABLE} a_var
-
Feature invocation: invoke a feature and optionally store its result in a variable.
Request:
[ <Variable>.<Feature_name> [<Arguments>] <Variable> := <Variable>.<Feature_name> [<Arguments>] ]
Response:
[ status:pass done: ]
Examples:
my_char := my_string.item (3) my_bool := my_list.valid_cursor (my_cursor)
-
Evaluating the precondition of a creation procedure. Note that the result type is always BOOLEAN.
Request:
[ <Variable> := precondition {<Type>} <Creation_procedure_name> [<Arguments>] ]
Response:
[ status:pass done: ]
Examples:
my_bool := precondition {LINKED_LIST [STRING]}.make
-
Evaluating the precondition of a feature. Note that the result type is always BOOLEAN
Request:
[ <Variable> := precondition <Variable>.<Feature_name> [<Arguments>] ]
Response:
[ status:pass done: ]
Error response:
[ error:<reason> ]
Examples:
my_bool := precondition my_string.item (Void)
-
Assignment: assignment of an expression to a variable
Request:
[ <Variable> := [Constant|Variable] ]
Response:
[ status:pass done: ]
Examples:
x := 10
- Variable names: like Eiffel variable names.
- Type names: like Eiffel type names.
-
Constants
<Constant> := [ <Void_constant> | <Integer_8_constant> | <Integer_16_constant> | <Integer_constant> | <Integer_64_constant> | <Natural_8_constant> | <Natural_16_constant> | <Natural_32_constant> | <Natural_64_constant> | <Real_constant> | <Double_constant> | <Boolean_constant> | <Character_constant> ] Void_constant := Void Integer_8_constant := {INTEGER_8} <Value> Integer_16_constant := {INTEGER_16} <Value> Integer_constant := [{INTEGER}] <Value> Integer_64_constant := {INTEGER_64} <Value> Natural_8_constant := {NATURAL_8} <Value> Natural_16_constant := {NATURAL_16} <Value> Natural_32_constant := {NATURAL_32} <Value> Natural_64_constant := {NATURAL_64} <Value> Double_constant := [{DOUBLE}] <Value>.<Value> Real_constant := {REAL} <Value>.<Value> Boolean_constant := [{BOOLEAN}][True|False] Character_constant := [{CHARACTER}]'c'
-
Arguments
[ <Arguments> := [Constant|Variable]+ ]
If an exception was triggered the response looks like this:
[ status:fail status:precondition TODO... ]
-
Meta-Command: list variables
Request:
[ list: ]
Response: a list of all variable names that have previously be assigned to or created. For example:
[ my_string: <Type> my_list: <Type> done: ]
-
Meta-Command: show variable
Request:
[ show: <Variable> ]
Response:
-
If the variable is of a basic expanded type then its value is printed in the constant notation. Example:
[ {INTEGER_8} 0 done: ]
-
If the variable is of a reference type then its address is printed. Example:
[ 0x00123212 done: ]
-
If the variable is of a basic expanded type then its value is printed in the constant notation. Example:
-
Quitting: quitting the interpreter
Request:
[ :quit ]
Response:
[ done: ]