GCC output parsing
Andreas Pakulat
apaku at gmx.de
Wed Mar 24 20:32:41 UTC 2010
On 24.03.10 20:26:11, Jérémie Dubois-Lacoste wrote:
> Likely, I will submit a proposal for the google summer of code
> this next days. My proposal should not concern Kdevelop
> but the GNU compiler GCC. I am interested in implementing an option
> to allow XML output instead of natural language to print any kind
> of warning\errors.
> There is an existing thread that reports a bug in gcc and speaks
> about that:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19165
>
> The main idea of printing
> XML output would be to make the parsing by an IDE easier.
> One advantage of using a machine readable format like XML
> would be also to allow gcc to output more information.
> As mentioned in the thread, this could be much more interesting
> if driven together with some requirement from IDE developers.
>
> So, before asking which kind of information could be usefull
> for an IDE, and how it should be structured, the main question is:
> Does any of you think it could be of any interest from
> the IDE point of view (that is, the user using gcc through an IDE...)?
For me the main questions are:
a) How can this be enabled in gcc?
b) How does it cope with translations, i.e. do we get a structure that
allows to extract file/line info while still getting translated
messages?
The latter is the biggest problem for KDevelop, which is why we run the
buildtool with LC_MESSAGES=C so the output is always english. The
parsing itself with regex'es are not overly complicated or problematic
and work quite well.
So if we can solve b) with the xml output and we can enable it in a
non-intrusive way (for a), then yes that would be quite nice.
Andreas
--
Courage is your greatest present need.
More information about the KDevelop-devel
mailing list