Static Value-Flow Analysis
|
#include <CFGrammar.h>
Classes | |
struct | Symbol |
class | SymbolHash |
struct | SymbolVectorHash |
Public Types | |
typedef u32_t | Kind |
typedef u32_t | Attribute |
typedef u32_t | VariableAttribute |
typedef struct SVF::GrammarBase::Symbol | Symbol |
template<typename Key , typename Value , typename Hash = SymbolHash, typename KeyEqual = std::equal_to<Key>, typename Allocator = std::allocator<std::pair<const Key, Value>>> | |
using | SymbolMap = std::unordered_map< Key, Value, Hash, KeyEqual, Allocator > |
template<typename Key , typename Hash = SymbolVectorHash, typename KeyEqual = std::equal_to<Key>, typename Allocator = std::allocator<Key>> | |
using | SymbolSet = std::unordered_set< Key, Hash, KeyEqual, Allocator > |
typedef std::vector< Symbol > | Production |
typedef SymbolSet< Production > | Productions |
Static Public Member Functions | |
static Kind | getAttributedKind (Attribute attribute, Kind kind) |
static Kind | getVariabledKind (VariableAttribute variableAttribute, Kind kind) |
Protected Attributes | |
Kind | startKind |
Static Protected Attributes | |
static constexpr unsigned char | EdgeKindMaskBits = 8 |
We use the lower 8 bits to denote edge kind. | |
static constexpr unsigned char | AttributedKindMaskBits = 24 |
We use the lower 24 bits to denote attributed kind. | |
static constexpr u64_t | EdgeKindMask = (~0ULL) >> (64 - EdgeKindMaskBits) |
Private Attributes | |
Map< std::string, Kind > | nonterminals |
Map< std::string, Kind > | terminals |
Map< std::string, Kind > | EBNFSigns |
Set< Kind > | attributeKinds |
Map contains Signs' String and associated Symbols. | |
Map< Kind, Set< Attribute > > | kindToAttrsMap |
SymbolMap< Symbol, Productions > | rawProductions |
u32_t | totalKind |
Definition at line 36 of file CFGrammar.h.
Definition at line 40 of file CFGrammar.h.
Definition at line 39 of file CFGrammar.h.
typedef std::vector<Symbol> SVF::GrammarBase::Production |
Definition at line 156 of file CFGrammar.h.
Definition at line 157 of file CFGrammar.h.
using SVF::GrammarBase::SymbolMap = std::unordered_map<Key, Value, Hash, KeyEqual, Allocator> |
Definition at line 150 of file CFGrammar.h.
using SVF::GrammarBase::SymbolSet = std::unordered_set<Key, Hash, KeyEqual, Allocator> |
Definition at line 154 of file CFGrammar.h.
Definition at line 41 of file CFGrammar.h.
std::string GrammarBase::extractAttributeStrFromSymbolStr | ( | const std::string & | symbolStr | ) | const |
Definition at line 219 of file CFGrammar.cpp.
std::string GrammarBase::extractKindStrFromSymbolStr | ( | const std::string & | symbolStr | ) | const |
Definition at line 207 of file CFGrammar.cpp.
Definition at line 265 of file CFGrammar.h.
Definition at line 243 of file CFGrammar.h.
Definition at line 180 of file CFGrammar.h.
Definition at line 195 of file CFGrammar.h.
Definition at line 160 of file CFGrammar.h.
|
inline |
Definition at line 190 of file CFGrammar.h.
|
inline |
Definition at line 205 of file CFGrammar.h.
|
inline |
Definition at line 238 of file CFGrammar.h.
Definition at line 170 of file CFGrammar.h.
|
inline |
Definition at line 200 of file CFGrammar.h.
|
inlinestatic |
Definition at line 270 of file CFGrammar.h.
Definition at line 327 of file CFGrammar.cpp.
GrammarBase::Symbol GrammarBase::insertEBNFSigns | ( | std::string | strLit | ) |
Definition at line 311 of file CFGrammar.cpp.
|
inline |
Insert kind to nonterminal and return kind.
Definition at line 192 of file CFGrammar.cpp.
GrammarBase::Symbol GrammarBase::insertNonTerminalSymbol | ( | std::string | strLit | ) |
Definition at line 249 of file CFGrammar.cpp.
GrammarBase::Symbol GrammarBase::insertSymbol | ( | std::string | strLit | ) |
Definition at line 231 of file CFGrammar.cpp.
GrammarBase::Kind GrammarBase::insertTerminalKind | ( | std::string | strLit | ) |
From SymbolStr extract kind to inserted in nonterminal symbolStr = <kindStr> [_] [ attributeStr | variableattributeStr ]
Definition at line 177 of file CFGrammar.cpp.
GrammarBase::Symbol GrammarBase::insertTerminalSymbol | ( | std::string | strLit | ) |
Definition at line 280 of file CFGrammar.cpp.
std::string GrammarBase::kindToStr | ( | Kind | kind | ) | const |
Definition at line 103 of file CFGrammar.cpp.
Definition at line 50 of file CFGrammar.cpp.
Definition at line 185 of file CFGrammar.h.
Definition at line 45 of file CFGrammar.cpp.
Definition at line 165 of file CFGrammar.h.
void GrammarBase::setRawProductions | ( | SymbolMap< Symbol, Productions > & | rawProductions | ) |
Definition at line 40 of file CFGrammar.cpp.
|
inline |
Definition at line 210 of file CFGrammar.h.
Definition at line 175 of file CFGrammar.h.
|
inline |
Definition at line 215 of file CFGrammar.h.
GrammarBase::Kind GrammarBase::strToKind | ( | std::string | str | ) | const |
Definition at line 55 of file CFGrammar.cpp.
GrammarBase::Symbol GrammarBase::strToSymbol | ( | const std::string | str | ) | const |
Definition at line 74 of file CFGrammar.cpp.
std::string GrammarBase::symToStrDump | ( | Symbol | sym | ) | const |
Definition at line 139 of file CFGrammar.cpp.
We use the lower 24 bits to denote attributed kind.
Definition at line 277 of file CFGrammar.h.
Map contains Signs' String and associated Symbols.
Definition at line 284 of file CFGrammar.h.
Definition at line 283 of file CFGrammar.h.
|
staticconstexprprotected |
Definition at line 278 of file CFGrammar.h.
We use the lower 8 bits to denote edge kind.
Definition at line 276 of file CFGrammar.h.
Definition at line 285 of file CFGrammar.h.
Definition at line 281 of file CFGrammar.h.
|
private |
Definition at line 286 of file CFGrammar.h.
|
protected |
Definition at line 279 of file CFGrammar.h.
Definition at line 282 of file CFGrammar.h.
|
private |
Definition at line 287 of file CFGrammar.h.