Your post doesn&#x27;t really agree with what I was taught.<p>&gt; the ambiguity rests in not knowing what is the lexical category of foo in &quot;foo * bar&quot;.<p>Right, so there are 2 possible parse trees. Being able to disambiguate them with more information doesn&#x27;t mean it&#x27;s not context-free. Given just a CFG, you were still able to determine that you have a syntactically valid C program.<p>&gt; A language whose semantics you have to understand to understand its syntax is outside of the entire formal language realm inside which we formally recognize a &quot;context-free&quot; category.<p>A formal language is just the set of strings that belong to it. That&#x27;s it. An absurd example might be &quot;the set of strings corresponding to valid C programs that do not terminate&quot;. To recognize such a language, you would not only have to understand the semantics of C, you would even need to solve the halting problem, but that doesn&#x27;t make it &quot;outside of the entire formal language realm&quot;.