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

Function yy_flush_buffer

gecode/flatzinc/lexer.yy.cpp:1938–1960  ·  view source on GitHub ↗

Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * @param yyscanner The scanner object. */

Source from the content-addressed store, hash-verified

1936 * @param yyscanner The scanner object.
1937 */
1938 void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
1939{
1940 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1941 if ( ! b )
1942 return;
1943
1944 b->yy_n_chars = 0;
1945
1946 /* We always need two end-of-buffer characters. The first causes
1947 * a transition to the end-of-buffer state. The second causes
1948 * a jam in that state.
1949 */
1950 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1951 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1952
1953 b->yy_buf_pos = &b->yy_ch_buf[0];
1954
1955 b->yy_at_bol = 1;
1956 b->yy_buffer_status = YY_BUFFER_NEW;
1957
1958 if ( b == YY_CURRENT_BUFFER )
1959 yy_load_buffer_state( yyscanner );
1960}
1961
1962/** Pushes the new state onto the stack. The new state becomes
1963 * the current state. This function will allocate the stack

Callers 1

yy_init_bufferFunction · 0.85

Calls 1

yy_load_buffer_stateFunction · 0.85

Tested by

no test coverage detected