src/main/software/amazon/event/ruler/JsonRuleCompiler.java [785:838]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        return null;  // completely unreachable
    }

    private static Patterns completeNumericRange(final JsonParser parser,
                                                 final JsonToken token,
                                                 final String bottom,
                                                 final boolean openBottom) throws IOException {
        if (token != JsonToken.VALUE_STRING) {
            barf(parser, "Bad value in numeric range: " + parser.getText());
        }
        final String operator = parser.getText();
        boolean openTop = false;

        if (Constants.LT.equals(operator)) {
            openTop = true;
        } else if (!Constants.LE.equals(operator)) {
            barf(parser, "Bad numeric range operator: " + operator);
        }
        if (!parser.nextToken().isNumeric()) {
            barf(parser, "Value of " + operator + " must be numeric");
        }
        final String top = parser.getText();
        if (parser.nextToken() != JsonToken.END_ARRAY) {
            barf(parser, "Too many terms in numeric range expression");
        }
        return Range.between(bottom, openBottom, top, openTop);
    }

    private static Patterns processExistsExpression(final JsonParser parser) throws IOException {
        final JsonToken existsToken = parser.nextToken();
        Patterns existsPattern;

        if (existsToken == JsonToken.VALUE_TRUE) {
            existsPattern = Patterns.existencePatterns();
        } else if (existsToken == JsonToken.VALUE_FALSE) {
            existsPattern = Patterns.absencePatterns();
        } else {
            barf(parser, "exists match pattern must be either true or false.");
            return null;
        }

        if (parser.nextToken() != JsonToken.END_OBJECT) {
            barf(parser, "Only one key allowed in match expression");
            return null;
        }
        return existsPattern;
    }

    private static void tooManyElements(final JsonParser parser) throws JsonParseException {
        barf(parser, "Too many elements in numeric expression");
    }

    private static void barf(final JsonParser parser, final String message) throws JsonParseException {
        throw new JsonParseException(parser, message, parser.getCurrentLocation());
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/main/software/amazon/event/ruler/RuleCompiler.java [627:679]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        return null;  // completely unreachable
    }

    private static Patterns completeNumericRange(final JsonParser parser,
                                                 final JsonToken token,
                                                 final String bottom,
                                                 final boolean openBottom) throws IOException {
        if (token != JsonToken.VALUE_STRING) {
            barf(parser, "Bad value in numeric range: " + parser.getText());
        }
        final String operator = parser.getText();
        boolean openTop = false;

        if (Constants.LT.equals(operator)) {
            openTop = true;
        } else if (!Constants.LE.equals(operator)) {
            barf(parser, "Bad numeric range operator: " + operator);
        }
        if (!parser.nextToken().isNumeric()) {
            barf(parser, "Value of " + operator + " must be numeric");
        }
        final String top = parser.getText();
        if (parser.nextToken() != JsonToken.END_ARRAY) {
            barf(parser, "Too many terms in numeric range expression");
        }
        return Range.between(bottom, openBottom, top, openTop);
    }

    private static Patterns processExistsExpression(final JsonParser parser) throws IOException {
        final JsonToken existsToken = parser.nextToken();
        Patterns existsPattern;

        if (existsToken == JsonToken.VALUE_TRUE) {
            existsPattern = Patterns.existencePatterns();
        } else if (existsToken == JsonToken.VALUE_FALSE) {
            existsPattern = Patterns.absencePatterns();
        } else {
            barf(parser, "exists match pattern must be either true or false.");
            return null;
        }

        if (parser.nextToken() != JsonToken.END_OBJECT) {
            barf(parser, "Only one key allowed in match expression");
            return null;
        }
        return existsPattern;
    }

    private static void tooManyElements(final JsonParser parser) throws JsonParseException {
        barf(parser, "Too many elements in numeric expression");
    }
    private static void barf(final JsonParser parser, final String message) throws JsonParseException {
        throw new JsonParseException(parser, message, parser.getCurrentLocation());
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



