# HG changeset patch # User Christian Urban # Date 1517519180 0 # Node ID 6589afc6789b682d5ef72ec3c463c2c4544edf32 # Parent 76a98ed71a2a9e3ac1d479a5ba6062d56de3ae2f updated diff -r 76a98ed71a2a -r 6589afc6789b 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 76a98ed71a2a -r 6589afc6789b 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 76a98ed71a2a -r 6589afc6789b 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 76a98ed71a2a -r 6589afc6789b 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 76a98ed71a2a -r 6589afc6789b coursework/cw01.pdf Binary file coursework/cw01.pdf has changed diff -r 76a98ed71a2a -r 6589afc6789b coursework/cw02.pdf Binary file coursework/cw02.pdf has changed diff -r 76a98ed71a2a -r 6589afc6789b coursework/cw03.pdf Binary file coursework/cw03.pdf has changed diff -r 76a98ed71a2a -r 6589afc6789b coursework/cw04.pdf Binary file coursework/cw04.pdf has changed diff -r 76a98ed71a2a -r 6589afc6789b coursework/cw05.pdf Binary file coursework/cw05.pdf has changed diff -r 76a98ed71a2a -r 6589afc6789b 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 76a98ed71a2a -r 6589afc6789b 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 {