Home
last modified time | relevance | path

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

12

/external/antlr/antlr-3.4/runtime/ObjC/Framework/
DANTLRRecognizerSharedState.m42 @synthesize ruleMemo;
80 ruleMemo = [[ANTLRRuleStack newANTLRRuleStack:cnt] retain];
83 [ruleMemo addObject:aHashRule];
110 ruleMemo = [[ANTLRRuleStack newANTLRRuleStack:aLen] retain];
113 [ruleMemo addObject:aHashRule];
140 if ( aState.ruleMemo == nil ) {
142 ruleMemo = [[ANTLRRuleStack newANTLRRuleStack:cnt] retain];
145 [ruleMemo addObject:aHashRule];
149 ruleMemo = aState.ruleMemo;
150 if ( [ruleMemo count] == 0 ) {
[all …]
DANTLRRecognizerSharedState.h41 …__strong ANTLRRuleStack *ruleMemo; // store previous results of matching rules so we don't have to… variable
59 @property (retain, getter=getRuleMemo, setter=setRuleMemo:) ANTLRRuleStack *ruleMemo;
DANTLRBaseRecognizer.m190 if ( state.ruleMemo != nil ) {
191 if ( [state.ruleMemo count] )
192 [state.ruleMemo removeAllObjects];
1003 if ( (aHashRule = [state.ruleMemo objectAtIndex:ruleIndex]) == nil ) {
1005 [state.ruleMemo insertObject:aHashRule atIndex:ruleIndex];
1051 aRuleStack = state.ruleMemo;
1058 …if (debug) NSLog(@"!!!!!!!!! memo size is %d, but rule index is %d", [state.ruleMemo length], rule…
1076 aRuleStack = state.ruleMemo;
/external/antlr/antlr-3.4/runtime/Java/src/main/java/org/antlr/runtime/
DRecognizerSharedState.java80 public Map[] ruleMemo; field in RecognizerSharedState
133 if ( state.ruleMemo!=null ) { in RecognizerSharedState()
134 this.ruleMemo = new Map[state.ruleMemo.length]; in RecognizerSharedState()
135 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(); in getRuleMemoization()
798 (Integer)state.ruleMemo[ruleIndex].get(new Integer(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( in memoize()
[all …]
/external/antlr/antlr-3.4/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/antlr-3.4/runtime/CSharp3/Sources/Antlr3.Runtime/
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()
DBaseRecognizer.cs119 for ( int i = 0; state.ruleMemo != null && i < state.ruleMemo.Length; i++ ) in Reset()
121 state.ruleMemo[i] = null; in Reset()
960 if ( state.ruleMemo[ruleIndex] == null ) in GetRuleMemoization()
962 state.ruleMemo[ruleIndex] = new Dictionary<int, int>(); in GetRuleMemoization()
966 if ( !state.ruleMemo[ruleIndex].TryGetValue( ruleStartIndex, out stopIndex ) ) in GetRuleMemoization()
1015 if ( state.ruleMemo == null ) in Memoize()
1020 if ( ruleIndex >= state.ruleMemo.Length ) in Memoize()
1023 …TraceDestination.WriteLine("!!!!!!!!! memo size is " + state.ruleMemo.Length + ", but rule index i… in Memoize()
1025 if ( state.ruleMemo[ruleIndex] != null ) in Memoize()
1027 state.ruleMemo[ruleIndex][ruleStartIndex] = stopTokenIndex; in Memoize()
[all …]
/external/antlr/antlr-3.4/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime/
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()
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 …]
/external/antlr/antlr-3.4/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/antlr-3.4/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/antlr-3.4/runtime/ObjC/ANTLR.framework/Headers/
DANTLRRecognizerSharedState.h40 …ANTLRRuleStack *ruleMemo; // store previous results of matching rules so we don't have to do it … variable
58 @property (retain, getter=getRuleMemo, setter=setRuleMemo:) ANTLRRuleStack *ruleMemo;
/external/antlr/antlr-3.4/runtime/ObjC/ANTLR.framework/Versions/Current/Headers/
DANTLRRecognizerSharedState.h40 …ANTLRRuleStack *ruleMemo; // store previous results of matching rules so we don't have to do it … variable
58 @property (retain, getter=getRuleMemo, setter=setRuleMemo:) ANTLRRuleStack *ruleMemo;
/external/antlr/antlr-3.4/runtime/ObjC/ANTLR.framework/Versions/A/Headers/
DANTLRRecognizerSharedState.h40 …ANTLRRuleStack *ruleMemo; // store previous results of matching rules so we don't have to do it … variable
58 @property (retain, getter=getRuleMemo, setter=setRuleMemo:) ANTLRRuleStack *ruleMemo;
/external/antlr/antlr-3.4/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/antlr-3.4/runtime/C/include/
Dantlr3recognizersharedstate.h120 pANTLR3_INT_TRIE ruleMemo; member
/external/antlr/antlr-3.4/tool/src/main/resources/org/antlr/codegen/templates/ObjC/
DObjC.stg332 if ( state.ruleMemo == nil ) {
333 state.ruleMemo = [[ANTLRRuleStack newANTLRRuleStackWithSize:<numRules>+1] retain];
335 if ( [state.ruleMemo count] == 0 ) {
337 … <! [state.ruleMemo addObject:[NSNull null]]; /* dummy entry to ensure 1-basedness. */ !>
339 [state.ruleMemo addObject:[ANTLRHashRule newANTLRHashRuleWithLen:17]];
756 state.ruleMemo = [[ANTLRRuleStack newANTLRRuleStack:<numRules>+1] retain];<\n> <! index from 1..n !>
/external/antlr/antlr-3.4/tool/src/main/resources/org/antlr/codegen/templates/CPP/
DCPP.stg130 // @TODO backtracking ruleMemo = new HashMap[<numRules>+1];<\n> <! index from 1..n !>
288 ruleMemo = new HashMap[<numRules>+1];<\n> <! index from 1..n !>
/external/antlr/antlr-3.4/tool/src/main/resources/org/antlr/codegen/templates/ActionScript/
DActionScript.stg84 this.state.ruleMemo = new Array(<numRules>+1);<\n> <! index from 1..n !>
228 this.state.ruleMemo = new Array(<length(grammar.allImportedRules)>+1);<\n> <! index from 1..n !>
/external/antlr/antlr-3.4/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/antlr-3.4/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/antlr-3.4/tool/src/main/resources/org/antlr/codegen/templates/Python/
DPython.stg125 self._state.ruleMemo = {}
254 self._state.ruleMemo = {}

12