Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #28630

Re: Language workbench written in python3

Newsgroups comp.lang.python
Date 2012-09-06 12:48 -0700
References <1ed391c3-8fcf-4a3f-8ad7-0a2cf913b6cc@googlegroups.com> <634287e3-12b3-4b47-8ad2-38c1bc76ff1a@googlegroups.com> <mailman.302.1346939197.27098.python-list@python.org> <314ae0e0-f38f-4cb9-944c-511343988f37@googlegroups.com>
Message-ID <a7c6b499-46da-4d53-a66b-91f332d90a7b@googlegroups.com> (permalink)
Subject Re: Language workbench written in python3
From Nestor Arocha <nesaro@gmail.com>

Show all headers | View raw


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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Language workbench written in python3 Nestor Arocha <nesaro@gmail.com> - 2012-09-05 14:04 -0700
  Re: Language workbench written in python3 Ramchandra Apte <maniandram01@gmail.com> - 2012-09-06 06:34 -0700
    Re: Language workbench written in python3 Dave Angel <d@davea.name> - 2012-09-06 09:46 -0400
      Re: Language workbench written in python3 Ramchandra Apte <maniandram01@gmail.com> - 2012-09-06 06:53 -0700
        Re: Language workbench written in python3 Dave Angel <d@davea.name> - 2012-09-06 10:25 -0400
        Re: Language workbench written in python3 Nestor Arocha <nesaro@gmail.com> - 2012-09-06 12:48 -0700
          Re: Language workbench written in python3 Ramchandra Apte <maniandram01@gmail.com> - 2012-09-08 08:09 -0700

csiph-web