void fill_tokens_by_number;
instance (id) parser TomFile f using LexTom lexer;
redeclare LexTom lex;
public mutable TomFile file;
Extension current_ext;
Meta current_meta;
current_ext, obviously).
CustomMethod current_method;
Compound current_compound;
boolean skips;
TRUE, any semantics are skipped. Only useful inside a
method body.
id init TomFile f lexer LexTom l;
void parse;
tom_file, which catches unexpected raises and report
the current line and all that.
Type typeNamed tom.String name;
void
addSuper Meta meta
shift boolean instance_only;
meta has been added to the supers of the
current meta. Iff instance_only, the current meta inherits the
indicated instance, instead of this being `normal' inheritance.
void
startExtension Extension ext
interface boolean is_interface;
void startSupers;
void finishSupers;
void finishMethodDecl CustomMethod m;
void startMethodBody CustomMethod m;
void finishMethodBody CustomMethod m;
TypeTuple startTypeTuple;
void
add Type t
toTypeTuple TypeTuple tuple;
Type finishTypeTuple TypeTuple tuple;
_builtin_.Any
monop int op_token
with tom.All shs
postp: boolean postfix = NO;
_builtin_.Any binop int op_token with (tom.All, tom.All) (lhs, rhs);
_builtin_.Any triop int op_token with (tom.All, tom.All, tom.All) (lhs, mhs, rhs);
_builtin_.Any break tom.All argument;
_builtin_.Any continue tom.All argument;
void startMetaVars;
void finishMetaVars;
int
addQualifier int q
to int collected;
token to the already collected
qualifiers.
int qualifier int token;
token.
void finishFile;
void startFile;
void willStartExtension;
implementation or interface token has been
read. This is used to synchronize documentation, i.e. to avoid that
documentation of the first method ends up as class documentation.
void
addConst tom.String name
value Expression e;
void metaVar (int, Type, tom.String) (qualifiers, type, name);
name, with the indicated qualifiers and type.
The default implementation passes this to the current_ext.
Argument argumentSingle (tom.String, Type) (name, type);
Expression stringConstant tom.String s;
Expression lastLocalVar LocalVariable variable;
variable as the one declared last. Default implementation does
nothing.
LocalVariable (lv) localVariable (Type, tom.String, Expression) (t, n, e);
current_compound.
Expression
selectorWithNameParts tom.MutableArray name_parts
types (Type, tom.MutableArray) (return_type, arg_types);
selector (void foo).
Default implementation does nothing.
_builtin_.Any startDo;
Expression
do tom.All do_loop
while Expression condition
body Expression body;
_builtin_.Any startWhile Expression condition;
Expression while tom.All while_loop body Expression body;
_builtin_.Any startFor (Expression, Expression, Expression) (i, c, m);
Expression for tom.All for_loop body Expression body;
void initBind;
_builtin_.Any startBind tom.MutableArray condition_tuples;
Expression bind tom.All binder body Expression body;
_builtin_.Any startCatch Expression what;
Expression catch tom.All catcher body Expression body;
_builtin_.Any startUnwind Expression what;
Expression
unwind tom.All unwinder
body Expression body;
void startMethods;
void finishMethods;
void topExpression Expression top_expression;
top_expression has been parsed, and can be
added to the current compound.
void startPostcondition;
void
postcondition Expression e
relative int relative
ofMethod CustomMethod m;
e. Default implementation passes
e with addPostcondition to m. relative is 0 for no
qualification, -1 for narrowing, or 1 for widening.
void startPrecondition;
void
precondition Expression e
relative int relative
ofMethod CustomMethod m;
e. Default implementation passes
e with addPrecondition to m. relative is 0 for no
qualification, -1 for narrowing, or 1 for widening.
void startCompound;
Expression finishCompound;
Expression attributeNotFound tom.String name;
attributeNamed for a name which did not
resolve. The default implementation simply returns the error_expr,
without issuing an error.
Expression attributeNamed tom.String name;
name in the current scope.
Expression (e) special;
Expression (e) other_expr0;
void imp_int;
tom.MutableArray (s) expr_sequence;
void one_super;
Expression (e) start_term (tom.String) (n);
Type (t) type;
Expression (e) other_term;
void super_list;
Argument (a) tuple_arg (Type) (t);
Expression (e) while_loop;
Expression (e) expr (int) (prio);
Expression (e) expr0;
Expression (e) rest_of_local_var (Type, tom.String) (type, name);
void meta_vars;
LocalVariable (v) local_var (Type, tom.String) (type, name);
Expression (mi) method_invocation;
ArgumentTuple (tup) ret_tuple (Type) (t);
void method;
Expression (e) term;
Expression (e) ss_top_expr;
void typed_meta_var (int, Type) (qualifiers, type);
ArgumentTuple (tup) ret_tuple_tuple (Type) (t);
tom.String (ext_name) extension;
void precondition (CustomMethod) (m);
Expression (e) top_expr;
Expression (e) start_atom (tom.String) (n);
void tom_file;
void postcondition (CustomMethod) (m);
Expression (e) other_atom;
Expression (f) rest_of_expr (int, Expression) (prio, e);
(tom.String, tom.String) (unit_name, meta_name) meta_name;
Expression (e) selector_ref;
Expression (e) string;
Expression (e) do_loop;
Argument (a) argument (Type) (t);
tom.All (v) ret_tuple_elt (Type) (t);
Argument (a) method_arg;
Type (t) tuple_type;
int (q) qualifier;
Expression (e) start_expr0 (tom.String) (n);
void methods;
Expression (e) atom;
Expression (e) tuple;
Expression (e) start_variable_or_meth_inv (tom.String) (n);
Expression (e) variable_or_meth_inv;
Type (t) arg_type;
Expression (e) sc_top_expr;
Expression (e) for_loop;
Expression (e) start_expr (tom.String, int) (n, prio);
Expression (e) if_else;
int (q) qualifiers;
Expression (e) compound;
Expression (e) other_expr (int) (prio);
Expression (e) expr_or_compound;
Meta (t) meta_type;
Expression (rcv) receiver_with_type (Type) (meta);
tom.String (np) method_name_part;
tom.String (np) bare_method_name_part;