|
| CFGrammar () |
|
Productions & | getEpsilonProds () |
|
SymbolMap< Symbol, Productions > & | getSingleRHSToProds () |
|
SymbolMap< Symbol, Productions > & | getFirstRHSToProds () |
|
SymbolMap< Symbol, Productions > & | getSecondRHSToProds () |
|
const bool | hasProdsFromFirstRHS (const Symbol sym) const |
|
const bool | hasProdsFromSingleRHS (const Symbol sym) const |
|
const bool | hasProdsFromSecondRHS (const Symbol sym) const |
|
const Productions & | getProdsFromSingleRHS (const Symbol sym) const |
|
const Productions & | getProdsFromFirstRHS (const Symbol sym) const |
|
const Productions & | getProdsFromSecondRHS (const Symbol sym) const |
|
const Symbol & | getLHSSymbol (const Production &prod) const |
|
const Symbol & | getFirstRHSSymbol (const Production &prod) const |
|
const Symbol & | getSecondRHSSymbol (const Production &prod) const |
|
void | dump () const |
|
void | dump (std::string fileName) const |
|
const u32_t | num_generator () |
|
Map< std::string, Kind > & | getNonterminals () |
|
void | setNonterminals (Map< std::string, Kind > &nonterminals) |
|
Map< std::string, Kind > & | getTerminals () |
|
void | setTerminals (Map< std::string, Kind > &terminals) |
|
Map< std::string, Kind > & | getEBNFSigns () |
|
void | setEBNFSigns (Map< std::string, Kind > &EBNFSigns) |
|
SymbolMap< Symbol, Productions > & | getRawProductions () |
|
const Map< Kind, Set< Attribute > > & | getKindToAttrsMap () const |
|
Kind | getTotalKind () |
|
Kind | getStartKind () |
|
void | setStartKind (Kind startKind) |
|
void | setTotalKind (Kind totalKind) |
|
std::string | extractKindStrFromSymbolStr (const std::string &symbolStr) const |
|
std::string | extractAttributeStrFromSymbolStr (const std::string &symbolStr) const |
|
void | setRawProductions (SymbolMap< Symbol, Productions > &rawProductions) |
|
void | setKindToAttrsMap (const Map< Kind, Set< Attribute > > &kindToAttrsMap) |
|
void | setAttributeKinds (const Set< Kind > &attributeKind) |
|
Kind | strToKind (std::string str) const |
|
Symbol | strToSymbol (const std::string str) const |
|
std::string | kindToStr (Kind kind) const |
|
std::string | symToStrDump (Symbol sym) const |
|
Symbol | getSymbol (const Production &prod, u32_t pos) |
|
const Set< Kind > & | getAttrSyms () const |
|
Kind | insertNonterminalKind (std::string const kindStr) |
| Insert kind to nonterminal and return kind.
|
|
Kind | insertTerminalKind (std::string strLit) |
|
Symbol | insertSymbol (std::string strLit) |
|
Symbol | insertNonTerminalSymbol (std::string strLit) |
|
Symbol | insertTerminalSymbol (std::string strLit) |
|
Symbol | insertEBNFSigns (std::string strLit) |
|
void | insertAttribute (Kind kind, Attribute a) |
|
|
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 |
|
Kind | startKind |
|
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) |
|
Definition at line 290 of file CFGrammar.h.