One of the limitations of a regular grammar is that it can't cope with nested matching brackets, so that it is impossible to write a regular grammar to describe an expression such as '''2 * (3+4)''' where that grammar is expected to allow brackets nested to any depth. A context-free grammar is needed for this, as described in the next section. | One of the limitations of a regular grammar is that it can't cope with nested matching brackets, so that it is impossible to write a regular grammar to describe an expression such as '''2 * (3+4)''' where that grammar is expected to allow brackets nested to any depth. A context-free grammar is needed for this, as described in the next section. |