Computer Science Canada Turing/c++ help |
Author: | MattyGG [ Tue Apr 05, 2005 10:39 am ] |
Post subject: | Turing/c++ help |
Is there any possible way to translate a turing program into c++ (other than the long and boring manual way)? |
Author: | Tony [ Tue Apr 05, 2005 10:46 am ] |
Post subject: | |
I've never tried this personally... but try decompiling Turing's executable. ![]() |
Author: | Martin [ Tue Apr 05, 2005 12:02 pm ] |
Post subject: | |
Write a program to do it for you, it's not that hard. |
Author: | wtd [ Tue Apr 05, 2005 12:22 pm ] |
Post subject: | |
martin wrote: Write a program to do it for you, it's not that hard.
Have you written a Turing parser? ![]() |
Author: | Tony [ Tue Apr 05, 2005 12:26 pm ] |
Post subject: | |
wtd wrote: Have you written a Turing parser?
![]() I know someone who has ![]() |
Author: | wtd [ Tue Apr 05, 2005 12:37 pm ] |
Post subject: | |
tony wrote:
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 Parsec. |
Author: | wtd [ Tue Apr 05, 2005 3:32 pm ] | ||||
Post subject: | |||||
Success! Parsing a basic Turing declaration.
Then running it:
|
Author: | bugzpodder [ Thu Apr 07, 2005 6:31 pm ] |
Post subject: | |
I've written a SL compiler as a CS assignment (its basic C++ with variables declared in the beginning) using JLex and believe me, that is painful. martin will do it soon... hey martin, you interested in some of the CS books i've got?? ![]() |
Author: | rizzix [ Thu Apr 07, 2005 8:30 pm ] |
Post subject: | |
JLex eh? i believe javacc is the more popular one use now-a-days.. |