Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
183 lines (153 sloc) 6.76 KB

Welcome to PyCep's documentation!

PyCep (Python Inception) is a Python 2.7 interpreter written in Python 2.7, with the goal to be fully compatible with CPython 2.7.

PyCep was created as study project to teach myself about writing interpreters. PyCep's externally exported methods are modelled after the Python standard library, thus have identical method signatures and return the same data structures as those offered by Python itself, while being entirely written in Python.

Try it out!

#editor { height: 250px; border: 1px solid #DDD; border-radius: 4px; border-bottom-right-radius: 0px; margin-top: 5px; margin-bottom: 5px; } #output { font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace; color: white; background-color: black; }
def fib(n): a, b = 0, 1 while a < n: print a a, b = b, a+b fib(1000)





Implementation Status

Module Status Comments
Tokenizer 0% Forwarding calls to tokenize.generate_tokens().
Parser 98% Very good coverage (except handling of encodings)
Analyzer 14% Analyzing a handful of example programs.
Interpreter 3% Interpreting very few example programs.

Design Goals

  • External methods have the same signatures and produce the same results as those provided by the standard Python library
  • Each of the interpreter's phases is built upon the previous phase, can be intercepted and studied independently of the other parts of the system

Sources

Get the sources from https://github.com/dlorch/pycep/

Contents

.. toctree::
   :maxdepth: 2

   pycep.rst
   parser.rst
   portability.rst
   tools.rst

Indices and tables

.. disqus:: pycep index
You can’t perform that action at this time.