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 (int (*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 exprhs (unsigned flags, int k, 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 int hie0 (ExprDesc *lval);
55 /* Parse comma operator. */
57 int evalexpr (unsigned flags, int (*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, exprhs is called to bring the value into the
61 * primary register and 1 is returned.
64 void expression1 (ExprDesc* lval);
65 /* Evaluate an expression on level 1 (no comma operator) and put it into
66 * the primary register
69 void expression (ExprDesc* lval);
70 /* Evaluate an expression and put it into the primary register */
72 void ConstExpr (ExprDesc* lval);
73 /* Get a constant value */
75 void ConstIntExpr (ExprDesc* Val);
76 /* Get a constant int value */
78 void intexpr (ExprDesc* lval);
79 /* Get an integer expression */
81 int hie10 (ExprDesc* lval);
82 /* Handle ++, --, !, unary - etc. */
84 int hie1 (ExprDesc* lval);
85 /* Parse first level of expression hierarchy. */
87 void DefineData (ExprDesc* lval);
88 /* Output a data definition for the given expression */
90 void Test (unsigned Label, int Invert);
91 /* Evaluate a boolean test expression and jump depending on the result of
92 * the test and on Invert.
95 void TestInParens (unsigned Label, int Invert);
96 /* Evaluate a boolean test expression in parenthesis and jump depending on
97 * the result of the test * and on Invert.