pl0stuff an optimizing pl0 > c transcompiler

Stefan Koch via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Mon Dec 28 16:50:49 PST 2015


On Monday, 28 December 2015 at 23:40:31 UTC, Nick B wrote:
> On Monday, 28 December 2015 at 16:41:30 UTC, Stefan Koch wrote:
>> On Monday, 28 December 2015 at 10:45:59 UTC, Nick B wrote:
>>> what languages do you plan to support for input and output ?
>>
>> I just planned on PL/0 as input and C as output.
>> It is a simple one-pass (okay 2 pass if you count the 
>> optimizer) trans-compilation.
>>
>> There is no middle-end.
>>
>> And very little verification. Everything that parses will 
>> produce an c-output.
>> Which does may or may not compile.
>>
>> Since PL/0 just one type.
>> Int
>>
>> you can get away with anything :)
>
> so could it be used to produce D output instead of C ?
>
> Could it be used to parse PHP as input ?

That would probably require implementing a vm.
fancyPars can certainly be used to create a php parser but a 
straightforward translation will not give you good performance...



More information about the Digitalmars-d-announce mailing list