Download presentation
Presentation is loading. Please wait.
Published byMalcolm Walters Modified over 9 years ago
1
Jianguo Lu 1 03-60-214: regular expression and automata
2
Jianguo Lu 2 Try RegexTester Running at course web site as an applet; –http://cs.uwindsor.ca/~jlu/214/regex_tester.htmhttp://cs.uwindsor.ca/~jlu/214/regex_tester.htm Write regular expressions and try the match(), find() methods; Try the string 3314 instead of 3.14
3
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.
4
Jianguo Lu 4 select “save target as”
5
Jianguo Lu 5 Construct and run a dfa from a text file
6
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
7
Jianguo Lu 7
8
8
9
9
10
10 Construct a dfa in GUI
11
Jianguo Lu 11
12
Jianguo Lu 12 JFLAP: RE NFA DFA m. DFA
13
Jianguo Lu 13
14
Jianguo Lu 14
15
Jianguo Lu 15
16
Jianguo Lu 16
17
Jianguo Lu 17
18
Jianguo Lu 18
19
Jianguo Lu 19
20
Jianguo Lu 20
21
Jianguo Lu 21
22
Jianguo Lu 22
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.