当前位置: 首页>>代码示例>>Java>>正文


Java Tools.isAs方法代码示例

本文整理汇总了Java中org.spoofax.interpreter.core.Tools.isAs方法的典型用法代码示例。如果您正苦于以下问题:Java Tools.isAs方法的具体用法?Java Tools.isAs怎么用?Java Tools.isAs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.spoofax.interpreter.core.Tools的用法示例。


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

示例1: matchAppl

import org.spoofax.interpreter.core.Tools; //导入方法依赖的package包/类
public Results matchAppl(IContext env, IStrategoAppl t,
        IStrategoAppl p) throws InterpreterException {

    if (Tools.isAnno(p, env)) {
        return matchAnyAnno(env, t, p);
    }
    else if (Tools.isOp(p, env)) {
        return matchApplOp(env, t, p);
    }
    else if (Tools.isInt(p, env)) {
        return matchApplInt(env, t, p);
    }
    else if (Tools.isStr(p, env)) {
        return null;
    }
    else if (Tools.isVar(p, env)) {
        return matchAnyVar(t, p);
    }
    else if (Tools.isExplode(p, env)) {
        return matchAnyExplode(env, t, p);
    }
    else if (Tools.isAs(p, env)) {
        return matchCompoundAs(env, t, p);
    }
    else if (Tools.isWld(p, env)) {
        return matchAnyWld(p);
    }

    throw new InterpreterException("Unknown Appl case '" + p + "'");
}
 
开发者ID:metaborg,项目名称:mb-exec,代码行数:31,代码来源:Match.java

示例2: matchInt

import org.spoofax.interpreter.core.Tools; //导入方法依赖的package包/类
protected Results matchInt(IContext env, IStrategoInt t,
        IStrategoAppl p) throws InterpreterException {

    if (DebugUtil.isDebugging()) {
        debug("term is Int");
    }

    if (Tools.isAnno(p, env)) {
        return matchAnyAnno(env, t, p);
    }
    else if (Tools.isInt(p, env)) {
        return matchIntInt(t, p);
    }
    else if (Tools.isReal(p, env)) {
        return null;
    }
    else if (Tools.isVar(p, env)) {
        return matchAnyVar(t, p);
    }
    else if (Tools.isOp(p, env)) {
        return null;
    }
    else if (Tools.isExplode(p, env)) {
        return matchAnyExplode(env, t, p);
    }
    else if (Tools.isWld(p, env)) {
        return matchAnyWld(p);
    }
    else if (Tools.isAs(p, env)) {
        return matchCompoundAs(env, t, p);
    } else if(Tools.isStr(p, env)) {
        return null;
    }

    throw new InterpreterException("Unknown Int case '" + p + "'");
}
 
开发者ID:metaborg,项目名称:mb-exec,代码行数:37,代码来源:Match.java

示例3: matchReal

import org.spoofax.interpreter.core.Tools; //导入方法依赖的package包/类
protected Results matchReal(IContext env, IStrategoReal t,
        IStrategoAppl p) throws InterpreterException {

    if (DebugUtil.isDebugging()) {
        debug("term is Real");
    }

    if (Tools.isAnno(p, env)) {
        return matchAnyAnno(env, t, p);
    }
    else if (Tools.isInt(p, env)) {
        return null;
    }
    else if (Tools.isReal(p, env)) {
        return matchRealReal(t, p);
    }
    else if (Tools.isVar(p, env)) {
        return matchAnyVar(t, p);
    }
    else if (Tools.isOp(p, env)) {
        return null;
    }
    else if (Tools.isExplode(p, env)) {
        return matchAnyExplode(env, t, p);
    }
    else if (Tools.isWld(p, env)) {
        return matchAnyWld(p);
    }
    else if (Tools.isAs(p, env)) {
        return matchCompoundAs(env, t, p);
    } else if (Tools.isStr(p, env)) {
        return null;
    }

    throw new InterpreterException("Unknown Real case '" + p + "'");
}
 
开发者ID:metaborg,项目名称:mb-exec,代码行数:37,代码来源:Match.java

示例4: matchBlob

