# ©2004 Brooks/Cole FIGURES FOR CHAPTER 2 SCANNING Click the mouse to move to the next page. Use the ESC key to exit this chapter. This chapter in the book.

## Presentation on theme: "©2004 Brooks/Cole FIGURES FOR CHAPTER 2 SCANNING Click the mouse to move to the next page. Use the ESC key to exit this chapter. This chapter in the book."— Presentation transcript:

©2004 Brooks/Cole FIGURES FOR CHAPTER 2 SCANNING Click the mouse to move to the next page. Use the ESC key to exit this chapter. This chapter in the book includes: 2.1The Scanning Process 2.2Regular Expressions 2.3Finite Automata 2.4From Regular Expressions to DFAs 2.5Implementation of a TINY Scanner 2.6Use of Lex to Generate a Scanner Automatically Exercises Programming Exercises Notes and References

©2004 Brooks/Cole 2.1 The Scanning Process, page 34 (1)

©2004 Brooks/Cole 2.1 The Scanning Process, page 34 (2)

©2004 Brooks/Cole Figure 2.1: A finite automaton for identifiers

©2004 Brooks/Cole 2.3 Finite Automata, page 49 (1)

©2004 Brooks/Cole 2.3 Finite Automata, page 49 (2)

©2004 Brooks/Cole Figure 2.2: A finite automaton for identifiers with error transitions

©2004 Brooks/Cole 2.3 Finite Automata, Example 2.6

©2004 Brooks/Cole 2.3 Finite Automata, Example 2.7

©2004 Brooks/Cole 2.3 Finite Automata, Example 2.8 (1)

©2004 Brooks/Cole 2.3 Finite Automata, Example 2.8 (2)

©2004 Brooks/Cole 2.3 Finite Automata, Example 2.8 (3)

©2004 Brooks/Cole Figure 2.3: A finite automaton for floating-point numbers

©2004 Brooks/Cole 2.3 Finite Automata, Example 2.9

©2004 Brooks/Cole Figure 2.5: Finite automaton for an identifier with delimiter and return value

©2004 Brooks/Cole 2.3 Finite Automata, page 54

©2004 Brooks/Cole 2.3 Finite Automata, page 55 (1)

©2004 Brooks/Cole 2.3 Finite Automata, page 55 (2)

©2004 Brooks/Cole 2.3 Finite Automata, page 55 (3)

©2004 Brooks/Cole 2.3 Finite Automata, page 56 (1)

©2004 Brooks/Cole 2.3 Finite Automata, page 56 (2)

©2004 Brooks/Cole 2.3 Finite Automata, page 56 (3)

©2004 Brooks/Cole 2.3 Finite Automata, page 57 (1)

©2004 Brooks/Cole 2.3 Finite Automata, page 57 (2)

©2004 Brooks/Cole 2.3 Finite Automata, Example 2.10 (1)

©2004 Brooks/Cole 2.3 Finite Automata, Example 2.10 (2)

©2004 Brooks/Cole 2.3 Finite Automata, Example 2.11 (1)

©2004 Brooks/Cole 2.3 Finite Automata, Example 2.11 (2)

©2004 Brooks/Cole 2.3 Finite Automata, page 59

©2004 Brooks/Cole 2.4 From Regular Expressions to DFAs, page 64 (1)

©2004 Brooks/Cole 2.4 From Regular Expressions to DFAs, page 64 (2)

©2004 Brooks/Cole 2.4 From Regular Expressions to DFAs, page 65 (1)

©2004 Brooks/Cole 2.4 From Regular Expressions to DFAs, page 65 (2)

©2004 Brooks/Cole 2.4 From Regular Expressions to DFAs, page 65 (3)

©2004 Brooks/Cole 2.4 From Regular Expressions to DFAs, page 66 (1)

©2004 Brooks/Cole 2.4 From Regular Expressions to DFAs, page 66 (2)

©2004 Brooks/Cole 2.4 From Regular Expressions to DFAs, page 66 (3)

©2004 Brooks/Cole 2.4 From Regular Expressions to DFAs, Example 2.12 (1)

©2004 Brooks/Cole 2.4 From Regular Expressions to DFAs, Example 2.12 (2)

©2004 Brooks/Cole Figure 2.8: NFA for the regular expression ab|a using Thompson’s construction

©2004 Brooks/Cole 2.4 From Regular Expressions to DFAs, Example 2.13 (1)

©2004 Brooks/Cole 2.4 From Regular Expressions to DFAs, Example 2.13 (2)

©2004 Brooks/Cole 2.4 From Regular Expressions to DFAs, Example 2.14

©2004 Brooks/Cole Figure 2.9: NFA for the regular expression letter(letter|digit) * using Thompson’s construction

©2004 Brooks/Cole 2.4 From Regular Expressions to DFAs, Example 2.14

©2004 Brooks/Cole 2.4 From Regular Expressions to DFAs, Example 2.15

©2004 Brooks/Cole 2.4 From Regular Expressions to DFAs, Example 2.16 (1)

©2004 Brooks/Cole 2.4 From Regular Expressions to DFAs, Example 2.16 (2)

©2004 Brooks/Cole 2.4 From Regular Expressions to DFAs, Example 2.17 (1)

©2004 Brooks/Cole 2.4 From Regular Expressions to DFAs, Example 2.17 (2)

©2004 Brooks/Cole 2.4 From Regular Expressions to DFAs, page 73 (1)

©2004 Brooks/Cole 2.4 From Regular Expressions to DFAs, page 73 (2)

©2004 Brooks/Cole 2.4 From Regular Expressions to DFAs, Example 2.18

©2004 Brooks/Cole 2.4 From Regular Expressions to DFAs, Example 2.19 (1)

©2004 Brooks/Cole 2.4 From Regular Expressions to DFAs, Example 2.19 (2)

©2004 Brooks/Cole 2.5 Implementation of a TINY Scanner, page 76 (1)

©2004 Brooks/Cole 2.5 Implementation of a TINY Scanner, page 76 (2)

©2004 Brooks/Cole Figure 2.10: DFA of the TINY scanner

©2004 Brooks/Cole Chapter 2, Exercise 2.16 (a)

©2004 Brooks/Cole Chapter 2, Exercise 2.16 (b)

Download ppt "©2004 Brooks/Cole FIGURES FOR CHAPTER 2 SCANNING Click the mouse to move to the next page. Use the ESC key to exit this chapter. This chapter in the book."

Similar presentations