--- 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
--- a/hw04.tex Sat Oct 20 16:44:39 2012 +0100
+++ b/hw04.tex Wed Oct 24 03:40:33 2012 +0100
@@ -93,15 +93,12 @@
% explain what is a context-free grammar and the language it generates
%
-% What does it mean for two regular expressions to be equivalent.
%
% Define the language L(M) accepted by a deterministic finite automaton M.
%
-% Draw a parse tree for....
%
% does (a + b)*b+ and (a*b+) + (b*b+) define the same language
-%
-% What does it mean for a grammar to be ambiguous
+
\end{document}
Binary file slides04.pdf has changed