This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Tags out of gcc
- From: Adrian May <adrian dot alexander dot may at gmail dot com>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: gcc at gcc dot gnu dot org
- Date: Sat, 4 Oct 2014 21:05:59 +0800
- Subject: Re: Tags out of gcc
- Authentication-results: sourceware.org; auth=none
- References: <CAD-UbzHxHOe3e+Gt87ODQOwXQ0OQ86UPgw2p9KmDc-6G8fCZWg at mail dot gmail dot com> <20141004101752 dot 7179133C9D at vlsi1 dot gnat dot com>
Well it seems to be able to report a lot of syntax errors even if
they're close together, so it must be getting back on its feet fairly
quickly. I don't know how that works. Maybe it just scoots along to
the next semicolon or maybe you explicitly have productions like "if
(syntax error) { ... }".
What I also don't know is what the parser outputs if there's an error.
Can it say "he tried to define bool foo() at line 123 but the body was
erroneous", or does it just stdout the error message and forget there
was ever an attempt to define foo?
On 4 October 2014 18:17, Richard Kenner <kenner@vlsi1.ultra.nyu.edu> wrote:
>> I reckon it's a bad idea to make source browsing info with a separate
>> program like cscope or etags. I reckon it's the compiler's job.
>
> One of the issues with soure browsing is that you want to be able to do
> it in the presence of syntax errors. That can make it harder for the
> compiler to do it since it's usually not doing a robust parse in the
> presense of errors.