OpenASIP 2.2
|
#include <OperationDAGLanguageParser.hh>
Classes | |
class | Token |
class | TokenTreeNode |
Public Member Functions | |
TokenizerData () | |
~TokenizerData () | |
void | addToken (const char *start, const char *end, OperationID id, std::string strVal) |
void | showTokenizedSource () |
const TokenTreeNode * | tokenTree () const |
Static Public Member Functions | |
static std::string | idString (OperationID id) |
Private Types | |
typedef std::map< std::pair< const char *, const char * >, Token * > | TokenContainerType |
Private Attributes | |
TokenContainerType | parsedTokens_ |
TokenTreeNode | root |
Class which is used by Spirit parser to create tokenized tree form of the source code.
Definition at line 148 of file OperationDAGLanguageParser.hh.
|
private |
Definition at line 705 of file OperationDAGLanguageParser.hh.
List of different type tokens.
Definition at line 154 of file OperationDAGLanguageParser.hh.
|
inline |
Definition at line 613 of file OperationDAGLanguageParser.hh.
|
inline |
Deletes all the parsed data.
Definition at line 618 of file OperationDAGLanguageParser.hh.
References parsedTokens_.
|
inline |
Creates new token based on parsed data or updates new type info for old token.
start | Start position of token. |
end | End position of token. |
id | Type of token. |
strVal | String of token. |
Definition at line 636 of file OperationDAGLanguageParser.hh.
References TokenizerData::TokenTreeNode::addToTokenTree(), parsedTokens_, and root.
Referenced by TokenizerActor::operator()().
|
inlinestatic |
Prints string value for each token.
id | Token type. |
Definition at line 229 of file OperationDAGLanguageParser.hh.
References ABSTRACT_DECLARATOR, ADDITIVE_EXPRESSION, AND_EXPRESSION, ASSIGNMENT_EXPRESSION, ASSIGNMENT_OPERATOR, CAST_EXPRESSION, COMPOUND_STATEMENT, CONDITIONAL_EXPRESSION, CONST_QUALIFER, CONSTANT_EXPRESSION, DECLARATION, DECLARATION_SPECIFIERS, DECLARATOR, DIRECT_ABSTRACT_DECLARATOR, DIRECT_DECLARATOR, ENUM_SPECIFIER, ENUMERATOR, EQUALITY_EXPRESSION, EXCLUSIVE_EXPRESSION, EXPRESSION, EXPRESSION_STATEMENT, EXTERNAL_DECLARATION, FLOAT_LITERAL, FUNCTION_DEFINITION, IDENTIFIER, IDENTIFIER_LIST, INCLUSIVE_EXPRESSION, INIT_DECLARATOR, INITIALIZER, INITIALIZER_LIST, INTEGER_LITERAL, INVALID_TOKEN, ITERATION_STATEMENT, JUMP_STATEMENT, LABELED_STATEMENT, LOGICAL_AND_EXPRESSION, LOGICAL_OR_EXPRESSION, MULTIPLICATIVE_EXPRESSION, PARAMETER_DECLARATION, PARAMETER_LIST, PARAMETER_TYPE_LIST, POINTER, POSTFIX_EXPRESSION, PRIMARY_EXPRESSION, RELATIONAL_EXPRESSION, SELECTION_STATEMENT, SHIFT_EXPRESSION, STATEMENT, STATEMENT_LIST, STORAGE_CLASS_SPECIFIER, STRING_LITERAL, STRUCT_DECLARATION, STRUCT_DECLARATOR, STRUCT_OR_UNION, STRUCT_OR_UNION_SPECIFIER, TYPE_NAME, TYPE_QUALIFER, TYPE_SPECIFIER, UNARY_ADDROF, UNARY_BANG, UNARY_EXPRESSION, UNARY_MINUS, UNARY_PLUS, UNARY_STAR, UNARY_TILDE, and VOLATILE_QUALIFER.
Referenced by showTokenizedSource(), and TokenizerData::TokenTreeNode::toStr().
|
inline |
Shows source code parsed to tokens.
Definition at line 675 of file OperationDAGLanguageParser.hh.
References idString(), and parsedTokens_.
|
inline |
Returns root node of token tree.
Definition at line 699 of file OperationDAGLanguageParser.hh.
References root.
Referenced by OperationDAGConverter::createDAG().
|
private |
Definition at line 707 of file OperationDAGLanguageParser.hh.
Referenced by addToken(), showTokenizedSource(), and ~TokenizerData().
|
private |
Definition at line 708 of file OperationDAGLanguageParser.hh.
Referenced by addToken(), and tokenTree().