@Override public final boolean run(Context<Object> context) { B builder = builder(); context.getValueStack().push(builder); return true; }
@Override public final boolean run(Context<Object> context) { Object value = get(context); context.getValueStack().push(value); return true; } }
@Override public boolean run(Context ctx) { String match = match(); if (match.endsWith("k") || match.endsWith("M") || match.endsWith("G")) { match = scaleValueToString(match); } ctx.getValueStack().push(new Value.Literal(match)); return true; } });
/** * Pushes the given value onto the value stack. Equivalent to push(0, value). * * @param value the value to push * @return true */ public boolean push(V value) { check(); context.getValueStack().push(value); return true; }
@Override public final boolean run(Context<Object> context) { B builder = builder(); context.getValueStack().push(builder); return true; }
@Override public final boolean run(Context<Object> context) { B builder = builder(); context.getValueStack().push(builder); return true; }
@Override public final boolean run(Context<Object> context) { Object value = get(context); context.getValueStack().push(value); return true; } }
@Override public final boolean run(Context<Object> context) { Object value = get(context); context.getValueStack().push(value); return true; } }
/** * Inserts the given value a given number of elements below the current top of the value stack. * * @param down the number of elements to skip before inserting the value (0 being equivalent to push(value)) * @param value the value * @return true * @throws IllegalArgumentException if the stack does not contain enough elements to perform this operation */ public boolean push(int down, V value) { check(); context.getValueStack().push(down, value); return true; }
@Override public boolean run(Context ctx) { String expression = match(); expression = expandEnvironmentVariables(expression); try { Filter f = ECQL.toFilter(expression); ctx.getValueStack().push(new Data(f)); return true; } catch (CQLException e) { throw new ParserRuntimeException( reportPosition(ctx) + ". " + e.getMessage(), e); } } });
@Override public boolean run(Context ctx) { String expression = match(); expression = expandEnvironmentVariables(expression); try { org.opengis.filter.expression.Expression e = ECQL.toExpression(expression); ctx.getValueStack().push(new Value.Expression(e)); return true; } catch (CQLException e) { throw new ParserRuntimeException( reportPosition(ctx) + ". " + e.getMessage(), e); } } });
@Override public boolean run(Context<CfgElement> context) { if (!context.inErrorRecovery()) { final int start = context.getMatchStartIndex(); final int end = context.getMatchEndIndex(); final InputBuffer ibuf = context.getInputBuffer(); final String value = ibuf.extract(start, end); ValueElement elemVal = new ValueElement(ibuf.getOriginalIndex(start), ibuf.getOriginalIndex(end), value); context.getValueStack().push(elemVal); } return true; }
@Override public boolean run(Context<CfgElement> context) { if (!context.inErrorRecovery()) { final int start = context.getMatchStartIndex(); final int end = context.getMatchEndIndex(); final InputBuffer ibuf = context.getInputBuffer(); final String key = ibuf.extract(start, end); KeyElement elemKey = new KeyElement(ibuf.getOriginalIndex(start), ibuf.getOriginalIndex(end), key); context.getValueStack().push(elemKey); } return true; }