本文整理汇总了Java中org.spoofax.interpreter.core.Tools.isExplode方法的典型用法代码示例。如果您正苦于以下问题:Java Tools.isExplode方法的具体用法?Java Tools.isExplode怎么用?Java Tools.isExplode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.spoofax.interpreter.core.Tools
的用法示例。
在下文中一共展示了Tools.isExplode方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildTerm
import org.spoofax.interpreter.core.Tools; //导入方法依赖的package包/类
public IStrategoTerm buildTerm(IContext env, IStrategoAppl t) throws InterpreterException {
ITermFactory factory = env.getFactory();
if (Tools.isAnno(t, env)) {
return buildAnno(env, t);
}
else if (Tools.isOp(t, env)) {
return buildOp(env, t, factory);
}
else if (Tools.isInt(t, env)) {
return buildInt(t, factory);
}
else if (Tools.isReal(t, env)) {
return buildReal(t, factory);
}
else if (Tools.isStr(t, env)) {
return buildStr(t);
}
else if (Tools.isVar(t, env)) {
return buildVar(env, t);
}
else if (Tools.isExplode(t, env)) {
return buildExplode(env, t);
}
throw new InterpreterException("Unknown build constituent '" + t.getConstructor() + "'");
}
示例2: 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 + "'");
}
示例3: 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 + "'");
}
示例4: 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 + "'");
}
示例5: 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 + "'");
}
示例6: 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 + "'");
}
示例7: 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 + "'");
}
示例8: 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 + "'");
}