Home
last modified time | relevance | path

Searched refs:nfa (Results 1 – 25 of 81) sorted by relevance

1234

/external/rust/crates/regex-automata/src/
Ddeterminize.rs7 use nfa::{self, NFA};
29 nfa: &'a NFA, field
44 stack: Vec<nfa::StateID>,
47 scratch_nfa_states: Vec<nfa::StateID>,
58 nfa_states: Vec<nfa::StateID>,
63 pub fn new(nfa: &'a NFA) -> Determinizer<'a, S> { in new()
69 nfa, in new()
70 dfa: DFARepr::empty().anchored(nfa.is_anchored()), in new()
82 let byte_classes = self.nfa.byte_classes().clone(); in with_byte_classes()
84 .anchored(self.nfa.is_anchored()); in with_byte_classes()
[all …]
/external/rust/crates/aho-corasick/src/
Dnfa.rs501 nfa: &'a mut NFA<S>, field
507 fn new(nfa: &'a mut NFA<S>, state_id: S) -> IterTransitionsMut<'a, S> { in new()
508 IterTransitionsMut { nfa, state_id, cur: 0 } in new()
511 fn nfa(&mut self) -> &mut NFA<S> { in nfa() method
512 self.nfa in nfa()
520 match self.nfa.states[self.state_id.to_usize()].trans { in next()
615 nfa: NFA<S>, field
625 nfa: NFA { in new()
659 self.nfa.byte_classes = self.byte_classes.build(); in compile()
661 self.nfa.prefilter = self.prefilter.build(); in compile()
[all …]
Dahocorasick.rs7 use nfa::{self, NFA};
1026 Imp::NFA(ref nfa) => nfa.heap_bytes(), in heap_bytes()
1045 Imp::NFA(ref nfa) => nfa.match_kind(), in match_kind()
1053 Imp::NFA(ref nfa) => nfa.start_state(), in start_state()
1063 Imp::NFA(ref nfa) => nfa.max_pattern_len(), in max_pattern_len()
1073 Imp::NFA(ref nfa) => nfa.pattern_count(), in pattern_count()
1082 Imp::NFA(ref nfa) => nfa.prefilter(), in prefilter()
1106 Imp::NFA(ref nfa) => nfa.overlapping_find_at( in overlapping_find_at()
1132 Imp::NFA(ref nfa) => { in earliest_find_at()
1133 nfa.earliest_find_at(prestate, haystack, at, state_id) in earliest_find_at()
[all …]
Ddfa.rs7 use nfa::{PatternID, PatternLength, NFA};
623 pub fn build<S: StateID>(&self, nfa: &NFA<S>) -> Result<DFA<S>> { in build()
625 nfa.byte_classes().clone() in build()
630 let trans = vec![fail_id(); alphabet_len * nfa.state_len()]; in build()
631 let matches = vec![vec![]; nfa.state_len()]; in build()
633 match_kind: nfa.match_kind().clone(), in build()
634 anchored: nfa.anchored(), in build()
636 start_id: nfa.start_state(), in build()
637 max_pattern_len: nfa.max_pattern_len(), in build()
638 pattern_count: nfa.pattern_count(), in build()
[all …]
/external/libnfnetlink/include/libnfnetlink/
Dlinux_nfnetlink_compat.h36 #define NFA_OK(nfa,len) ((len) > 0 && (nfa)->nfa_len >= sizeof(struct nfattr) \ argument
37 && (nfa)->nfa_len <= (len))
38 #define NFA_NEXT(nfa,attrlen) ((attrlen) -= NFA_ALIGN((nfa)->nfa_len), \ argument
39 (struct nfattr *)(((char *)(nfa)) + NFA_ALIGN((nfa)->nfa_len)))
42 #define NFA_DATA(nfa) ((void *)(((char *)(nfa)) + NFA_LENGTH(0))) argument
43 #define NFA_PAYLOAD(nfa) ((int)((nfa)->nfa_len) - NFA_LENGTH(0)) argument
Dlibnfnetlink.h57 int (*call)(struct nlmsghdr *nlh, struct nfattr *nfa[], void *data);
197 #define nfnl_parse_nested(tb, max, nfa) \ argument
198 nfnl_parse_attr((tb), (max), NFA_DATA((nfa)), NFA_PAYLOAD((nfa)))
206 extern void nfnl_build_nfa_iovec(struct iovec *iov, struct nfattr *nfa,
/external/kernel-headers/original/uapi/linux/netfilter/
Dnfnetlink_compat.h39 #define NFA_OK(nfa,len) ((len) > 0 && (nfa)->nfa_len >= sizeof(struct nfattr) \ argument
40 && (nfa)->nfa_len <= (len))
41 #define NFA_NEXT(nfa,attrlen) ((attrlen) -= NFA_ALIGN((nfa)->nfa_len), \ argument
42 (struct nfattr *)(((char *)(nfa)) + NFA_ALIGN((nfa)->nfa_len)))
45 #define NFA_DATA(nfa) ((void *)(((char *)(nfa)) + NFA_LENGTH(0))) argument
46 #define NFA_PAYLOAD(nfa) ((int)((nfa)->nfa_len) - NFA_LENGTH(0)) argument
/external/libnl/include/linux-private/linux/netfilter/
Dnfnetlink_compat.h38 #define NFA_OK(nfa,len) ((len) > 0 && (nfa)->nfa_len >= sizeof(struct nfattr) \ argument
39 && (nfa)->nfa_len <= (len))
40 #define NFA_NEXT(nfa,attrlen) ((attrlen) -= NFA_ALIGN((nfa)->nfa_len), \ argument
41 (struct nfattr *)(((char *)(nfa)) + NFA_ALIGN((nfa)->nfa_len)))
44 #define NFA_DATA(nfa) ((void *)(((char *)(nfa)) + NFA_LENGTH(0))) argument
45 #define NFA_PAYLOAD(nfa) ((int)((nfa)->nfa_len) - NFA_LENGTH(0)) argument
/external/skia/src/sksl/lex/
DRegexNode.cpp12 std::vector<int> RegexNode::createStates(NFA* nfa, const std::vector<int>& accept) const { in createStates() argument
16 result.push_back(nfa->addState(NFAState(fPayload.fChar, accept))); in createStates()
38 result.push_back(nfa->addState(NFAState(fPayload.fBool, chars, accept))); in createStates()
42 std::vector<int> right = fChildren[1].createStates(nfa, accept); in createStates()
43 result = fChildren[0].createStates(nfa, right); in createStates()
47 result.push_back(nfa->addState(NFAState(NFAState::kDot_Kind, accept))); in createStates()
50 std::vector<int> states = fChildren[0].createStates(nfa, accept); in createStates()
52 states = fChildren[1].createStates(nfa, accept); in createStates()
59 int id = nfa->addState(NFAState(placeholder)); in createStates()
61 result = fChildren[0].createStates(nfa, next); in createStates()
[all …]
DMain.cpp188 NFA nfa; in process() local
215 nfa.addRegex(node); in process()
218 nfa.addRegex(RegexParser().parse(pattern)); in process()
222 NFAtoDFA converter(&nfa); in process()
/external/skqp/src/sksl/lex/
DRegexNode.cpp12 std::vector<int> RegexNode::createStates(NFA* nfa, const std::vector<int>& accept) const { in createStates() argument
16 result.push_back(nfa->addState(NFAState(fPayload.fChar, accept))); in createStates()
38 result.push_back(nfa->addState(NFAState(fPayload.fBool, chars, accept))); in createStates()
42 std::vector<int> right = fChildren[1].createStates(nfa, accept); in createStates()
43 result = fChildren[0].createStates(nfa, right); in createStates()
47 result.push_back(nfa->addState(NFAState(NFAState::kDot_Kind, accept))); in createStates()
50 std::vector<int> states = fChildren[0].createStates(nfa, accept); in createStates()
52 states = fChildren[1].createStates(nfa, accept); in createStates()
59 int id = nfa->addState(NFAState(placeholder)); in createStates()
61 result = fChildren[0].createStates(nfa, next); in createStates()
[all …]
/external/libpcap/
Dpcap-netfilter-linux.c360 struct nfattr *nfa = (struct nfattr *) (buf + NLMSG_ALIGN(nlh->nlmsg_len)); in netfilter_send_config_msg() local
362 nfa->nfa_type = mynfa->nfa_type; in netfilter_send_config_msg()
363 nfa->nfa_len = NFA_LENGTH(mynfa->nfa_len); in netfilter_send_config_msg()
364 memcpy(NFA_DATA(nfa), mynfa->data, mynfa->nfa_len); in netfilter_send_config_msg()
365 nlh->nlmsg_len = NLMSG_ALIGN(nlh->nlmsg_len) + NFA_ALIGN(nfa->nfa_len); in netfilter_send_config_msg()
429 struct my_nfattr nfa; in nflog_send_config_cmd() local
433 nfa.data = &msg; in nflog_send_config_cmd()
434 nfa.nfa_type = NFULA_CFG_CMD; in nflog_send_config_cmd()
435 nfa.nfa_len = sizeof(msg); in nflog_send_config_cmd()
437 return nflog_send_config_msg(handle, family, group_id, &nfa); in nflog_send_config_cmd()
[all …]
/external/libnfnetlink/src/
Dlibnfnetlink.c101 struct nfattr *nfa = NFM_NFA(NLMSG_DATA(nlh)); in nfnl_dump_packet() local
109 nfa, ((void *)nfa - (void *)nlh)); in nfnl_dump_packet()
115 while (NFA_OK(nfa, len)) { in nfnl_dump_packet()
117 nfa, NFA_TYPE(nfa), nfa->nfa_len); in nfnl_dump_packet()
118 nfa = NFA_NEXT(nfa,len); in nfnl_dump_packet()
879 struct nfattr *nfa; in nfnl_addattr_l() local
890 nfa = NLMSG_TAIL(n); in nfnl_addattr_l()
891 nfa->nfa_type = type; in nfnl_addattr_l()
892 nfa->nfa_len = len; in nfnl_addattr_l()
893 memcpy(NFA_DATA(nfa), data, alen); in nfnl_addattr_l()
[all …]
/external/python/cpython2/Parser/
Dpgen.c35 } nfa; typedef
39 nfa *nf, node *n, int *pa, int *pb);
41 nfa *nf, node *n, int *pa, int *pb);
43 nfa *nf, node *n, int *pa, int *pb);
45 nfa *nf, node *n, int *pa, int *pb);
48 addnfastate(nfa *nf) in addnfastate()
63 addnfaarc(nfa *nf, int from, int to, int lbl) in addnfaarc()
78 static nfa *
81 nfa *nf; in newnfa()
84 nf = (nfa *)PyObject_MALLOC(sizeof(nfa)); in newnfa()
[all …]
/external/rust/crates/regex-automata/src/nfa/
Dcompiler.rs42 use nfa::map::{Utf8BoundedMap, Utf8SuffixKey, Utf8SuffixMap};
43 use nfa::range_trie::RangeTrie;
44 use nfa::{State, StateID, Transition, NFA};
86 let mut nfa = NFA::always_match(); in build() localVariable
87 self.build_with(&mut Compiler::new(), &mut nfa, expr)?; in build()
88 Ok(nfa) in build()
107 nfa: &mut NFA, in build_with()
112 compiler.compile(nfa, expr) in build_with()
286 fn compile(&self, nfa: &mut NFA, expr: &Hir) -> Result<()> { in compile()
287 nfa.anchored = self.config.anchored; in compile()
[all …]
Dmod.rs4 pub use nfa::compiler::Builder;
229 let nfa = NFA::always_match(); in always_match() localVariable
230 let dfa = dense::Builder::new().build_from_nfa::<usize>(&nfa).unwrap(); in always_match()
242 let nfa = NFA::never_match(); in never_match() localVariable
243 let dfa = dense::Builder::new().build_from_nfa::<usize>(&nfa).unwrap(); in never_match()
/external/antlr/tool/src/main/java/org/antlr/analysis/
DLL1DFA.java56 nfa = decisionStartState.nfa; in LL1DFA()
57 nAlts = nfa.grammar.getNumberOfAltsForDecisionNFA(decisionStartState); in LL1DFA()
83 nfa = decisionStartState.nfa; in LL1DFA()
84 nAlts = nfa.grammar.getNumberOfAltsForDecisionNFA(decisionStartState); in LL1DFA()
161 nfa.grammar.getNFAStateForAltOfDecision(decisionStartState, walkAlt); in getSynPredForAlt()
174 nfa.grammar.synPredUsedInDFA(this, ctx); in getSynPredForAlt()
DNFAState.java57 public NFA nfa = null; field in NFAState
108 public NFAState(NFA nfa) { in NFAState() argument
109 this.nfa = nfa; in NFAState()
198 int nAlts = nfa.grammar.getNumberOfAltsForDecisionNFA(nfaStart); in translateDisplayAltToWalkAlt()
DDFA.java154 public NFA nfa; field in DFA
229 nfa = decisionStartState.nfa; in DFA()
230 nAlts = nfa.grammar.getNumberOfAltsForDecisionNFA(decisionStartState); in DFA()
654 Interpreter interp = new Interpreter(nfa.grammar, input);
734 !nfa.grammar.decisionsWhoseDFAsUsesSemPreds.contains(this) &&
735 !nfa.grammar.decisionsWhoseDFAsUsesSynPreds.contains(this);
746 if ( nfa.grammar.type!=Grammar.LEXER ) {
750 Rule r = nfa.grammar.getLocallyDefinedRule(Grammar.ARTIFICIAL_TOKENS_RULENAME);
765 user_k = nfa.grammar.getUserMaxLookahead(decisionNumber);
770 return nfa.grammar.getAutoBacktrackMode(decisionNumber);
[all …]
DDecisionProbe.java317 Grammar g = dfa.nfa.grammar; in getInputSequenceDisplay()
365 dfa.nfa.grammar.getNFAStateForAltOfDecision(nfaStart,a); in getNFAPathStatesForAlt()
370 NFAState altStart = dfa.nfa.grammar.getNFAStateForAltOfDecision(nfaStart,alt); in getNFAPathStatesForAlt()
427 while ( it.hasNext() && !dfa.nfa.grammar.NFAToDFAConversionExternallyAborted() ) { in issueWarnings()
444 d.dfa.nfa.grammar.getDecisionBlockAST(d.dfa.decisionNumber); in issueWarnings()
477 dfa.nfa.grammar, in issueWarnings()
479 dfa.nfa.grammar.name, in issueWarnings()
503 dfa.nfa.grammar.getDecisionBlockAST(dfa.decisionNumber); in stripWildCardAlts()
571 NFAState ruleInvocationState = dfa.nfa.getState(c.state); in computeAltToProblemMaps()
632 dfa.nfa.grammar.numNonLLStar++; in reportNonLLStarDecision()
[all …]
/external/antlr/tool/src/main/java/org/antlr/tool/
DInterpreter.java224 actions.enterRule(s.nfa.grammar.getFileName(), start.enclosingRule.name); in parseEngine()
236 if ( s.getDecisionNumber()>0 && s.nfa.grammar.getNumberOfAltsForDecisionNFA(s)>1 ) { in parseEngine()
238 DFA dfa = s.nfa.grammar.getLookaheadDFA(s.getDecisionNumber()); in parseEngine()
271 if ( parseAlt > s.nfa.grammar.getNumberOfAltsForDecisionNFA(s) ) { in parseEngine()
273 alt = s.nfa.grammar.nfa.getState( s.endOfBlockStateNumber ); in parseEngine()
276 alt = s.nfa.grammar.getNFAStateForAltOfDecision(s, parseAlt); in parseEngine()
285 actions.exitRule(s.nfa.grammar.getFileName(), s.enclosingRule.name); in parseEngine()
321 actions.enterRule(s.nfa.grammar.getFileName(), s.enclosingRule.name); in parseEngine()
324 if ( !s.nfa.grammar.allDecisionDFAHaveBeenCreated() ) { in parseEngine()
325 s.nfa.grammar.createLookaheadDFAs(); in parseEngine()
[all …]
DNFAFactory.java50 NFA nfa = null; field in NFAFactory
62 public NFAFactory(NFA nfa) { in NFAFactory() argument
63 nfa.setFactory(this); in NFAFactory()
64 this.nfa = nfa; in NFAFactory()
68 NFAState n = new NFAState(nfa); in newState()
69 int state = nfa.getNewNFAStateNumber(); in newState()
71 nfa.addState(n); in newState()
89 s = nfa.getState(s.endOfBlockStateNumber); in optimizeAlternative()
129 int tokenType = nfa.grammar.getTokenType(atomAST.getText()); in build_Atom()
198 if ( nfa.grammar.type==Grammar.LEXER ) { in build_StringLiteralAtom()
[all …]
/external/rust/crates/regex/src/
Dexec.rs75 nfa: Program, field
181 pub fn nfa(mut self) -> Self { in nfa() method
305 nfa: Program::new(), in build()
317 let mut nfa = Compiler::new() in build() localVariable
336 nfa.prefixes = LiteralSearcher::prefixes(parsed.prefixes); in build()
337 dfa.prefixes = nfa.prefixes.clone(); in build()
343 nfa: nfa, in build()
431 self.ro.nfa.captures.len() * 2 in slots_len()
633 if self.ro.nfa.is_anchored_start { in captures_read_at()
704 let lits = &self.ro.nfa.prefixes; in find_literals()
[all …]
/external/python/cpython3/Parser/pgen/
Dautomata.py160 def from_nfa(cls, nfa): argument
223 assert isinstance(nfa, NFA)
241 add_closure(nfa.start, base_nfa_set)
244 states = [DFAState(nfa.name, base_nfa_set, nfa.end)]
274 next_state = DFAState(nfa.name, nfa_set, nfa.end)
281 return cls(nfa.name, states)
/external/libnetfilter_conntrack/src/
Dcallback.c32 int __callback(struct nlmsghdr *nlh, struct nfattr *nfa[], void *data) in __callback() argument
55 __parse_conntrack(nlh, nfa, ct); in __callback()
69 __parse_expect(nlh, nfa, exp); in __callback()

1234