Metadata-Version: 2.2
Name: toy_lang_fun
Version: 0.1.2
Summary: A toy functional programming language
Author: Krishna Murugan
Author-email: Krishna Murugan <krishnamurugan589@gmail.com>
Project-URL: Homepage, https://github.com/M-krishna/toy_lang
Project-URL: Issues, https://github.com/M-krishna/toy_lang/issues
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author

# Toy Language Interpreter

A minimalist Scheme-like programming language interpreter written in Python. This project implements a custom programming language with support for basic arithmetic operations, conditionals, and functional programming concepts.

## Features

- Lambda functions and closures
- Basic arithmetic operations `(+, -, *, /)`
- Comparison operators `(<, >, <=, >=)`
- Boolean operations `(and, or, not)`
- Conditional statements `(if)`
- Local variable bindings
- Comments support

## Installation

```bash
# Using pip
pip install toy_lang
```

## Quick start

```lisp
; Hello World
(display "Hello, World!")

; Basic arithmetic
(+ 1 2 3)  ; => 6
(* 4 5)    ; => 20

; Lambda functions
(lambda (x) (* x x))

; Conditional statements
(if (> 5 3)
    "yes"
    "no")
```

## Language Features

Arithmetic Operations

* Addition: `(+ 1 2 3)`
* Subtraction: `(- 10 5)`
* Multiplication: `(* 2 3 4)`
* Division: `(/ 10 2)`

Comparison Operators

* Less than: `(< 5 10)`
* Greater than: `(> 10 5)`
* Less than or equal: `(<= 5 5)`
* Greater than or equal: `(>= 10 10)`


Boolean Operations

* And: `(and #t #f)`
* Or: `(or #t #f)`
* Not: `(not #t)`


Functions

```lisp
; Define a function
(lambda (x) (* x x))

; Using begin for multiple expressions
(begin
  (define square (lambda (x) (* x x)))
  (square 5))
```

## Development

To set up the development environment:
```bash
git clone https://github.com/M-krishna/toy_lang.git
cd toy_lang
```

## Contributing
* Fork the repository
* Create your feature branch (`git checkout -b feature/amazing-feature`)
* Commit your changes (`git commit -m 'Add some amazing feature'`)
* Push to the branch (`git push origin feature/amazing-feature`)
* Open a Pull Request


## License

This project is licensed under the MIT License - see the LICENSE file for details.
