Aldo Cortesi
a1f782b543
Simplify Request/Response class hierarchy.
2012-10-30 13:28:22 +13:00
Aldo Cortesi
3e0cd6442a
Add .spec methods for Request and Response objects.
2012-10-29 17:33:10 +13:00
Aldo Cortesi
747eafd107
Add a .spec method to the token ABC, and to all tokens.
2012-10-29 16:31:35 +13:00
Aldo Cortesi
8741600ce7
Refactoring: canonical storage of a message is now the sequence of tokens that defines it.
...
We use a set of accessor properties to ease access to tokens. We can now ditch
the .accept() methods.
2012-10-29 15:16:44 +13:00
Aldo Cortesi
882969086c
Cleaup, some more ABCs.
2012-10-29 10:19:58 +13:00
Aldo Cortesi
61f8992fbf
Change response spec format to code[:features]
...
Reason message is now specified as just another feature with the "m" mnemonic.
2012-10-28 22:18:06 +13:00
Aldo Cortesi
07560ffe30
Cleaup, ABC for Value classes.
2012-10-28 22:00:19 +13:00
Aldo Cortesi
35f37626a9
Clean up .accept() signature.
2012-10-28 17:39:58 +13:00
Aldo Cortesi
7d74f75f6d
Split Code and Reason into separate _Component objects.
2012-10-28 17:07:16 +13:00
Aldo Cortesi
e9af434c2b
.body and .method to lazy generator instantiation.
...
Also introduce a _Component ABC.
2012-10-28 14:15:29 +13:00
Aldo Cortesi
9d42a06c92
Move message body to new lazy-generator scheme.
2012-10-28 12:56:08 +13:00
Aldo Cortesi
f54ed69a35
Adjust serve() API.
2012-10-28 09:06:55 +13:00
Aldo Cortesi
ac5aacce44
Remove check argument to serve() methods.
...
Refactoring means we can now do this without a callback.
Also introduce the maximum_length method that estimates the max possible
message length.
2012-10-27 17:40:22 +13:00
Aldo Cortesi
06864e5a1b
Major refactoring towars separate representation of expressions and request/response service.
2012-10-27 14:00:50 +13:00
Aldo Cortesi
6174e46023
Unit test suite love: 100% coverage
...
Also start figuring out how to sanitize binary data in the JSON API.
2012-10-25 10:59:18 +13:00
Aldo Cortesi
173b5c596e
Start moving policy checks to service-time, rather than parse-time.
2012-10-25 09:45:55 +13:00
Aldo Cortesi
c684f7417d
Extend Action and Value classes
...
- Values now know how to print their own specs
- Actions now know how to print their own specs
- Actions have a resolve_offset method that resolves relative and random offsets.
2012-10-24 11:32:53 +13:00
Aldo Cortesi
e83392bfc8
Start making Action objects more sophisticated.
2012-10-05 11:23:30 +13:00
Aldo Cortesi
495daf2b64
Remove actions log and explain, preparing for a more sophisticated take on this.
2012-10-05 11:14:17 +13:00
Aldo Cortesi
f5d5cc4988
rparse.py -> language.py
2012-10-05 10:30:32 +13:00