1 / 22

03-60-214: regular expression and automata

03-60-214: regular expression and automata. Winter 2010. Try RegexTester. Running at course web site as an applet; http://cs.uwindsor.ca/~jlu/214/regex_tester.htm Write regular expressions and try the match(), find() methods;. Try FSM simulator. Run the simulator

Download Presentation

03-60-214: regular expression and 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. 03-60-214: regular expression and automata Winter 2010 Jianguo Lu

  2. Try RegexTester • Running at course web site as an applet; • http://cs.uwindsor.ca/~jlu/214/regex_tester.htm • Write regular expressions and try the match(), find() methods; Jianguo Lu

  3. Try FSM simulator • Run the simulator • The java code can be downloaded at • http://cs.uwindsor.ca/~jlu/214/fsm.zip • Unzip the zip file • >unzip fsm.zip • Go to the directory fsmsim_bgm/classes • Run the java program: >java FSM • Define the FSM in the text file; • The text files are in fsm-sources • Generate the transition diagram; • Machine/new machine • Run the simulator and observe how strings are recognized. Jianguo Lu

  4. select “save target as” Jianguo Lu

  5. Construct and run a dfa from a text file Jianguo Lu

  6. NFA //Type (a|b)*abb Fig 3. 23 in dragon book a b // input alphabet q0 q1 q2 q3 // Machine states q0 // the initial state q3 // final state q0 b q0 // transitions: input state, input symbol, output state q3 b q0 q1 a q1 q2 a q1 q3 a q1 q0 a q1 q1 b q2 q2 b q3 end Jianguo Lu

  7. Jianguo Lu

  8. Jianguo Lu

  9. Jianguo Lu

  10. Construct a dfa in GUI Jianguo Lu

  11. Jianguo Lu

  12. JFLAP: RENFADFAm. DFA Jianguo Lu

  13. Jianguo Lu

  14. Jianguo Lu

  15. Jianguo Lu

  16. Jianguo Lu

  17. Jianguo Lu

  18. Jianguo Lu

  19. Jianguo Lu

  20. Jianguo Lu

  21. Jianguo Lu

  22. Jianguo Lu

More Related