Skip to content

Commit 1e3a40c

Browse files
committed
track error types
1 parent 856f069 commit 1e3a40c

File tree

1 file changed

+2
-4
lines changed
  • src/commonMain/kotlin/ai/hypergraph/kaliningraph/automata

1 file changed

+2
-4
lines changed

src/commonMain/kotlin/ai/hypergraph/kaliningraph/automata/GRE.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -485,10 +485,8 @@ fun repairWithGRE(brokenStr: List<Σᐩ>, cfg: CFG): GRE? {
485485
val Bidx = indexArray[j]
486486
val Cidx = indexArray[j + 1]
487487
for (r in appq) {
488-
val left = dp[p][r][Bidx]
489-
if (left == null) continue
490-
val right = dp[r][q][Cidx]
491-
if (right == null) continue
488+
val left = dp[p][r][Bidx] ?: continue
489+
val right = dp[r][q][Cidx] ?: continue
492490
// Found a parse for A
493491
rhsPairs += left * right
494492
// if (rhsPairs.size > 10) break@outerLoop

0 commit comments

Comments
 (0)