Lines Matching defs:input

43 static void					setCharStream				(pANTLR3_LEXER lexer,  pANTLR3_INPUT_STREAM input);
44 static void pushCharStream (pANTLR3_LEXER lexer, pANTLR3_INPUT_STREAM input);
201 /// Returns the next available token from the current input stream.
208 /// The next token in the current input stream or the EOF token
221 pANTLR3_INPUT_STREAM input;
226 input = lexer->input;
227 istream = input->istream;
244 // Record the start of the token in our input stream.
247 state->tokenStartCharIndex = (ANTLR3_MARKER)(((pANTLR3_UINT8)input->nextChar));
248 state->tokenStartCharPositionInLine = input->charPositionInLine;
249 state->tokenStartLine = input->line;
319 * The next token in the current input stream or the EOF token
320 * if there are no more tokens in any input stream in the stack.
339 // input stream if there were any and just return the
341 // in any outstanding input stream we pop into the active
344 // on the reinstalled input stream, when in actual fact
345 // there might be more input streams to POP before the
348 // that isn't EOF or we reach the actual end of the last input
359 // We have another input stream in the stack so we
368 // There were no more streams on the input stack
370 // the input stream. So we just exit the loop and
384 antlr3LexerNewStream(ANTLR3_UINT32 sizeHint, pANTLR3_INPUT_STREAM input, pANTLR3_RECOGNIZER_SHARED_STATE state)
394 // Install the input stream and reset the lexer
396 setCharStream(lexer, input);
457 width = ANTLR3_UINT32_CAST(( (pANTLR3_UINT8)(lexer->input->data) + (lexer->input->size(lexer->input) )) - (pANTLR3_UINT8)(ex->index));
473 ANTLR3_FPRINTF(stderr, "(end of input).\n\t This indicates a poorly specified lexer RULE\n\t or unterminated input element such as: \"STRING[\"]\n");
478 width = ANTLR3_UINT32_CAST(((pANTLR3_UINT8)(lexer->input->data)+(lexer->input->size(lexer->input))) - (pANTLR3_UINT8)(lexer->rec->state->tokenStartCharIndex));
492 static void setCharStream (pANTLR3_LEXER lexer, pANTLR3_INPUT_STREAM input)
494 /* Install the input interface
496 lexer->input = input;
505 lexer->rec->state->tokFactory = antlr3TokenFactoryNew(input);
509 /* When the input stream is being changed on the fly, rather than
511 * which input stream to adorn the tokens with so that when they
512 * are asked to provide their original input strings they can
515 lexer->rec->state->tokFactory->setInputStream(lexer->rec->state->tokFactory, input);
519 * the input stream.
523 lexer->rec->state->tokSource->strFactory = input->strFactory;
530 lexer->rec->state->tokSource->eofToken.strFactory = input->strFactory;
546 lexer->rec->state->tokSource->fileName = input->fileName;
551 * Change to a new input stream, remembering the old one.
554 * Pointer to the lexer instance to switch input streams for.
556 * \param input
557 * New input stream to install as the current one.
559 * Switches the current character input stream to
564 pushCharStream (pANTLR3_LEXER lexer, pANTLR3_INPUT_STREAM input)
566 // Do we need a new input stream stack?
584 // We have a stack, so we can save the current input stream
587 lexer->input->istream->mark(lexer->input->istream);
588 lexer->rec->state->streams->push(lexer->rec->state->streams, lexer->input, NULL);
592 lexer->setCharStream(lexer, input);
597 * Stops using the current input stream and reverts to any prior
598 * input stream on the stack.
603 * Pointer to a function that abandons the current input stream, whether it
604 * is empty or not and reverts to the previous stacked input stream.
607 * The function fails silently if there are no prior input streams.
612 pANTLR3_INPUT_STREAM input;
625 input = (pANTLR3_INPUT_STREAM)(lexer->rec->state->streams->top);
630 lexer->setCharStream(lexer, input);
631 lexer->input->istream->rewindLast(lexer->input->istream);
648 * so we are not checking any errors. So make sure you have installed an input stream before
654 * get added automatically, such as the input stream it is associated with
673 token->lineStart = lexer->input->currentLine;
731 if (lexer->input->istream->_LA(lexer->input->istream, 1) != (*string))
750 lexer->input->istream->consume(lexer->input->istream);
772 if (lexer->input->istream->_LA(lexer->input->istream, 1) == c)
776 lexer->input->istream->consume(lexer->input->istream);
816 c = lexer->input->istream->_LA(lexer->input->istream, 1);
821 lexer->input->istream->consume(lexer->input->istream);
851 lexer->input->istream->consume(lexer->input->istream);
857 lexer->input->istream->consume(lexer->input->istream);
863 return lexer->input->getLine(lexer->input);
869 return lexer->input->charPositionInLine;
874 return lexer->input->istream->index(lexer->input->istream);
885 return lexer->input->substr(
886 lexer->input,
888 lexer->getCharIndex(lexer) - lexer->input->charByteSize