bottleneck testcase based on rubbos
[bottlenecks.git] / rubbos / app / apache2 / include / ssl_expr.h
1 /* Licensed to the Apache Software Foundation (ASF) under one or more
2  * contributor license agreements.  See the NOTICE file distributed with
3  * this work for additional information regarding copyright ownership.
4  * The ASF licenses this file to You under the Apache License, Version 2.0
5  * (the "License"); you may not use this file except in compliance with
6  * the License.  You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 /*                      _             _
18  *  _ __ ___   ___   __| |    ___ ___| |  mod_ssl
19  * | '_ ` _ \ / _ \ / _` |   / __/ __| |  Apache Interface to OpenSSL
20  * | | | | | | (_) | (_| |   \__ \__ \ |
21  * |_| |_| |_|\___/ \__,_|___|___/___/_|
22  *                      |_____|
23  *  ssl_expr.h
24  *  Expression Handling (Header)
25  */
26                              /* ``May all your PUSHes be POPed.'' */
27
28 #ifndef __SSL_EXPR_H__
29 #define __SSL_EXPR_H__
30
31 #ifndef FALSE
32 #define FALSE 0
33 #endif
34
35 #ifndef TRUE
36 #define TRUE !FALSE
37 #endif
38
39 #ifndef YY_NULL
40 #define YY_NULL 0
41 #endif
42
43 #ifndef MIN
44 #define MIN(a,b) (((a)<(b))?(a):(b))
45 #endif
46
47 #ifndef BOOL
48 #define BOOL unsigned int
49 #endif
50
51 #ifndef NULL
52 #define NULL (void *)0
53 #endif
54
55 #ifndef NUL
56 #define NUL '\0'
57 #endif
58
59 #ifndef YYDEBUG
60 #define YYDEBUG 0
61 #endif
62
63 typedef enum {
64     op_NOP, op_ListElement,
65     op_True, op_False, op_Not, op_Or, op_And, op_Comp,
66     op_EQ, op_NE, op_LT, op_LE, op_GT, op_GE, op_IN, op_REG, op_NRE,
67     op_Digit, op_String, op_Regex, op_Var, op_Func
68 } ssl_expr_node_op;
69
70 typedef struct {
71     ssl_expr_node_op node_op;
72     void *node_arg1;
73     void *node_arg2;
74     apr_pool_t *p;
75 } ssl_expr_node;
76
77 typedef ssl_expr_node ssl_expr;
78
79 typedef struct {
80         apr_pool_t *pool;
81     char     *inputbuf;
82     int       inputlen;
83     char     *inputptr;
84     ssl_expr *expr;
85 } ssl_expr_info_type;
86
87 extern ssl_expr_info_type ssl_expr_info;
88 extern char *ssl_expr_error;
89
90 #define yylval  ssl_expr_yylval
91 #define yyerror ssl_expr_yyerror
92 #define yyinput ssl_expr_yyinput
93
94 extern int ssl_expr_yyparse(void);
95 extern int ssl_expr_yyerror(char *);
96 extern int ssl_expr_yylex(void);
97
98 extern ssl_expr *ssl_expr_comp(apr_pool_t *, char *);
99 extern int       ssl_expr_exec(request_rec *, ssl_expr *);
100 extern char     *ssl_expr_get_error(void);
101 extern ssl_expr *ssl_expr_make(ssl_expr_node_op, void *, void *);
102 extern BOOL      ssl_expr_eval(request_rec *, ssl_expr *);
103
104 #endif /* __SSL_EXPR_H__ */