Is there a parser / lexer somewhere (in bison / flex)?

I need to parse the CMakeLists.txt files for a small code editor project I'm working on. Therefore, I am looking for a parser / lexer for the CMake language, but cannot find anything using Google. Has anyone written such a grammar in a bison with the corresponding lexer in flex? Thank!

+4
source share
1 answer

Yes, you can steal it from the very source of CMake .

The use of lexer generated from this file may depend on the internal CMake library called cmSys / kwSys. Here's how we at KDevelop solved this.

+4
source

All Articles