Skip to content

darius/tailbiter

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

A compiler from a subset of Python 3.4 (starting with abstract syntax trees in Python's ast form) to CPython 3.4 bytecode. The compiler is coded in that same Python subset; it can compile itself.

It can optionally run on top of a port of byterun to Python 3.4. (The original Byterun runs in 2.7 or 3.3.)

I've greatly stripped down and modified the version of byterun in this repo, and extended the compiler a bit, to run both together, i.e. the compiler-compiled compiler and interpreter on the interpreter.

This is a continuation of https://github.com/darius/500lines/tree/master/bytecode-compiler

See article-code for the version published in Code Words. Also, for tweaks to run in Python 3.5 and 3.6.

If you run a later CPython version, don't expect this to work there. I haven't tried it.

About

Self-compiling compiler of a Python subset. Just enough Python to Python in Python.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published