⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lp_rlpt.inc

📁 lp_solve_5.5.0.13_xli_CPLEX_source.tar优化问题的求解
💻 INC
📖 第 1 页 / 共 5 页
字号:
  pv->Last_var = strdup(ptr);  return(SOSTYPE);}	YY_BREAKcase 20:YY_RULE_SETUP{  parse_parm *pp = PARM;  parse_vars *pv = (parse_vars *) pp->parse_vars;  char *ptr = (char *)lpt_yytext;  pp->lineno = lpt_yylineno;  while ((isspace(*ptr))) ptr++;  FREE(pv->Last_var);  pv->Last_var = strdup(ptr);  ptr = pv->Last_var + strlen(pv->Last_var) - 1;  while ((ptr > pv->Last_var) && (isspace(ptr[-1]))) ptr--;  *ptr = 0;  return(VARIABLECOLON);}	YY_BREAKcase 21:YY_RULE_SETUP{  parse_parm *pp = PARM;  parse_vars *pv = (parse_vars *) pp->parse_vars;  char *ptr = (char *)lpt_yytext;  pp->lineno = lpt_yylineno;  while ((isspace(*ptr))) ptr++;  FREE(pv->Last_var);  pv->Last_var = strdup(ptr);  return(VAR);}	YY_BREAKcase 22:YY_RULE_SETUP{  parse_parm *pp = PARM;  parse_vars *pv = (parse_vars *) pp->parse_vars;  char *ptr = (char *)lpt_yytext;  pp->lineno = lpt_yylineno;  while ((isspace(*ptr))) ptr++;  if(ptr>(char *)lpt_yytext)    strcpy((char *)lpt_yytext, ptr);  pv->OP = *lpt_yytext;  return(RE_OPEQ);}	YY_BREAKcase 23:YY_RULE_SETUP{  parse_parm *pp = PARM;  parse_vars *pv = (parse_vars *) pp->parse_vars;  char *ptr = (char *)lpt_yytext;  pp->lineno = lpt_yylineno;  while ((isspace(*ptr))) ptr++;  if(ptr>(char *)lpt_yytext)    strcpy((char *)lpt_yytext, ptr);  pv->OP = *lpt_yytext;  return(RE_OPLE);}	YY_BREAKcase 24:YY_RULE_SETUP{  parse_parm *pp = PARM;  parse_vars *pv = (parse_vars *) pp->parse_vars;  char *ptr = (char *)lpt_yytext;  pp->lineno = lpt_yylineno;  while ((isspace(*ptr))) ptr++;  if(ptr>(char *)lpt_yytext)    strcpy((char *)lpt_yytext, ptr);  pv->OP = *lpt_yytext;  return(RE_OPGE);}	YY_BREAKcase 25:YY_RULE_SETUP{  parse_parm *pp = PARM;  pp->lineno = lpt_yylineno;  report(NULL, CRITICAL, "LEX ERROR : %s lineno %d\n", lpt_yytext, lpt_yylineno);  return(UNDEFINED);}	YY_BREAKcase 26:YY_RULE_SETUPECHO;	YY_BREAKcase YY_STATE_EOF(INITIAL):case YY_STATE_EOF(LINECOMMENT):	lpt_yyterminate();	case YY_END_OF_BUFFER:		{		/* Amount of text matched not including the EOB char. */		int lpt_yy_amount_of_matched_text = (int) (lpt_yy_cp - lpt_yyg->lpt_yytext_ptr) - 1;		/* Undo the effects of YY_DO_BEFORE_ACTION. */		*lpt_yy_cp = lpt_yyg->lpt_yy_hold_char;		YY_RESTORE_YY_MORE_OFFSET		if ( YY_CURRENT_BUFFER_LVALUE->lpt_yy_buffer_status == YY_BUFFER_NEW )			{			/* We're scanning a new file or input source.  It's			 * possible that this happened because the user			 * just pointed lpt_yyin at a new source and called			 * lpt_yylex().  If so, then we have to assure			 * consistency between YY_CURRENT_BUFFER and our			 * globals.  Here is the right place to do so, because			 * this is the first action (other than possibly a			 * back-up) that will match for the new input source.			 */			lpt_yyg->lpt_yy_n_chars = YY_CURRENT_BUFFER_LVALUE->lpt_yy_n_chars;			YY_CURRENT_BUFFER_LVALUE->lpt_yy_input_file = lpt_yyin;			YY_CURRENT_BUFFER_LVALUE->lpt_yy_buffer_status = YY_BUFFER_NORMAL;			}		/* Note that here we test for lpt_yy_c_buf_p "<=" to the position		 * of the first EOB in the buffer, since lpt_yy_c_buf_p will		 * already have been incremented past the NUL character		 * (since all states make transitions on EOB to the		 * end-of-buffer state).  Contrast this with the test		 * in input().		 */		if ( lpt_yyg->lpt_yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->lpt_yy_ch_buf[lpt_yyg->lpt_yy_n_chars] )			{ /* This was really a NUL. */			lpt_yy_state_type lpt_yy_next_state;			lpt_yyg->lpt_yy_c_buf_p = lpt_yyg->lpt_yytext_ptr + lpt_yy_amount_of_matched_text;			lpt_yy_current_state = lpt_yy_get_previous_state( lpt_yyscanner );			/* Okay, we're now positioned to make the NUL			 * transition.  We couldn't have			 * lpt_yy_get_previous_state() go ahead and do it			 * for us because it doesn't know how to deal			 * with the possibility of jamming (and we don't			 * want to build jamming into it because then it			 * will run more slowly).			 */			lpt_yy_next_state = lpt_yy_try_NUL_trans( lpt_yy_current_state , lpt_yyscanner);			lpt_yy_bp = lpt_yyg->lpt_yytext_ptr + YY_MORE_ADJ;			if ( lpt_yy_next_state )				{				/* Consume the NUL. */				lpt_yy_cp = ++lpt_yyg->lpt_yy_c_buf_p;				lpt_yy_current_state = lpt_yy_next_state;				goto lpt_yy_match;				}			else				{				lpt_yy_cp = lpt_yyg->lpt_yy_c_buf_p;				goto lpt_yy_find_action;				}			}		else switch ( lpt_yy_get_next_buffer( lpt_yyscanner ) )			{			case EOB_ACT_END_OF_FILE:				{				lpt_yyg->lpt_yy_did_buffer_switch_on_eof = 0;				if ( lpt_yywrap(lpt_yyscanner ) )					{					/* Note: because we've taken care in					 * lpt_yy_get_next_buffer() to have set up					 * lpt_yytext, we can now set up					 * lpt_yy_c_buf_p so that if some total					 * hoser (like flex itself) wants to					 * call the scanner after we return the					 * YY_NULL, it'll still work - another					 * YY_NULL will get returned.					 */					lpt_yyg->lpt_yy_c_buf_p = lpt_yyg->lpt_yytext_ptr + YY_MORE_ADJ;					lpt_yy_act = YY_STATE_EOF(YY_START);					goto do_action;					}				else					{					if ( ! lpt_yyg->lpt_yy_did_buffer_switch_on_eof )						YY_NEW_FILE;					}				break;				}			case EOB_ACT_CONTINUE_SCAN:				lpt_yyg->lpt_yy_c_buf_p =					lpt_yyg->lpt_yytext_ptr + lpt_yy_amount_of_matched_text;				lpt_yy_current_state = lpt_yy_get_previous_state( lpt_yyscanner );				lpt_yy_cp = lpt_yyg->lpt_yy_c_buf_p;				lpt_yy_bp = lpt_yyg->lpt_yytext_ptr + YY_MORE_ADJ;				goto lpt_yy_match;			case EOB_ACT_LAST_MATCH:				lpt_yyg->lpt_yy_c_buf_p =				&YY_CURRENT_BUFFER_LVALUE->lpt_yy_ch_buf[lpt_yyg->lpt_yy_n_chars];				lpt_yy_current_state = lpt_yy_get_previous_state( lpt_yyscanner );				lpt_yy_cp = lpt_yyg->lpt_yy_c_buf_p;				lpt_yy_bp = lpt_yyg->lpt_yytext_ptr + YY_MORE_ADJ;				goto lpt_yy_find_action;			}		break;		}	default:		YY_FATAL_ERROR(			"fatal flex scanner internal error--no action found" );	} /* end of action switch */		} /* end of scanning one token */} /* end of lpt_yylex *//* lpt_yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: *	EOB_ACT_LAST_MATCH - *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position *	EOB_ACT_END_OF_FILE - end of file */static int lpt_yy_get_next_buffer (lpt_yyscan_t lpt_yyscanner){    struct lpt_yyguts_t * lpt_yyg = (struct lpt_yyguts_t*)lpt_yyscanner;	register char *dest = YY_CURRENT_BUFFER_LVALUE->lpt_yy_ch_buf;	register char *source = lpt_yyg->lpt_yytext_ptr;	register int number_to_move, i;	int ret_val;	if ( lpt_yyg->lpt_yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->lpt_yy_ch_buf[lpt_yyg->lpt_yy_n_chars + 1] )		YY_FATAL_ERROR(		"fatal flex scanner internal error--end of buffer missed" );	if ( YY_CURRENT_BUFFER_LVALUE->lpt_yy_fill_buffer == 0 )		{ /* Don't try to fill the buffer, so this is an EOF. */		if ( lpt_yyg->lpt_yy_c_buf_p - lpt_yyg->lpt_yytext_ptr - YY_MORE_ADJ == 1 )			{			/* We matched a single character, the EOB, so			 * treat this as a final EOF.			 */			return EOB_ACT_END_OF_FILE;			}		else			{			/* We matched some text prior to the EOB, first			 * process it.			 */			return EOB_ACT_LAST_MATCH;			}		}	/* Try to read more data. */	/* First move last chars to start of buffer. */	number_to_move = (int) (lpt_yyg->lpt_yy_c_buf_p - lpt_yyg->lpt_yytext_ptr) - 1;	for ( i = 0; i < number_to_move; ++i )		*(dest++) = *(source++);	if ( YY_CURRENT_BUFFER_LVALUE->lpt_yy_buffer_status == YY_BUFFER_EOF_PENDING )		/* don't do the read, it's not guaranteed to return an EOF,		 * just force an EOF		 */		YY_CURRENT_BUFFER_LVALUE->lpt_yy_n_chars = lpt_yyg->lpt_yy_n_chars = 0;	else		{			int num_to_read =			YY_CURRENT_BUFFER_LVALUE->lpt_yy_buf_size - number_to_move - 1;		while ( num_to_read <= 0 )			{ /* Not enough room in the buffer - grow it. */			/* just a shorter name for the current buffer */			YY_BUFFER_STATE b = YY_CURRENT_BUFFER;			int lpt_yy_c_buf_p_offset =				(int) (lpt_yyg->lpt_yy_c_buf_p - b->lpt_yy_ch_buf);			if ( b->lpt_yy_is_our_buffer )				{				int new_size = b->lpt_yy_buf_size * 2;				if ( new_size <= 0 )					b->lpt_yy_buf_size += b->lpt_yy_buf_size / 8;				else					b->lpt_yy_buf_size *= 2;				b->lpt_yy_ch_buf = (char *)					/* Include room in for 2 EOB chars. */					lpt_yyrealloc((void *) b->lpt_yy_ch_buf,b->lpt_yy_buf_size + 2 ,lpt_yyscanner );				}			else				/* Can't grow it, we don't own it. */				b->lpt_yy_ch_buf = 0;			if ( ! b->lpt_yy_ch_buf )				YY_FATAL_ERROR(				"fatal error - scanner input buffer overflow" );			lpt_yyg->lpt_yy_c_buf_p = &b->lpt_yy_ch_buf[lpt_yy_c_buf_p_offset];			num_to_read = YY_CURRENT_BUFFER_LVALUE->lpt_yy_buf_size -						number_to_move - 1;			}		if ( num_to_read > YY_READ_BUF_SIZE )			num_to_read = YY_READ_BUF_SIZE;		/* Read in more data. */		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->lpt_yy_ch_buf[number_to_move]),			lpt_yyg->lpt_yy_n_chars, (size_t) num_to_read );		YY_CURRENT_BUFFER_LVALUE->lpt_yy_n_chars = lpt_yyg->lpt_yy_n_chars;		}	if ( lpt_yyg->lpt_yy_n_chars == 0 )		{		if ( number_to_move == YY_MORE_ADJ )			{			ret_val = EOB_ACT_END_OF_FILE;			lpt_yyrestart(lpt_yyin  ,lpt_yyscanner);			}		else			{			ret_val = EOB_ACT_LAST_MATCH;			YY_CURRENT_BUFFER_LVALUE->lpt_yy_buffer_status =				YY_BUFFER_EOF_PENDING;			}		}	else		ret_val = EOB_ACT_CONTINUE_SCAN;	if ((lpt_yy_size_t) (lpt_yyg->lpt_yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->lpt_yy_buf_size) {		/* Extend the array by 50%, plus the number we really need. */		lpt_yy_size_t new_size = lpt_yyg->lpt_yy_n_chars + number_to_move + (lpt_yyg->lpt_yy_n_chars >> 1);		YY_CURRENT_BUFFER_LVALUE->lpt_yy_ch_buf = (char *) lpt_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->lpt_yy_ch_buf,new_size ,lpt_yyscanner );		if ( ! YY_CURRENT_BUFFER_LVALUE->lpt_yy_ch_buf )			YY_FATAL_ERROR( "out of dynamic memory in lpt_yy_get_next_buffer()" );	}	lpt_yyg->lpt_yy_n_chars += number_to_move;	YY_CURRENT_BUFFER_LVALUE->lpt_yy_ch_buf[lpt_yyg->lpt_yy_n_chars] = YY_END_OF_BUFFER_CHAR;	YY_CURRENT_BUFFER_LVALUE->lpt_yy_ch_buf[lpt_yyg->lpt_yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;	lpt_yyg->lpt_yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->lpt_yy_ch_buf[0];	return ret_val;}/* lpt_yy_get_previous_state - get the state just before the EOB char was reached */    static lpt_yy_state_type lpt_yy_get_previous_state (lpt_yyscan_t lpt_yyscanner){	register lpt_yy_state_type lpt_yy_current_state;	register char *lpt_yy_cp;    struct lpt_yyguts_t * lpt_yyg = (struct lpt_yyguts_t*)lpt_yyscanner;	lpt_yy_current_state = lpt_yyg->lpt_yy_start;	lpt_yy_current_state += YY_AT_BOL();	for ( lpt_yy_cp = lpt_yyg->lpt_yytext_ptr + YY_MORE_ADJ; lpt_yy_cp < lpt_yyg->lpt_yy_c_buf_p; ++lpt_yy_cp )		{		register YY_CHAR lpt_yy_c = (*lpt_yy_cp ? lpt_yy_ec[YY_SC_TO_UI(*lpt_yy_cp)] : 1);		if ( lpt_yy_accept[lpt_yy_current_state] )			{			lpt_yyg->lpt_yy_last_accepting_state = lpt_yy_current_state;			lpt_yyg->lpt_yy_last_accepting_cpos = lpt_yy_cp;			}		while ( lpt_yy_chk[lpt_yy_base[lpt_yy_current_state] + lpt_yy_c] != lpt_yy_current_state )			{			lpt_yy_current_state = (int) lpt_yy_def[lpt_yy_current_state];			if ( lpt_yy_current_state >= 174 )				lpt_yy_c = lpt_yy_meta[(unsigned int) lpt_yy_c];			}		lpt_yy_current_state = lpt_yy_nxt[lpt_yy_base[lpt_yy_current_state] + (unsigned int) lpt_yy_c];		}	return lpt_yy_current_state;}/* lpt_yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis *	next_state = lpt_yy_try_NUL_trans( current_state ); */    static lpt_yy_state_type lpt_yy_try_NUL_trans  (lpt_yy_state_type lpt_yy_current_state , lpt_yyscan_t lpt_yyscanner){

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -