/* expression.h */
#ifndef EXPRESSION_H
#define EXPRESSION_H

/** higher precedence operators are acted on first, **/
/** though the flow control enters at the lowest precedence, **/
/** the lower precedence is acted on upon return from **/
/** higher precedence ascent. **/

	/* - 3 element evaluation array of ints -
	** eval[0] = Symbol table address, else 0 for constant
	** eval[1] = type indirect object to fetch, else 0 for
        	     static object (const.)
	** eval[2] = type pointer or array, else 0
	*/

/** expression(Y..N) loop if comma operator is allowed in expr **/
/** comma is lowest precedence operator in C and acted on last **/
/** comma, precedence level 15 **/
/** vers_2 expression for comma'd expression **/
/** caller- expr2(NO); or expr2(YES); for comma'd expr. **/
/** identifiers with sa_ or _sa are codegen functions, i.e., **/
/** syntactic actions to output backend code, generically **/
/** patterned after stack machine operations. **/
void expression(int comma);

/** assignments, precedence level 14 **/
/** {=} of {=,+=,-=,/=,*=,%=,<<=,>>=,&=,^=,|=} **/
int heir1(int eval[]);

/*** install levels 13 (?:), 12 (||), 11 (&&) here ***/
/** (?:), precedence level 13 **/
/** conditional operator, ternary, takes three expressions **/
/** cond_expr ::= expr ? expr : expr **/
int heir1a(int eval[]);

/** (||), precedence level 12 - either, both, true yields true. **/
int heir1b(int eval[]);

/** (&&), precedence level 11 - both true yields true **/
int heir1c(int eval[]);

/** bitwise inclusive OR, precedence level 10 **/
int heir2(int eval[]);

/** bitwise exclusive OR, precedence level 9 **/
int heir3(int eval[]);

/** bitwise AND, precedence level 8 **/
int heir4(int eval[]);

/** equality operator; (T..F) equivalence, precedence level 7.1 **/
/** equality operator; not_equal, precedence level 7.2 **/
int heir5(int eval[]);

/** relational operator; less than, <, precedence level 6.1 **/
/** relational operator; less than or eq, <=, precedence level 6.2 **/
/** relational operator; greater than or eq, >=, precedence level 6.3 **/
/** relational operator; greater than, >, precedence level 6.4 **/
int heir6(int eval[]);

/*	>>>>>> start of cc6 <<<<<<	*/
/** shift operator; left shift, <<, precedence level 5.1 **/
/** shift operator; right shift, >>, precedence level 5.2 **/
/* Arithmetic left shift the secondary register by the */
/*  count in the primary. (results in primary) */
int heir7(int eval[]);

/** binary arithmetic operator; add, +, precedence level 4.1 **/
/** binary arithmetic operator; subtract, -, precedence level 4.2 **/
int heir8(int eval[]);

/** binary arithmetic operator; multiply, *, precedence level 3.1 **/
/** binary arithmetic operator; divide, /, precedence level 3.2 **/
/** binary arithmetic operator; modulo, %, precedence level 3.3 **/
int heir9(int eval[]);

/** unary operator; increment, ++, precedence level 2.7 **/
/** unary operator; decrement, --, precedence level 2.8 **/
/** unary operator; minus, -, precedence level 2.3 **/
/** unary operator; indirection, *, precedence level 2.5 **/
/** unary operator; address of, &, precedence level 2.6 **/
/** unary operator; logical not, !, precedence level 2.1 **/
/** unary operator; bitwise one's complement, ~, precedence level 2.2 **/
/** TBI, ~, sizeof, cast (typename)expr **/
int heir10(int eval[]);

/** primary operator; function parenthesis, (), precedence level 1.1 **/
/** primary op; subscripting square brakets, [], precedence level 1.2 **/
/** primary operator; member access, ->, precedence level 1.3 **/
/** primary operator; member access, ., precedence level 1.4 **/
int heir11(int eval[]);

/** primary is called when an expression is expected, it is **/
/** the highest precedence level, it is acted on first. **/
int primary(int eval[]);

#endif /* EXPRESSION_H */