123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- %start MainMap::Startup
- %class ApiRequest
- %map MainMap
- %%
- Startup
- {
- ApiResponse
- ApiResponseStarted
- {
- }
- }
- ApiResponseStarted
- {
- ContentLength
- ContentPreStarted
- {
- }
- }
- ContentPreStarted
- {
- BlankLine
- ContentStarted
- {
- }
- }
- ContentStarted
- {
- ProcessLine(line)
- [ctxt.add_content(line) == True]
- Startup
- {
- setRequestFinished(); callbackDeferred(ctxt.getResponse());
- }
- ProcessLine(line)
- nil
- {
- // for some reason, have to add doNothing() here or
- // importing smc will fail. looks like smc bug.
- doNothing();
- }
- }
- Default
- {
- BlankLine
- nil
- {
- setRequestFinished();
- errbackDeferred("Protocol failure - was not expecting blank line");
- }
- ContentFinished
- nil
- {
- setRequestFinished();
- errbackDeferred("Protocol failure - was not expecting content to be finished");
- }
- ContentLength
- nil
- {
- setRequestFinished();
- errbackDeferred("Protocol failure - was not expecting content-length header");
- }
- ApiResponse
- nil
- {
- setRequestFinished();
- errbackDeferred("Protocol failure - was not expecting api response");
- }
- ProcessLine(line)
- nil
- {
- setRequestFinished();
- errbackDeferred("Protocol failure - was not expecting needing to process a line");
- }
- }
- %%
|