summaryrefslogtreecommitdiff
path: root/src/http_req_range_parser.y
diff options
context:
space:
mode:
authorstbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9>2015-09-18 15:15:18 +0000
committerstbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9>2015-09-18 15:15:18 +0000
commit8b2630a82fbecfd57fa38aebb397a755936690e5 (patch)
treea9cfcd7bb5bea87d63fc8ef81c8456a130a249bc /src/http_req_range_parser.y
parente57c8295ebe92b58ca3e68fa8ea8f70d4b0b4cee (diff)
downloadlighttpd-master.tar.gz
add README to point to lighttpd-1.4.x as stableHEADmaster
git-svn-id: svn://svn.lighttpd.net/lighttpd/trunk@3041 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'src/http_req_range_parser.y')
-rw-r--r--src/http_req_range_parser.y76
1 files changed, 0 insertions, 76 deletions
diff --git a/src/http_req_range_parser.y b/src/http_req_range_parser.y
deleted file mode 100644
index 62241fb3..00000000
--- a/src/http_req_range_parser.y
+++ /dev/null
@@ -1,76 +0,0 @@
-%token_prefix TK_
-%token_type {buffer *}
-%extra_argument {http_req_range_ctx_t *ctx}
-%name http_req_range_parser
-
-%include {
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <sys/types.h>
-#include <string.h>
-#include "http_req_range.h"
-#include "log.h"
-#include "sys-strings.h"
-}
-
-%parse_failure {
- ctx->ok = 0;
-}
-
-%type num { off_t }
-%type range { http_req_range * }
-%type ranges { http_req_range * }
-%token_destructor { buffer_free($$); }
-
-
-range_hdr ::= BYTES EQUAL ranges(A) . {
- ctx->ranges->start = A->start;
- ctx->ranges->end = A->end;
- ctx->ranges->next = A->next;
-
- A->next = NULL;
- http_request_range_free(A);
-}
-
-ranges(A) ::= ranges(B) COMMA range(C) . {
- for (A = B; A->next; A = A->next);
-
- A->next = C;
-
- A = B;
-}
-ranges(A) ::= range(B) . {
- A = B;
-}
-range(A) ::= num(B) MINUS . {
- http_req_range *r = http_request_range_init();
-
- r->start = B;
- r->end = -1;
-
- A = r;
-}
-
-range(A) ::= num(B) MINUS num(C) . {
- http_req_range *r = http_request_range_init();
-
- r->start = B;
- r->end = C;
-
- A = r;
-}
-
-range(A) ::= MINUS num(B) . {
- http_req_range *r = http_request_range_init();
-
- r->start = -1;
- r->end = B;
-
- A = r;
-}
-
-num(A) ::= NUMBER(B) . {
- A = strtoull(BUF_STR(B), NULL, 10);
- buffer_pool_append(ctx->unused_buffers, B);
-}