Lines Matching defs:ex
271 pANTLR3_EXCEPTION ex;
325 ex = antlr3ExceptionNew(ANTLR3_RECOGNITION_EXCEPTION,
337 ex->c = is->_LA (is, 1); /* Current input character */
338 ex->line = ins->getLine (ins); /* Line number comes from stream */
339 ex->charPositionInLine = ins->getCharPositionInLine (ins); /* Line offset also comes from the stream */
340 ex->index = is->index (is);
341 ex->streamName = ins->fileName;
342 ex->message = "Unexpected character";
347 ex->token = cts->tstream->_LT (cts->tstream, 1); /* Current input token */
348 ex->line = ((pANTLR3_COMMON_TOKEN)(ex->token))->getLine (ex->token);
349 ex->charPositionInLine = ((pANTLR3_COMMON_TOKEN)(ex->token))->getCharPositionInLine (ex->token);
350 ex->index = cts->tstream->istream->index (cts->tstream->istream);
351 if (((pANTLR3_COMMON_TOKEN)(ex->token))->type == ANTLR3_TOKEN_EOF)
353 ex->streamName = NULL;
357 ex->streamName = ((pANTLR3_COMMON_TOKEN)(ex->token))->input->fileName;
359 ex->message = "Unexpected token";
364 ex->token = tns->_LT (tns, 1); /* Current input tree node */
365 ex->line = ((pANTLR3_BASE_TREE)(ex->token))->getLine (ex->token);
366 ex->charPositionInLine = ((pANTLR3_BASE_TREE)(ex->token))->getCharPositionInLine (ex->token);
367 ex->index = tns->istream->index (tns->istream);
374 tnode = ((pANTLR3_COMMON_TREE)(((pANTLR3_BASE_TREE)(ex->token))->super));
378 ex->streamName = ((pANTLR3_BASE_TREE)(ex->token))->strFactory->newStr(((pANTLR3_BASE_TREE)(ex->token))->strFactory, (pANTLR3_UINT8)"-unknown source-");
384 ex->streamName = NULL;
388 ex->streamName = tnode->token->input->fileName;
391 ex->message = "Unexpected node";
396 ex->input = is;
397 ex->nextException = recognizer->state->exception; /* So we don't leak the memory */
398 recognizer->state->exception = ex;
1015 pANTLR3_EXCEPTION ex;
1022 ex = recognizer->state->exception;
1027 if (ex->streamName == NULL)
1029 if (((pANTLR3_COMMON_TOKEN)(ex->token))->type == ANTLR3_TOKEN_EOF)
1040 ftext = ex->streamName->to8(ex->streamName);
1124 switch (ex->type)
1140 if (ex->expecting == ANTLR3_TOKEN_EOF)
1146 ANTLR3_FPRINTF(stderr, " : Extraneous input - expected %s ...\n", tokenNames[ex->expecting]);
1160 ANTLR3_FPRINTF(stderr, " : Missing token (%d)...\n", ex->expecting);
1164 if (ex->expecting == ANTLR3_TOKEN_EOF)
1170 ANTLR3_FPRINTF(stderr, " : Missing %s \n", tokenNames[ex->expecting]);
1203 if (ex->expecting == ANTLR3_TOKEN_EOF)
1209 ANTLR3_FPRINTF(stderr, " : expected %s ...\n", tokenNames[ex->expecting]);
1244 errBits = antlr3BitsetLoad (ex->expectingSet);