Home
last modified time | relevance | path

Searched refs:parse_tree (Results 1 – 24 of 24) sorted by relevance

/external/libtextclassifier/native/utils/grammar/parsing/
Dmatcher.cc279 [terminal](ParseTree* parse_tree) { in AddTerminal() argument
280 parse_tree->terminal = terminal.data(); in AddTerminal()
281 parse_tree->rhs2 = nullptr; in AddTerminal()
295 [terminal](ParseTree* parse_tree) { in AddTerminal() argument
296 parse_tree->terminal = terminal.data(); in AddTerminal()
297 parse_tree->rhs2 = nullptr; in AddTerminal()
305 void Matcher::AddParseTree(ParseTree* parse_tree) { in AddParseTree() argument
306 TC3_CHECK_GE(parse_tree->codepoint_span.second, last_end_); in AddParseTree()
309 if (parse_tree->codepoint_span.second > last_end_) { in AddParseTree()
313 last_end_ = parse_tree->codepoint_span.second; in AddParseTree()
[all …]
Dlexer.h78 explicit Symbol(ParseTree* parse_tree) in Symbol()
80 codepoint_span(parse_tree->codepoint_span), in Symbol()
81 match_offset(parse_tree->match_offset), in Symbol()
82 parse_tree(parse_tree) {} in Symbol()
98 ParseTree* parse_tree; member
Dderivation.h28 const ParseTree* parse_tree; member
34 const ParseTree* GetParseTree() const { return parse_tree; } in GetParseTree()
81 if (sorted_candidates[j].parse_tree->codepoint_span.first <= in DeduplicateDerivations()
82 candidate.parse_tree->codepoint_span.first && in DeduplicateDerivations()
83 sorted_candidates[j].parse_tree->codepoint_span.second >= in DeduplicateDerivations()
84 candidate.parse_tree->codepoint_span.second) { in DeduplicateDerivations()
Dmatcher_test.cc110 result.back().codepoint_span = derivation.parse_tree->codepoint_span; in GetMatchResults()
112 GetNonterminalName(debug_information, derivation.parse_tree->lhs); in GetMatchResults()
113 if (derivation.parse_tree->IsTerminalRule()) { in GetMatchResults()
114 result.back().terminal = derivation.parse_tree->terminal; in GetMatchResults()
Dderivation.cc26 Traverse(parse_tree, [&result](const ParseTree* node) { in IsValid()
Dmatcher.h95 void AddParseTree(ParseTree* parse_tree);
Dparser.cc200 matcher->AddParseTree(symbol.parse_tree); in EmitSymbol()
/external/libtextclassifier/native/annotator/grammar/
Dgrammar-annotator.cc33 const grammar::ParseTree* parse_tree) { in GetCapturingNodes() argument
37 parse_tree, grammar::ParseTree::Type::kMapping)) { in GetCapturingNodes()
45 const grammar::ParseTree* parse_tree, in MatchSelectionBoundaries() argument
49 return parse_tree->codepoint_span; in MatchSelectionBoundaries()
55 GetCapturingNodes(parse_tree); in MatchSelectionBoundaries()
97 if (!SpansOverlap(selection, derivation.parse_tree->codepoint_span)) { in OverlappingDerivations()
104 derivation.parse_tree, in OverlappingDerivations()
117 const grammar::ParseTree* parse_tree, in InstantiateAnnotatedSpanFromDerivation() argument
120 result->span = MatchSelectionBoundaries(parse_tree, interpretation); in InstantiateAnnotatedSpanFromDerivation()
123 input_context, parse_tree, interpretation, &classification)) { in InstantiateAnnotatedSpanFromDerivation()
[all …]
Dgrammar-annotator.h69 const grammar::ParseTree* parse_tree,
76 const grammar::ParseTree* parse_tree,
/external/python/cpython3/Lib/email/
Dheaderregistry.py204 def init(self, name, *, parse_tree, defects): argument
206 self._parse_tree = parse_tree
407 kwds['parse_tree'] = parse_tree = cls.value_parser(value)
408 kwds['decoded'] = str(parse_tree)
409 kwds['defects'].extend(parse_tree.all_defects)
410 kwds['major'] = None if parse_tree.minor is None else parse_tree.major
411 kwds['minor'] = parse_tree.minor
412 if parse_tree.minor is not None:
445 kwds['parse_tree'] = parse_tree = cls.value_parser(value)
446 kwds['decoded'] = str(parse_tree)
[all …]
D_header_value_parser.py2762 def _refold_parse_tree(parse_tree, *, policy): argument
2774 parts = list(parse_tree)
/external/libtextclassifier/native/utils/grammar/testing/
Dutils.h41 inline std::ostream& operator<<(std::ostream& os, const ParseTree* parse_tree) {
42 return os << "ParseTree(lhs=" << parse_tree->lhs
43 << ", begin=" << parse_tree->codepoint_span.first
44 << ", end=" << parse_tree->codepoint_span.second << ")";
50 << "parse_tree=" << derivation.parse_tree << ")";
60 arg.parse_tree->codepoint_span,
/external/libtextclassifier/native/utils/grammar/semantics/
Dcomposer.cc87 if (!derivation.parse_tree->IsUnaryRule() || in Eval()
88 derivation.parse_tree->unary_rule_rhs()->type != in Eval()
94 derivation.parse_tree->unary_rule_rhs()), in Eval()
Deval-context.h36 const ParseTree* parse_tree = nullptr; member
/external/selinux/libsepol/cil/src/
Dcil_parser.c199 int cil_parser(char *_path, char *buffer, uint32_t size, struct cil_tree **parse_tree) in cil_parser() argument
222 tree = *parse_tree; in cil_parser()
305 *parse_tree = tree; in cil_parser()
Dcil_parser.h35 int cil_parser(char *path, char *buffer, uint32_t size, struct cil_tree **parse_tree);
Dcil_build_ast.h235 int cil_build_ast(struct cil_db *db, struct cil_tree_node *parse_tree, struct cil_tree_node *ast);
Dcil_build_ast.c6557 int cil_build_ast(struct cil_db *db, struct cil_tree_node *parse_tree, struct cil_tree_node *ast) in cil_build_ast() argument
6562 if (db == NULL || parse_tree == NULL || ast == NULL) { in cil_build_ast()
6573 …rc = cil_tree_walk(parse_tree, __cil_build_ast_node_helper, NULL, __cil_build_ast_last_child_helpe… in cil_build_ast()
/external/antlr/runtime/Ruby/lib/antlr3/tree/
Dwizard.rb202 when :open then return parse_tree
213 def parse_tree method in ANTLR3.AST.Wizard.PatternParser
221 subtree = parse_tree
/external/libtextclassifier/native/utils/grammar/semantics/evaluators/
Dspan-eval.h39 context.text_context->Span(context.parse_tree->codepoint_span), arena); in Apply()
/external/libtextclassifier/native/utils/grammar/
Danalyzer.cc63 EvaluatedDerivation{{/*parse_tree=*/derivation.parse_tree, in Parse()
/external/libtextclassifier/native/annotator/datetime/
Dgrammar-parser.cc113 evaluated_derivation.parse_tree->codepoint_span; in Parse()
/external/libtextclassifier/native/actions/
Dgrammar-actions.cc54 derivation.parse_tree, grammar::ParseTree::Type::kMapping)) { in InstantiateActionsFromMatch()
/external/iproute2/tc/
Dm_ematch.c173 static int parse_tree(struct nlmsghdr *n, struct ematch *tree) in parse_tree() function
352 if (parse_tree(n, ematch_root) < 0) in parse_ematch()