
-----------------------------------
MattyGG
Tue Apr 05, 2005 10:39 am

Turing/c++ help
-----------------------------------
Is there any possible way to translate a turing program into c++ (other than the long and boring manual way)?

-----------------------------------
Tony
Tue Apr 05, 2005 10:46 am


-----------------------------------
I've never tried this personally... but try decompiling Turing's executable. :wink:

-----------------------------------
Martin
Tue Apr 05, 2005 12:02 pm


-----------------------------------
Write a program to do it for you, it's not that hard.

-----------------------------------
wtd
Tue Apr 05, 2005 12:22 pm


-----------------------------------
Write a program to do it for you, it's not that hard.

Have you written a Turing parser?  :)

-----------------------------------
Tony
Tue Apr 05, 2005 12:26 pm


-----------------------------------
Have you written a Turing parser?  :)
I know someone who [url=http://www.compsci.ca/v2/viewtopic.php?t=6712]has :lol:

-----------------------------------
wtd
Tue Apr 05, 2005 12:37 pm


-----------------------------------
Have you written a Turing parser?  :)
I know someone who 

That was actually a really amateurish attempt.  I should have known better.  Regular expressions simply can't do that job.  I am thinking of trying again, but this time using [url=http://www.cs.uu.nl/~daan/download/parsec/parsec.html]Parsec.

-----------------------------------
wtd
Tue Apr 05, 2005 3:32 pm


-----------------------------------
Success!  Parsing a basic Turing declaration.

module TuringParser where

import Text.ParserCombinators.Parsec

identifier = (do
  l 