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

Function yy_flush_buffer

src/parser/ds_lexer.cpp:4452–4474  ·  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

4450 * @param yyscanner The scanner object.
4451 */
4452 void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
4453{
4454 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
4455 if ( ! b )
4456 return;
4457
4458 b->yy_n_chars = 0;
4459
4460 /* We always need two end-of-buffer characters. The first causes
4461 * a transition to the end-of-buffer state. The second causes
4462 * a jam in that state.
4463 */
4464 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
4465 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
4466
4467 b->yy_buf_pos = &b->yy_ch_buf[0];
4468
4469 b->yy_at_bol = 1;
4470 b->yy_buffer_status = YY_BUFFER_NEW;
4471
4472 if ( b == YY_CURRENT_BUFFER )
4473 yy_load_buffer_state( yyscanner );
4474}
4475
4476/** Pushes the new state onto the stack. The new state becomes
4477 * 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