Home
last modified time | relevance | path

Searched refs:ruleMemo (Results 1 – 25 of 30) sorted by relevance

12

/external/antlr/runtime/ObjC/Framework/
DRecognizerSharedState.m42 @synthesize ruleMemo;
80 ruleMemo = [[RuleStack newRuleStack:cnt] retain];
83 [ruleMemo addObject:aHashRule];
110 ruleMemo = [[RuleStack newRuleStack:aLen] retain];
113 [ruleMemo addObject:aHashRule];
140 if ( aState.ruleMemo == nil ) {
142 ruleMemo = [[RuleStack newRuleStack:cnt] retain];
145 [ruleMemo addObject:aHashRule];
149 ruleMemo = aState.ruleMemo;
150 if ( [ruleMemo count] == 0 ) {
[all …]
DRecognizerSharedState.h41 …__strong RuleStack *ruleMemo; // store previous results of matching rules so we don't have to do i… variable
59 @property (retain, getter=getRuleMemo, setter=setRuleMemo:) RuleStack *ruleMemo;
DBaseRecognizer.m192 if ( state.ruleMemo != nil ) {
193 if ( [state.ruleMemo count] )
194 [state.ruleMemo removeAllObjects];
1006 if ( (aHashRule = [state.ruleMemo objectAtIndex:ruleIndex]) == nil ) {
1008 [state.ruleMemo insertObject:aHashRule atIndex:ruleIndex];
1054 aRuleStack = state.ruleMemo;
1061 …if (debug) NSLog(@"!!!!!!!!! memo size is %d, but rule index is %d", [state.ruleMemo length], rule…
1079 aRuleStack = state.ruleMemo;
/external/antlr/runtime/Java/src/main/java/org/antlr/runtime/
DRecognizerSharedState.java81 public Map<Integer, Integer>[] ruleMemo; field in RecognizerSharedState
135 if ( state.ruleMemo!=null ) { in RecognizerSharedState()
136 this.ruleMemo = (Map<Integer, Integer>[])new Map<?, ?>[state.ruleMemo.length]; in RecognizerSharedState()
137 System.arraycopy(state.ruleMemo, 0, this.ruleMemo, 0, state.ruleMemo.length); in RecognizerSharedState()
DBaseRecognizer.java83 for (int i = 0; state.ruleMemo!=null && i < state.ruleMemo.length; i++) { // wipe cache in reset()
84 state.ruleMemo[i] = null; in reset()
794 if ( state.ruleMemo[ruleIndex]==null ) { in getRuleMemoization()
795 state.ruleMemo[ruleIndex] = new HashMap<Integer, Integer>(); in getRuleMemoization()
798 state.ruleMemo[ruleIndex].get(ruleStartIndex); in getRuleMemoization()
838 if ( state.ruleMemo==null ) { in memoize()
841 if ( ruleIndex >= state.ruleMemo.length ) { in memoize()
842 …System.err.println("!!!!!!!!! memo size is "+state.ruleMemo.length+", but rule index is "+ruleInde… in memoize()
844 if ( state.ruleMemo[ruleIndex]!=null ) { in memoize()
845 state.ruleMemo[ruleIndex].put(ruleStartIndex, stopTokenIndex); in memoize()
[all …]
/external/antlr/runtime/JavaScript/src/org/antlr/runtime/
DBaseRecognizer.js85 if (this.state.ruleMemo) {
86 for (i=0, len=this.state.ruleMemo.length; i<len; i++) {
87 this.state.ruleMemo[i] = null;
843 if ( !this.state.ruleMemo[ruleIndex] ) {
844 this.state.ruleMemo[ruleIndex] = {};
847 this.state.ruleMemo[ruleIndex][ruleStartIndex];
893 if ( !org.antlr.lang.isValue(this.state.ruleMemo) ) {
896 if ( ruleIndex >= this.state.ruleMemo.length ) {
897 …throw new Error("!!!!!!!!! memo size is "+this.state.ruleMemo.length+", but rule index is "+ruleIn…
899 if ( org.antlr.lang.isValue(this.state.ruleMemo[ruleIndex]) ) {
[all …]
DRecognizerSharedState.js51 this.ruleMemo = null;
/external/antlr/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime/
DBaseRecognizer.cs110 … for (int i = 0; state.ruleMemo != null && i < state.ruleMemo.Length; i++) { // wipe cache in Reset()
111 state.ruleMemo[i] = null; in Reset()
851 if (state.ruleMemo[ruleIndex] == null) { in GetRuleMemoization()
852 state.ruleMemo[ruleIndex] = new Dictionary<int, int>(); in GetRuleMemoization()
856 if (!state.ruleMemo[ruleIndex].TryGetValue(ruleStartIndex, out stopIndex)) in GetRuleMemoization()
899 if (state.ruleMemo == null) { in Memoize()
903 if (ruleIndex >= state.ruleMemo.Length) { in Memoize()
905 …TraceDestination.WriteLine("!!!!!!!!! memo size is " + state.ruleMemo.Length + ", but rule index i… in Memoize()
907 if (state.ruleMemo[ruleIndex] != null) { in Memoize()
908 state.ruleMemo[ruleIndex][ruleStartIndex] = stopTokenIndex; in Memoize()
[all …]
DRecognizerSharedState.cs105 public IDictionary<int, int>[] ruleMemo; field in Antlr.Runtime.RecognizerSharedState
171 if (state.ruleMemo != null) in RecognizerSharedState()
172 ruleMemo = (IDictionary<int, int>[])state.ruleMemo.Clone(); in RecognizerSharedState()
/external/antlr/runtime/CSharp3/Sources/Antlr3.Runtime/
DBaseRecognizer.cs121 for ( int i = 0; state.ruleMemo != null && i < state.ruleMemo.Length; i++ ) in Reset()
123 state.ruleMemo[i] = null; in Reset()
962 if ( state.ruleMemo[ruleIndex] == null ) in GetRuleMemoization()
964 state.ruleMemo[ruleIndex] = new Dictionary<int, int>(); in GetRuleMemoization()
968 if ( !state.ruleMemo[ruleIndex].TryGetValue( ruleStartIndex, out stopIndex ) ) in GetRuleMemoization()
1017 if ( state.ruleMemo == null ) in Memoize()
1022 if ( ruleIndex >= state.ruleMemo.Length ) in Memoize()
1025 …TraceDestination.WriteLine("!!!!!!!!! memo size is " + state.ruleMemo.Length + ", but rule index i… in Memoize()
1027 if ( state.ruleMemo[ruleIndex] != null ) in Memoize()
1029 state.ruleMemo[ruleIndex][ruleStartIndex] = stopTokenIndex; in Memoize()
[all …]
DRecognizerSharedState.cs107 public IDictionary<int, int>[] ruleMemo; field in Antlr.Runtime.RecognizerSharedState
175 if ( state.ruleMemo != null ) in RecognizerSharedState()
176 ruleMemo = (IDictionary<int, int>[])state.ruleMemo.Clone(); in RecognizerSharedState()
/external/antlr/runtime/C/src/
Dantlr3baserecognizer.c121 recognizer->state->ruleMemo = NULL; in antlr3BaseRecognizerNew()
208 if (recognizer->state->ruleMemo != NULL) in freeBR()
210 recognizer->state->ruleMemo->free(recognizer->state->ruleMemo); in freeBR()
211 recognizer->state->ruleMemo = NULL; in freeBR()
1866 entry = recognizer->state->ruleMemo->get(recognizer->state->ruleMemo, (ANTLR3_INTKEY)ruleIndex); in getRuleMemoization()
1881 …recognizer->state->ruleMemo->add(recognizer->state->ruleMemo, (ANTLR3_INTKEY)ruleIndex, ANTLR3_HAS… in getRuleMemoization()
2037 entry = recognizer->state->ruleMemo->get(recognizer->state->ruleMemo, (ANTLR3_INTKEY)ruleIndex); in memoize()
2138 if (recognizer->state->ruleMemo != NULL) in reset()
2140 recognizer->state->ruleMemo->free(recognizer->state->ruleMemo); in reset()
2141 recognizer->state->ruleMemo = antlr3IntTrieNew(15); /* 16 bit depth is enough for 32768 rules! */ in reset()
/external/antlr/runtime/Python/antlr3/
Drecognizers.py85 self.ruleMemo = None
193 if self._state.ruleMemo is not None:
194 self._state.ruleMemo = {}
920 if ruleIndex not in self._state.ruleMemo:
921 self._state.ruleMemo[ruleIndex] = {}
923 return self._state.ruleMemo[ruleIndex].get(
964 if ruleIndex in self._state.ruleMemo:
965 self._state.ruleMemo[ruleIndex][ruleStartIndex] = stopTokenIndex
/external/antlr/runtime/Python3/antlr3/
Drecognizers.py83 self.ruleMemo = None
192 if self._state.ruleMemo is not None:
193 self._state.ruleMemo = {}
895 if ruleIndex not in self._state.ruleMemo:
896 self._state.ruleMemo[ruleIndex] = {}
898 return self._state.ruleMemo[ruleIndex].get(
939 if ruleIndex in self._state.ruleMemo:
940 self._state.ruleMemo[ruleIndex][ruleStartIndex] = stopTokenIndex
/external/antlr/runtime/ActionScript/project/src/org/antlr/runtime/
DBaseRecognizer.as48 for (var i:int = 0; state.ruleMemo!=null && i < state.ruleMemo.length; i++) { // wipe cache
49 state.ruleMemo[i] = null;
722 if ( state.ruleMemo[ruleIndex]==undefined ) {
723 state.ruleMemo[ruleIndex] = new Array();
725 var stopIndex:* = state.ruleMemo[ruleIndex][ruleStartIndex];
765 if ( state.ruleMemo==null ) {
768 if ( ruleIndex >= state.ruleMemo.length ) {
769 trace("!!!!!!!!! memo size is "+state.ruleMemo.length+", but rule index is "+ruleIndex);
772 if ( state.ruleMemo[ruleIndex]!=null ) {
773 state.ruleMemo[ruleIndex][ruleStartIndex] = stopTokenIndex;
[all …]
DRecognizerSharedState.as46 * the stop token index for each rule. ruleMemo[ruleIndex] is
52 public var ruleMemo:Array; variable in org.antlr.runtime.RecognizerSharedState
/external/antlr/runtime/C/include/
Dantlr3recognizersharedstate.h120 pANTLR3_INT_TRIE ruleMemo; member
/external/antlr/runtime/Cpp/include/
Dantlr3recognizersharedstate.hpp241 void set_ruleMemo( RuleMemoType* ruleMemo );
Dantlr3recognizersharedstate.inl189 …R_INLINE void RecognizerSharedState<ImplTraits, StreamType>::set_ruleMemo( RuleMemoType* ruleMemo ) argument
191 m_ruleMemo = ruleMemo;
/external/antlr/tool/src/main/resources/org/antlr/codegen/templates/ObjC/
DObjC.stg346 if ( state.ruleMemo == nil ) {
347 state.ruleMemo = [[RuleStack newRuleStackWithSize:<numRules>+1] retain];
349 if ( [state.ruleMemo count] == 0 ) {
351 … <! [state.ruleMemo addObject:[NSNull null]]; /* dummy entry to ensure 1-basedness. */ !>
353 [state.ruleMemo addObject:[HashRule newHashRuleWithLen:17]];
777 state.ruleMemo = [[RuleStack newRuleStack:<numRules>+1] retain];<\n> <! index from 1..n !>
/external/antlr/tool/src/main/resources/org/antlr/codegen/templates/JavaScript/
DJavaScript.stg44 this.state.ruleMemo = {};
232 this.state.ruleMemo = {};<\n> <! index from 1..n !>
/external/antlr/tool/src/main/resources/org/antlr/codegen/templates/Python3/
DPython3.stg128 self._state.ruleMemo = {}
263 self._state.ruleMemo = {}
/external/antlr/tool/src/main/resources/org/antlr/codegen/templates/Scala/
DScala.stg94 state.ruleMemo = new Array[java.util.Map[_,_]](<numRules>+1)<\n> <! index from 1..n !>
247 this.state.ruleMemo = new Array[java.util.Map[_,_]](<length(grammar.allImportedRules)>+1)<\n> <! in…
/external/antlr/tool/src/main/resources/org/antlr/codegen/templates/Java/
DJava.stg111 state.ruleMemo = new HashMap[<numRules>+1];<\n><! index from 1..n !>
270 this.state.ruleMemo = new HashMap[<length(grammar.allImportedRules)>+1];<\n><! index from 1..n !>
/external/antlr/tool/src/main/resources/org/antlr/codegen/templates/ActionScript/
DActionScript.stg83 this.state.ruleMemo = new Array(<numRules>+1);<\n> <! index from 1..n !>
227 this.state.ruleMemo = new Array(<length(grammar.allImportedRules)>+1);<\n> <! index from 1..n !>

12