# http-request.spicy module HTTP; const Token = /[^ \t\r\n]+/; const WhiteSpace = /[ \t]+/; const NewLine = /\r?\n/; public type RequestLine = unit { method: Token; : WhiteSpace; uri: Token; : WhiteSpace; version: Version; : NewLine; on %done { print self; } }; type Version = unit { : /HTTP\//; number: /[0-9]+\.[0-9]+/; };