This path is intended it add -dump-tokens-bg option to clang.
While trying to extract information from code, we find it difficult to use -dump-tokens option with complex compiling systems, e.g. this one. This new option is supposed not to interfere with other parts of the build, and output token dumps to stdout.
A dump may look like this. Other formats are possible if one cares to propose.
file token dump begins hello.c raw_identifier 'int' raw_identifier 'foo' l_paren '(' r_paren ')' l_brace '{' raw_identifier 'int' raw_identifier 'i' equal '=' numeric_constant '0' semi ';' raw_identifier 'int' raw_identifier 'j' equal '=' raw_identifier 'i' minus '-' numeric_constant '4' semi ';' raw_identifier 'int' raw_identifier 'k' equal '=' numeric_constant '999' slash '/' raw_identifier 'j' semi ';' raw_identifier 'return' numeric_constant '1' semi ';' r_brace '}' raw_identifier 'int' raw_identifier 'main' l_paren '(' r_paren ')' l_brace '{' raw_identifier 'foo' l_paren '(' r_paren ')' semi ';' raw_identifier 'return' numeric_constant '0' semi ';' r_brace '}' eof '' file token dump ends hello.c