# HG changeset patch # User Christian Urban # Date 1517519180 0 # Node ID b2db644b7442c6b0d8b433e56db173ab749faca4 # Parent 56e054d84be2d8fe2b0898aff9e4af4337d4e10c updated diff -r 56e054d84be2 -r b2db644b7442 2017/Autumn_17_8-Compilers_and_Formal_Languages-Christian_Urban.pdf Binary file 2017/Autumn_17_8-Compilers_and_Formal_Languages-Christian_Urban.pdf has changed diff -r 56e054d84be2 -r b2db644b7442 2017/Autumn_17_8-Compilers_and_Formal_Languages-General_questions.pdf Binary file 2017/Autumn_17_8-Compilers_and_Formal_Languages-General_questions.pdf has changed diff -r 56e054d84be2 -r b2db644b7442 2017/Autumn_17_8-Compilers_and_Formal_Languages_(6CCS3CFL_2017_8_SEM1_000001).pdf Binary file 2017/Autumn_17_8-Compilers_and_Formal_Languages_(6CCS3CFL_2017_8_SEM1_000001).pdf has changed diff -r 56e054d84be2 -r b2db644b7442 LINKS --- 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/ diff -r 56e054d84be2 -r b2db644b7442 coursework/cw01.pdf Binary file coursework/cw01.pdf has changed diff -r 56e054d84be2 -r b2db644b7442 coursework/cw02.pdf Binary file coursework/cw02.pdf has changed diff -r 56e054d84be2 -r b2db644b7442 coursework/cw03.pdf Binary file coursework/cw03.pdf has changed diff -r 56e054d84be2 -r b2db644b7442 coursework/cw04.pdf Binary file coursework/cw04.pdf has changed diff -r 56e054d84be2 -r b2db644b7442 coursework/cw05.pdf Binary file coursework/cw05.pdf has changed diff -r 56e054d84be2 -r b2db644b7442 progs/re1.scala --- 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) diff -r 56e054d84be2 -r b2db644b7442 progs/re4.scala --- 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 {