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