Skip to content

Commit

Permalink
parsingdata#186: Added missing license header, fixed import order.
Browse files Browse the repository at this point in the history
  • Loading branch information
ccreeten committed Jul 11, 2017
1 parent ba6e4be commit 3fbfbbb
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ public interface Expression {

ImmutableList<Boolean> eval(ParseGraph graph, Encoding encoding);

// TODO: should the reducing operation be present here? See Util#allTrue
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@

package io.parsingdata.metal.expression.comparison;

import static java.util.function.Function.identity;

import static io.parsingdata.metal.SafeTrampoline.complete;
import static io.parsingdata.metal.SafeTrampoline.intermediate;
import static io.parsingdata.metal.Util.checkNotNull;
import static io.parsingdata.metal.data.transformation.Reversal.reverse;
import static java.util.function.Function.identity;

import java.util.Objects;
import java.util.Optional;
Expand Down
3 changes: 1 addition & 2 deletions core/src/main/java/io/parsingdata/metal/token/While.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package io.parsingdata.metal.token;

import static io.parsingdata.metal.Shorthand.expTrue;
import static io.parsingdata.metal.Trampoline.complete;
import static io.parsingdata.metal.Trampoline.intermediate;
import static io.parsingdata.metal.Util.allTrue;
Expand All @@ -26,8 +27,6 @@
import java.util.Objects;
import java.util.Optional;

import static io.parsingdata.metal.Shorthand.expTrue;

import io.parsingdata.metal.Trampoline;
import io.parsingdata.metal.Util;
import io.parsingdata.metal.data.Environment;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2013-2016 Netherlands Forensic Institute
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package io.parsingdata.metal;

import static io.parsingdata.metal.Util.allTrue;
Expand Down Expand Up @@ -64,8 +80,8 @@ public void evalGtEqNum() throws IOException {
assertFalse(allTrue(gtEqNum(ref("value"), rev(ref("other"))).eval(graph, enc())));
}

private static Expression imp(final Expression l, final Expression r) {
return or(not(l), r);
private static Expression imp(final Expression left, final Expression right) {
return or(not(left), right);
}

private static Expression gtEqNum(final ValueExpression value, final ValueExpression predicate) {
Expand Down

0 comments on commit 3fbfbbb

Please sign in to comment.