Lines Matching refs:ctx

29 %parse-param { ap_expr_parse_ctx_t *ctx }
104 #define yyscanner ctx->scanner
112 root : T_EXPR_BOOL expr { ctx->expr = $2; }
113 | T_EXPR_STRING string { ctx->expr = $2; }
117 expr : T_TRUE { $$ = ap_expr_make(op_True, NULL, NULL, ctx); }
118 | T_FALSE { $$ = ap_expr_make(op_False, NULL, NULL, ctx); }
119 | T_OP_NOT expr { $$ = ap_expr_make(op_Not, $2, NULL, ctx); }
120 | expr T_OP_OR expr { $$ = ap_expr_make(op_Or, $1, $3, ctx); }
121 | expr T_OP_AND expr { $$ = ap_expr_make(op_And, $1, $3, ctx); }
122 | comparison { $$ = ap_expr_make(op_Comp, $1, NULL, ctx); }
123 | T_OP_UNARY word { $$ = ap_expr_unary_op_make( $1, $2, ctx); }
124 | word T_OP_BINARY word { $$ = ap_expr_binary_op_make($2, $1, $3, ctx); }
129 comparison: word T_OP_EQ word { $$ = ap_expr_make(op_EQ, $1, $3, ctx); }
130 | word T_OP_NE word { $$ = ap_expr_make(op_NE, $1, $3, ctx); }
131 | word T_OP_LT word { $$ = ap_expr_make(op_LT, $1, $3, ctx); }
132 | word T_OP_LE word { $$ = ap_expr_make(op_LE, $1, $3, ctx); }
133 | word T_OP_GT word { $$ = ap_expr_make(op_GT, $1, $3, ctx); }
134 | word T_OP_GE word { $$ = ap_expr_make(op_GE, $1, $3, ctx); }
135 | word T_OP_STR_EQ word { $$ = ap_expr_make(op_STR_EQ, $1, $3, ctx); }
136 | word T_OP_STR_NE word { $$ = ap_expr_make(op_STR_NE, $1, $3, ctx); }
137 | word T_OP_STR_LT word { $$ = ap_expr_make(op_STR_LT, $1, $3, ctx); }
138 | word T_OP_STR_LE word { $$ = ap_expr_make(op_STR_LE, $1, $3, ctx); }
139 | word T_OP_STR_GT word { $$ = ap_expr_make(op_STR_GT, $1, $3, ctx); }
140 | word T_OP_STR_GE word { $$ = ap_expr_make(op_STR_GE, $1, $3, ctx); }
141 | word T_OP_IN wordlist { $$ = ap_expr_make(op_IN, $1, $3, ctx); }
142 | word T_OP_REG regex { $$ = ap_expr_make(op_REG, $1, $3, ctx); }
143 | word T_OP_NRE regex { $$ = ap_expr_make(op_NRE, $1, $3, ctx); }
150 words : word { $$ = ap_expr_make(op_ListElement, $1, NULL, ctx); }
151 | words ',' word { $$ = ap_expr_make(op_ListElement, $3, $1, ctx); }
154 string : string strpart { $$ = ap_expr_make(op_Concat, $1, $2, ctx); }
159 strpart : T_STRING { $$ = ap_expr_make(op_String, $1, NULL, ctx); }
164 var : T_VAR_BEGIN T_ID T_VAR_END { $$ = ap_expr_var_make($2, ctx); }
165 | T_VAR_BEGIN T_ID ':' string T_VAR_END { $$ = ap_expr_str_func_make($2, $4, ctx); }
168 word : T_DIGIT { $$ = ap_expr_make(op_Digit, $1, NULL, ctx); }
169 | word T_OP_CONCAT word { $$ = ap_expr_make(op_Concat, $1, $3, ctx); }
174 | T_STR_BEGIN T_STR_END { $$ = ap_expr_make(op_String, "", NULL, ctx); }
179 if ((regex = ap_pregcomp(ctx->pool, $1,
181 ctx->error = "Failed to compile regular expression";
184 $$ = ap_expr_make(op_Regex, regex, NULL, ctx);
188 if ((regex = ap_pregcomp(ctx->pool, $1,
190 ctx->error = "Failed to compile regular expression";
193 $$ = ap_expr_make(op_Regex, regex, NULL, ctx);
198 int *n = apr_palloc(ctx->pool, sizeof(int));
200 $$ = ap_expr_make(op_RegexBackref, n, NULL, ctx);
204 lstfunccall : T_ID '(' word ')' { $$ = ap_expr_list_func_make($1, $3, ctx); }
207 strfunccall : T_ID '(' word ')' { $$ = ap_expr_str_func_make($1, $3, ctx); }
208 | T_ID '(' words ')' { $$ = ap_expr_str_func_make($1, $3, ctx); }
213 void yyerror(ap_expr_parse_ctx_t *ctx, const char *s)
216 ctx->error = apr_pstrdup(ctx->ptemp, s);