]> err.no Git - varnish/commitdiff
Eliminate the "proof of concept" tokens that were never implemented
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 1 Apr 2007 09:17:52 +0000 (09:17 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 1 Apr 2007 09:17:52 +0000 (09:17 +0000)
at runtime.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1299 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/lib/libvcl/vcc_action.c
varnish-cache/lib/libvcl/vcc_fixed_token.c
varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl
varnish-cache/lib/libvcl/vcc_token_defs.h

index 4e0a78a73cb6fe7b767bffd53e2089eae124fcfa..d3a5a008df01402b80df14ab486eef5e1bf6255b 100644 (file)
 
 /*--------------------------------------------------------------------*/
 
-#define L(tl, foo)     do {    \
-       tl->indent += INDENT;   \
-       foo;                    \
-       tl->indent -= INDENT;   \
-} while (0)
-
-#define C(tl, sep)     do {                                    \
-       Fb(tl, 1, "VRT_count(sp, %u)%s\n", ++tl->cnt, sep);     \
-       tl->t->cnt = tl->cnt;                                   \
-} while (0)
-
-/*--------------------------------------------------------------------*/
-
 #define VCL_RET_MAC(l,u,b,i)                           \
 static void                                            \
 parse_##l(struct tokenlist *tl)                                \
@@ -237,7 +224,6 @@ static struct action_table {
        { NULL,         NULL }
 };
 
-
 void
 vcc_ParseAction(struct tokenlist *tl)
 {
@@ -253,30 +239,6 @@ vcc_ParseAction(struct tokenlist *tl)
                        }
                }
        }
-       vcc_NextToken(tl);
-       switch (at->tok) {
-       case T_NO_NEW_CACHE:
-               Fb(tl, 1, "VCL_no_new_cache(sp);\n");
-               return;
-       case T_NO_CACHE:
-               Fb(tl, 1, "VCL_no_cache(sp);\n");
-               return;
-       case T_SWITCH_CONFIG:
-               ExpectErr(tl, ID);
-               Fb(tl, 1, "VCL_switch_config(\"%.*s\");\n", PF(tl->t));
-               vcc_NextToken(tl);
-               return;
-       case T_REWRITE:
-               ExpectErr(tl, CSTR);
-               Fb(tl, 1, "VCL_rewrite(%.*s", PF(tl->t));
-               vcc_NextToken(tl);
-               ExpectErr(tl, CSTR);
-               Fb(tl, 0, ", %.*s);\n", PF(tl->t));
-               vcc_NextToken(tl);
-               return;
-       default:
-               vsb_printf(tl->sb, "Expected action, 'if' or '}'\n");
-               vcc_ErrWhere(tl, at);
-               return;
-       }
+       vsb_printf(tl->sb, "Expected action, 'if' or '}'\n");
+       vcc_ErrWhere(tl, at);
 }
index bc2b5036afbf4c4f9a4618738b9b125ac121c7a9..864ddc9e7a05ff7f904323eb7bb2bba8de3d673b 100644 (file)
@@ -191,13 +191,6 @@ vcl_fixed_token(const char *p, const char **q)
                        return (T_ELSE);
                }
                return (0);
-       case 'f':
-               if (p[0] == 'f' && p[1] == 'u' && p[2] == 'n' && 
-                   p[3] == 'c' && !isvar(p[4])) {
-                       *q = p + 4;
-                       return (T_FUNC);
-               }
-               return (0);
        case 'i':
                if (p[0] == 'i' && p[1] == 'n' && p[2] == 'c' && 
                    p[3] == 'l' && p[4] == 'u' && p[5] == 'd' && 
@@ -210,46 +203,7 @@ vcl_fixed_token(const char *p, const char **q)
                        return (T_IF);
                }
                return (0);
-       case 'n':
-               if (p[0] == 'n' && p[1] == 'o' && p[2] == '_' && 
-                   p[3] == 'n' && p[4] == 'e' && p[5] == 'w' && 
-                   p[6] == '_' && p[7] == 'c' && p[8] == 'a' && 
-                   p[9] == 'c' && p[10] == 'h' && p[11] == 'e'
-                    && !isvar(p[12])) {
-                       *q = p + 12;
-                       return (T_NO_NEW_CACHE);
-               }
-               if (p[0] == 'n' && p[1] == 'o' && p[2] == '_' && 
-                   p[3] == 'c' && p[4] == 'a' && p[5] == 'c' && 
-                   p[6] == 'h' && p[7] == 'e' && !isvar(p[8])) {
-                       *q = p + 8;
-                       return (T_NO_CACHE);
-               }
-               return (0);
-       case 'p':
-               if (p[0] == 'p' && p[1] == 'r' && p[2] == 'o' && 
-                   p[3] == 'c' && !isvar(p[4])) {
-                       *q = p + 4;
-                       return (T_PROC);
-               }
-               return (0);
-       case 'r':
-               if (p[0] == 'r' && p[1] == 'e' && p[2] == 'w' && 
-                   p[3] == 'r' && p[4] == 'i' && p[5] == 't' && 
-                   p[6] == 'e' && !isvar(p[7])) {
-                       *q = p + 7;
-                       return (T_REWRITE);
-               }
-               return (0);
        case 's':
