Binary file 2017/Autumn_17_8-Compilers_and_Formal_Languages-Christian_Urban.pdf has changed
Binary file 2017/Autumn_17_8-Compilers_and_Formal_Languages-General_questions.pdf has changed
Binary file 2017/Autumn_17_8-Compilers_and_Formal_Languages_(6CCS3CFL_2017_8_SEM1_000001).pdf has changed
--- a/LINKS Mon Jan 01 15:02:03 2018 +0000
+++ b/LINKS Thu Feb 01 21:06:20 2018 +0000
@@ -1,3 +1,25 @@
+Pictures from teh Starting Forth book
+
+https://www.forth.com/starting-forth/2-stack-manipulation-operators-arithmetic/
+
+--------------------------------
+
+Yeti - ML for the JVM
+https://mth.github.io/yeti/
+http://dot.planet.ee/yeti/intro.html
+
+
+JVM languages
+https://en.wikipedia.org/wiki/List_of_JVM_languages
+https://www.codeproject.com/Articles/50377/Create-Your-Own-Programming-Language
+
+
+Scheme
+https://wespiser.com/writings/wyas/home.html
+http://peter.michaux.ca/index#Scheme
+
+
+
assmebly (calculator RPN)
https://dere.github.io/2017-02-12/beginners-assembly-part1/
Binary file coursework/cw01.pdf has changed
Binary file coursework/cw02.pdf has changed
Binary file coursework/cw03.pdf has changed
Binary file coursework/cw04.pdf has changed
Binary file coursework/cw05.pdf has changed
--- a/progs/re1.scala Mon Jan 01 15:02:03 2018 +0000
+++ b/progs/re1.scala Thu Feb 01 21:06:20 2018 +0000
@@ -50,6 +50,12 @@
der('b', r)
der('c', r)
+val r = SEQ(SEQ(CHAR('x'), CHAR('y')), CHAR('z'))
+der('x', r)
+der('y', der('x', r))
+der('z', der('y', der('x', r)))
+
+
//optional regular expression (one or zero times)
def OPT(r: Rexp) = ALT(r, ONE)
--- a/progs/re4.scala Mon Jan 01 15:02:03 2018 +0000
+++ b/progs/re4.scala Thu Feb 01 21:06:20 2018 +0000
@@ -52,6 +52,13 @@
case r => r
}
+//example
+val r = SEQ(SEQ(CHAR('x'), CHAR('y')), CHAR('z'))
+der('x', r)
+der('y', der('x', r))
+der('z', der('y', der('x', r)))
+simp(der('z', der('y', der('x', r))))
+
// *new*
// derivative w.r.t. a string (iterates der)
def ders2(s: List[Char], r: Rexp) : Rexp = (s, r) match {