Encoding unit — one grounded idea

1 Semantic analysis transforms the parsed AST into a correct representation by performing name resolution, type checking, and validating program inputs, and in complex languages like C++, it can generate multiple instances of the AST through instantiation and enable meta-programming.
“it's responsible for things like name resolution type checking validating all of the input program simple languages often have very little to do here uh the grammar itself largely produces the correct AST uh for very simple languages but as you get to more complex languages you start to see more happening here to validate what are correct inputs eventually to kind of transform and even expand the AST to represent the meaning of the program because the original parsed AST won't have enough information in it you can get implicit operations added in with C plus plus you start to see really exciting things like instantiation where you kind of template stamp out copies of the AST for different type parameters you can have meta programming”
spoken · 475s · 2023-08-17 · en · CppNow · Modernizing Compiler Design for Carbon Toolchain - Chandler Carruth - CppNow 202…
id: 6b0ebd1d0ad55d80
concepts in this idea