src/main/java/com/github/fge/grappa/parsers/BaseActions.java
public <E extends V> E popAs(final Class<E> c, final int down)
    {
        return c.cast(pop(down));
    }
public <E extends V> E popAs(final Class<E> c, final int down)
    {
        return c.cast(pop(down));
    }
Removes the value the given number of elements below the top of the value
stack and casts it before returning it

@param c the class to cast to
@param down the number of elements to skip before removing the value (0
being equivalent to {@code pop()})
@param <E> type of the class
@return the value
@throws IllegalArgumentException the stack does not contain enough
elements to perform this operation

@see #pop(int)