[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: parser improvement suggestion

From: Jean-Marc Saffroy
Subject: Re: parser improvement suggestion
Date: Wed, 8 Jun 2011 09:52:30 +0200 (CEST)
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)


On Wed, 8 Jun 2011, asmwarrior wrote:

> I think a full preprocessor is not necessory, but a lexer is necessory, 
> I have try to rewrite the code::blocks' parser by using Quex lexer, this 
> will make your parser code clean and easy to learn.

Don't forget that one of the good features of Global is that it is able to 
extract useful information from source that is cluttered with #ifdef's.

> Mostly, I think you need to use the "recursive decent parser", so you create a
> lot of functions like:
> HandleClass();
> HandleNamespace();
> HandleWhile();

With the approach you suggest, is it still possible to parse things like 

#ifdef foo
class foo {
class bar {

> For this kind of bug:
> http://lists.gnu.org/archive/html/bug-global/2011-05/msg00000.html
> I think you can add some simple replacement rule to skip Some user defined
> words in the lexer/preprocessor stage.
> This is much like the ctags -I option.

That's a good point.

> Finally, I'm grad to see the gtags project and hope it will becomes 
> mature in the future.

Global felt quite mature to me the last 10 years I used it. :)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]