I need to parse CMakeLists.txt files for a small code editor project I am working on. I am therefore searching for a parser/lexer for the CMake language but can't seem to find anything using Google. Has anyone written such a grammar in bison with the corresponding lexer in flex? Thanks!
1 Answers
4
votes
Yes, you can steal it from the CMake source itself.
Using lexer generated from that file could make you depend on internal CMake library called cmSys/kwSys. Here is how we at KDevelop solved this.