Home | History | Annotate | Download | only in src

Lines Matching refs:exception

214 		// Free any exception space we have left around
216 thisE = recognizer->state->exception;
246 * Creates a new Mismatched Token Exception and inserts in the recognizer
247 * exception stack.
256 /* Create a basic recognition exception structure
260 /* Now update it to indicate this is a Mismatched token exception
262 recognizer->state->exception->name = ANTLR3_MISMATCHED_EX_NAME;
263 recognizer->state->exception->type = ANTLR3_MISMATCHED_TOKEN_EXCEPTION;
323 /* Create a basic exception structure
397 ex->nextException = recognizer->state->exception; /* So we don't leak the memory */
398 recognizer->state->exception = ex;
399 recognizer->state->error = ANTLR3_TRUE; /* Exception is outstanding */
410 /// in a rule will cause an exception and immediate exit from
475 // going on, so we mismatch, which creates an exception in the recognizer exception
537 if (recognizer->state->exception != NULL)
539 recognizer->state->exception->expecting = nextt;
648 // Install a mismatched token exception in the exception stack
651 recognizer->state->exception->expecting = ttype;
673 // Create a basic recognition exception structure
677 // Now update it to indicate this is an unwanted token exception
679 recognizer->state->exception->name = ANTLR3_UNWANTED_TOKEN_EXCEPTION_NAME;
680 recognizer->state->exception->type = ANTLR3_UNWANTED_TOKEN_EXCEPTION;
687 // Create a basic recognition exception structure
691 // Now update it to indicate this is an unwanted token exception
693 recognizer->state->exception->name = ANTLR3_MISSING_TOKEN_EXCEPTION_NAME;
694 recognizer->state->exception->type = ANTLR3_MISSING_TOKEN_EXCEPTION;
727 recognizer->debugger->recognitionException(recognizer->debugger, recognizer->state->exception);
797 /// When you find a "no viable alt exception", the input is not
849 /// exception (since LA(1) is not in the viable following token
850 /// set). The rule exception handler tries to recover, but finds
936 /// throwing an exception.
1022 ex = recognizer->state->exception;
1047 ANTLR3_FPRINTF(stderr, "%d) ", recognizer->state->exception->line);
1049 recognizer->state->exception->type,
1050 (pANTLR3_UINT8) (recognizer->state->exception->message));
1065 theToken = (pANTLR3_COMMON_TOKEN)(recognizer->state->exception->token);
1068 ANTLR3_FPRINTF(stderr, ", at offset %d", recognizer->state->exception->charPositionInLine);
1089 theBaseTree = (pANTLR3_BASE_TREE)(recognizer->state->exception->token);
1114 // of what you can do with each exception type. In general, when you make up your
1132 // is just something that should not be there and throw this exception.
1178 // in the input that was not predicted. This is the basic exception type
1287 // if you wish. If we get an exception that hits this point
1391 // Reset the inError flag so we don't re-report the exception
1411 /// exception For example, Input "i=(3;" is clearly missing the
1427 /// The exception that was passed in, in the java implementation is
1428 /// sorted in the recognizer exception stack in the C version. To 'throw' it we set the
1467 // Create an exception if we need one
1469 if (recognizer->state->exception == NULL)
1481 recognizer->state->exception->type = ANTLR3_UNWANTED_TOKEN_EXCEPTION;
1482 recognizer->state->exception->message = ANTLR3_UNWANTED_TOKEN_EXCEPTION_NAME;
1504 // token in the exception.
1517 recognizer->state->error = ANTLR3_FALSE; // Exception is not outstanding any more
1530 matchedSymbol = recognizer->getMissingSymbol(recognizer, is, recognizer->state->exception, ttype, follow);
1531 recognizer->state->exception
1532 recognizer->state->exception->message = ANTLR3_MISSING_TOKEN_EXCEPTION_NAME;
1533 recognizer->state->exception->token = matchedSymbol;
1534 recognizer->state->exception->expecting = ttype;
1537 // token in the exception.
1541 recognizer->state->error = ANTLR3_FALSE; // Exception is not outstanding any more
1548 // must just report the exception.
1592 matchedSymbol = recognizer->getMissingSymbol(recognizer, is, recognizer->state->exception, ANTLR3_TOKEN_INVALID, follow);
1593 recognizer->state->exception->type = ANTLR3_MISSING_TOKEN_EXCEPTION;
1594 recognizer->state->exception->token = matchedSymbol;
1597 // token in the exception.
1601 recognizer->state->error = ANTLR3_FALSE; // Exception is not outstanding any more
1686 * an exception and assuming that we saw it.
1708 * cause an exception.