Changes

Jump to navigation Jump to search
185 bytes added ,  16:16, April 17, 2012
→‎Level 3: regular grammar: refine the limitation, common use
Line 179: Line 179:  
Further examples in [[Regular grammar]] show how numbers can be defined via a regular grammar, and also show how a hyphenated word could be defined.
 
Further examples in [[Regular grammar]] show how numbers can be defined via a regular grammar, and also show how a hyphenated word could be defined.
   −
One of the most obvious limitations of a regular grammar is that it can't cope with matching brackets, so that it is impossible to write a regular grammar to describe a simple expression such as '''2 * (3+4)'''
+
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 a simple expression such as '''2 * (3+4)''' where that grammar is expected to allow brackets nested to any depth.
 +
 
 +
Regular grammars or equivalent are widely used during [[compilation]] in the lexical analysis of programming languages.
    
===Level 2===
 
===Level 2===
SkipCaptcha
265

edits

Navigation menu