4 ms·
> I think you are conflating the grammar checking of a language with all the checks done in other compilation phases. The main ppoint is that for some language
by praptak 14y ago
> I think you are conflating the grammar checking of a language with all the checks done in other compilation phases.
The main ppoint is that for some languages those two kinds of checks can not be easily separated. The top answer to the linked question demonstrates that for C++. It occurs that in C++ typen<1>() can be either parsed as a template istantiation or not-parsed (i.e. producing a syntax error) as (typen < 1)>().
The syntactical correctness of this expression depends on the result of evaluation of a fine piece of template metaprogramming - there must be more than one grammar checking phase, each one dependent on the evaluation of the previous one. This gives a good hint on why C++ compile times are sometimes so huge.