public void Go(string content) { lineTokens = new RequestLineTokens(content); headerTokens = new RequestHeaderTokens(content); for (int i = 0; i < content.Length; i++) { switch (State) { case ParseState.LineTokens: ParseLine(content[i],ref i); break; case ParseState.Headers: ParseHeader(content[i], ref i); break; case ParseState.Message: break; default: break; } } }
public void Go(string content) { lineTokens = new RequestLineTokens(content); headerTokens = new RequestHeaderTokens(content); for (int i = 0; i < content.Length; i++) { switch (State) { case ParseState.LineTokens: ParseLine(content[i],ref i); break; case ParseState.Headers: ParseHeader(content[i], ref i); break; case ParseState.Message: break; default: break; } /* var result = lineTokens.InputToken(content[i], i); switch (result) { case DFAResult.Continue: continue; case DFAResult.Quit: InputLexToken(lex, lex.OutputToken); break; case DFAResult.ElseQuit: InputLexToken(lex, lex.OutputToken); i--; break; case DFAResult.End: InputLexToken(lex, lex.OutputToken); break; default: break; } */ } }