Lines Matching refs:pos
33 const UChar *pos=pos_; in current() local
34 if(pos==NULL) { in current()
38 return (remainingMatchLength_<0 && (node=*pos)>=kMinValueLead) ? in current()
62 UCharsTrie::branchNext(const UChar *pos, int32_t length, int32_t uchar) { in branchNext() argument
65 length=*pos++; in branchNext()
71 if(uchar<*pos++) { in branchNext()
73 pos=jumpByDelta(pos); in branchNext()
76 pos=skipDelta(pos); in branchNext()
83 if(uchar==*pos++) { in branchNext()
85 int32_t node=*pos; in branchNext()
91 ++pos; in branchNext()
97 delta=((node-kMinTwoUnitValueLead)<<16)|*pos++; in branchNext()
99 delta=(pos[0]<<16)|pos[1]; in branchNext()
100 pos+=2; in branchNext()
103 pos+=delta; in branchNext()
104 node=*pos; in branchNext()
107 pos_=pos; in branchNext()
111 pos=skipValue(pos); in branchNext()
113 if(uchar==*pos++) { in branchNext()
114 pos_=pos; in branchNext()
115 int32_t node=*pos; in branchNext()
124 UCharsTrie::nextImpl(const UChar *pos, int32_t uchar) { in nextImpl() argument
125 int32_t node=*pos++; in nextImpl()
128 return branchNext(pos, node, uchar); in nextImpl()
132 if(uchar==*pos++) { in nextImpl()
134 pos_=pos; in nextImpl()
135 return (length<0 && (node=*pos)>=kMinValueLead) ? in nextImpl()
146 pos=skipNodeValue(pos, node); in nextImpl()
156 const UChar *pos=pos_; in next() local
157 if(pos==NULL) { in next()
163 if(uchar==*pos++) { in next()
165 pos_=pos; in next()
167 return (length<0 && (node=*pos)>=kMinValueLead) ? in next()
174 return nextImpl(pos, uchar); in next()
184 const UChar *pos=pos_; in next() local
185 if(pos==NULL) { in next()
197 pos_=pos; in next()
199 return (length<0 && (node=*pos)>=kMinValueLead) ? in next()
206 if(uchar!=*pos) { in next()
210 ++pos; in next()
217 pos_=pos; in next()
219 return (length<0 && (node=*pos)>=kMinValueLead) ? in next()
228 if(uchar!=*pos) { in next()
232 ++pos; in next()
236 int32_t node=*pos++; in next()
239 UStringTrieResult result=branchNext(pos, node, uchar); in next()
260 pos=pos_; // branchNext() advanced pos and wrote it to pos_ . in next()
261 node=*pos++; in next()
265 if(uchar!=*pos) { in next()
269 ++pos; in next()
278 pos=skipNodeValue(pos, node); in next()
286 UCharsTrie::findUniqueValueFromBranch(const UChar *pos, int32_t length, in findUniqueValueFromBranch() argument
289 ++pos; // ignore the comparison unit in findUniqueValueFromBranch()
290 … if(NULL==findUniqueValueFromBranch(jumpByDelta(pos), length>>1, haveUniqueValue, uniqueValue)) { in findUniqueValueFromBranch()
294 pos=skipDelta(pos); in findUniqueValueFromBranch()
297 ++pos; // ignore a comparison unit in findUniqueValueFromBranch()
299 int32_t node=*pos++; in findUniqueValueFromBranch()
302 int32_t value=readValue(pos, node); in findUniqueValueFromBranch()
303 pos=skipValue(pos, node); in findUniqueValueFromBranch()
314 if(!findUniqueValue(pos+value, haveUniqueValue, uniqueValue)) { in findUniqueValueFromBranch()
320 return pos+1; // ignore the last comparison unit in findUniqueValueFromBranch()
324 UCharsTrie::findUniqueValue(const UChar *pos, UBool haveUniqueValue, int32_t &uniqueValue) { in findUniqueValue() argument
325 int32_t node=*pos++; in findUniqueValue()
329 node=*pos++; in findUniqueValue()
331 pos=findUniqueValueFromBranch(pos, node+1, haveUniqueValue, uniqueValue); in findUniqueValue()
332 if(pos==NULL) { in findUniqueValue()
336 node=*pos++; in findUniqueValue()
339 pos+=node-kMinLinearMatch+1; // Ignore the match units. in findUniqueValue()
340 node=*pos++; in findUniqueValue()
345 value=readValue(pos, node&0x7fff); in findUniqueValue()
347 value=readNodeValue(pos, node); in findUniqueValue()
360 pos=skipNodeValue(pos, node); in findUniqueValue()
368 const UChar *pos=pos_; in getNextUChars() local
369 if(pos==NULL) { in getNextUChars()
373 out.appendCodeUnit(*pos); // Next unit of a pending linear-match node. in getNextUChars()
376 int32_t node=*pos++; in getNextUChars()
381 pos=skipNodeValue(pos, node); in getNextUChars()
387 node=*pos++; in getNextUChars()
390 getNextBranchUChars(pos, node, out); in getNextUChars()
394 out.appendCodeUnit(*pos); in getNextUChars()
400 UCharsTrie::getNextBranchUChars(const UChar *pos, int32_t length, Appendable &out) { in getNextBranchUChars() argument
402 ++pos; // ignore the comparison unit in getNextBranchUChars()
403 getNextBranchUChars(jumpByDelta(pos), length>>1, out); in getNextBranchUChars()
405 pos=skipDelta(pos); in getNextBranchUChars()
408 out.appendCodeUnit(*pos++); in getNextBranchUChars()
409 pos=skipValue(pos); in getNextBranchUChars()
411 out.appendCodeUnit(*pos); in getNextBranchUChars()