Skip to content

Commit

Permalink
Dry run
Browse files Browse the repository at this point in the history
  • Loading branch information
Baltoli committed Oct 26, 2023
1 parent bac2c75 commit ca0f710
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -550,10 +550,8 @@ private static Tuple4<Set<Sentence>, Sort, K, Boolean> computeSentencesOfWellFor
.add(Att.WRAP_ELEMENT(), "<" + cellName + ">")
.add(Att.UNIT(), "." + bagSort.name())
.add(Att.HOOK(), type.toUpperCase() + ".concat")
.add(
Att
.AVOID()) // needed to ensure cell collections are parsed as Bag instead of
// CellBag
.add(Att.AVOID()) // needed to ensure cell collections are parsed as Bag instead of
// CellBag
.add(Att.FUNCTION());
String unitHook = type.toUpperCase() + ".unit", elementHook = type.toUpperCase() + ".element";
switch (type) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -753,9 +753,8 @@ public CompletableFuture<List<SelectionRange>> selectionRange(SelectionRangePara
SelectionRange tsr =
new SelectionRange(
loc2range(t.location().get()), x.get());
x.set(
tsr); // find the deepest term that contains this
// position
x.set(tsr); // find the deepest term that contains this
// position
}
return t;
},
Expand All @@ -765,7 +764,7 @@ public CompletableFuture<List<SelectionRange>> selectionRange(SelectionRangePara
}
lloc.add(x.get());
} else { // anything else that doesn't have a complex structure: Import,
// SyntaxPriorities...
// SyntaxPriorities...
lloc.add(new SelectionRange(loc2range(getSafeLoc(mi)), msr));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ public static Tuple3<Module, Module, Module> getCombinedGrammarImpl(
Object PRESENT = new Object();
PatriciaTrie<Object> terminals =
new PatriciaTrie<>(); // collect all terminals so we can do automatic follow restriction
// for prefix terminals
// for prefix terminals
parseProds.stream()
.filter(sent -> sent instanceof Production)
.forEach(
Expand All @@ -568,7 +568,7 @@ public static Tuple3<Module, Module, Module> getCombinedGrammarImpl(
if (s instanceof Production p) {
if (p.sort().name().startsWith("#"))
return p; // don't do anything for such productions since they are advanced
// features
// features
// rewrite productions to contain follow restrictions for prefix terminals
// example _==_ and _==K_ can produce ambiguities. Rewrite the first into
// _(==(?![K])_
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public Either<java.util.Set<KEMException>, Term> apply(TermCons tc) {
// TODO: remove check once the java backend is no longer supported.
return super.apply(
tc); // don't do anything if the label is not a token KLabel (in case of variable or
// casted variable)
// casted variable)
String klvalue = kl.value();
try {
klvalue = StringUtil.unescapeKoreKLabel(kl.value());
Expand Down
2 changes: 0 additions & 2 deletions kore/src/main/java/org/kframework/utils/StringUtil.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) K Team. All Rights Reserved.
package org.kframework.utils;



import java.util.HashMap;
import java.util.Map;
import java.util.regex.Pattern;
Expand Down

0 comments on commit ca0f710

Please sign in to comment.