Here is an example. In a book that describes, say, Pascal, there will be productions that look like this: -> := -> -> -> | -> a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z -> 0|1|2|3|4|5|6|7|8|9 -> | -> | (These would only be a few of the hundreds, or perhaps thousands, of productions which define the CFG for Pascal.) However, the grammar would generate lots of "incorrect" programs. Using just the above productions, we could generate the string "height0 := maxheight" from the grammar symbol . If Pascal were truly context-free, then "height0 := maxheight" could be freely placed in any position of the program were a statement is allowed, for example, we could write: program incorrect(input,output); begin height0 := maxheight end. But you know that's wrong. Why? Because that string is only a valid statement if the variables height0 and maxheight have been declared, and the statement is in the scopes of both of those declarations, and if their types are consistent. For example, the following is a Pascal program: program correct(input,output); var height0,maxheight:real; begin height0 := maxheight end. It turns out that the requirement that identifiers be declared makes giving a context-free grammar for Pascal impossible. The so-called "context-free grammar for Pascal" thus generates all Pascal programs, but also generates many incorrect "wannabe" programs that are in error because of violation of the declaration rules. We call this the "underlying CFG for Pascal." There is, of course, a "true" grammar for Pascal, but it's not a context-free grammar. For more on this subject, there is a book by Pagan that goes very deeply into advanced grammars. In our course, we will deal with only one other class of grammars, which we call "general grammars," or "unrestricted grammars," or "phase-structure grammars." (These are all different words for the same thing.) This is the most powerful class of grammars, meaning that if any language can be generated by any grammar whatsoever, it can be generated by one of those.