Metadata-Version: 2.4
Name: pratt-calc
Version: 0.1.0
Summary: Arithmetic calculator which uses a Pratt parser
Author: Brandon C. Irizarry
Author-email: Brandon C. Irizarry <brandon.irizarry@gmail.com>
License-Expression: GPL-3.0-or-later
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Dist: more-itertools>=10.8.0
Requires-Python: >=3.13
Project-URL: Homepage, https://github.com/BrandonIrizarry/pratt_calc
Description-Content-Type: text/markdown

# Introduction

An arithmetic expression calculator in Python, demoing the Pratt
parsing algorithm.

This takes inspiration from [this 2010 blog
post](https://eli.thegreenplace.net/2010/01/02/top-down-operator-precedence-parsing)
by Eli Bendersky, as well as a few other sources, which I'll touch on
in a future blog post.

# Installation

## Using `uv`

1. [Make sure](https://docs.astral.sh/uv/getting-started/installation/) `uv` is
installed in your system.

2. `git clone https://github.com/BrandonIrizarry/pratt_calc && cd !$`

3. `uv sync`

## Conventional

1. `git clone https://github.com/BrandonIrizarry/pratt_calc && cd !$`

2. `python -m venv venv`

3. `source venv/bin/activate`

4. `pip install .` 

# Usage

`./pratt_calc $EXPRESSION`

Example: 

`./pratt_calc '3-4*5'`

This should print -17 at the console.

# TODO

- [ ] add support for running the tests.
- [ ] CI?

