[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using %printer
From: |
Akim Demaille |
Subject: |
Re: Using %printer |
Date: |
Fri, 15 Sep 2006 13:05:05 +0200 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
>>> "Frans" == Frans Englich <address@hidden> writes:
> 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.
I was not proposing to reopen the file for edition, but to get the
full context and use caret-error-reporting:
% icc foo.c
foo.c(1): error: more than one storage class may not be specified
register volatile const auto static extern int foo = 0;
^
foo.c(1): error: more than one storage class may not be specified
register volatile const auto static extern int foo = 0;
^
foo.c(1): error: more than one storage class may not be specified
register volatile const auto static extern int foo = 0;
^
foo.c(1): error: a global-scope declaration may not have this storage class
register volatile const auto static extern int foo = 0;
^
compilation aborted for foo.c (code 2)
- Using %printer, Frans Englich, 2006/09/11
- Re: Using %printer, Akim Demaille, 2006/09/14
- Re: Using %printer, Frans Englich, 2006/09/14
- Re: Using %printer, Akim Demaille, 2006/09/14
- Re: Using %printer, Frans Englich, 2006/09/15
- Re: Using %printer, Akim Demaille, 2006/09/15
- Re: Using %printer, Frans Englich, 2006/09/15
- Re: Using %printer,
Akim Demaille <=
- Re: Using %printer, Tim Van Holder, 2006/09/15
- Re: Using %printer, Akim Demaille, 2006/09/15