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. */
| 2106 | * @param yyscanner The scanner object. |
| 2107 | */ |
| 2108 | void ap_expr_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) |
| 2109 | { |
| 2110 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 2111 | if (new_buffer == NULL) |
| 2112 | return; |
| 2113 | |
| 2114 | ap_expr_yyensure_buffer_stack(yyscanner); |
| 2115 | |
| 2116 | /* This block is copied from ap_expr_yy_switch_to_buffer. */ |
| 2117 | if ( YY_CURRENT_BUFFER ) |
| 2118 | { |
| 2119 | /* Flush out information for old buffer. */ |
| 2120 | *yyg->yy_c_buf_p = yyg->yy_hold_char; |
| 2121 | YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; |
| 2122 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; |
| 2123 | } |
| 2124 | |
| 2125 | /* Only push if top exists. Otherwise, replace top. */ |
| 2126 | if (YY_CURRENT_BUFFER) |
| 2127 | yyg->yy_buffer_stack_top++; |
| 2128 | YY_CURRENT_BUFFER_LVALUE = new_buffer; |
| 2129 | |
| 2130 | /* copied from ap_expr_yy_switch_to_buffer. */ |
| 2131 | ap_expr_yy_load_buffer_state(yyscanner ); |
| 2132 | yyg->yy_did_buffer_switch_on_eof = 1; |
| 2133 | } |
| 2134 | |
| 2135 | /** Removes and deletes the top of the stack, if present. |
| 2136 | * The next element becomes the new top. |
nothing calls this directly
no test coverage detected