- Expert C++
- Vardan Grigoryan Shunguang Wu
- 78字
- 2025-04-04 13:09:41
Semantic analysis
If the previous expression was something like it b = a + 0; , the compiler would divide it into the tokens it, b, =, and others. We already see that it is something unknown, but for the compiler, it is fine at this point. This would lead to the compilation error unknown type name "it" in g++. Finding the meaning behind expressions is the task of semantic analysis (parsing).