Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgenvinju committed Mar 14, 2024
1 parent 0bfabdc commit de7efcc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import lang::rascal::grammar::definition::Parameters;

import IO;
import Grammar;
import util::Monitor;

private str package = "org.rascalmpl.library.lang.rascal.syntax";
private str rootName = "RascalParser";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ private bool injection(appl(prod(Symbol _,[Symbol _],set[Attr] _), [Tree _])) =

&T <: Tree generalInjectionCountFilter(amb(set[&T <: Tree] alts)) {
as = [*alts];
counts = [(0 | it + 1 | a <- as, /Tree t := a, injection(t)) | a <- alts];
new = {as[i] | i <- index(as), counts[i] == min(counts)};
counts = [(0 | it + 1 | /Tree t := a, injection(t)) | a <- as];
minimum = min(counts);
new = {as[i] | i <- index(as), counts[i] == minimum};
if (new == alts) {
fail generalInjectionCountFilter;
Expand Down

0 comments on commit de7efcc

Please sign in to comment.