MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / yy_init_buffer

Function yy_init_buffer

src/parser/ds2_lexer.cpp:3990–4013  ·  view source on GitHub ↗

Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */

Source from the content-addressed store, hash-verified

3988 * such as during a yyrestart() or at EOF.
3989 */
3990 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
3991
3992{
3993 int oerrno = errno;
3994 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
3995
3996 yy_flush_buffer( b , yyscanner);
3997
3998 b->yy_input_file = file;
3999 b->yy_fill_buffer = 1;
4000
4001 /* If b is the current buffer, then yy_init_buffer was _probably_
4002 * called from yyrestart() or through yy_get_next_buffer.
4003 * In that case, we don't want to reset the lineno or column.
4004 */
4005 if (b != YY_CURRENT_BUFFER){
4006 b->yy_bs_lineno = 1;
4007 b->yy_bs_column = 0;
4008 }
4009
4010 b->yy_is_interactive = 0;
4011
4012 errno = oerrno;
4013}
4014
4015/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
4016 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.

Callers 2

yyrestartFunction · 0.70
yy_create_bufferFunction · 0.70

Calls 1

yy_flush_bufferFunction · 0.70

Tested by

no test coverage detected