progs/display/nfa.scala
changeset 491 d5776c6018f0
parent 487 a697421eaa04
equal deleted inserted replaced
490:4fee50f38305 491:d5776c6018f0
     1 // NFAs in Scala using partial functions (returning
     1 // NFAs in Scala using partial functions (returning
     2 // sets of states)
     2 // sets of states)
     3 import scala.util.Try
     3 //
       
     4 // needs :load dfa.scala   for states
       
     5 
     4 
     6 
     5 // type abbreviation for partial functions
     7 // type abbreviation for partial functions
     6 type :=>[A, B] = PartialFunction[A, B]
     8 type :=>[A, B] = PartialFunction[A, B]
     7 
     9 
     8 // return an empty set when not defined
    10 // return an empty set when not defined