Effectivement, d'après http://en.wikipedia.org/wiki/C%2B%2B :
It is relatively difficult to write a good C++ parser with classic parsing algorithms such as LALR(1).[5] This is partly because the C++ grammar is not LALR. Because of this, there are very few tools for analyzing or performing non-trivial transformations (e.g., refactoring) of existing code. One way to handle this difficulty is to choose a different syntax, such as Significantly Prettier and Easier C++ Syntax, which is LALR(1) parsable. More powerful parsers, such as GLR parsers, can be substantially simpler (though slower).
Mais je crois que la parseur est assez flexible, savoir s'il l'est assez je ne sais pas.
Mais il faut noter que ce parseur prend directement une grammaire écrite en BNF, et non une suite de règles à la lex/yacc.
« Il n’y a pas de choix démocratiques contre les Traités européens » - Jean-Claude Junker
[^] # Re: Parser du C++
Posté par Ontologia (site web personnel) . En réponse à la dépêche CodeWorker 4.4. Évalué à 5.
It is relatively difficult to write a good C++ parser with classic parsing algorithms such as LALR(1).[5] This is partly because the C++ grammar is not LALR. Because of this, there are very few tools for analyzing or performing non-trivial transformations (e.g., refactoring) of existing code. One way to handle this difficulty is to choose a different syntax, such as Significantly Prettier and Easier C++ Syntax, which is LALR(1) parsable. More powerful parsers, such as GLR parsers, can be substantially simpler (though slower).
Mais je crois que la parseur est assez flexible, savoir s'il l'est assez je ne sais pas.
Mais il faut noter que ce parseur prend directement une grammaire écrite en BNF, et non une suite de règles à la lex/yacc.
« Il n’y a pas de choix démocratiques contre les Traités européens » - Jean-Claude Junker