Generating an AST and an intermediate representation from the HLSL Preprocessor tokens we receive from gld::hlsl::preprocessor::lex( ... ).
The parser will also have to get into semantic analysis and other goodies that are not taught in the regular Computer Science Theory courses. Oh boy. At least parsing the tokens should be mildly straightforward... Recursive Descent parser seems to be the most robust, performant, and maintainable way to do it, as far as the initial research goes.
Consider maybe using Spirit? Albeit the learning curve is gigantic...
Figuring out the actual contents of the AST's declarations is a bit hard. Need to spend some more time hammering out what structure belongs in a parse tree...
Generating an AST and an intermediate representation from the HLSL Preprocessor tokens we receive from
gld::hlsl::preprocessor::lex( ... )
.The parser will also have to get into semantic analysis and other goodies that are not taught in the regular Computer Science Theory courses. Oh boy. At least parsing the tokens should be mildly straightforward... Recursive Descent parser seems to be the most robust, performant, and maintainable way to do it, as far as the initial research goes.
Consider maybe using Spirit? Albeit the learning curve is gigantic...