• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/iserver/libantlr3c-3.2/src/

Lines Matching refs:is

57 static ANTLR3_BOOLEAN		mismatchIsUnwantedToken		(pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM is, ANTLR3_UINT32 ttype);
58 static ANTLR3_BOOLEAN mismatchIsMissingToken (pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM is, pANTLR3_BITSET_LIST follow);
130 // free it when the base recognizer is freed.
260 /* Now update it to indicate this is a Mismatched token exception
277 pANTLR3_INT_STREAM is;
284 is = NULL;
295 is = ins->istream;
303 is = parser->tstream->istream;
311 is = tns->istream;
333 switch (is->type & ANTLR3_INPUT_MASK)
337 ex->c = is->_LA (is, 1); /* Current input character */
340 ex->index = is->index (is);
396 ex->input = is;
399 recognizer->state->error = ANTLR3_TRUE; /* Exception is outstanding */
420 pANTLR3_INT_STREAM is;
429 is = parser->tstream->istream;
437 is = tparser->ctnstream->tnstream->istream;
451 matchedSymbol = recognizer->getCurrentInputSymbol(recognizer, is);
453 if (is->_LA(is, 1) == ttype)
457 is->consume(is); // Consume that token from the stream
468 // Backtracking is going on
474 // We did not find the expected token and there is no backtracking
482 /// Consumes the next token, whatever it is, and resets the recognizer state
483 /// so that it is not in error.
493 pANTLR3_INT_STREAM is;
501 is = parser->tstream->istream;
509 is = tparser->ctnstream->tnstream->istream;
522 is->consume(is);
529 mismatchIsUnwantedToken(pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM is, ANTLR3_UINT32 ttype)
533 nextt = is->_LA(is, 2);
541 return ANTLR3_TRUE; // This token is unknown, but the next one is the one we wanted
545 return ANTLR3_FALSE; // Neither this token, nor the one following is the one we wanted
552 mismatchIsMissingToken(pANTLR3_BASE_RECOGNIZER recognizer, pANTLR3_INT_STREAM is, pANTLR3_BITSET_LIST follow)
560 // There is no information about the tokens that can follow the last one
561 // hence we must say that the current one we found is not a member of the
601 /// if current token is consistent with what could come after set
602 /// then we know we're missing a token; error recovery is free to
606 /// in follow set to indicate that the fall of the start symbol is
609 if ( followClone->isMember(followClone, is->_LA(is, 1))
646 pANTLR3_INT_STREAM is;
659 is = parser->tstream->istream;
671 if (mismatchIsUnwantedToken(recognizer, is, ttype))
677 // Now update it to indicate this is an unwanted token exception
685 if (mismatchIsMissingToken(recognizer, is, follow))
691 // Now update it to indicate this is an unwanted token exception
699 // Just a mismatched token is all we can dtermine
707 /// This method sets errorRecovery to indicate the parser is recovering
779 /// Documentation below is from the Java implementation.
790 /// When you find a "no viable alt exception", the input is not
792 /// thing to do is to consume tokens until you see something that
809 /// that rule is pushed on a stack. Here are the various "local"
816 /// Upon erroneous input "[]", the call chain is
820 /// and, hence, the follow context stack is:
827 /// Notice that ')' is not included, because b would have to have
838 /// In this case, for input "[]", LA(1) is in this set so we would
842 /// exception (since LA(1) is not in the viable following token
853 /// ANTLR's error recovery mechanism is based upon original ideas:
878 /// Documentation below is from the Java runtime.
880 /// This is the set of token types that can follow a specific rule
888 /// where x in T* and alpha, beta in V*; T is set of terminals and
889 /// V is the set of terminals and non terminals. In other words,
890 /// FOLLOW(r) is the set of all tokens that can possibly follow
908 /// For input input "i=(3);", here is the derivation:
926 /// token mismatch. Upon token mismatch, if LA(1) is member of
927 /// the viable next token set, then you know there is most likely
995 /// of the error display routines into spearate units. However, ther is little advantage
1005 pANTLR3_INT_STREAM is;
1018 // See if there is a 'filename' we can use
1046 // How we determine the next piece is dependent on which thing raised the
1057 is = parser->tstream->istream;
1081 is = tparser->ctnstream->tnstream->istream;
1113 // is to produce a perfect (in traversal terms) syntactically correct tree, so errors
1115 // in whatever way is appropriate.
1125 // is just something that should not be there and throw this exception.
1171 // in the input that was not predicted. This is the basic exception type
1181 // We were expecting to see one thing and got another. This is the
1243 // However many tokens we could have dealt with here, it is usually
1250 // TODO: This doesn;t look right - should be asking if the bit is set!!
1288 // Here you have the token that was in error which if this is
1296 // Here is where you do it though :-).
1308 /// Recover from an error found on the input stream. Mostly this is
1320 pANTLR3_INT_STREAM is;
1328 is = parser->tstream->istream;
1336 is = tparser->ctnstream->tnstream->istream;
1350 if (recognizer->state->lastErrorIndex == is->index(is))
1353 // where LT(1) is in the recovery token set so nothing is
1355 // an infinite loop; this is a failsafe.
1357 is->consume(is);
1362 recognizer->state->lastErrorIndex = is->index(is);
1395 /// LA(1) is not what we are looking for. If LA(2) has the right token,
1396 /// however, then assume LA(1) is some extra spurious token. Delete it
1402 /// If current token is consistent with what could come after
1403 /// ttype then it is ok to "insert" the missing token, else throw
1404 /// exception For example, Input "i=(3;" is clearly missing the
1417 /// is in the set of tokens that can follow the ')' token
1420 /// The exception that was passed in, in the java implementation is
1422 /// error flag and rules cascade back when this is set.
1429 pANTLR3_INT_STREAM is;
1432 // Invoke the debugger event if there is a debugger listening to us
1445 is = parser->tstream->istream;
1453 is = tparser->ctnstream->tnstream->istream;
1473 // is what we are looking for then we remove the one we have discovered
1477 if ( recognizer->mismatchIsUnwantedToken(recognizer, is, ttype) == ANTLR3_TRUE)
1494 is->consume(is);
1510 matchedSymbol = recognizer->getCurrentInputSymbol(recognizer, is);
1515 is->consume(is);
1517 recognizer->state->error = ANTLR3_FALSE; // Exception is not outstanding any more
1526 if (mismatchIsMissingToken(recognizer, is, follow))
1530 matchedSymbol = recognizer->getMissingSymbol(recognizer, is, recognizer->state->exception, ttype, follow);
1541 recognizer->state->error = ANTLR3_FALSE; // Exception is not outstanding any more
1559 pANTLR3_INT_STREAM is;
1568 is = parser->tstream->istream;
1576 is = tparser->ctnstream->tnstream->istream;
1588 if (recognizer->mismatchIsMissingToken(recognizer, is, follow) == ANTLR3_TRUE)
1592 matchedSymbol = recognizer->getMissingSymbol(recognizer, is, recognizer->state->exception, ANTLR3_TOKEN_INVALID, follow);
1601 recognizer->state->error = ANTLR3_FALSE; // Exception is not outstanding any more
1613 /// This code is factored out from mismatched token and mismatched set
1625 pANTLR3_INT_STREAM is;
1633 is = parser->tstream->istream;
1641 is = tparser->ctnstream->tnstream->istream;
1657 /* The follow set is NULL, which means we don't know what can come
1685 * is consistent, then we can "insert" that token by not throwing
1688 if ( follow->isMember(follow, is->_LA(is, 1)) == ANTLR3_TRUE)
1707 /* We could not find anything viable to do, so this is going to
1721 pANTLR3_INT_STREAM is;
1729 is = parser->tstream->istream;
1737 is = tparser->ctnstream->tnstream->istream;
1751 ttype = is->_LA(is, 1);
1757 is->consume(is);
1758 ttype = is->_LA(is, 1);
1771 pANTLR3_INT_STREAM is;
1779 is = parser->tstream->istream;
1787 is = tparser->ctnstream->tnstream->istream;
1801 ttype = is->_LA(is, 1);
1807 is->consume(is);
1808 ttype = is->_LA(is, 1);
1872 * bits required to represent the largest possible stop index in the input, which is the
1873 * last character. An int stream is free to return the largest 64 bit offset if it has
1877 ruleList = antlr3IntTrieNew(63); /* Depth is theoretically 64 bits, but probably not ;-) */
1891 /* See if there is a stop index associated with the supplied start index.
1924 pANTLR3_INT_STREAM is;
1933 is = parser->tstream->istream;
1942 is = tparser->ctnstream->tnstream->istream;
1951 is = lexer->input->istream;
1964 stopIndex = recognizer->getRuleMemoization(recognizer, ruleIndex, is->index(is));
1977 is->seek(is, stopIndex+1);
1999 pANTLR3_INT_STREAM is;
2007 is = parser->tstream->istream;
2015 is = tparser->ctnstream->tnstream->istream;
2024 is = lexer->input->istream;
2035 stopIndex = recognizer->state->failed == ANTLR3_TRUE ? MEMO_RULE_FAILED : is->index(is) - 1;
2045 * return code as we don't care if it is there already.
2060 pANTLR3_INT_STREAM is;
2068 is = parser->tstream->istream;
2076 is = tparser->ctnstream->tnstream->istream;
2091 start = is->mark(is);
2100 is->rewind(is, start);
2141 recognizer->state->ruleMemo = antlr3IntTrieNew(15); /* 16 bit depth is enough for 32768 rules! */
2152 // Default implementation is for parser and assumes a token stream as supplied by the runtime.
2153 // You MAY need override this function if the standard TOKEN_STREAM is not what you are using.
2161 // Default implementation is for parser and assumes a token stream as supplied by the runtime.
2162 // You MAY need override this function if the standard COMMON_TOKEN_STREAM is not what you are using.