help-bison
[Top][All Lists]
Advanced

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

Re: Using %printer


From: Frans Englich
Subject: Re: Using %printer
Date: Fri, 15 Sep 2006 10:14:50 +0000
User-agent: KMail/1.9.4

On Friday 15 September 2006 08:43, Akim Demaille wrote:
> >>> "Frans" == Frans Englich <address@hidden> writes:
>  >
>  > I guess one would have to invent a different "print system" for
>  > that. Perhaps those "error printers" would return a heap allocated
>  > char string, which the caller(the bison generated parser) is
>  > responsible for de-allocating.
>
> That's very hairy...  Besides, I don't think that for error reporting
> pretty-printing the symbols is the right means to do it.  I think one
> should rather use accurate locations, re-open the guilty file, and
> print the guilty input.

Consider the case of identifiers(variable/funcion names, etc). Practically all 
programming languages has it, and it would surely be nice to be able to print 
the actual instances("myVariable"), instead of just "<identifier>" or 
similar.

Opening the source and printing it is surely a good idea and a very nice 
complement to regular reporting, but I still think that improving regular 
reporting is significant.


Cheers,

                Frans




reply via email to

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