Здравствуйте, Horotapo, Вы писали:
H>Приветствую всех заглянувших сюда, и задаю им собственно 1 вопрос:
H>Где взять и какой посоветуете лексический анализатор для С++???
H>Цель — лексический анализ файлов.
H>Желательна или dll — ка или код.
two different, but functionally identical C++ lexers were implemented.
...
The first of these C++ lexers is implemented with the help of the well known Re2C tool, which generates C code from given regular expressions. The lexers generated with Re2C are known to be very fast, because they are not table driven but directly code the token building logic (very similar to hand coded lexers).
The second of these C++ lexers is built around a table driven lexer, where the DFA tables (discrete finite automaton tables) are generated from regular expressions with the help of a Spirit-based lexer generating framework named Slex. The Slex is fed during runtime with the token definitions (regular expressions) and generates the resulting DFA table. This table is used to combine the input characters into corresponding lexemes (tokens). The generated DFA table can be saved to disk to avoid the generation process at program startup.
boost::Spirit::Lex. Не требует линковки к проекту, всё в заголовочных файлах. Требует достаточно длительного времени компиляции, достаточно современного компилятора, достаточного желания разбираться в портянках ошибок, которые он любит выдавать.