Skip to content

Bootstrap a pythOwO compiler in pythOwO #16

@Swiddis

Description

@Swiddis

This is a bit of a tall order but I reckon it will be doable. We need to go deeper. Writing the compiler to output Python will probably be most natural, but since the feature set is small (I don't see classes implemented) any language could work. Maybe C so we can actually do a full compilation process and get a working Compiwer binary. Some action steps:

  1. Write a working interpreter in a lower-level target language that is restricted to the implemented feature-set of PythOwO
  2. Test the compiler thoroughly enough that we can be sure it will translate PythOwO faithfully
  3. Finally, translate the compiler to PythOwO
  4. Build and ship the Compiwer

For reference, I would recommend looking a little into LoxLox, which is a Lox implementation of the simple language Lox. The only real barrier to implementing it directly is the use of classes. In addition there's the C implementation in Crafting Interpreters, which does fairly well without classes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions