Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » parsing compiler error messages
parsing compiler error messages [message #46136] Mon, 21 October 2002 16:02 Go to next message
Eclipse UserFriend
Originally posted by: pickens.metaware.com

We're using a different compiler than gcc to do our builds under CDT and
the error messages have a different format. Therefore, I need to be able
to override the error parsing. I noticed that the "ErrorParserManager"
is buried in an internal package, and isn't accessible from an extension
point. Is there a plan to make the error parsing more configurable in
the future?

(I noticed that ErrorParserManager maintains individual IErrorParser
class names from the preference store, but this interface has two
problems: it is an internal interface, and it apparently assumes that
each error message is just one line long.)

- David
Re: parsing compiler error messages [message #46165 is a reply to message #46136] Mon, 21 October 2002 20:30 Go to previous messageGo to next message
David Inglis is currently offline David InglisFriend
Messages: 45
Registered: July 2009
Member
I will soon be posting a patch which will basically make ErrorParserManager
and IErrorParser not internal with changes to the manager so that error parsing
is performed inline with the output stream writing.

David Pickens wrote:
> We're using a different compiler than gcc to do our builds under CDT and
> the error messages have a different format. Therefore, I need to be able
> to override the error parsing. I noticed that the "ErrorParserManager"
> is buried in an internal package, and isn't accessible from an extension
> point. Is there a plan to make the error parsing more configurable in
> the future?
>
> (I noticed that ErrorParserManager maintains individual IErrorParser
> class names from the preference store, but this interface has two
> problems: it is an internal interface, and it apparently assumes that
> each error message is just one line long.)

You can get the previous line from ErrorParserManager.getPreviousLine()

Do you require more capabilities from the ErrorParserMananger?
Re: parsing compiler error messages [message #46314 is a reply to message #46165] Tue, 22 October 2002 16:09 Go to previous messageGo to next message
David Pickens is currently offline David PickensFriend
Messages: 2
Registered: July 2009
Junior Member
Dave,
Our compiler's error messages can extend for multiple lines after the
source/line marker. It would be nice to capture the entire message for the
Tasks entry. This would require that the error parser be able to consume
multiple lines.
-David

"Dave Inglis" <dinglis@qnx.com> wrote in message
news:3DB463D9.7000208@qnx.com...
> I will soon be posting a patch which will basically make
ErrorParserManager
> and IErrorParser not internal with changes to the manager so that error
parsing
> is performed inline with the output stream writing.
>
> David Pickens wrote:
> > We're using a different compiler than gcc to do our builds under CDT and
> > the error messages have a different format. Therefore, I need to be able
> > to override the error parsing. I noticed that the "ErrorParserManager"
> > is buried in an internal package, and isn't accessible from an extension
> > point. Is there a plan to make the error parsing more configurable in
> > the future?
> >
> > (I noticed that ErrorParserManager maintains individual IErrorParser
> > class names from the preference store, but this interface has two
> > problems: it is an internal interface, and it apparently assumes that
> > each error message is just one line long.)
>
> You can get the previous line from ErrorParserManager.getPreviousLine()
>
> Do you require more capabilities from the ErrorParserMananger?
>
Re: parsing compiler error messages [message #46435 is a reply to message #46314] Tue, 22 October 2002 19:15 Go to previous messageGo to next message
David Inglis is currently offline David InglisFriend
Messages: 45
Registered: July 2009
Member
Could your error parser not consume the lines of the message and then add the marker
when it had received all lines?

David Pickens wrote:
> Dave,
> Our compiler's error messages can extend for multiple lines after the
> source/line marker. It would be nice to capture the entire message for the
> Tasks entry. This would require that the error parser be able to consume
> multiple lines.
> -David
>
> "Dave Inglis" <dinglis@qnx.com> wrote in message
> news:3DB463D9.7000208@qnx.com...
>
>>I will soon be posting a patch which will basically make
>
> ErrorParserManager
>
>>and IErrorParser not internal with changes to the manager so that error
>
> parsing
>
>>is performed inline with the output stream writing.
>>
>>David Pickens wrote:
>>
>>>We're using a different compiler than gcc to do our builds under CDT and
>>>the error messages have a different format. Therefore, I need to be able
>>>to override the error parsing. I noticed that the "ErrorParserManager"
>>>is buried in an internal package, and isn't accessible from an extension
>>>point. Is there a plan to make the error parsing more configurable in
>>>the future?
>>>
>>>(I noticed that ErrorParserManager maintains individual IErrorParser
>>>class names from the preference store, but this interface has two
>>>problems: it is an internal interface, and it apparently assumes that
>>>each error message is just one line long.)
>>
>>You can get the previous line from ErrorParserManager.getPreviousLine()
>>
>>Do you require more capabilities from the ErrorParserMananger?
>>
>
>
>
Re: parsing compiler error messages [message #46713 is a reply to message #46435] Wed, 23 October 2002 15:25 Go to previous messageGo to next message
David Pickens is currently offline David PickensFriend
Messages: 2
Registered: July 2009
Junior Member
Dave,
Yes, I could have "processLine(String line)" track that it is actually in a
multi-line error message and to delay creating the marker until the entire
message is seen.

But it seems like it would be more in the spirit of Eclipse to make error
parsing an extension point with a well-defined interface (e.g.,
IErrorParserManager). Provide a default abstract class that defines
"generateMarker(IResource, line,...)" and "parseOutput(String)" .
parseOutput would create the <name/IFile> map of all files of the workspace
and then call "parse(String)". The default
would read lines and call the abstract method "processLine()" (which is a
protected abstract class that is defined in the abstract class only -- not
the interface). Then ErrorParserManager would be the default concrete
implementation.

This will provide the flexibility for a new plug-in to completely override
"parse(String)" altogether. (Or am I misunderstanding how extension points
work?)

-David


"Dave Inglis" <dinglis@qnx.com> wrote in message
news:3DB5A3DD.4060400@qnx.com...
> Could your error parser not consume the lines of the message and then add
the marker
> when it had received all lines?
>
> David Pickens wrote:
> > Dave,
> > Our compiler's error messages can extend for multiple lines after the
> > source/line marker. It would be nice to capture the entire message for
the
> > Tasks entry. This would require that the error parser be able to consume
> > multiple lines.
> > -David
> >
> > "Dave Inglis" <dinglis@qnx.com> wrote in message
> > news:3DB463D9.7000208@qnx.com...
> >
> >>I will soon be posting a patch which will basically make
> >
> > ErrorParserManager
> >
> >>and IErrorParser not internal with changes to the manager so that error
> >
> > parsing
> >
> >>is performed inline with the output stream writing.
> >>
> >>David Pickens wrote:
> >>
> >>>We're using a different compiler than gcc to do our builds under CDT
and
> >>>the error messages have a different format. Therefore, I need to be
able
> >>>to override the error parsing. I noticed that the "ErrorParserManager"
> >>>is buried in an internal package, and isn't accessible from an
extension
> >>>point. Is there a plan to make the error parsing more configurable in
> >>>the future?
> >>>
> >>>(I noticed that ErrorParserManager maintains individual IErrorParser
> >>>class names from the preference store, but this interface has two
> >>>problems: it is an internal interface, and it apparently assumes that
> >>>each error message is just one line long.)
> >>
> >>You can get the previous line from ErrorParserManager.getPreviousLine()
> >>
> >>Do you require more capabilities from the ErrorParserMananger?
> >>
> >
> >
> >
>
Re: parsing compiler error messages [message #47386 is a reply to message #46713] Thu, 24 October 2002 20:02 Go to previous messageGo to next message
David Inglis is currently offline David InglisFriend
Messages: 45
Registered: July 2009
Member
David,
I guess I should have mentioned at the beginning of all this, but the entire
CBuilder will be going through a major change in the near future, at which time
we will most likely provide a means of adding\removing error parsers on a per-project
basis through an extension point, the interface used for this will most likely be
IErrorParser. I have no exact time frame for when this will all take place, but it
should be very soon.

David Pickens wrote:
> Dave,
> Yes, I could have "processLine(String line)" track that it is actually in a
> multi-line error message and to delay creating the marker until the entire
> message is seen.
>
> But it seems like it would be more in the spirit of Eclipse to make error
> parsing an extension point with a well-defined interface (e.g.,
> IErrorParserManager). Provide a default abstract class that defines
> "generateMarker(IResource, line,...)" and "parseOutput(String)" .
> parseOutput would create the <name/IFile> map of all files of the workspace
> and then call "parse(String)". The default
> would read lines and call the abstract method "processLine()" (which is a
> protected abstract class that is defined in the abstract class only -- not
> the interface). Then ErrorParserManager would be the default concrete
> implementation.
>
> This will provide the flexibility for a new plug-in to completely override
> "parse(String)" altogether. (Or am I misunderstanding how extension points
> work?)
>
> -David
>
>
> "Dave Inglis" <dinglis@qnx.com> wrote in message
> news:3DB5A3DD.4060400@qnx.com...
>
>>Could your error parser not consume the lines of the message and then add
>
> the marker
>
>>when it had received all lines?
>>
>>David Pickens wrote:
>>
>>>Dave,
>>>Our compiler's error messages can extend for multiple lines after the
>>>source/line marker. It would be nice to capture the entire message for
>>
> the
>
>>>Tasks entry. This would require that the error parser be able to consume
>>>multiple lines.
>>>-David
>>>
>>>"Dave Inglis" <dinglis@qnx.com> wrote in message
>>>news:3DB463D9.7000208@qnx.com...
>>>
>>>
>>>>I will soon be posting a patch which will basically make
>>>
>>>ErrorParserManager
>>>
>>>
>>>>and IErrorParser not internal with changes to the manager so that error
>>>
>>>parsing
>>>
>>>
>>>>is performed inline with the output stream writing.
>>>>
>>>>David Pickens wrote:
>>>>
>>>>
>>>>>We're using a different compiler than gcc to do our builds under CDT
>>>>
> and
>
>>>>>the error messages have a different format. Therefore, I need to be
>>>>
> able
>
>>>>>to override the error parsing. I noticed that the "ErrorParserManager"
>>>>>is buried in an internal package, and isn't accessible from an
>>>>
> extension
>
>>>>>point. Is there a plan to make the error parsing more configurable in
>>>>>the future?
>>>>>
>>>>>(I noticed that ErrorParserManager maintains individual IErrorParser
>>>>>class names from the preference store, but this interface has two
>>>>>problems: it is an internal interface, and it apparently assumes that
>>>>>each error message is just one line long.)
>>>>
>>>>You can get the previous line from ErrorParserManager.getPreviousLine()
>>>>
>>>>Do you require more capabilities from the ErrorParserMananger?
>>>>
>>>
>>>
>>>
>
>
Re: parsing compiler error messages [message #47576 is a reply to message #47386] Fri, 25 October 2002 21:46 Go to previous message
Ed Burnette is currently offline Ed BurnetteFriend
Messages: 279
Registered: July 2009
Senior Member
That'd be nice although something that didn't require plugin programming,
such as a regular expression in the preferences that recognized the error
that I could edit would be nice too.

"Dave Inglis" <dinglis@qnx.com> wrote in message
news:3DB851EA.9010205@qnx.com...
> David,
> I guess I should have mentioned at the beginning of all this, but the
entire
> CBuilder will be going through a major change in the near future, at which
time
> we will most likely provide a means of adding\removing error parsers on a
per-project
> basis through an extension point, the interface used for this will most
likely be
> IErrorParser. I have no exact time frame for when this will all take
place, but it
> should be very soon.
>
Previous Topic:"Outline": parsing problems with wxWindows EVENT_TABLE's
Next Topic:Eclipse & CORBA
Goto Forum:
  


Current Time: Thu Dec 26 15:31:52 GMT 2024

Powered by FUDForum. Page generated in 0.03025 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top