Some of the languages which we have shown not to be regular are actually context-free.
The language is given by the following grammar
Also the language of palindromes
We also note that
(Extensions of) context free grammars are used in computer linguistics to describe real languages. As an example consider
the dog which catches the cat which bites barks
An important example for context-free languages is the syntax of programming languages. We have already mentioned the syntax of JAVA which uses a formalism slightly different from the one introduced here. Another example is the toy language used in the compilers course (G52CMP), see Mini-Triangle Concrete and Abstract Syntax
However, note that not all syntactic aspects of programming languages are captured by the context free grammar, i.e. the fact that a variable has to be declared before used and the type correctness of expressions are not captured.