Skip to content

This is a learning project where the point is to learn the Rust programming language by making a toy Python compiler

License

Notifications You must be signed in to change notification settings

rawrgulmuffins/toy_rustpython

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

toy_rustpython

Build Status Crate API Average time to resolve an issue Percentage of issues still open Minimum rustc version

This is a learning project where the point is to learn the Rust programming language by making a toy Python compiler

Goals

  • Be a small enough project that I'll actually finish it.
  • Learn Rust
  • Learn How Python ByteCode works (maybe?).
  • Learn how to implement a REPL.
  • Be expandable if I want to continue working on this.
  • Learn how to use Docker for local testing and how CircleCI or Github Actions can also use the same Docker Images.
  • Build a test suite that can be re-used if I want to use this to learn other languages.

Specific Features

Operators

  • +
  • -
  • *
  • **
  • %
  • /
  • //
  • =

Statements

  • if
  • elif
  • else
  • print
  • def
  • return

Other In Scope Features

  • Python REPL for all keywords.
  • Run Programs from files.
  • CircleCI or github Actions running fmt, tests, and crates upload.

Maybe Later

  • for
  • while
  • globals
  • locals
  • del
  • Dict types and [ ]
  • ( )
  • == and other logical comparisons
  • all of the operator =s (*=, -=, etc.)
  • indent syntax error
  • objects.
  • dot traversal (object.method, object.object.attribute)

Resources

CPython Tokens CPython Grammar

About

This is a learning project where the point is to learn the Rust programming language by making a toy Python compiler

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages