/* Copyright 2005 The Apache Software Foundation or its licensors, as * applicable. * * 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 * * http://www.apache.org/licenses/LICENSE-2.0 * * 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. */ /** * @file lcn_query_parser.h * @brief Routines for creating queries from a user provided string */ #ifndef _LCN_QUERY_PARSER_H #define _LCN_QUERY_PARSER_H #include "lcn_pools.h" #include "lcn_error.h" #include "lcn_query.h" #include "lcn_analyzer.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** A query parser. */ typedef struct lcn_query_parser_t lcn_query_parser_t; /** Create @a query from @a input, with default field @a field, analyzed * with @a analyzer, allocated in @a pool. * * @note this creates an @c lcn_query_parser_t object under the hood. If * you want to avoid the overhead of recreating the parser for each parse * use @c lcn_query_parser_create and @c lcn_query_parser_parse. */ lcn_error_t * lcn_query_parse (lcn_query_t **query, const char *input, const char *field, lcn_analyzer_t *analyzer, apr_pool_t *pool); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* _LCN_QUERY_PARSER_H */