Search code examples
programming-languageswizard

wizard that create code in multiple programming languages


as part of our application i need to build component that will output code in php and asp that have the same functionality ( and maybe latter jsp ) . how can i design this kind of component to be generic as possible ?


Solution

  • You need to be able to create a parse tree out of all input languages.

    For each output language, you will need to create a set of tree transforming grammar.

    You may also require a runtime library to help translate routines that are not available in your output language.