This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re : gcc analyze tools

thank you andi :)

However, have you any idea why gcc uses now hand written lexer and parsers ? 
what's wrong with lexer/ parser generated from flex/ bison ?
thank you very much


----- Message d'origine ----
De : Andi Hellmund <>
À : charfi asma <>
Cc :
Envoyé le : Lun 25 juillet 2011, 14h 40min 02s
Objet : Re: gcc analyze tools

Hey Asma,

yes, in older versions of gcc generator tools like flex/bison were used to parse 
the source code, but this was changed with newer versions. Now, GCC uses 
hand-written lexer and parsers (recursive descent parser). So for C, you need to 
look for gcc-x.y.z/gcc/c-parser.c.

Hope that helps,

----- Original Message -----
From: "charfi asma" <>
Sent: Monday, July 25, 2011 1:54:23 PM
Subject: gcc analyze tools


to  analyze the source code, I thought that gcc uses flex  and bison. but I red 
yesterday in a presentation done on 2008 that gcc  did not use those old tools.
I tried to verify and I find that for  c++ in the cp directory there is lex.c it 

means that gcc still use flex  bison to parse source code;
did someone has as better knowledges  about gcc analysis and can give me a 
better idea about which tools are  used by gcc to parse source code?

thank you very much.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]