[fpc-devel] Output flush on pipes

Michael Van Canneyt michael at freepascal.org
Sun May 14 22:52:43 CEST 2006



On Sun, 14 May 2006, Daniƫl Mantione wrote:

> 
> 
> Op Sun, 14 May 2006, schreef Michael Van Canneyt:
> 
> > 
> > 
> > On Sun, 14 May 2006, Florian Klaempfl wrote:
> > 
> > > The error numbers didn't change, they are keep unique.
> > > 
> > > I propose to do the following:
> > > - add an option -vm (machine readable output)
> > > Using this option the compiler outputs the messages csv like and flushes
> > > after each message:
> > > message type <tab> file <tab> line <tab> column <tab> error number <tab>
> > > complete error message <tab> message template (i.e. Type $1 expected, $2
> > > found <tab> parameter 1 <tab> parameter 2 <tab> parameter n
> > > 
> > > To avoid trouble with future versions, a header line will describe each
> > > column.
> > 
> > Why not output XML, then ? 
> > 
> > <fpc-output>
> > <error file='name.pas' line='xyz' col='nm' code='ABC' params="X,Y,Z">Message text</error>
> > <warning file='name.pas' line='xyz' col='nm' code='ABC' params="X,Y,Z">warning text</warning>
> > <info file='name.pas' line='xyz' col='nm' code='ABC' params="X,Y,Z">info text</info>
> > </fpc-output>
> > 
> > It is extensible. Many parsing tools... Just a thought.
> 
> XML requires an advanced parser and existing parsers will also produce 
> complicated parser trees. (All that is needed is a sequence of key/value 
> pairs, XML is a recursive tree). I'm not against it, but I have a light
> preference for something simple.

For me, your or Florian's proposal is perfectly OK. I was just suggesting.
After all, it's just 1 or 2 routines that need to be changed...
I'm not really in favour of CSV style, but all this is a matter of taste...
In the end, it doesn't really matter, as long as it is structured...

Michael.


More information about the fpc-devel mailing list