import org.spoofax.interpreter.core.Tools; //导入方法依赖的package包/类
private Results matchBlob(IContext env, IStrategoTerm t, IStrategoAppl p) throws InterpreterException {
    if (DebugUtil.isDebugging()) {
        debug("term is Blob");
    }
    if (Tools.isAnno(p, env)) {
        return matchAnyAnno(env, t, p);
    }
    else if (Tools.isWld(p, env)) {
        return matchAnyWld(p);
    }
    else if (Tools.isAs(p, env)) {
        return matchCompoundAs(env, t, p);
    }
    else if (Tools.isVar(p, env)) {
        return matchAnyVar(t, p);
    }
    else if (Tools.isExplode(p, env)) {
        return null; // FIXME: explode blobs?
    } 
    else if (Tools.isStr(p, env)) {
        return null;
    }
    else if (Tools.isInt(p, env)) {
        return null;
    }
    else if (Tools.isReal(p, env)) {
        return null;
    }
    else if (Tools.isOp(p, env)) {
        return null;
    }

    throw new InterpreterException("Unknown Tuple case '" + p + "'");
}
 
开发者ID:metaborg,项目名称:mb-exec,代码行数:35,代码来源:Match.java

示例5: matchTuple

import org.spoofax.interpreter.core.Tools; //导入方法依赖的package包/类
private Results matchTuple(IContext env, IStrategoTuple t, IStrategoAppl p) throws InterpreterException {
    if (DebugUtil.isDebugging()) {
        debug("term is Tuple");
    }
    if (Tools.isAnno(p, env)) {
        return matchAnyAnno(env, t, p);
    }
    else if (Tools.isInt(p, env)) {
        return null;
    }
    else if (Tools.isReal(p, env)) {
        return null;
    }
    else if (Tools.isVar(p, env)) {
        return matchAnyVar(t, p);
    }
    else if (Tools.isOp(p, env)) {
        return matchTupleOp(env, t, p);
    }
    else if (Tools.isWld(p, env)) {
        return matchAnyWld(p);
    }
    else if (Tools.isAs(p, env)) {
        return matchCompoundAs(env, t, p);
    }
    else if (Tools.isExplode(p, env)) {
        return matchAnyExplode(env, t, p);
    } 
    else if (Tools.isStr(p, env)) {
        return null;
    }

    throw new InterpreterException("Unknown Tuple case '" + p + "'");
}
 
开发者ID:metaborg,项目名称:mb-exec,代码行数:35,代码来源:Match.java

示例6: matchList

import org.spoofax.interpreter.core.Tools; //导入方法依赖的package包/类
protected Results matchList(IContext env, IStrategoList t,
        IStrategoAppl p) throws InterpreterException {

    if (DebugUtil.isDebugging()) {
        debug("term is List");
    }

    if (Tools.isAnno(p, env)) {
        return matchAnyAnno(env, t, p);
    }
    else if (Tools.isInt(p, env)) {
        return null;
    }
    else if (Tools.isReal(p, env)) {
        return null;
    }
    else if (Tools.isVar(p, env)) {
        return matchAnyVar(t, p);
    }
    else if (Tools.isOp(p, env)) {
        return matchListOp(env, t, p);
    }
    else if (Tools.isWld(p, env)) {
        return matchAnyWld(p);
    }
    else if (Tools.isAs(p, env)) {
        return matchCompoundAs(env, t, p);
    }
    else if (Tools.isExplode(p, env)) {
        return matchAnyExplode(env, t, p);
    }
    else if (Tools.isStr(p, env)) {
        return null;
    }

    throw new InterpreterException("Unknown List case '" + p + "'");
}
 
开发者ID:metaborg,项目名称:mb-exec,代码行数:38,代码来源:Match.java

示例7: matchString

import org.spoofax.interpreter.core.Tools; //导入方法依赖的package包/类
private Results matchString(IContext env, IStrategoString t, IStrategoAppl p) throws InterpreterException {
    if (DebugUtil.isDebugging()) {
        debug("term is String");
    }
    
    if (Tools.isAnno(p, env)) {
        return matchAnyAnno(env, t, p);
    }
    else if(Tools.isStr(p, env)) {
        return matchStrStr(env, t, p);
    }
    else if (Tools.isInt(p, env)) {
        return null;
    }
    else if (Tools.isReal(p, env)) {
        return null;
    }
    else if (Tools.isVar(p, env)) {
        return matchAnyVar(t, p);
    }
    else if (Tools.isOp(p, env)) {
        return null;
    }
    else if (Tools.isExplode(p, env)) {
        return matchAnyExplode(env, t, p);
    }
    else if (Tools.isWld(p, env)) {
        return matchAnyWld(p);
    }
    else if (Tools.isAs(p, env)) {
        return matchCompoundAs(env, t, p);
    } 

    throw new InterpreterException("Unknown String case '" + p + "'");
}
 
开发者ID:metaborg,项目名称:mb-exec,代码行数:36,代码来源:Match.java


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