cloud9_root/src/third_party/stp/src/parser/lexsmt.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 smt_create_buffer  (FILE * file, int  size )
{
	YY_BUFFER_STATE b;
	b = (YY_BUFFER_STATE) smtalloc(sizeof( struct yy_buffer_state )  );
	if ( ! b )
		YY_FATAL_ERROR( "out of dynamic memory in smt_create_buffer()" );
	b->yy_buf_size = size;
	b->yy_ch_buf = (char *) smtalloc(b->yy_buf_size + 2  );
	if ( ! b->yy_ch_buf )
		YY_FATAL_ERROR( "out of dynamic memory in smt_create_buffer()" );
	b->yy_is_our_buffer = 1;
	smt_init_buffer(b,file );
	return b;
}
YY_BUFFER_STATE smt_create_buffer ( FILE * file , int size ) { YY_BUFFER_STATE b ; b = ( YY_BUFFER_STATE ) smtalloc ( sizeof ( struct yy_buffer_state ) ) ; if ( ! b ) YY_FATAL_ERROR ( " " ) ; b -> yy_buf_size = size ; b -> yy_ch_buf = ( char * ) smtalloc ( b -> yy_buf_size + 2 ) ; if ( ! b -> yy_ch_buf ) YY_FATAL_ERROR ( " " ) ; b -> yy_is_our_buffer = 1 ; smt_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.
	 */