Metadata-Version: 2.1
Name: mathterpreter
Version: 1.0.0
Summary: A lightweight and basic maths interpreter
Home-page: https://github.com/pjones123/mathterpreter
Author: pjones123
License: MIT
Keywords: python,math,maths
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3.7
Description-Content-Type: text/markdown
Requires-Dist: dataclasses
Requires-Dist: enum


# mathterpreter

#### A lightweight and basic maths interpreter

## Example usage

Basic usage

```python
from mathterpreter import interpret

print(interpret("54-3*(2+1)-3"))
```

Step by step
```python
from mathterpreter import Lexer, Parser

lexer = Lexer("54-3*(2+1)-3")
tokens = lexer.tokenize()
parser = Parser(tokens)
tree = parser.parse()
result = tree.evaluate()
print(result)
```


