[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Visibility and error messages (in named refs).
From: |
Joel E. Denny |
Subject: |
Re: Visibility and error messages (in named refs). |
Date: |
Mon, 20 Jul 2009 09:25:26 -0400 (EDT) |
User-agent: |
Alpine 1.00 (DEB 882 2007-12-20) |
Hi Alex.
On Sat, 18 Jul 2009, Alex Rozenman wrote:
> I think we all agreed now that the "misleading reference" will be a warning.
Ok.
> Now, my biggest (and sole) concern is the following: would we like to give
> warnings in the following cases:
>
> stmt[result] : IF expr THEN stmt;
> { $result = create_if_stmt($expr, $stmt); }
>
> if_stmt : IF expr THEN stmt[then] ELSE stmt;
> { $$ = create_if_stmt($expr, $then, $stmt); }
>
> Currently, my intuitions says not to issue any warnings (compile smoothly)
> in the first case, and give a "misleading reference" warning in the second
> case. This probably because I started with not including LHS at all and my
> brain just refuses to change the view. I just afraid that this single issue
> will cause to multiple complains from users and we will be forced to change
> it anyway.
> Akim, could you please give you opinion ?
I feel this would be a subtle inconsistency for the LHS and thus would
make Bison's behavior more complex and confusing to the user. I don't see
a benefit. Of course, I'd be happy to hear Akim's opinion too.
> I think it's confusing and not helpful to the user if Bison makes it an
> > error only in
> > some subcases.
I'm not sure my wording was clear here. By "subcases", I meant subcases
of the misleading reference case. In your previous email, you wanted an
error for the subcase where a "possibly meant" variant involved a
bracketing change, and so I was arguing against that. Above, I think
you're now agreeing that all misleading reference subcases including this
one should be warnings.
> Sub cases are our implementation detail. I'm not sure users will be ever
> aware of a similarity between these situations. We are free to decide about
> the behavior in each specific case.
I'm not sure I understand this comment. Are you again suggesting that
some subcases of the misleading reference case should be errors? I think
this inconsistency would make the error subcases even more confusing than
if we made all subcases errors.
Again, I think Bison's behavior will be most intuitive if a reference is
never an error when it is valid and unambiguous. Instead, Bison just
warns that it's misleading.