4 * Ullrich von Bassewitz, 21.06.1998
20 /*****************************************************************************/
22 /*****************************************************************************/
26 void PushAddr (const ExprDesc* Expr);
27 /* If the expression contains an address that was somehow evaluated,
28 * push this address on the stack. This is a helper function for all
29 * sorts of implicit or explicit assignment functions where the lvalue
30 * must be saved if it's not constant, before evaluating the rhs.
33 void ExprLoad (unsigned flags, ExprDesc* Expr);
34 /* Put the result of an expression into the primary register */
36 void Store (ExprDesc* Expr, const type* StoreType);
37 /* Store the primary register into the location denoted by lval. If StoreType
38 * is given, use this type when storing instead of lval->Type. If StoreType
39 * is NULL, use lval->Type instead.
42 void hie0 (ExprDesc* Expr);
43 /* Parse comma operator. */
45 int evalexpr (unsigned flags, void (*Func) (ExprDesc*), ExprDesc* Expr);
46 /* Will evaluate an expression via the given function. If the result is a
47 * constant, 0 is returned and the value is put in the lval struct. If the
48 * result is not constant, ExprLoad is called to bring the value into the
49 * primary register and 1 is returned.
52 void Expression0 (ExprDesc* Expr);
53 /* Evaluate an expression via hie0 and put the result into the primary register */
55 void ConstExpr (void (*Func) (ExprDesc*), ExprDesc* Expr);
56 /* Will evaluate an expression via the given function. If the result is not
57 * a constant of some sort, a diagnostic will be printed, and the value is
58 * replaced by a constant one to make sure there are no internal errors that
59 * result from this input error.
62 void BoolExpr (void (*Func) (ExprDesc*), ExprDesc* Expr);
63 /* Will evaluate an expression via the given function. If the result is not
64 * something that may be evaluated in a boolean context, a diagnostic will be
65 * printed, and the value is replaced by a constant one to make sure there
66 * are no internal errors that result from this input error.
69 void ConstAbsIntExpr (void (*Func) (ExprDesc*), ExprDesc* Expr);
70 /* Will evaluate an expression via the given function. If the result is not
71 * a constant numeric integer value, a diagnostic will be printed, and the
72 * value is replaced by a constant one to make sure there are no internal
73 * errors that result from this input error.
76 void hie10 (ExprDesc* lval);
77 /* Handle ++, --, !, unary - etc. */
79 void hie1 (ExprDesc* lval);
80 /* Parse first level of expression hierarchy. */
82 void DefineData (ExprDesc* lval);
83 /* Output a data definition for the given expression */