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()); } }
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()); } }
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());