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

Function yy_flush_buffer

src/parser/ds2_lexer.cpp:4019–4041  ·  view source on GitHub ↗

Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * @param yyscanner The scanner object. */

Source from the content-addressed store, hash-verified

4017 * @param yyscanner The scanner object.
4018 */
4019 void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
4020{
4021 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4022 if ( ! b )
4023 return;
4024
4025 b->yy_n_chars = 0;
4026
4027 /* We always need two end-of-buffer characters. The first causes
4028 * a transition to the end-of-buffer state. The second causes
4029 * a jam in that state.
4030 */
4031 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
4032 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
4033
4034 b->yy_buf_pos = &b->yy_ch_buf[0];
4035
4036 b->yy_at_bol = 1;
4037 b->yy_buffer_status = YY_BUFFER_NEW;
4038
4039 if ( b == YY_CURRENT_BUFFER )
4040 yy_load_buffer_state( yyscanner );
4041}
4042
4043/** Pushes the new state onto the stack. The new state becomes
4044 * the current state. This function will allocate the stack

Callers 1

yy_init_bufferFunction · 0.70

Calls 1

yy_load_buffer_stateFunction · 0.70

Tested by

no test coverage detected