services/script/yacc/lexer.cpp
/** Allocate and initialize an input buffer state.
 * @param file A readable stream.
 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
 * 
 * @return the allocated buffer state.
 */
Allocate and initialize an input buffer state.
@param file A readable stream.
@param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.

@return the allocated buffer state.
Allocate and initialize an input buffer state . @param file A readable stream . @param size The character buffer size in bytes . When in doubt use @c YY_BUF_SIZE . @return the allocated buffer state .
YY_BUFFER_STATE yyFlexLexer::yy_create_buffer(std::istream& file, int size)
{
    YY_BUFFER_STATE b;
    b = (YY_BUFFER_STATE)yyalloc(sizeof(struct yy_buffer_state));
    if (!b) {
        YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()");
    }
    b->yy_buf_size = size;
    b->yy_ch_buf = (char *)yyalloc((yy_size_t)(b->yy_buf_size + 2));
    if (!b->yy_ch_buf) {
        YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()");
    }
    b->yy_is_our_buffer = 1;
    yy_init_buffer(b, file);
    return b;
}
YY_BUFFER_STATE yyFlexLexer :: yy_create_buffer ( std :: istream & file , int size ) { YY_BUFFER_STATE b ; b = ( YY_BUFFER_STATE ) yyalloc ( sizeof ( struct yy_buffer_state ) ) ; if ( ! b ) { YY_FATAL_ERROR ( " " ) ; } b -> yy_buf_size = size ; b -> yy_ch_buf = ( char * ) yyalloc ( ( yy_size_t ) ( b -> yy_buf_size + 2 ) ) ; if ( ! b -> yy_ch_buf ) { YY_FATAL_ERROR ( " " ) ; } b -> yy_is_our_buffer = 1 ; yy_init_buffer ( b , file ) ; return b ; }
Allocate and initialize an input buffer state.
Allocate and initialize an input buffer state .
/* yy_ch_buf has to be 2 characters longer than the size given because
     * we need to put in 2 end-of-buffer characters.
     */