Language workbench written in python3

Nestor Arocha nesaro at gmail.com
Thu Sep 6 15:48:44 EDT 2012


On Thursday, September 6, 2012 2:53:15 PM UTC+1, Ramchandra Apte wrote:
> On Thursday, 6 September 2012 19:16:38 UTC+5:30, Dave Angel  wrote:
> 
> > On 09/06/2012 09:34 AM, Ramchandra Apte wrote:
> 
> > 
> 
> > > Translator means what precisely?
> 
> > 
> 
> > 
> 
> > 
> 
> > Examples of translators include compilers, assemblers, and
> 
> > 
> 
> > interpreters.  They also include implementations like cfront, which
> 
> > 
> 
> > translates from one high-level language to another lower-level
> 
> > 
> 
> > language.  (high and low being relative)
> 
> > 
> 
> > 
> 
> > 
> 
> > -- 
> 
> > 
> 
> > 
> 
> > 
> 
> > DaveA
> 
> 
> 
> Is conversion from Python to C++ possible from this project?

No, it is not currently possible for several reasons: 
   * current parser implementation is a recursive descent parser. I haven't implemented an LR parser yet, although PLY lexers and parsers are supported.
   * Syntax Directed Translator is not fully implemented either.
   * Parser Trees are supported, but there is no clear method defined for converting them into ASTs (like antlr grammars)
   * Even with AST and SDT support, a Python to C++ translator will require more complex tools and a lot of coding.

This tool is oriented to small DSLs parsing and translation; grammars like Python or C++ are too complex for the current implementation



More information about the Python-list mailing list