What I'm doing?
I'm building a C code analyzer. to do some checks at the compile time. and if passed, compile it.
What do I want?
for my goal, I should lex and parse user source code. maybe in the future, I write a lexer and parser for this, but now I just want some tools to do this for me and just give me the final AST, so I can go through that and do my analysis. so: I want something like a library that gets some source code in c, parses it, and gets me an ast structure.
What I did?
I searched for some tools to do that. it seems clang has some facilities and libraries for this, but I couldn't find any helpful thing. Does anyone know some useful ways or things for this goal?
thank you for helping me!