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

Function yypush_buffer_state

Source/LexerParser/cmListFileLexer.c:2027–2052  ·  view source on GitHub ↗

Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * @param yyscanner The scanner object. */

Source from the content-addressed store, hash-verified

2025 * @param yyscanner The scanner object.
2026 */
2027void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
2028{
2029 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2030 if (new_buffer == NULL)
2031 return;
2032
2033 yyensure_buffer_stack(yyscanner);
2034
2035 /* This block is copied from yy_switch_to_buffer. */
2036 if ( YY_CURRENT_BUFFER )
2037 {
2038 /* Flush out information for old buffer. */
2039 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2040 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2041 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2042 }
2043
2044 /* Only push if top exists. Otherwise, replace top. */
2045 if (YY_CURRENT_BUFFER)
2046 yyg->yy_buffer_stack_top++;
2047 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2048
2049 /* copied from yy_switch_to_buffer. */
2050 yy_load_buffer_state( yyscanner );
2051 yyg->yy_did_buffer_switch_on_eof = 1;
2052}
2053
2054/** Removes and deletes the top of the stack, if present.
2055 * The next element becomes the new top.

Callers

nothing calls this directly

Calls 2

yyensure_buffer_stackFunction · 0.70
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…