1 / 11

Finite Automata

Finite Automata. COP 3402 System Software Spring 2008. A Sample Automata. 1 is the start state 4 is the final state abc : recognized abccabc : recognized ac : not recognized. a. b. c. a. 1. 2. 3. 4. c. Identifiers and Keywords. A-Za-z. 1. 2. A-Za-z 0-9.

Télécharger la présentation

Finite Automata

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Finite Automata COP 3402 System Software Spring 2008

  2. A Sample Automata • 1 is the start state • 4 is the final state • abc : recognized • abccabc : recognized • ac : not recognized a b c a 1 2 3 4 c

  3. Identifiers and Keywords A-Za-z 1 2 A-Za-z 0-9

  4. Identifiers and Keywords 2 • Allows character ‘-’, e.g. Next_Line • Can not begin with ‘-’ • Can not have consecutive ‘-’ A-Za-z - 1 2 3 A-Za-z 0-9 A-Z 0-9

  5. Integers • Can begin with 0, e.g. 000025 0-9 1 2 0-9

  6. Integers 2 • Can not begin with 0 • Except integer 0, followed by space 0-9 1 2 0 space 3 4 0-9

  7. . 0-9 1 2 4 Float Point Number • Can begin with “0” , e.g. 001.35 • Can end with “.”, e.g. 12. • Can end with “0”, e.g. 3.1400 0-9 0-9

  8. All-In-One Automata A-Za-z . 1 2 3 0-9 4 ;,+-*() 5 : = 6 7 0-9 A-Za-z 0-9

  9. All-In-One Automata A-Za-z . 1 2 3 0-9 4 ;,+-*() 5 : = 6 7 0-9 A-Za-z 0-9

  10. Reserved Words n u l . l 0 33 34 35 1 b e g . i 36 37 38 39 n 21 e n d 40 41 22 i f 42 23

  11. Special Symbols + 4 - 5 * 0 6 / 7 = 9 ( 15

More Related