[Instructions] [Search] [Current] [News] [Syllabus] [Handouts] [Outlines] [Assignments]
Held Monday, September 14, 1998
Handouts
Notes
Q0 = { q0 }
// but there are some states we can reach from q0 at no cost
Q0 = epsilon-closure(Q0)
while there are states we haven't processed
pick one such state, Qn
for each symbol s
let tmp be a new set
for each q in Qn
add delta(q,s) to tmp
end for
tmp = epsilon-closure(tmp)
if tmp is not in the DFA then
let Qi be a new state
Qi = tmp
add Qi to the DFA
else
let Qi be the state equivalent to tmp
end if
add an edge from Qn to Qi in the automaton
end for
end while
for each Qi
if there is a q in Qi that is a final state then
Qi is a final state
end if
end for
lex.
flex
Jlex
lex is in /usr/bin/lex and flex
is in /usr/local/bin/flex.
Blade has installed Jlex in the course directory.
::= to separate the two parts of a rule.
Program ::= 'program'
identifier
'('
Identifier-List
')'
Declaration-List
Compound-Statement
'.'
Compound-Statement ::= 'begin'
Statement-List
'end'
Statement-List ::= Statement Statement-List ::= Statement ';' Statement-List
Statement ::= Assignment-Statement Statement ::= Compound-Statement ... Assignment-Statement ::= identifier '=' Expression ...
[Instructions] [Search] [Current] [News] [Syllabus] [Handouts] [Outlines] [Assignments]
Disclaimer Often, these pages were created "on the fly" with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.
Source text last modified Wed Sep 16 10:15:01 1998.
This page generated on Wed Sep 16 11:21:19 1998 by SiteWeaver.
Contact our webmaster at rebelsky@math.grin.edu