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. */
| 1966 | * @param yyscanner The scanner object. |
| 1967 | */ |
| 1968 | void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) |
| 1969 | { |
| 1970 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 1971 | if (new_buffer == NULL) |
| 1972 | return; |
| 1973 | |
| 1974 | yyensure_buffer_stack(yyscanner); |
| 1975 | |
| 1976 | /* This block is copied from yy_switch_to_buffer. */ |
| 1977 | if ( YY_CURRENT_BUFFER ) |
| 1978 | { |
| 1979 | /* Flush out information for old buffer. */ |
| 1980 | *yyg->yy_c_buf_p = yyg->yy_hold_char; |
| 1981 | YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; |
| 1982 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; |
| 1983 | } |
| 1984 | |
| 1985 | /* Only push if top exists. Otherwise, replace top. */ |
| 1986 | if (YY_CURRENT_BUFFER) |
| 1987 | yyg->yy_buffer_stack_top++; |
| 1988 | YY_CURRENT_BUFFER_LVALUE = new_buffer; |
| 1989 | |
| 1990 | /* copied from yy_switch_to_buffer. */ |
| 1991 | yy_load_buffer_state( yyscanner ); |
| 1992 | yyg->yy_did_buffer_switch_on_eof = 1; |
| 1993 | } |
| 1994 | |
| 1995 | /** Removes and deletes the top of the stack, if present. |
| 1996 | * The next element becomes the new top. |
nothing calls this directly
no test coverage detected