%start MainMap::Startup %class LoginRequest %map MainMap %% Startup { AuthRequest AuthRequestStarted { } } AuthRequestStarted { BlankLine AuthRequestFinished { } } AuthRequestFinished { CommandReply CommandReplyStarted { } } CommandReplyStarted { ReplyText GotReplyText { } } GotReplyText { BlankLine Startup { setRequestFinished(); callOrErrback(); } } Default { BlankLine nil { setRequestFinished(); errbackDeferred("Protocol failure"); } AuthRequest nil { setRequestFinished(); errbackDeferred("Protocol failure"); } CommandReply nil { setRequestFinished(); errbackDeferred("Protocol failure"); } ReplyText nil { setRequestFinished(); errbackDeferred("Protocol failure"); } ProcessLine(line) nil { setRequestFinished(); errbackDeferred("Protocol failure"); } } %%