KiCad PCB EDA Suite
|
Classes | |
class | COMPILER |
class | CONTEXT |
struct | ERROR_STATUS |
struct | T_TOKEN |
struct | T_TOKEN_VALUE |
class | TOKENIZER |
class | TREE_NODE |
class | UCODE |
class | UNIT_RESOLVER |
class | UOP |
class | VALUE |
class | VAR_REF |
Typedefs | |
typedef std::function< void(CONTEXT *, void *)> | FUNC_CALL_REF |
Enumerations | |
enum | COMPILATION_STAGE { CST_PARSE = 0 , CST_CODEGEN , CST_RUNTIME } |
enum | VAR_TYPE_T { VT_STRING = 1 , VT_NUMERIC , VT_UNDEFINED , VT_PARSE_ERROR } |
enum | TOKEN_TYPE_T { TR_UNDEFINED = 0 , TR_NUMBER = 1 , TR_IDENTIFIER = 2 , TR_ASSIGN = 3 , TR_STRUCT_REF = 4 , TR_STRING = 5 , TR_UNIT = 6 , TR_ARG_LIST = 7 , TR_NULL = 8 } |
Functions | |
TREE_NODE * | newNode (LIBEVAL::COMPILER *compiler, int op, const T_TOKEN_VALUE &value) |
static const wxString | formatOpName (int op) |
const wxString | formatNode (TREE_NODE *node) |
void | dumpNode (wxString &buf, TREE_NODE *tok, int depth=0) |
static void | prepareTree (LIBEVAL::TREE_NODE *node) |
static std::vector< TREE_NODE * > | squashParamList (TREE_NODE *root) |
Variables | |
constexpr T_TOKEN_VALUE | defaultTokenValue = { nullptr, 0.0, 0 } |
constexpr T_TOKEN | defaultToken = { TR_UNDEFINED, defaultTokenValue } |
typedef std::function<void( CONTEXT*, void* )> LIBEVAL::FUNC_CALL_REF |
Definition at line 109 of file libeval_compiler.h.
Enumerator | |
---|---|
CST_PARSE | |
CST_CODEGEN | |
CST_RUNTIME |
Definition at line 66 of file libeval_compiler.h.
Enumerator | |
---|---|
TR_UNDEFINED | |
TR_NUMBER | |
TR_IDENTIFIER | |
TR_ASSIGN | |
TR_STRUCT_REF | |
TR_STRING | |
TR_UNIT | |
TR_ARG_LIST | |
TR_NULL |
Definition at line 91 of file libeval_compiler.h.
enum LIBEVAL::VAR_TYPE_T |
Enumerator | |
---|---|
VT_STRING | |
VT_NUMERIC | |
VT_UNDEFINED | |
VT_PARSE_ERROR |
Definition at line 83 of file libeval_compiler.h.
void LIBEVAL::dumpNode | ( | wxString & | buf, |
TREE_NODE * | tok, | ||
int | depth = 0 |
||
) |
Definition at line 604 of file libeval_compiler.cpp.
References dumpNode(), formatNode(), formatOpName(), LIBEVAL::T_TOKEN_VALUE::idx, LIBEVAL::TREE_NODE::leaf, LIBEVAL::TREE_NODE::op, TR_ARG_LIST, TR_IDENTIFIER, TR_NUMBER, TR_OP_BINARY_MASK, TR_OP_FUNC_CALL, TR_STRING, TR_STRUCT_REF, TR_UNIT, and LIBEVAL::TREE_NODE::value.
Referenced by dumpNode(), and LIBEVAL::COMPILER::generateUCode().
const wxString LIBEVAL::formatNode | ( | TREE_NODE * | node | ) |
Definition at line 598 of file libeval_compiler.cpp.
References LIBEVAL::T_TOKEN_VALUE::str, and LIBEVAL::TREE_NODE::value.
Referenced by dumpNode(), LIBEVAL::COMPILER::generateUCode(), and squashParamList().
|
static |
Definition at line 87 of file libeval_compiler.cpp.
References TR_OP_ADD, TR_OP_BOOL_AND, TR_OP_BOOL_NOT, TR_OP_BOOL_OR, TR_OP_DIV, TR_OP_EQUAL, TR_OP_GREATER, TR_OP_GREATER_EQUAL, TR_OP_LESS, TR_OP_LESS_EQUAL, TR_OP_MUL, TR_OP_NOT_EQUAL, and TR_OP_SUB.
Referenced by dumpNode(), and LIBEVAL::UOP::Format().
TREE_NODE * LIBEVAL::newNode | ( | LIBEVAL::COMPILER * | compiler, |
int | op, | ||
const T_TOKEN_VALUE & | value | ||
) |
Definition at line 61 of file libeval_compiler.cpp.
References LIBEVAL::COMPILER::GcItem(), LIBEVAL::COMPILER::GetSourcePos(), LIBEVAL::T_TOKEN_VALUE::idx, libeval_dbg, LIBEVAL::T_TOKEN_VALUE::num, and LIBEVAL::T_TOKEN_VALUE::str.
|
static |
Definition at line 752 of file libeval_compiler.cpp.
References LIBEVAL::TREE_NODE::isVisited, LIBEVAL::TREE_NODE::leaf, LIBEVAL::TREE_NODE::op, prepareTree(), and TR_OP_FUNC_CALL.
Referenced by LIBEVAL::COMPILER::generateUCode(), and prepareTree().
Definition at line 771 of file libeval_compiler.cpp.
References formatNode(), LIBEVAL::TREE_NODE::leaf, libeval_dbg, LIBEVAL::TREE_NODE::op, TR_ARG_LIST, and TR_NULL.
Referenced by LIBEVAL::COMPILER::generateUCode().
|
constexpr |
Definition at line 129 of file libeval_compiler.h.
Referenced by LIBEVAL::COMPILER::Compile().
|
constexpr |
Definition at line 119 of file libeval_compiler.h.
Referenced by LIBEVAL::COMPILER::getToken().