20100907

20100907 - = CS 441 Fall 2010 - JWJ Pre-class notes - do...

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

View Full Document Right Arrow Icon
============================ CS 441 Fall 2010 -- JWJ Pre-class notes - do not distribute Tuesday, September 7, 2010 ============================ Scope: ------ Regular expressions and Nondeterministic Finite State Automata. Thompson's construction. [continuation] Regular Gramars. AWK (gawk) - a text processing program that uses RegEx. Programming Assignment 1. Outline: ------- Concepts and definitions: Thompson [and also McNathon and Yamada] (see Section 3.7.4) Instance: a regular expression regex Question: what is a NFA M that accepts L(regex)? (i.e., L(regex) = M(regex)) Algorithm: (stage 1) Construct the syntax tree for regex. The construction of the syntax tree is recursive and follows the following steps: - if a regular expression is b or epsilon then its syntax tree is a node labeled with b or epsilon, respectively. - if the regular expression is r op s ( op is a binary operation such as concatenation or bar) or r* and the expression is equivalent to (r) op (s) or (r)*, respectively, then the syntax trees are:
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

20100907 - = CS 441 Fall 2010 - JWJ Pre-class notes - do...

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

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