public Object getReducedValue(Object ctx, Object thisValue, VariableResolverFactory factory) { try { String i = String.valueOf(soundslike.getReducedValue(ctx, thisValue, factory)); if (i == null) throw new ClassCastException(); String x = (String) stmt.getReducedValue(ctx, thisValue, factory); if (x == null) throw new CompileException("not a string: " + stmt.getName(), stmt.getExpr(), stmt.getStart()); return soundex(i).equals(soundex(x)); } catch (ClassCastException e) { throw new CompileException("not a string: " + soundslike.getName(), soundslike.getExpr(), soundslike.getStart()); } }
public Object getReducedValue(Object ctx, Object thisValue, VariableResolverFactory factory) { try { String i = String.valueOf(soundslike.getReducedValue(ctx, thisValue, factory)); if (i == null) throw new ClassCastException(); String x = (String) stmt.getReducedValue(ctx, thisValue, factory); if (x == null) throw new CompileException("not a string: " + stmt.getName(), stmt.getExpr(), stmt.getStart()); return soundex(i).equals(soundex(x)); } catch (ClassCastException e) { throw new CompileException("not a string: " + soundslike.getName(), soundslike.getExpr(), soundslike.getStart()); } }
public Object getReducedValue(Object ctx, Object thisValue, VariableResolverFactory factory) { try { String i = String.valueOf(soundslike.getReducedValue(ctx, thisValue, factory)); if (i == null) throw new ClassCastException(); String x = (String) stmt.getReducedValue(ctx, thisValue, factory); if (x == null) throw new CompileException("not a string: " + stmt.getName(), stmt.getExpr(), getStart()); return similarity(i, x); } catch (ClassCastException e) { throw new CompileException("not a string: " + soundslike.getName(), soundslike.getExpr(), soundslike.getStart()); } }
public Object getReducedValue(Object ctx, Object thisValue, VariableResolverFactory factory) { try { String i = String.valueOf(soundslike.getReducedValue(ctx, thisValue, factory)); if (i == null) throw new ClassCastException(); String x = (String) stmt.getReducedValue(ctx, thisValue, factory); if (x == null) throw new CompileException("not a string: " + stmt.getName(), stmt.getExpr(), getStart()); return similarity(i, x); } catch (ClassCastException e) { throw new CompileException("not a string: " + soundslike.getName(), soundslike.getExpr(), soundslike.getStart()); } }
PropertyVerifier propVerifier = new PropertyVerifier(expr, tk.getStart(), tk.getOffset(), pCtx); throw new CompileException("no such identifier: " + tk.getAbsoluteName(), expr, tk.getStart()); ExecutableStatement c = (ExecutableStatement) subCompileExpression(expr, tk.getStart(), tk.getOffset(), pCtx);
PropertyVerifier propVerifier = new PropertyVerifier(expr, tk.getStart(), tk.getOffset(), pCtx); throw new CompileException("no such identifier: " + tk.getAbsoluteName(), expr, tk.getStart()); ExecutableStatement c = (ExecutableStatement) subCompileExpression(expr, tk.getStart(), tk.getOffset(), pCtx);
String key = new String(expr, tk.getStart(), tk.getOffset()); Map<String, CompiledExpression> cec = pCtx.getCompiledExpressionCache(); Map<String, Class> rtc = pCtx.getReturnTypeCache(); Class rt = rtc.get(key); if (compiled == null) { ExpressionCompiler subCompiler = new ExpressionCompiler(expr, tk.getStart(), tk.getOffset(), pCtx); compiled = subCompiler._compile(); rt = subCompiler.getReturnType(); throw new CompileException("unexpected token: " + tkOp.getName(), expr, tkOp.getStart());
String key = new String(expr, tk.getStart(), tk.getOffset()); Map<String, CompiledExpression> cec = pCtx.getCompiledExpressionCache(); Map<String, Class> rtc = pCtx.getReturnTypeCache(); Class rt = rtc.get(key); if (compiled == null) { ExpressionCompiler subCompiler = new ExpressionCompiler(expr, tk.getStart(), tk.getOffset(), pCtx); compiled = subCompiler._compile(); rt = subCompiler.getReturnType(); throw new CompileException("unexpected token: " + tkOp.getName(), expr, tkOp.getStart());
if (tk != null && tk.isOperator() && tk.nextASTNode != null) { throw new CompileException("incomplete statement: " + tk.getName() + " (possible use of reserved keyword as identifier: " + tk.getName() + ")", tk.getExpr(), tk.getStart());
if (tk != null && tk.isOperator() && tk.nextASTNode != null) { throw new CompileException("incomplete statement: " + tk.getName() + " (possible use of reserved keyword as identifier: " + tk.getName() + ")", tk.getExpr(), tk.getStart());