Expression.cc File Reference
#include "squid.h"
#include "Debug.h"
#include "esi/Esi.h"
#include "esi/Expression.h"
#include "profiler/Profiler.h"
#include <cerrno>
#include <cmath>
Include dependency graph for Expression.cc:

Go to the source code of this file.

Classes

struct  _stackmember
 

Typedefs

typedef struct _stackmember stackmember
 
typedef int evaluate(stackmember *stack, int *depth, int whereAmI, stackmember *candidate)
 

Enumerations

enum  evaltype {
  ESI_EXPR_INVALID,
  ESI_EXPR_LITERAL,
  ESI_EXPR_OR,
  ESI_EXPR_AND,
  ESI_EXPR_NOT,
  ESI_EXPR_START,
  ESI_EXPR_END,
  ESI_EXPR_EQ,
  ESI_EXPR_NOTEQ,
  ESI_EXPR_LESS,
  ESI_EXPR_LESSEQ,
  ESI_EXPR_MORE,
  ESI_EXPR_MOREEQ,
  ESI_EXPR_EXPR
}
 
enum  literalhint {
  ESI_LITERAL_STRING,
  ESI_LITERAL_FLOAT,
  ESI_LITERAL_INT,
  ESI_LITERAL_BOOL,
  ESI_LITERAL_INVALID
}
 

Functions

static void cleanmember (stackmember *)
 
static void stackpop (stackmember *s, int *depth)
 
static void stackpush (stackmember *stack, stackmember &item, int *depth)
 
static void dumpstack (stackmember *stack, int depth)
 
static int addmember (stackmember *stack, int *stackdepth, stackmember *candidate)
 
static int membercompare (stackmember a, stackmember b)
 
static const char * trim (char const *s)
 
static stackmember getsymbol (const char *s, char const **endptr)
 
int evalnegate (stackmember *stack, int *depth, int whereAmI, stackmember *candidate)
 
int evalliteral (stackmember *stack, int *depth, int whereAmI, stackmember *candidate)
 
int evalexpr (stackmember *stack, int *depth, int whereAmI, stackmember *candidate)
 
int evalor (stackmember *stack, int *depth, int whereAmI, stackmember *candidate)
 
int evaland (stackmember *stack, int *depth, int whereAmI, stackmember *candidate)
 
int evallesseq (stackmember *stack, int *depth, int whereAmI, stackmember *candidate)
 
int evallessthan (stackmember *stack, int *depth, int whereAmI, stackmember *candidate)
 
int evalmoreeq (stackmember *stack, int *depth, int whereAmI, stackmember *candidate)
 
int evalmorethan (stackmember *stack, int *depth, int whereAmI, stackmember *candidate)
 
int evalequals (stackmember *stack, int *depth, int whereAmI, stackmember *candidate)
 
int evalnotequals (stackmember *stack, int *depth, int whereAmI, stackmember *candidate)
 
int evalstartexpr (stackmember *stack, int *depth, int whereAmI, stackmember *candidate)
 
int evalendexpr (stackmember *stack, int *depth, int whereAmI, stackmember *candidate)
 
static void printLiteral (std::ostream &os, const stackmember &s)
 
static std::ostream & operator<< (std::ostream &os, const stackmember &s)
 

Variables

static evaluate evalnegate
 
static evaluate evalliteral
 
static evaluate evalor
 
static evaluate evaland
 
static evaluate evallesseq
 
static evaluate evallessthan
 
static evaluate evalmoreeq
 
static evaluate evalmorethan
 
static evaluate evalequals
 
static evaluate evalnotequals
 
static evaluate evalstartexpr
 
static evaluate evalendexpr
 
static evaluate evalexpr
 

Typedef Documentation

◆ evaluate

typedef int evaluate(stackmember *stack, int *depth, int whereAmI, stackmember *candidate)

Definition at line 38 of file Expression.cc.

◆ stackmember

typedef struct _stackmember stackmember

Definition at line 36 of file Expression.cc.

Enumeration Type Documentation

◆ evaltype

