automata.scala
changeset 43 93fc2f18e129
parent 35 487b0c0aef75
--- a/automata.scala	Sat Oct 20 16:44:39 2012 +0100
+++ b/automata.scala	Wed Oct 24 03:40:33 2012 +0100
@@ -90,6 +90,17 @@
 
 val A = mk_automaton(ALT("ab","ac"))
 
+A.start
+A.states.toList.length
+
 println(A.accepts("bd"))
 println(A.accepts("ab"))
 println(A.accepts("ac"))
+
+val r1 = STAR(ALT("a","b"))
+val r2 = SEQ("b","b")
+val r3 = SEQ(SEQ(SEQ(r1, r2), r1), "a")
+val B = mk_automaton(r3)
+
+B.start
+B.states.toList.length