Python Forum

Full Version: a new language based on python
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i've wanted to create a new language based on python. this language would differ by having some new kinds of statements added. my thought to run it is a python program that reads in code in this new language and scans the lines for the new statements. for each of these it finds, it translates them to one or more lines of python code that performs what the coded statement is expected to do and replaces the one source line with the translation results. then the whole new list is joined together and passed to exec(). does this sound like a viable way to run such a language?