/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
#ifndef __AP_EXPR_PRIVATE_H__
#define __AP_EXPR_PRIVATE_H__
#include "httpd.h"
#include "apr_strings.h"
#include "apr_tables.h"
#include "ap_expr.h"
#ifndef YY_NULL
#define YY_NULL 0
#endif
#ifndef MIN
#define MIN(a,b) (((a)<(b))?(a):(b))
#endif
#if !APR_HAVE_UNISTD_H
#define YY_NO_UNISTD_H
#endif
#ifdef _MSC_VER
/* Avoid some warnings with Visual Studio (likely due to a bug in bison) */
#endif
#ifndef YYDEBUG
#define YYDEBUG 0
#endif
/** The operations in a parse tree node */
typedef enum {
/*
* The info node contains the function pointer and some function specific
* info.
* For Binary operators, the Call node links to the Info node and the
* Args node, which in turn links to the left and right operand.
* For all other variants, the Call node links to the Info node and the
* argument.
*/
/** The basic parse tree node */
struct ap_expr_node {
const void *node_arg1;
const void *node_arg2;
};
/** The context used by scanner and parser */
typedef struct {
/* internal state of the scanner */
const char *inputbuf;
int inputlen;
const char *inputptr;
void *scanner;
char *scan_ptr;
char scan_del;
int at_start;
/* pools for result and temporary usage */
/* The created parse tree */
const char *error;
const char *error2;
unsigned flags;
/*
* The function to use to lookup provider functions for variables
* and funtctions
*/
int ap_expr_yylex_init(void **scanner);
int ap_expr_yylex_destroy(void *scanner);
/* create a parse tree node */
/* create parse tree node for the string-returning function 'name' */
/* create parse tree node for the list-returning function 'name' */
/* create parse tree node for the variable 'name' */
/* create parse tree node for the unary operator 'name' */
/* create parse tree node for the binary operator 'name' */
#endif /* __AP_EXPR_PRIVATE_H__ */
/** @} */