Home
last modified time | relevance | path

Searched refs:rules_set (Results 1 – 6 of 6) sorted by relevance

/external/libtextclassifier/native/utils/grammar/parsing/
Dmatcher_test.cc135 const RulesSet* rules_set = in TEST_F() local
137 Matcher matcher(&unilib_, rules_set, &arena_); in TEST_F()
144 EXPECT_THAT(GetMatchResults(matcher.chart(), rules_set->debug_information()), in TEST_F()
192 const RulesSet* rules_set = in TEST_F() local
194 Matcher matcher(&unilib_, rules_set, &arena_); in TEST_F()
203 EXPECT_THAT(GetMatchResults(matcher.chart(), rules_set->debug_information()), in TEST_F()
227 const RulesSet* rules_set = in TEST_F() local
229 Matcher matcher(&unilib_, rules_set, &arena_); in TEST_F()
238 EXPECT_THAT(GetMatchResults(matcher.chart(), rules_set->debug_information()), in TEST_F()
251 const RulesSet* rules_set = in TEST_F() local
[all …]
Dmatcher.cc157 T input_iterator, const RulesSet* rules_set, in FindTerminalMatches() argument
167 input_iterator, rules_set->terminals()->data(), in FindTerminalMatches()
171 return rules_set->lhs_set()->Get( in FindTerminalMatches()
178 const RulesSet_::LhsSet* FindUnaryRulesMatches(const RulesSet* rules_set, in FindUnaryRulesMatches() argument
186 return rules_set->lhs_set()->Get(entry->value()); in FindUnaryRulesMatches()
193 const RulesSet* rules_set, const RulesSet_::Rules* rules, in FindBinaryRulesMatches() argument
214 return rules_set->lhs_set()->Get(rule->lhs_set_index()); in FindBinaryRulesMatches()
222 inline void GetLhs(const RulesSet* rules_set, const int lhs_entry, in GetLhs() argument
232 const RulesSet_::Lhs* lhs = rules_set->lhs()->Get(-lhs_entry); in GetLhs()
/external/libtextclassifier/native/utils/grammar/
Danalyzer.cc24 Analyzer::Analyzer(const UniLib* unilib, const RulesSet* rules_set) in Analyzer() argument
33 parser_(unilib, rules_set),
34 semantic_evaluator_(rules_set->semantic_values_schema() != nullptr
36 rules_set->semantic_values_schema()->data())
39 Analyzer::Analyzer(const UniLib* unilib, const RulesSet* rules_set, in Analyzer() argument
42 parser_(unilib, rules_set), in Analyzer()
43 semantic_evaluator_(rules_set->semantic_values_schema() != nullptr in Analyzer()
45 rules_set->semantic_values_schema()->data()) in Analyzer()
Danalyzer.h36 explicit Analyzer(const UniLib* unilib, const RulesSet* rules_set);
37 explicit Analyzer(const UniLib* unilib, const RulesSet* rules_set,
/external/libtextclassifier/native/utils/grammar/utils/
Dir.cc91 int AddLhsSet(const Ir::LhsSet& lhs_set, RulesSetT* rules_set) { in AddLhsSet() argument
94 const int output_size = rules_set->lhs_set.size(); in AddLhsSet()
96 if (IsSameLhsSet(lhs_set, *rules_set->lhs_set[i], rules_set->lhs)) { in AddLhsSet()
102 rules_set->lhs_set.emplace_back(std::make_unique<RulesSet_::LhsSetT>()); in AddLhsSet()
103 RulesSet_::LhsSetT* serialized_lhs_set = rules_set->lhs_set.back().get(); in AddLhsSet()
112 const int lhs_size = rules_set->lhs.size(); in AddLhsSet()
115 if (IsSameLhs(lhs, rules_set->lhs[i])) { in AddLhsSet()
128 rules_set->lhs.push_back( in AddLhsSet()
140 RulesSetT* rules_set, RulesSet_::RulesT* rules) { in SerializeUnaryRulesShard() argument
143 it.first, AddLhsSet(it.second, rules_set))); in SerializeUnaryRulesShard()
[all …]
Dir.h223 RulesSetT* rules_set,