Lines Matching refs:cts
42 static void setTokenTypeChannel (pANTLR3_COMMON_TOKEN_STREAM cts, ANTLR3_UINT32 ttype, ANTLR3_…
43 static void discardTokenType (pANTLR3_COMMON_TOKEN_STREAM cts, ANTLR3_INT32 ttype);
44 static void discardOffChannel (pANTLR3_COMMON_TOKEN_STREAM cts, ANTLR3_BOOLEAN discard);
45 static pANTLR3_VECTOR getTokens (pANTLR3_COMMON_TOKEN_STREAM cts);
46 static pANTLR3_LIST getTokenRange (pANTLR3_COMMON_TOKEN_STREAM cts, ANTLR3_UINT32 start, AN…
47 static pANTLR3_LIST getTokensSet (pANTLR3_COMMON_TOKEN_STREAM cts, ANTLR3_UINT32 start, ANT…
48 static pANTLR3_LIST getTokensList (pANTLR3_COMMON_TOKEN_STREAM cts, ANTLR3_UINT32 start, AN…
49 static pANTLR3_LIST getTokensType (pANTLR3_COMMON_TOKEN_STREAM cts, ANTLR3_UINT32 start, AN…
50 static void reset (pANTLR3_COMMON_TOKEN_STREAM cts);
163 reset (pANTLR3_COMMON_TOKEN_STREAM cts) in reset() argument
169 if (cts->discardSet != NULL) in reset()
171 cts->discardSet->free(cts->discardSet); in reset()
172 cts->discardSet = NULL; in reset()
174 if (cts->channelOverrides != NULL) in reset()
176 cts->channelOverrides->free(cts->channelOverrides); in reset()
177 cts->channelOverrides = NULL; in reset()
187 if (cts->tokens != NULL) in reset()
189 cts->tokens->clear(cts->tokens); in reset()
195 cts->tokens = antlr3VectorNew(0); in reset()
200 cts->discardOffChannel = ANTLR3_FALSE; in reset()
201 cts->channel = ANTLR3_TOKEN_DEFAULT_CHANNEL; in reset()
202 cts->p = -1; in reset()
356 pANTLR3_COMMON_TOKEN_STREAM cts; in tokLT() local
358 cts = (pANTLR3_COMMON_TOKEN_STREAM)ts->super; in tokLT()
362 return LB(cts, -k); in tokLT()
365 if (cts->p == -1) in tokLT()
367 fillBuffer(cts); in tokLT()
375 if ((cts->p + k - 1) >= (ANTLR3_INT32)ts->istream->cachedSize) in tokLT()
384 i = cts->p; in tokLT()
392 i = skipOffTokenChannels(cts, i+1); /* leave p on valid token */ in tokLT()
408 return (pANTLR3_COMMON_TOKEN)cts->tokens->elements[i].element; in tokLT()
454 LB(pANTLR3_COMMON_TOKEN_STREAM cts, ANTLR3_INT32 k) in LB() argument
459 if (cts->p == -1) in LB()
461 fillBuffer(cts); in LB()
467 if ((cts->p - k) < 0) in LB()
472 i = cts->p; in LB()
482 i = skipOffTokenChannelsReverse(cts, i - 1); /* leave p on valid token */ in LB()
493 return (pANTLR3_COMMON_TOKEN)cts->tokens->elements[i].element; in LB()
499 pANTLR3_COMMON_TOKEN_STREAM cts; in get() local
501 cts = (pANTLR3_COMMON_TOKEN_STREAM)ts->super; in get()
503 …return (pANTLR3_COMMON_TOKEN)(cts->tokens->get(cts->tokens, i)); /* Token index is zero based bu… in get()
522 pANTLR3_COMMON_TOKEN_STREAM cts; in toString() local
524 cts = (pANTLR3_COMMON_TOKEN_STREAM)ts->super; in toString()
526 if (cts->p == -1) in toString()
528 fillBuffer(cts); in toString()
541 pANTLR3_COMMON_TOKEN_STREAM cts; in toStringSS() local
543 cts = (pANTLR3_COMMON_TOKEN_STREAM) ts->super; in toStringSS()
545 if (cts->p == -1) in toStringSS()
547 fillBuffer(cts); in toStringSS()
558 if (tsource != NULL && cts->tokens != NULL) in toStringSS()
602 pANTLR3_COMMON_TOKEN_STREAM cts; in consume() local
606 cts = (pANTLR3_COMMON_TOKEN_STREAM) ts->super; in consume()
608 if ((ANTLR3_UINT32)cts->p < cts->tokens->count) in consume()
610 cts->p++; in consume()
611 cts->p = skipOffTokenChannels(cts, cts->p); in consume()
867 pANTLR3_COMMON_TOKEN_STREAM cts; in size() local
875 cts = (pANTLR3_COMMON_TOKEN_STREAM) ts->super; in size()
877 is->cachedSize = cts->tokens->count; in size()
884 pANTLR3_COMMON_TOKEN_STREAM cts; in tindex() local
888 cts = (pANTLR3_COMMON_TOKEN_STREAM) ts->super; in tindex()
890 return cts->p; in tindex()
929 pANTLR3_COMMON_TOKEN_STREAM cts; in seek() local
933 cts = (pANTLR3_COMMON_TOKEN_STREAM) ts->super; in seek()
935 cts->p = (ANTLR3_UINT32)index; in seek()