On 5/29/2007 10:05 AM, Duncan Murdoch wrote:
We're using a GNU Bison 2.3 parser, with verbose error messages.
However, we only see messages with a single "expected" token. For
example, if a user forgets to give a function name in a function call
and types "(1,1)" they'll get the error
syntax error, unexpected ',', expecting ')'
when in fact there are lots of legal tokens at that spot: any
arithmetic operator would be fine, such as "(1+1)", "(1-1)", etc.
Sorry about the noise. I see what's happening now. One of the rules we
have is
expr : '(' expr_or_assign ')'
and the first "1" is matching the expr_or_assign rule, so ')' really is
the only possibility at that point.
Duncan Murdoch
_______________________________________________
[email protected] http://lists.gnu.org/mailman/listinfo/help-bison