tuned
authorChristian Urban <urbanc@in.tum.de>
Wed, 24 Oct 2012 03:40:33 +0100
changeset 43 93fc2f18e129
parent 42 5529cfb2a81e
child 44 3840d09e4271
tuned
automata.scala
hw04.tex
slides04.pdf
--- 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