On 07/25/2011 11:10 AM, Andi Hellmund wrote:
Hey Asma,
However, have you any idea why gcc uses now hand
written lexer and parsers ?
what's wrong with lexer/ parser generated from
flex/ bison ?
This is just a wild guess from my side because I was not involved in this change:
I think there is generally nothing wrong with flex/bison but you would possibly switch to hand-written code to get better performance and to have better control on the code of the lexer/parser (though not depending on externals tools whose generated code might change). By using hand-written code you could then specifically tune some parts of your code.
But maybe, you'll also get an answer from someone being involved in that change ;-)
Best regards,
Andi
Another guess: it's really tough to parse C++ with tools like flex and
bison, and you don't always get exactly what you need. There's just too
much magic in the language.
--jeff