3 #ifndef _MADARA_KNOWLEDGE_INTERPRETER_INL_ 4 #define _MADARA_KNOWLEDGE_INTERPRETER_INL_ 6 #ifndef _MADARA_NO_KARL_ 25 || input ==
'/' || input ==
'%';
32 return input >=
'0' && input <=
'9';
39 return input ==
'e' || input ==
'E' || input ==
'-' ||
40 (input >=
'0' && input <=
'9');
46 return input ==
"true" || input ==
"false" ||
47 input ==
"nan" || input ==
"inf";
54 return input ==
'"' || input ==
'\'';
62 return (input >=
'a' && input <=
'z')
63 || (input >=
'A' && input <=
'Z')
65 || (input >=
'0' && input <=
'9') || input ==
'.' 66 || input ==
'{' || input ==
'}';
73 return input ==
' ' || input ==
'\t' || input ==
'\r' || input ==
'\n';
85 return cache_.erase (expression) == 1;
89 #endif // _MADARA_NO_KARL_ 91 #endif // _MADARA_KNOWLEDGE_INTERPRETER_INL_
static bool is_reserved_word(const std::string &input)
Checks a given input for a reserved word literal.
static bool is_alphanumeric(char input)
Checks a character to see if it is alphanumeric.
static bool is_number(char input)
Checks a character to see if it is a number.
static bool is_whitespace(char input)
Checks a character to see if it is whitespace.
ExpressionTreeMap cache_
Cache of expressions that have been previously compiled.
static bool is_exponential(char input)
Checks a character to see if it is in scientific format.
static bool is_string_literal(char input)
Checks a character to see if it is a string literal.
bool delete_expression(const std::string &expression)
Attempts to delete an expression from cache.
static bool is_operator(char input)
Checks a character to see if it is a mathematical operator.