GCC output parsing
jeremie.dl at gmail.com
Thu Mar 25 13:16:38 UTC 2010
Thanks for the answers!
I agree that in the current state, it works pretty well (nice regexps by the
way...), so in the current state of what gcc outputs and what kdevelop and
others are expecting, I think it is not that easy to define added value.
The point would be likely to provide more information, so that IDEs would
be able to do more with it, as Syron mentionned with cross references.
Probably it could also be possible to derive a (kind of) semantic, to say "ok,
these errors and warning have the same origine" and could be displayed
And obviously the markup for the structure should be the same in
every languages so that the parsing would be totally language independent.
I totally agree that ideally, this should be a standard.
A very high percentage of programmer are using gcc and compilers in general
through IDEs, so it does not make sense that at the middle of the compiling
flow, softwares can still not avoid to deal with natural language to
Indeed, I was thinking of asking the same questions to the eclipse community.
If gcc one day end up with an option for xml output, and both eclipse and
kdevelop use it, this could be a good start for such a standard. But the eclipse
community is so huge that I don't really know where to post. Anyway, define
and implement such a standard is probably not possible at my level.
Ideally, if gcc could provide all the diagnostic information you could imagine,
what would you be interested to read and display for the user ?
Then, how can this be enabled in gcc, that would be the coding project itself...
On Wednesday 24 March 2010 21:32:41 Andreas Pakulat wrote:
> 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
> 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.
More information about the KDevelop-devel