Reverse Codification

Is there a way to use a reversed version of codification e.g. print("Hello World") => say[Hello World]? I was thinking that it could be used to create text programming languages in Snap.
Edit (more than one year later!): see Reverse Codification? - #3 by programmer_user

1 Like

What should happen if I try to reverse-codify invalid code?

Do you want to take in text and convert to Snap statements or convert Snap! blocks to Python type text?

I want to take in text and convert it to Snap statements.

It would be hard to do that in general, but I guess not really impossible provided that we first invent a feature I want anyway: the ability to use blocks in a script that don't exist yet. So in general a program from some other language will use procedures that don't exist in Snap! and we'd translate them to a call to a nonexistent block.

There is an XML export/import built into Snap.

There is also a dynamic script generator project:

Yes, I should have mentioned that. But I think @programmer_user is looking for something human-readable, which the XML equivalent to a Snap! block isn't. (As opposed to, you know, hacker-readable.)

XML can be intermediate language in translation from Python, Perl, C.

We can smerge a project and make our own reverse codification