enum evaltype
Enumerator
ESI_EXPR_INVALID 
ESI_EXPR_LITERAL 
ESI_EXPR_OR 
ESI_EXPR_AND 
ESI_EXPR_NOT 
ESI_EXPR_START 
ESI_EXPR_END 
ESI_EXPR_EQ 
ESI_EXPR_NOTEQ 
ESI_EXPR_LESS 
ESI_EXPR_LESSEQ 
ESI_EXPR_MORE 
ESI_EXPR_MOREEQ 
ESI_EXPR_EXPR 

Definition at line 41 of file Expression.cc.

◆ literalhint

Enumerator
ESI_LITERAL_STRING 
ESI_LITERAL_FLOAT 
ESI_LITERAL_INT 
ESI_LITERAL_BOOL 
ESI_LITERAL_INVALID 

Definition at line 58 of file Expression.cc.

Function Documentation

◆ addmember()

◆ cleanmember()

◆ dumpstack()

void dumpstack ( stackmember stack,
int  depth 
)
static

Definition at line 956 of file Expression.cc.

References buf, and debugs.

Referenced by addmember().

◆ evaland()

◆ evalendexpr()

int evalendexpr ( stackmember stack,
int depth,
int  whereAmI,
stackmember candidate 
)

Definition at line 667 of file Expression.cc.

◆ evalequals()

◆ evalexpr()

int evalexpr ( stackmember stack,
int depth,
int  whereAmI,
stackmember candidate 
)

Definition at line 256 of file Expression.cc.

References DBG_IMPORTANT, and debugs.

◆ evallesseq()

◆ evallessthan()

◆ evalliteral()

int evalliteral ( stackmember stack,
int depth,
int  whereAmI,
stackmember candidate 
)

Definition at line 248 of file Expression.cc.

References DBG_IMPORTANT, and debugs.

◆ evalmoreeq()

◆ evalmorethan()

◆ evalnegate()

int evalnegate ( stackmember stack,
int depth,
int  whereAmI,
stackmember candidate 
)

◆ evalnotequals()

◆ evalor()

◆ evalstartexpr()

int evalstartexpr ( stackmember stack,
int depth,
int  whereAmI,
stackmember candidate 
)

Definition at line 645 of file Expression.cc.

References cleanmember(), ESI_EXPR_END, and _stackmember::valuetype.

◆ getsymbol()

◆ membercompare()

◆ operator<<()

◆ printLiteral()

◆ stackpop()

void stackpop ( stackmember s,
int depth 
)
static

◆ stackpush()

static void stackpush ( stackmember stack,
stackmember item,
int depth 
)
static

◆ trim()

const char * trim ( char const *  s)
static

Variable Documentation

◆ evaland

evaluate evaland
static

Definition at line 115 of file Expression.cc.

Referenced by getsymbol().

◆ evalendexpr

evaluate evalendexpr
static

Definition at line 123 of file Expression.cc.

Referenced by getsymbol().

◆ evalequals

evaluate evalequals
static

Definition at line 120 of file Expression.cc.

Referenced by getsymbol().

◆ evalexpr

evaluate evalexpr
static

◆ evallesseq

evaluate evallesseq
static

Definition at line 116 of file Expression.cc.

Referenced by getsymbol().

◆ evallessthan

evaluate evallessthan
static

Definition at line 117 of file Expression.cc.

Referenced by getsymbol().

◆ evalliteral

evaluate evalliteral
static

Definition at line 113 of file Expression.cc.

Referenced by evalor(), and getsymbol().

◆ evalmoreeq

evaluate evalmoreeq
static

Definition at line 118 of file Expression.cc.

Referenced by getsymbol().

◆ evalmorethan

evaluate evalmorethan
static

Definition at line 119 of file Expression.cc.

Referenced by getsymbol().

◆ evalnegate

evaluate evalnegate
static

Definition at line 112 of file Expression.cc.

Referenced by getsymbol().

◆ evalnotequals

evaluate evalnotequals
static

Definition at line 121 of file Expression.cc.

Referenced by getsymbol().

◆ evalor

evaluate evalor
static

Definition at line 114 of file Expression.cc.

Referenced by getsymbol().

◆ evalstartexpr

evaluate evalstartexpr
static

Definition at line 122 of file Expression.cc.

Referenced by getsymbol().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors