KiCad PCB EDA Suite
numEval Namespace Reference

Namespaces

 numEval
 

Classes

class  NumericEvaluator
 
struct  TokenType
 
union  YYMINORTYPE
 
struct  yyParser
 
struct  yyStackEntry
 

Typedefs

typedef struct yyStackEntry yyStackEntry
 
typedef struct yyParser yyParser
 

Functions

void ParseTrace (FILE *TraceFILE, char *zTracePrompt)
 
void * ParseAlloc (void *(*mallocProc)(size_t))
 
static void yy_destructor (yyParser *yypParser, YYCODETYPE yymajor, YYMINORTYPE *yypminor)
 
static int yy_pop_parser_stack (yyParser *pParser)
 
void ParseFree (void *p, void(*freeProc)(void *))
 
static int yy_find_shift_action (yyParser *pParser, YYCODETYPE iLookAhead)
 
static int yy_find_reduce_action (int stateno, YYCODETYPE iLookAhead)
 
static void yyStackOverflow (yyParser *yypParser, YYMINORTYPE *yypMinor)
 
static void yy_shift (yyParser *yypParser, int yyNewState, int yyMajor, YYMINORTYPE *yypMinor)
 
static void yy_accept (yyParser *)
 
static void yy_reduce (yyParser *yypParser, int yyruleno)
 
static void yy_parse_failed (yyParser *yypParser)
 
static void yy_syntax_error (yyParser *yypParser, int yymajor, YYMINORTYPE yyminor)
 
void Parse (void *yyp, int yymajor, ParseTOKENTYPE yyminorParseARG_PDECL)
 

Variables

static const YYMINORTYPE yyzerominor = { 0 }
 
static const YYACTIONTYPE yy_action []
 
static const YYCODETYPE yy_lookahead []
 
static const signed char yy_shift_ofst []
 
static const signed char yy_reduce_ofst []
 
static const YYACTIONTYPE yy_default []
 
static FILE * yyTraceFILE = 0
 
static char * yyTracePrompt = 0
 
static const char *const yyTokenName []
 
static const char *const yyRuleName []
 
struct {
   YYCODETYPE   numEval::lhs
 
   unsigned char   numEval::nrhs
 
yyRuleInfo []
 

Typedef Documentation

typedef struct yyParser numEval::yyParser

Definition at line 235 of file numeric_evaluator.cpp.

Definition at line 217 of file numeric_evaluator.cpp.

Function Documentation

void* numEval::ParseAlloc ( void *(*)(size_t)  mallocProc)

Definition at line 340 of file numeric_evaluator.cpp.

void numEval::ParseFree ( void *  p,
void(*)(void *)  freeProc 
)

Definition at line 421 of file numeric_evaluator.cpp.

void numEval::ParseTrace ( FILE *  TraceFILE,
char *  zTracePrompt 
)

Definition at line 261 of file numeric_evaluator.cpp.

References NumericEvaluator::clToken, numEval::numEval::TokenType::dValue, numEval::NumericEvaluator::Token::token, NumericEvaluator::TokenStat::token, VALUE, and numEval::NumericEvaluator::Token::value.

261  { // VALUE
262  extractNumber();
263  retval.token = VALUE;
264  retval.value.dValue = atof(clToken.token);
265  }
266  else if ((convertFrom = checkUnit()) != Unit::Invalid) { // UNIT
#define VALUE
static void numEval::yy_accept ( yyParser yypParser)
static

Definition at line 824 of file numeric_evaluator.cpp.

static void numEval::yy_destructor ( yyParser yypParser,
YYCODETYPE  yymajor,
YYMINORTYPE yypminor 
)
static

Definition at line 362 of file numeric_evaluator.cpp.

static int numEval::yy_find_reduce_action ( int  stateno,
YYCODETYPE  iLookAhead 
)
static

Definition at line 517 of file numeric_evaluator.cpp.

static int numEval::yy_find_shift_action ( yyParser pParser,
YYCODETYPE  iLookAhead 
)
static

Definition at line 452 of file numeric_evaluator.cpp.

static void numEval::yy_parse_failed ( yyParser yypParser)
static

Definition at line 788 of file numeric_evaluator.cpp.

static int numEval::yy_pop_parser_stack ( yyParser pParser)
static

Definition at line 391 of file numeric_evaluator.cpp.

static void numEval::yy_reduce ( yyParser yypParser,
int  yyruleno 
)
static

Definition at line 638 of file numeric_evaluator.cpp.

static void numEval::yy_shift ( yyParser yypParser,
int  yyNewState,
int  yyMajor,
YYMINORTYPE yypMinor 
)
static

Definition at line 564 of file numeric_evaluator.cpp.

static void numEval::yy_syntax_error ( yyParser yypParser,
int  yymajor,
YYMINORTYPE  yyminor 
)
static

Definition at line 807 of file numeric_evaluator.cpp.

static void numEval::yyStackOverflow ( yyParser yypParser,
YYMINORTYPE yypMinor 
)
static

Definition at line 547 of file numeric_evaluator.cpp.

Variable Documentation

unsigned char numEval::nrhs

Definition at line 612 of file numeric_evaluator.cpp.

const YYACTIONTYPE numEval::yy_action[]
static
Initial value:
= {
22, 8, 6, 3, 4, 23, 26, 15, 8, 6,
3, 4, 7, 25, 9, 24, 16, 2, 8, 6,
3, 4, 15, 21, 15, 18, 5, 7, 12, 7,
24, 16, 2, 16, 2, 14, 43, 1, 17, 9,
3, 4, 13, 11, 20, 19, 10,
}

Definition at line 148 of file numeric_evaluator.cpp.

const YYACTIONTYPE numEval::yy_default[]
static
Initial value:
= {
42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
42, 36, 37, 38, 34, 35, 32, 27, 41, 40,
39, 33, 31, 30, 29, 28,
}

Definition at line 177 of file numeric_evaluator.cpp.

const YYCODETYPE numEval::yy_lookahead[]
static
Initial value:
= {
4, 5, 6, 7, 8, 9, 0, 1, 5, 6,
7, 8, 6, 16, 17, 9, 10, 11, 5, 6,
7, 8, 1, 3, 1, 12, 2, 6, 17, 6,
9, 10, 11, 10, 11, 17, 14, 15, 16, 17,
7, 8, 17, 17, 17, 17, 17,
}

Definition at line 155 of file numeric_evaluator.cpp.

const signed char numEval::yy_reduce_ofst[]
static
Initial value:
= {
22, -3, 29, 28, 27, 26, 25, 18, 11,
}

Definition at line 174 of file numeric_evaluator.cpp.

const signed char numEval::yy_shift_ofst[]
static
Initial value:
= {
21, 6, 23, 23, 23, 23, 23, 23, 23, -4,
13, 3, 33, 33, 33, 24, 20,
}

Definition at line 166 of file numeric_evaluator.cpp.

const { ... } numEval::yyRuleInfo[]
Initial value:
= {
{ 14, 1 },
{ 15, 1 },
{ 15, 2 },
{ 16, 1 },
{ 16, 2 },
{ 16, 2 },
{ 17, 1 },
{ 17, 2 },
{ 17, 2 },
{ 17, 1 },
{ 17, 3 },
{ 17, 3 },
{ 17, 3 },
{ 17, 3 },
{ 17, 3 },
{ 17, 3 },
}
const char* const numEval::yyRuleName[]
static
Initial value:
= {
"main ::= in",
"in ::= stmt",
"in ::= in stmt",
"stmt ::= ENDS",
"stmt ::= expr ENDS",
"stmt ::= expr SEMCOL",
"expr ::= VALUE",
"expr ::= VALUE UNIT",
"expr ::= MINUS expr",
"expr ::= VAR",
"expr ::= VAR ASSIGN expr",
"expr ::= expr PLUS expr",
"expr ::= expr MINUS expr",
"expr ::= expr MULT expr",
"expr ::= expr DIVIDE expr",
"expr ::= PARENL expr PARENR",
}

Definition at line 284 of file numeric_evaluator.cpp.

const char* const numEval::yyTokenName[]
static
Initial value:
= {
"$", "VAR", "ASSIGN", "UNIT",
"SEMCOL", "PLUS", "MINUS", "DIVIDE",
"MULT", "ENDS", "VALUE", "PARENL",
"PARENR", "error", "main", "in",
"stmt", "expr",
}

Definition at line 272 of file numeric_evaluator.cpp.

FILE* numEval::yyTraceFILE = 0
static

Definition at line 239 of file numeric_evaluator.cpp.

char* numEval::yyTracePrompt = 0
static

Definition at line 240 of file numeric_evaluator.cpp.

const YYMINORTYPE numEval::yyzerominor = { 0 }
static

Definition at line 85 of file numeric_evaluator.cpp.