Regular_Expressions

Regular_Expressions - R e g ula rExp re s s io ns...

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon
Re g ula r Expre s s io ns  
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Regular Expressions Regular expressions  describe regular languages   Example:                  describes the language * ) ( c b a + { } { } ,... , , , , , * , bca abc aa bc a bc a λ =
Background image of page 2
Recursive Definition α λ , , ( 29 1 1 2 1 2 1 * r r r r r r + Are regular expressions Primitive regular expressions: 2 r 1 r Given regular expressions       and 
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Examples ( 29 ) ( * + + c c b a A regular expression: ( 29 + + b a Not a regular expression:
Background image of page 4
Languages of Regular Expressions                   :   language of regular expression Example   ( 29 r L r ( 29 { } ,... , , , , , * ) ( bca abc aa bc a c b a L λ = +
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Definition For primitive regular expressions: ( 29 ( 29 { } ( 29 { } a a L L L = = = λ
Background image of page 6
Definition (continued) For regular expressions       and    1 r 2 r ( 29 ( 29 ( 29 2 1 2 1 r L r L r r L = + ( 29 ( 29 ( 29 2 1 2 1 r L r L r r L = ( 29 ( 29 ( 29 * * 1 1 r L r L = ( 29 ( 29 ( 29 1 1 r L r L =
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Example Regular expression:   ( 29 * a b a + ( 29 ( 29 * a b a L + ( 29 ( 29 ( 29 * a L b a L + = ( 29 ( 29 * a L b a L + = ( 29 ( 29 ( 29 ( 29 ( 29 * a L b L a L = { } { } ( 29 { } ( 29 * a b a = { } { } ,... , , , , aaa aa a b a λ = { } ,... , , ,..., , , baa ba b aaa aa a =
Background image of page 8
Example Regular expression  ( 29 ( 29 bb a b a r + + = * ( 29 { } ,... , , , , , bbb ba abb aa bb a r L =
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Example Regular expression ( 29 ( 29 b bb aa r * * = ( 29 } 0 , : { 2 2 = m n b b a r L m n
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/02/2011 for the course AR 107 taught by Professor Gracegraham during the Fall '11 term at Montgomery College.

Page1 / 35

Regular_Expressions - R e g ula rExp re s s io ns...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online