Switch to a different input buffer. * @param new_buffer The new input buffer. * @param yyscanner The scanner object. */
| 1812 | * @param yyscanner The scanner object. |
| 1813 | */ |
| 1814 | void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) |
| 1815 | { |
| 1816 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
| 1817 | |
| 1818 | /* TODO. We should be able to replace this entire function body |
| 1819 | * with |
| 1820 | * yypop_buffer_state(); |
| 1821 | * yypush_buffer_state(new_buffer); |
| 1822 | */ |
| 1823 | yyensure_buffer_stack (yyscanner); |
| 1824 | if ( YY_CURRENT_BUFFER == new_buffer ) |
| 1825 | return; |
| 1826 | |
| 1827 | if ( YY_CURRENT_BUFFER ) |
| 1828 | { |
| 1829 | /* Flush out information for old buffer. */ |
| 1830 | *yyg->yy_c_buf_p = yyg->yy_hold_char; |
| 1831 | YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; |
| 1832 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; |
| 1833 | } |
| 1834 | |
| 1835 | YY_CURRENT_BUFFER_LVALUE = new_buffer; |
| 1836 | yy_load_buffer_state( yyscanner ); |
| 1837 | |
| 1838 | /* We don't actually know whether we did this switch during |
| 1839 | * EOF (yywrap()) processing, but the only time this flag |
| 1840 | * is looked at is after yywrap() is called, so it's safe |
| 1841 | * to go ahead and always set it. |
| 1842 | */ |
| 1843 | yyg->yy_did_buffer_switch_on_eof = 1; |
| 1844 | } |
| 1845 | |
| 1846 | static void yy_load_buffer_state (yyscan_t yyscanner) |
| 1847 | { |
no test coverage detected