-               if (p[0] == 's' && p[1] == 'w' && p[2] == 'i' && 
-                   p[3] == 't' && p[4] == 'c' && p[5] == 'h' && 
-                   p[6] == '_' && p[7] == 'c' && p[8] == 'o' && 
-                   p[9] == 'n' && p[10] == 'f' && p[11] == 'i' && 
-                   p[12] == 'g' && !isvar(p[13])) {
-                       *q = p + 13;
-                       return (T_SWITCH_CONFIG);
-               }
                if (p[0] == 's' && p[1] == 'u' && p[2] == 'b'
                     && !isvar(p[3])) {
                        *q = p + 3;
@@ -329,7 +283,6 @@ vcl_init_tnames(void)
        vcl_tnames[T_ELSEIF] = "elseif";
        vcl_tnames[T_ELSIF] = "elsif";
        vcl_tnames[T_EQ] = "==";
-       vcl_tnames[T_FUNC] = "func";
        vcl_tnames[T_GEQ] = ">=";
        vcl_tnames[T_IF] = "if";
        vcl_tnames[T_INC] = "++";
@@ -338,14 +291,9 @@ vcl_init_tnames(void)
        vcl_tnames[T_LEQ] = "<=";
        vcl_tnames[T_MUL] = "*=";
        vcl_tnames[T_NEQ] = "!=";
-       vcl_tnames[T_NO_CACHE] = "no_cache";
-       vcl_tnames[T_NO_NEW_CACHE] = "no_new_cache";
-       vcl_tnames[T_PROC] = "proc";
-       vcl_tnames[T_REWRITE] = "rewrite";
        vcl_tnames[T_SHL] = "<<";
        vcl_tnames[T_SHR] = ">>";
        vcl_tnames[T_SUB] = "sub";
-       vcl_tnames[T_SWITCH_CONFIG] = "switch_config";
        vcl_tnames[VAR] = "VAR";
 }
 
index ce94a454ae40f851337f46124ae0a408ff4ac59f..c4d32c7435c2ed68809e1efbae08fb3a1ad31d9c 100755 (executable)
@@ -65,16 +65,11 @@ set keywords {
 
        if else elseif elsif
 
-       func proc sub
+       sub
 
        acl
 
        backend
-
-       no_cache
-       no_new_cache
-       rewrite
-       switch_config
 }
 
 # Non-word tokens
index 74526f23305805e4279358b587fb1d9293483606..d5ebec7d9a9407319ddf1f2f4eabd55a7284be02 100644 (file)
 #define T_ELSE 130
 #define T_ELSEIF 131
 #define T_ELSIF 132
-#define T_FUNC 133
-#define T_PROC 134
-#define T_SUB 135
-#define T_ACL 136
-#define T_BACKEND 137
-#define T_NO_CACHE 138
-#define T_NO_NEW_CACHE 139
-#define T_REWRITE 140
-#define T_SWITCH_CONFIG 141
-#define T_INC 142
-#define T_DEC 143
-#define T_CAND 144
-#define T_COR 145
-#define T_LEQ 146
-#define T_EQ 147
-#define T_NEQ 148
-#define T_GEQ 149
-#define T_SHR 150
-#define T_SHL 151
-#define T_INCR 152
-#define T_DECR 153
-#define T_MUL 154
-#define T_DIV 155
-#define ID 156
-#define VAR 157
-#define CNUM 158
-#define CSTR 159
-#define EOI 160
-#define METHOD 161
+#define T_SUB 133
+#define T_ACL 134
+#define T_BACKEND 135
+#define T_INC 136
+#define T_DEC 137
+#define T_CAND 138
+#define T_COR 139
+#define T_LEQ 140
+#define T_EQ 141
+#define T_NEQ 142
+#define T_GEQ 143
+#define T_SHR 144
+#define T_SHL 145
+#define T_INCR 146
+#define T_DECR 147
+#define T_MUL 148
+#define T_DIV 149
+#define ID 150
+#define VAR 151
+#define CNUM 152
+#define CSTR 153
+#define EOI 154
+#define METHOD 155