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. * */
| 3555 | * |
| 3556 | */ |
| 3557 | void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) |
| 3558 | { |
| 3559 | if (new_buffer == NULL) |
| 3560 | return; |
| 3561 | |
| 3562 | yyensure_buffer_stack(); |
| 3563 | |
| 3564 | /* This block is copied from yy_switch_to_buffer. */ |
| 3565 | if ( YY_CURRENT_BUFFER ) |
| 3566 | { |
| 3567 | /* Flush out information for old buffer. */ |
| 3568 | *(yy_c_buf_p) = (yy_hold_char); |
| 3569 | YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); |
| 3570 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); |
| 3571 | } |
| 3572 | |
| 3573 | /* Only push if top exists. Otherwise, replace top. */ |
| 3574 | if (YY_CURRENT_BUFFER) |
| 3575 | (yy_buffer_stack_top)++; |
| 3576 | YY_CURRENT_BUFFER_LVALUE = new_buffer; |
| 3577 | |
| 3578 | /* copied from yy_switch_to_buffer. */ |
| 3579 | yy_load_buffer_state( ); |
| 3580 | (yy_did_buffer_switch_on_eof) = 1; |
| 3581 | } |
| 3582 | |
| 3583 | /** Removes and deletes the top of the stack, if present. |
| 3584 | * The next element becomes the new top. |
nothing calls this directly
no test coverage detected