Re: Using %printer

2006-09-15 Thread Akim Demaille
>>> "Tim" == Tim Van Holder <[EMAIL PROTECTED]> writes: > I don't see how _bison_ can do this with any accuracy Well, with enough insight on locations, I don't see why it couldn't. Of course it requires changes. One possibility is the one you mention, which is quite tractable for small files, b

Re: Using %printer

2006-09-15 Thread Tim Van Holder
Akim Demaille wrote: "Frans" == Frans Englich <[EMAIL PROTECTED]> writes: > > 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 re

Re: Using %printer

2006-09-15 Thread Akim Demaille
>>> "Frans" == Frans Englich <[EMAIL PROTECTED]> writes: > On Friday 15 September 2006 08:43, Akim Demaille wrote: >> >>> "Frans" == Frans Englich <[EMAIL PROTECTED]> writes: >> > >> > I guess one would have to invent a different "print system" for >> > that. Perhaps those "error printers" wo

Re: Using %printer

2006-09-15 Thread Frans Englich
On Friday 15 September 2006 08:43, Akim Demaille wrote: > >>> "Frans" == Frans Englich <[EMAIL PROTECTED]> 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

Re: Using %printer

2006-09-15 Thread Akim Demaille
>>> "Frans" == Frans Englich <[EMAIL PROTECTED]> 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'

Re: Using %printer

2006-09-15 Thread Frans Englich
On Thursday 14 September 2006 12:34, Akim Demaille wrote: > >>> "Frans" == Frans Englich <[EMAIL PROTECTED]> writes: > > > > I'm sure that's practical, but it surely would be cool to be able > > to craft better messages! > > I agree, but there is a real problem: the interface here is outputting

Re: Using %printer

2006-09-14 Thread Akim Demaille
>>> "Frans" == Frans Englich <[EMAIL PROTECTED]> writes: > I'm sure that's practical, but it surely would be cool to be able > to craft better messages! I agree, but there is a real problem: the interface here is outputting on a stream, while yyerror expects a string. Besides, levels of verbos

Re: Using %printer

2006-09-14 Thread Frans Englich
On Thursday 14 September 2006 09:09, Akim Demaille wrote: > >>> "Frans" == Frans Englich <[EMAIL PROTECTED]> writes: > > > > What exactly does it do, it allows one to at runtime customize the > > message Bison uses for a token(and perhaps even terminal?)? For > > example, that instead of that B

Re: Using %printer

2006-09-14 Thread Akim Demaille
>>> "Frans" == Frans Englich <[EMAIL PROTECTED]> writes: > What exactly does it do, it allows one to at runtime customize the > message Bison uses for a token(and perhaps even terminal?)? For > example, that instead of that Bison says "Unexpected literal>" one can make it say "Unexpected '2.3'

Using %printer

2006-09-11 Thread Frans Englich
The Bison manual for 2.3 use %printer but doesn't describe it. How does on use %printer? Will it change much in 2.4? What exactly does it do, it allows one to at runtime customize the message Bison uses for a token(and perhaps even terminal?)? For example, that instead of that Bison says "Une