[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Expressions are stored in an expressionS
structure. The structure is
defined in `expr.h'.
The macro expression
will create an expressionS
structure based
on the text found at the global variable input_line_pointer
.
A single expressionS
structure can represent a single operation.
Complex expressions are formed by creating expression symbols and
combining them in expressionS
structures. An expression symbol is
created by calling make_expr_symbol
. An expression symbol should
naturally never appear in a symbol table, and the implementation of
S_IS_LOCAL
(see section 2.1 Symbols) reflects that. The function
expr_symbol_where
returns non-zero if a symbol is an expression symbol,
and also returns the file and line for the expression which caused it to be
created.
The expressionS
structure has two symbol fields, a number field, an
operator field, and a field indicating whether the number is unsigned.
The operator field is of type operatorT
, and describes how to interpret
the other fields; see the definition in `expr.h' for the possibilities.
An operatorT
value of O_big
indicates either a floating point
number, stored in the global variable generic_floating_point_number
, or
an integer too large to store in an offsetT
type, stored in the global
array generic_bignum
. This rather inflexible approach makes it
impossible to use floating point numbers or large expressions in complex
expressions.