MiniLisp is a compact Lisp interpreter implemented in fewer than one thousand lines of C, designed to demonstrate the core principles of Lisp and interpreter design in a highly readable format. The interpreter evaluates expressions in a traditional read-eval-print loop, allowing users to input Lisp code and immediately see the results. Despite its small size, it supports a wide range of language features, including integers, symbols, lists, closures, macros, and garbage collection. The project emphasizes clarity and educational value, with well-commented code that explains how each feature is implemented. It includes support for lexical scoping, user-defined functions, and a macro system, enabling users to explore advanced Lisp concepts. The interpreter also implements a copying garbage collector, demonstrating memory management techniques in a simple context. It is designed to run on Unix-like systems and includes a test suite for validation.
Features
- Compact implementation under 1000 lines of C
- Support for closures, macros, and lexical scoping
- Read-eval-print loop for interactive execution
- Built-in garbage collection system
- User-defined functions and primitive operations
- Well-documented code for educational purposes