Algorithm page 126 of text alg.3.3
Algorithm page 126 of text alg.3.3
getNextToken() {
t.error = true; // t is a token that will be found
S = epsilon_closure({start});
while(true) {
if (S is empty} break;
if (S contains a final state) {
t.eror=false;
//fill in t.line and other attributes.}
if (end_of_file) break;
c= getchar():
T=move(S,c); S=epsilon_closure(T);}
reset_inputbuffer(t.line,t.lastcol+1);
return t}