4 * Ullrich von Bassewitz, 21.06.1998
20 /*****************************************************************************/
22 /*****************************************************************************/
26 void PushAddr (ExprDesc* lval);
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 ConstSubExpr (void (*F) (ExprDesc*), ExprDesc* Expr);
34 /* Will evaluate an expression via the given function. If the result is not
35 * a constant, a diagnostic will be printed, and the value is replaced by
36 * a constant one to make sure there are no internal errors that result
37 * from this input error.
40 void CheckBoolExpr (ExprDesc* lval);
41 /* Check if the given expression is a boolean expression, output a diagnostic
45 void ExprLoad (unsigned flags, ExprDesc *lval);
46 /* Put the result of an expression into the primary register */
48 void Store (ExprDesc* lval, const type* StoreType);
49 /* Store the primary register into the location denoted by lval. If StoreType
50 * is given, use this type when storing instead of lval->Type. If StoreType
51 * is NULL, use lval->Type instead.
54 void hie0 (ExprDesc *lval);
55 /* Parse comma operator. */
57 int evalexpr (unsigned flags, void (*f) (ExprDesc*), ExprDesc* lval);
58 /* Will evaluate an expression via the given function. If the result is a
59 * constant, 0 is returned and the value is put in the lval struct. If the
60 * result is not constant, ExprLoad is called to bring the value into the
61 * primary register and 1 is returned.
64 void expr (void (*Func) (ExprDesc*), ExprDesc *Expr);
65 /* Expression parser; func is either hie0 or hie1. */
67 void expression1 (ExprDesc* lval);
68 /* Evaluate an expression on level 1 (no comma operator) and put it into
69 * the primary register
72 void expression0 (ExprDesc* lval);
73 /* Evaluate an expression via hie0 and put it into the primary register */
75 void ConstExpr (ExprDesc* lval);
76 /* Get a constant value */
78 void ConstIntExpr (ExprDesc* Val);
79 /* Get a constant int value */
81 void intexpr (ExprDesc* lval);
82 /* Get an integer expression */
84 void hie10 (ExprDesc* lval);
85 /* Handle ++, --, !, unary - etc. */
87 void hie1 (ExprDesc* lval);
88 /* Parse first level of expression hierarchy. */
90 void DefineData (ExprDesc* lval);
91 /* Output a data definition for the given expression */