本文整理汇总了C++中Expression函数的典型用法代码示例。如果您正苦于以下问题:C++ Expression函数的具体用法?C++ Expression怎么用?C++ Expression使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Expression函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Expression
Expression Operator::operator*( const Expression & arg ) const{ return Expression(*this)*arg; }
示例2: Expression
ConstraintComponent NonsmoothOperator::operator==( const VariablesGrid& b ) const{ return Expression(*this) == b; }
示例3: DotCommand
//.........这里部分代码省略.........
else if( i==DOTCMD_RET )
{
/*
// .ret command
//
// Generate the line "jmp r30.w0"
// This makes us compatible with "CALL", although inexplicably,
// the CALL command is not a "dot" command.
//
*/
if( TermCnt != 1 )
{ Report(ps,REP_ERROR,"Expected no operands"); return(-1); }
if( Options & OPTION_RETREGSET )
{ Report(ps,REP_ERROR,".ret incompatible with .setcallreg, use ret"); return(-1); }
if( Core > CORE_V1 )
{ Report(ps,REP_ERROR,".ret illegal with specified core version, use ret"); return(-1); }
strcpy( Src, "jmp r30.w0" );
return(strlen(Src));
}
else if( i==DOTCMD_ORIGIN )
{
int val,tmp;
char tstr[TOKEN_MAX_LEN];
/*
// .origin command
//
// Alter the origin for writing code
*/
if( TermCnt != 2 )
{ Report(ps,REP_ERROR,"Expected 1 operand"); return(-1); }
strcpy( tstr, pTerms[1] );
if( Expression(ps, tstr, (uint *)&val, &tmp)<0 )
{ Report(ps,REP_ERROR,"Error in processing .origin value"); return(-1); }
if( Core == CORE_V0 )
{ Report(ps,REP_ERROR,".origin illegal with specified core version"); return(-1); }
if( val<CodeOffset )
{ Report(ps,REP_ERROR,".origin value is less than current offset"); return(-1); }
if( CodeOffset>=0 )
Report(ps,REP_WARN1,"Resetting .origin value after use");
if( EntryPoint<0 )
EntryPoint = val;
CodeOffset = val;
return(0);
}
else if( i==DOTCMD_ENTRYPOINT )
{
int val,tmp;
char tstr[TOKEN_MAX_LEN];
/*
// .entrypoint command
//
// Alter the origin for writing code
*/
if( TermCnt != 2 )
{ Report(ps,REP_ERROR,"Expected 1 operand"); return(-1); }
strcpy( tstr, pTerms[1] );
if( Expression(ps, tstr, (uint *)&val, &tmp)<0 )
{ Report(ps,REP_ERROR,"Error in processing .entrypoint value"); return(-1); }
if( Core == CORE_V0 )
{ Report(ps,REP_ERROR,".entrypoint illegal with specified core version"); return(-1); }
示例4:
Expression NonsmoothOperator::operator-( ) const{ return -Expression(*this); }
示例5: select1
LongInt
EngineBase::get_next_value(const String &seq_name)
{
return select1(Expression(get_dialect()->select_next_value(seq_name)),
Expression(get_dialect()->dual_name()), Expression()).as_longint();
}
示例6: GetEA
void GetEA (EffAddr* A)
/* Parse an effective address, return the result in A */
{
unsigned long Restrictions;
token_t IndirectEnter;
token_t IndirectLeave;
const char* IndirectExpect;
/* Choose syntax for indirection */
if (BracketAsIndirect) {
IndirectEnter = TOK_LBRACK;
IndirectLeave = TOK_RBRACK;
IndirectExpect = "']' expected";
} else {
IndirectEnter = TOK_LPAREN;
IndirectLeave = TOK_RPAREN;
IndirectExpect = "')' expected";
}
/* Clear the output struct */
A->AddrModeSet = 0;
A->Expr = 0;
/* Handle an addressing size override */
switch (CurTok.Tok) {
case TOK_OVERRIDE_ZP:
Restrictions = AM65_DIR | AM65_DIR_X | AM65_DIR_Y;
NextTok ();
break;
case TOK_OVERRIDE_ABS:
Restrictions = AM65_ABS | AM65_ABS_X | AM65_ABS_Y;
NextTok ();
break;
case TOK_OVERRIDE_FAR:
Restrictions = AM65_ABS_LONG | AM65_ABS_LONG_X;
NextTok ();
break;
default:
Restrictions = ~0UL; /* None */
break;
}
/* Parse the effective address */
if (TokIsSep (CurTok.Tok)) {
A->AddrModeSet = AM65_IMPLICIT;
} else if (CurTok.Tok == TOK_HASH) {
/* #val */
NextTok ();
A->Expr = Expression ();
A->AddrModeSet = AM65_ALL_IMM;
} else if (CurTok.Tok == TOK_A) {
NextTok ();
A->AddrModeSet = AM65_ACCU;
} else if (CurTok.Tok == IndirectEnter) {
/* One of the indirect modes */
NextTok ();
A->Expr = Expression ();
if (CurTok.Tok == TOK_COMMA) {
/* (expr,X) or (rel,S),y */
NextTok ();
if (CurTok.Tok == TOK_X) {
/* (adr,x) */
NextTok ();
A->AddrModeSet = AM65_ABS_X_IND | AM65_DIR_X_IND;
Consume (IndirectLeave, IndirectExpect);
} else if (CurTok.Tok == TOK_S) {
/* (rel,s),y */
NextTok ();
A->AddrModeSet = AM65_STACK_REL_IND_Y;
Consume (IndirectLeave, IndirectExpect);
ConsumeComma ();
Consume (TOK_Y, "`Y' expected");
} else {
Error ("Syntax error");
}
} else {
/* (adr), (adr),y or (adr),z */
Consume (IndirectLeave, IndirectExpect);
if (CurTok.Tok == TOK_COMMA) {
/* (adr),y */
NextTok ();
switch (CurTok.Tok) {
case TOK_Z:
/* only set by scanner.c if in 4510-mode */
NextTok ();
A->AddrModeSet = AM65_DIR_IND;
//.........这里部分代码省略.........
示例7:
Expression Operator::operator-( ) const{ return -Expression(*this); }