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

Function yy_init_buffer

gecode/flatzinc/lexer.yy.cpp:1909–1932  ·  view source on GitHub ↗

Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */

Source from the content-addressed store, hash-verified

1907 * such as during a yyrestart() or at EOF.
1908 */
1909 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
1910
1911{
1912 int oerrno = errno;
1913 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1914
1915 yy_flush_buffer( b , yyscanner);
1916
1917 b->yy_input_file = file;
1918 b->yy_fill_buffer = 1;
1919
1920 /* If b is the current buffer, then yy_init_buffer was _probably_
1921 * called from yyrestart() or through yy_get_next_buffer.
1922 * In that case, we don't want to reset the lineno or column.
1923 */
1924 if (b != YY_CURRENT_BUFFER){
1925 b->yy_bs_lineno = 1;
1926 b->yy_bs_column = 0;
1927 }
1928
1929 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1930
1931 errno = oerrno;
1932}
1933
1934/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1935 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.

Callers 2

yyrestartFunction · 0.85
yy_create_bufferFunction · 0.85

Calls 1

yy_flush_bufferFunction · 0.85

Tested by

no test coverage detected