bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 10-exercise-parse-param.patch


From: Paul Eggert
Subject: Re: 10-exercise-parse-param.patch
Date: Fri, 25 Oct 2002 18:55:28 -0700 (PDT)

I'm following up to:
<http://mail.gnu.org/pipermail/bison-patches/2002-October/001247.html>.

> From: Akim Demaille <address@hidden>
> Date: 21 Oct 2002 09:57:52 +0200

> Let's start with the yyerror problem: what should we pass to it?  I
> would say all the %parse-param, but what about the %lex-param?

Sure: yyerror needs to know everything that it can.

> And what if there are doubles?

You mean, double-precision floating point?  I don't see why they
should be handled differently from other types.  But I suspect that I
am misunderstanding you.

> Often I use yyerror from my scanners for lexical errors, do we want
> to keep this possible?

Yes.

> Another possibility would be to cease the `yyerror' approach, and have
> something like:
> 
> %error {
>   location_print (@$);
>   fprintf (stderr, "%s", yy_error_message);
>   exit (1);
> }

Something like that would be reasonable, but I don't fully understand
the issues.  I suppose that the generated file would define yyerror if
you used %error, and would remain compatible with POSIX otherwise
(i.e. you'd need to define your own yyerror).

Hmm, how would %error interact with YYERROR?

Also, would %error replace the need for YYERROR_VERBOSE?, or would
that be done by some other means?

> Something similar to %printer and %destructor.

Sorry, I don't know how these work.  (They're not documented yet.)

> But of course, we have to keep POSIX compatibility, plus backward
> compatibility under some form.

Yes, we need to be compatible not only with POSIX, but also with
previous versions of Bison.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]