ssl_expr_parse.y revision ef5650b61a8e35f3cc93ec07e73efc17ea329894
/* Copyright 2001-2004 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* _ _
* _ __ ___ ___ __| | ___ ___| |
* | '_ ` _ \ / _ \ / _` | / __/ __| |
* | | | | | | (_) | (_| | \__ \__ \ | mod_ssl - Apache Interface to OpenSSL
* |_| |_| |_|\___/ \__,_|___|___/___/_| http://www.modssl.org/
* |_____|
* ssl_expr_parse.y
* Expression LR(1) Parser
*/
/* ``What you see is all you get.''
-- Brian Kernighan */
/* _________________________________________________________________
**
** Expression Parser
** _________________________________________________________________
*/
%{
#include "ssl_private.h"
%}
%union {
char *cpVal;
}
%%
;
;
;
;
| funccall { $$ = $1; }
;
ssl_expr_error = "Failed to compile regular expression";
}
}
| T_REGEX_I {
ssl_expr_error = "Failed to compile regular expression";
}
}
;
}
;
%%
int yyerror(char *s)
{
ssl_expr_error = s;
return 2;
}