[Vm-dev] Fwd: [Pharo-users] Understanding Slang for building a
compiler to C++
kilon.alios at gmail.com
Fri Mar 4 23:06:26 UTC 2016
---------- Forwarded message ---------
From: Dimitris Chloupis <kilon.alios at gmail.com>
Date: Sat, Mar 5, 2016 at 1:05 AM
Subject: Re: [Pharo-users] Understanding Slang for building a compiler to
To: Any question about pharo is welcome <pharo-users at lists.pharo.org>
Thanks guys for the pointers, Clement I dont care about the VM my goal is
not something like Slang but rather something that I will take a small
piece of code in pharo lets say a few classes and convert it to C++ code
that is human readable. But Esteban recommended to take a look at Slang
anyway for what I want to create. My priority here is readable C++ code,
rather than keeping the code as close to Pharo as possible. I know that
compromises will have to be made, so no GC, static types etc. So I am
looking into creating something that can take pharo code then the user adds
annotations or extra syntax like types, pointers, manual memory managment,
templates etc and then my compiler takes that and turns it to readable C++.
I think this approach would be much easier for me to do instead of doing
the hard work of trying to map Pharo to C++ which most likely is not
possible since C++ even lacks simple reflection and of course will have to
implement my own VM and my own GC .
Essentially my goal is writing C++ with Pharo syntax or close to Pharo
syntax. So people like me that want to take Pharo code and port it to C++
can do it easier than a manual rewrite.
On Fri, Mar 4, 2016 at 10:36 PM Bernardo Ezequiel Contreras <
vonbecmann at gmail.com> wrote:
> Hi Dimitris,
> Pavel has extracted the code generator in this project
> On Fri, Mar 4, 2016 at 9:06 AM, Dimitris Chloupis <kilon.alios at gmail.com>
>> Hey pharo experts I am interesting into studying how Slang works for
>> making a compiler that takes pharo code and turns it to C++ code, my
>> questions is where to find Slang , how to extract the code that compiles
>> Slang to C and study it as an example for making my own compiler for C++.
> Bernardo E.C.
> Sent from a cheap desktop computer in South America.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Vm-dev