MCPcopy Create free account
hub / github.com/Kitware/CMake / yy_flush_buffer

Function yy_flush_buffer

Source/LexerParser/cmListFileLexer.c:1997–2019  ·  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

1995 * @param yyscanner The scanner object.
1996 */
1997 void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
1998{
1999 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2000 if ( ! b )
2001 return;
2002
2003 b->yy_n_chars = 0;
2004
2005 /* We always need two end-of-buffer characters. The first causes
2006 * a transition to the end-of-buffer state. The second causes
2007 * a jam in that state.
2008 */
2009 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2010 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2011
2012 b->yy_buf_pos = &b->yy_ch_buf[0];
2013
2014 b->yy_at_bol = 1;
2015 b->yy_buffer_status = YY_BUFFER_NEW;
2016
2017 if ( b == YY_CURRENT_BUFFER )
2018 yy_load_buffer_state( yyscanner );
2019}
2020
2021/** Pushes the new state onto the stack. The new state becomes
2022 * 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…