Am 11.03.2013 15:20, schrieb Daniel Murphy:
"Daniel Murphy" <yebbl...@nospamgmail.com> wrote in message
news:khfoa6$fm7$1...@digitalmars.com...
"Daniel Murphy" <yebbl...@nospamgmail.com> wrote in message
news:kgumek$2tp4$1...@digitalmars.com...
"Zach the Mystic" <reachbutminusthisz...@googlymail.com> wrote in message
news:pabfuaorrjbljxzrg...@forum.dlang.org...

Something like this https://github.com/yebblies/magicport2 ?

Yes! I need to look it over more thoroughly, but I couldn't ask for a
better beginning. Can I trust that you'll be a willing part of future
discussions on this matter, even if only to play Devil's Advocate?

More like a full-blown attempt than a beginning.  I started this a long
time ago.

There are three parts to it:
- c++ parser/d printer, with lots of cheating and special cases
- patches to the c++ source
- patched version of dmd to build the result (no error on variable
shadowing etc)

It produces a 70000 line d file which appears to get through 3/7ths of
semantic1.  Root needs to be ported, and a cleaner interface to the
backend is needed to compile the glue layer.


Update: With the bulk of root converting or ported, and the glue layer
stubbed out, I can build dmd from the converted source then lex and parse
the source (+druntime headers) again.

The highlight was the dynamically resized struct in root/stringtable.
Something went horribly wrong there.

Update: I can now generate the source, then build a frontend from that, then
process the frontend's source again with the built compiler.  It also works
on the conversion tool, and pulls in a sizeable chunk of druntime and
phobos.

do i get it right - you've converted the dmd C++ code with it?

Reply via email to