Skip to content

Commit

Permalink
take first nonempty shell
Browse files Browse the repository at this point in the history
  • Loading branch information
breandan committed Dec 4, 2024
1 parent 6aec385 commit 2802de9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ open class FSA(open val Q: TSA, open val init: Set<Σᐩ>, open val final: Set<
else (str.fold(init) { acc, sym ->
val nextStates = acc.flatMap { map[it to sym] ?: emptySet() }.toSet()
// println("$acc --$sym--> $nextStates")
nextStates.also { println("Next states: $it") }
nextStates//.also { println("Next states: $it") }
} intersect final).isNotEmpty()

open fun recognizes(str: Σᐩ) = recognizes(str.tokenizeByWhitespace())
Expand Down

0 comments on commit 2802de9

Please sign in to comment.