private static int getValueOf(TokenType type, String s) {
        switch (type){
            case DIGIT:
            case NTY:
            case TEEN:
                int toReturn = type.getValue(s);
                assert (toReturn >= 0) : "No value found for token type " + type;
                return toReturn;
            default:
                return NO_VAL;
        }
    }