Skip to content
/ kaminpy Public
forked from ramalho/kaminpy

Interpreters from Kamin's PLIBA book, rewritten in Python 3

Notifications You must be signed in to change notification settings

pliba/kaminpy

 
 

Repository files navigation

kaminpy

This repository contains Python implementations of the interpreters described in Samuel Kamin's excellent PLIBA [1] book.

[1] Samuel Kamin, "Programming Languages, An Interpreter-Based Approach", Addison-Wesley, Reading, MA, 1990. ISBN 0-201-06824-9.

Python examples

Introductory

Examples designed to make it easier to understand the essentials of an interpreter.

  • SimpleCalc: single-module arithmetic expressions calculator.

  • Calculator: arithmetic expressions calculator with separate parser and evaluator.

  • CalcWithVars: arithmetic expressions calculator with variables.

SubPascal

Kamin's "chapter 1 language", minimal yet Turing-complete, inspired by Pascal with s-expression syntax. SubPascal is our name for it.

  • SubPascalWithoutFunc: SubPascal without function definitions.

  • SubPascalHappyPaths: "complete" SubPascal language, with function definitions but almost no error handling and limited REPL.

  • SubPascal: complete SubPascal with better error handling, multi-line REPL and source file execution.

Source material

PLIBA book errata and source code in Pascal and C:

http://www.cs.cmu.edu/afs/cs/project/ai-repository/ai/lang/lisp/impl/kamin/0.html

About

Interpreters from Kamin's PLIBA book, rewritten in Python 3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 94.3%
  • Jupyter Notebook 5.6%
  • Shell 0.1%