Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] Error Parser Manager removes leading whitespace

It would actually be nice to eat continuations forwards rather than getting them one at a
time. We have a tool that pumps out dissertations like

Warning (TIE_WARN_UNUSED) foo.tie:27
    the dissertation starts
    here and goes on for
    several lines making the
    previous line alone not useful


So if an error parser could peek forwards and optionally eat continuations that would make
it more robust. Probably not easy the way it is stuctured as a stream though.

Ciao,

PMac
  

> -----Original Message-----
> From: cdt-dev-bounces@xxxxxxxxxxx 
> [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Volanakis, Elias
> Sent: Wednesday, November 23, 2005 6:02 AM
> To: CDT General developers list.
> Subject: [cdt-dev] Error Parser Manager removes leading whitespace
> 
> Hi everybody,
> 
> I'm wondering if this is a "feature" is the 
> ErrorParserManager or an actual bug: 
> 
> Currently, I'm trying to write an error parser for my 
> toolchain. My compiler uses whitespace at the beginning of 
> the line to indicate that the line is a continuation of the 
> current warning/error message, e.g.
> 
> Warning 105: Some random warning that is continued
>    onto the next line of the compiler output.
> 
> I would like to use this information in my error parser, but 
> unfortunately, the ErrorParserManager will trim leading and 
> trailing whitespace:
> 
> ErrorParserManager:
> private void checkLine(boolean flush) {
> 		String buffer = currentLine.toString();
> 		int i = 0;
> 		while ((i = buffer.indexOf('\n')) != -1) {
> 			String line = buffer.substring(0, 
> i).trim(); // get rid of any trailing \r
> //this will remove leading whitespace too :( ---------^^^^^^
> 			processLine(line);
> [...]
> 
> So my questions are:
> 1. Should I file a bugzilla for this?
> 2. If it is not a bug, is there a way to get the "raw" line?
> 3. If it is a bug, should the line rather trim the trailing 
> whitespace only? I could provide a patch that does that. 
> 
> Kind regards,
> Elias.	
> 
> ---
> Elias Volanakis
> Innoopract Informationssysteme GmbH
> ### address: Stephanienstraße 20, 76133 Karlsruhe, Germany
> ###   phone: +49 721 966-2360
> ###     fax: +49 721 966-2362
> ###     web: www.innoopract.de
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev
> 



Back to the top