On Thu, Jun 11, 2015 at 7:18 AM, Sandro Magi <[email protected]> wrote:
> If the type is unclear at any given point while parsing, couldn't you > simply assign a type variable until parsing is complete? I do not believe so. First, the type of the entity appended to the parse stack is totally clear for every shift action. The types of the top K items on the parse stack and their replacement item is perfectly clear for every reduce action. The actions, in turn, are a pure function of the current parser state and the lookahead token (that is: in bottom-up parsers). So it's not that we don't know what the type is. It's that we can't express the relationship between that type and the (state, lookahead) pair. You can't get out of this with a type variable, because the parse stack cannot be instantiated with a non-concrete type. shap
_______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
