Searched refs:ForestNode (Results 1 – 10 of 10) sorted by relevance
| /llvm-project-15.0.7/clang-tools-extra/pseudo/include/clang-pseudo/ |
| H A D | Forest.h | 44 class alignas(class ForestNode *) ForestNode { in alignas() argument 116 ForestNode(const ForestNode &) = delete; in alignas() 117 ForestNode &operator=(const ForestNode &) = delete; in alignas() 118 ForestNode(ForestNode &&) = delete; in alignas() 119 ForestNode &operator=(ForestNode &&) = delete; in alignas() 185 ForestNode &create(ForestNode::Kind K, SymbolID SID, Token::Index Start, in create() 190 sizeof(ForestNode) + Elements.size() * sizeof(ForestNode *), in create() 191 alignof(ForestNode))) ForestNode(K, SID, Start, Data); in create() 201 class ForestNode::RecursiveIterator 205 const ForestNode *Parent; [all …]
|
| H A D | GLR.h | 81 const ForestNode *Payload = nullptr; in alignas() 91 const Node *addNode(LRTable::StateID State, const ForestNode *Symbol, 131 const ForestNode &glrParse(const ParseParams &Params, SymbolID StartSymbol, 138 const ForestNode &NextTok, const ParseParams &Params,
|
| H A D | Language.h | 18 class ForestNode; variable 23 llvm::ArrayRef<const ForestNode *> RHS;
|
| /llvm-project-15.0.7/clang-tools-extra/pseudo/lib/ |
| H A D | Forest.cpp | 19 void ForestNode::RecursiveIterator::operator++() { in operator ++() 43 llvm::iterator_range<ForestNode::RecursiveIterator> 44 ForestNode::descendants() const { in descendants() 48 std::string ForestNode::dump(const Grammar &G) const { in dump() 63 std::string ForestNode::dumpRecursive(const Grammar &G, in dumpRecursive() 69 std::function<void(const ForestNode *)> CountVisits = in dumpRecursive() 70 [&](const ForestNode *P) { in dumpRecursive() 103 llvm::ArrayRef<const ForestNode *> Children; in dumpRecursive() 179 llvm::ArrayRef<ForestNode> 181 ForestNode *Terminals = Arena.Allocate<ForestNode>(Code.tokens().size()); in createTerminals() [all …]
|
| H A D | GLR.cpp | 67 std::vector<const ForestNode *> DiscardedParse; in glrRecover() 93 std::vector<const ForestNode *> Path; in glrRecover() 183 const ForestNode &Placeholder = in glrRecover() 223 const ForestNode &NewTok, const ParseParams &Params, in glrShift() 225 assert(NewTok.kind() == ForestNode::Terminal); in glrShift() 370 llvm::ArrayRef<const ForestNode *> S; 424 llvm::ArrayRef<const ForestNode *> RHS) const { in canReduce() 484 std::vector<const ForestNode *> SequenceNodes; 519 const ForestNode *Parsed = in pushNext() 581 const ForestNode *Parsed = in popAndPushTrivial() [all …]
|
| /llvm-project-15.0.7/clang-tools-extra/pseudo/tool/ |
| H A D | HTMLForest.cpp | 61 const ForestNode &Root; 124 std::vector<std::pair<const ForestNode *, /*End*/ Token::Index>> Sequence; in writeForestJSON() 125 llvm::DenseMap<const ForestNode *, unsigned> Index; in writeForestJSON() 126 auto AssignID = [&](const ForestNode *N, Token::Index End) -> unsigned { in writeForestJSON() 138 const ForestNode *N = Sequence[I].first; in writeForestJSON() 143 case ForestNode::Terminal: in writeForestJSON() 147 case ForestNode::Sequence: in writeForestJSON() 151 case ForestNode::Ambiguous: in writeForestJSON() 155 case ForestNode::Opaque: in writeForestJSON() 183 const ForestNode &Root, const TokenStream &Stream) { in writeHTMLForest()
|
| H A D | ClangPseudo.cpp | 27 using clang::pseudo::ForestNode; 73 const ForestNode &Root, const TokenStream &); 80 NodeStats(const ForestNode &Root, in NodeStats() 81 llvm::function_ref<bool(const ForestNode &)> Filter) { in NodeStats() 83 for (const ForestNode &N : Root.descendants()) in NodeStats() 179 for (auto &P : {std::make_pair("Ambiguous", ForestNode::Ambiguous), in main() 180 std::make_pair("Opaque", ForestNode::Opaque)}) { in main() 195 llvm::DenseSet<const ForestNode *> Visited; in main() 197 if (N.kind() == ForestNode::Opaque) { in main() 199 } else if (N.kind() == ForestNode::Ambiguous) { in main() [all …]
|
| /llvm-project-15.0.7/clang-tools-extra/pseudo/lib/cxx/ |
| H A D | CXX.cpp | 99 const ArrayRef<const ForestNode *> RHS, in onlyToken() 106 const ForestNode &onlySymbol(SymbolID Kind, in onlySymbol() 107 const ArrayRef<const ForestNode *> RHS, in onlySymbol() 113 bool isFunctionDeclarator(const ForestNode *Declarator) { in isFunctionDeclarator() 119 if (Declarator->kind() != ForestNode::Sequence) in isFunctionDeclarator() 172 bool hasExclusiveType(const ForestNode *N) { in hasExclusiveType() 183 if (N->kind() == ForestNode::Opaque) in hasExclusiveType() 185 if (N->kind() == ForestNode::Ambiguous) in hasExclusiveType() 188 assert(N->kind() == ForestNode::Sequence); in hasExclusiveType() 272 const ForestNode &N = onlySymbol((SymbolID)Symbol::kind, P.RHS, P.Tokens); \ in buildGuards()
|
| /llvm-project-15.0.7/clang-tools-extra/pseudo/unittests/ |
| H A D | ForestTest.cpp | 167 std::vector<const ForestNode *> Nodes; in TEST_F() 168 for (const ForestNode &N : Z->descendants()) in TEST_F() 173 for (const ForestNode &N : X->descendants()) in TEST_F()
|
| H A D | GLRTest.cpp | 153 ForestNode &SemiTerminal = Arena.createTerminal(tok::semi, 0); in TEST_F() 414 EXPECT_EQ(NewHeads.front()->Payload->kind(), ForestNode::Opaque); in TEST_F() 524 const ForestNode &Parsed = in TEST_F() 561 const ForestNode &Parsed = in TEST_F() 590 const ForestNode &Parsed = in TEST_F() 620 const ForestNode &Parsed = in TEST_F() 643 const ForestNode &Parsed = in TEST_F()
|