[bitc-dev] Syntax update on e:T

Jonathan S. Shapiro shap at eros-os.org
Thu Jun 1 14:12:19 EDT 2006


Good news: the  e:T type-qualified expression is back. We found and
killed the source of the shift-reduce error on this. This is good,
because writing (the T e) everywhere was subjectively awful.

The interfering case was coming from the infix syntax for field
reference:

	expr.Id =>
	expr:type.Id =>
	expr:Id.Id.Id
               ^-shift reduce conflict

where that first Id.Id is a reference to a type name defined in another
interface.

Since this case is rarely useful, we resolved it by hacking the grammar
to say that the e:T syntax is legal everywhere *except* in combination
with the e.Id syntax. In that context (only) you now need to write one
of:

	(member e:T Id)
	(the T e).Id

shap



More information about the bitc-dev mailing list