* expression.h (OP_LABELED): New operator, for Chill

labeled structre tuples.
	* ch-exp.y (tuple_element, named_record_element, tuple_elements):
	New non-terminals, to handle labeled structure tuples.
	(tuple):  Re-define using tuple_elements.
	* eval.c (evaluate_labeled_field_init):  New function, to handle
	initialization of structure fields, possibly using OP_LABELED.
	(evaluate_subexp):  Use it.
	* expprint.c (print_subexp case):  For OP_ARRAY, use Chill syntax
	for Chill.  Handled OP_LABELED.
	* parse.c (length_of_subexp, prefixify_subexp):  Handle OP_LABELED.

	* eval.c (evaluate_subexp):  Handle Chill Powerset tuples.
	* valarith.c (value_bit_index):  Just treat bitstring as represented
	by an array of bytes.  Alignment is handled by compiler.
This commit is contained in:
Per Bothner
1995-01-20 23:45:21 +00:00
parent f34c87666e
commit dcda44a07a
6 changed files with 399 additions and 172 deletions

View File

@ -510,6 +510,7 @@ length_of_subexp (expr, endpos)
args = 1;
break;
case OP_LABELED:
case STRUCTOP_STRUCT:
case STRUCTOP_PTR:
args = 1;
@ -653,6 +654,7 @@ prefixify_subexp (inexpr, outexpr, inend, outbeg)
case STRUCTOP_STRUCT:
case STRUCTOP_PTR:
case OP_LABELED:
args = 1;
/* fall through */
case OP_M2_STRING: