• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ Expression函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中Expression函数的典型用法代码示例。如果您正苦于以下问题:C++ Expression函数的具体用法?C++ Expression怎么用?C++ Expression使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了Expression函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: Expression

Expression Operator::operator*( const Expression    & arg ) const{ return Expression(*this)*arg; }
开发者ID:ThomasBesselmann,项目名称:acado,代码行数:1,代码来源:operator.cpp


示例2: Expression

ConstraintComponent NonsmoothOperator::operator==( const VariablesGrid&  b ) const{ return Expression(*this) ==  b; }
开发者ID:rtkg,项目名称:acado,代码行数:1,代码来源:nonsmooth_operator.cpp


示例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); }
开发者ID:AgusCT,项目名称:am335x_pru_package,代码行数:67,代码来源:pasmdot.c


示例4:

Expression NonsmoothOperator::operator-( ) const{ return -Expression(*this); }
开发者ID:rtkg,项目名称:acado,代码行数:1,代码来源:nonsmooth_operator.cpp


示例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();
}
开发者ID:sunfirefox,项目名称:yb-orm,代码行数:6,代码来源:engine.cpp


示例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;
//.........这里部分代码省略.........
开发者ID:MonteCarlos,项目名称:cc65,代码行数:101,代码来源:ea65.c


示例7:

Expression Operator::operator-( ) const{ return -Expression(*this); }
开发者ID:ThomasBesselmann,项目名称:acado,代码行数:1,代码来源:operator.cpp



注:本文中的Expression函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ ExpressionData函数代码示例发布时间:2022-05-30
下一篇:
C++ Expects函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap