Expression.cc File Reference
#include "squid.h"
#include "Debug.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 dumpstack (stackmember *stack, int depth)
 
static int addmember (stackmember *stack, int *stackdepth, stackmember *candidate)
 
static int membercompare (stackmember a, stackmember b)
 
static char const * 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

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

Definition at line 37 of file Expression.cc.

typedef struct _stackmember stackmember

Definition at line 35 of file Expression.cc.

Enumeration Type Documentation

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 40 of file Expression.cc.

Enumerator
ESI_LITERAL_STRING 
ESI_LITERAL_FLOAT 
ESI_LITERAL_INT 
ESI_LITERAL_BOOL 
ESI_LITERAL_INVALID 

Definition at line 57 of file Expression.cc.

Function Documentation

void dumpstack ( stackmember stack,
int  depth 
)
static

Definition at line 939 of file Expression.cc.

References buf, debugs, and i.

Referenced by addmember().

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

Definition at line 650 of file Expression.cc.

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

Definition at line 239 of file Expression.cc.

References DBG_IMPORTANT, and debugs.

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

Definition at line 231 of file Expression.cc.

References DBG_IMPORTANT, and debugs.

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

Definition at line 628 of file Expression.cc.

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

void stackpop ( stackmember s,
int depth 
)
static
char const * trim ( char const *  s)
static

Definition at line 657 of file Expression.cc.

Referenced by LruMap< Key, EntryValue, EntryCost >::add(), and getsymbol().

Variable Documentation

evaluate evaland
static

Definition at line 103 of file Expression.cc.

Referenced by getsymbol().

evaluate evalendexpr
static

Definition at line 111 of file Expression.cc.

Referenced by getsymbol().

evaluate evalequals
static

Definition at line 108 of file Expression.cc.

Referenced by getsymbol().

evaluate evalexpr
static
evaluate evallesseq
static

Definition at line 104 of file Expression.cc.

Referenced by getsymbol().

evaluate evallessthan
static

Definition at line 105 of file Expression.cc.

Referenced by getsymbol().

evaluate evalliteral
static

Definition at line 101 of file Expression.cc.

Referenced by evalor(), and getsymbol().

evaluate evalmoreeq
static

Definition at line 106 of file Expression.cc.

Referenced by getsymbol().

evaluate evalmorethan
static

Definition at line 107 of file Expression.cc.

Referenced by getsymbol().

evaluate evalnegate
static

Definition at line 100 of file Expression.cc.

Referenced by getsymbol().

evaluate evalnotequals
static

Definition at line 109 of file Expression.cc.

Referenced by getsymbol().

evaluate evalor
static

Definition at line 102 of file Expression.cc.

Referenced by getsymbol().

evaluate evalstartexpr
static

Definition at line 110 of file Expression.cc.

Referenced by getsymbol().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors