Hi Kilon,

you don't need any parser to do that, you need something to generate C / C++ code :)

There are Smalltalk to C translators floating around, and I believe one of them is in the Squeak / Pharo code base to generate the VM (or part of it).

If you want to do it yourself, you probably should: explore the Ring model as a way to export the package / class structure in C++ (just generate text as you go) and also make a pass method by method, asking for the RBAST of the method, and a visitor to� generate the C / C++ equivalent to each node of the AST (and you'll find the Smalltalk AST very simple and nice :) ).

Thierry


2014-09-15 11:04 GMT+02:00 kilon alios <kilon.alios@gmail.com>:

Is there a way to convert code from pharo to c or c++ ? Does pettit parser or other parsers offer such support ?