MCPcopy Create free account
hub / github.com/Gecode/gecode / yyrestart

Function yyrestart

gecode/flatzinc/lexer.yy.cpp:1796–1808  ·  view source on GitHub ↗

Immediately switch to a different input stream. * @param input_file A readable stream. * @param yyscanner The scanner object. * @note This function does not reset the start condition to @c INITIAL . */

Source from the content-addressed store, hash-verified

1794 * @note This function does not reset the start condition to @c INITIAL .
1795 */
1796 void yyrestart (FILE * input_file , yyscan_t yyscanner)
1797{
1798 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1799
1800 if ( ! YY_CURRENT_BUFFER ){
1801 yyensure_buffer_stack (yyscanner);
1802 YY_CURRENT_BUFFER_LVALUE =
1803 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
1804 }
1805
1806 yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
1807 yy_load_buffer_state( yyscanner );
1808}
1809
1810/** Switch to a different input buffer.
1811 * @param new_buffer The new input buffer.

Callers 2

yy_get_next_bufferFunction · 0.85
inputFunction · 0.85

Calls 4

yyensure_buffer_stackFunction · 0.85
yy_create_bufferFunction · 0.85
yy_init_bufferFunction · 0.85
yy_load_buffer_stateFunction · 0.85

Tested by

no test coverage detected