Skip to content
/ revpo Public

An intentionally over-engineered evaluator and REPL for reverse Polish (aka postfix) notation expressions

Notifications You must be signed in to change notification settings

ciplazar/revpo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

RevPo

RevPo is an (intentionally) over-engineered evaluator and REPL for reverse Polish (aka postfix) notation expressions (test suite included).

In: '4 2 ** 1 +'
Out: 17

To run the test suite:

python revpo.py test

Or to pop straight into the REPL:

python revpo.py

The REPL accepts postfix expressions by default, but can also handle prefix and infix expressions if they are prefixed with pre/in followed by a space:

In: in (5 + ((1 + 2) * 4)) - 3
Out: 14

About

An intentionally over-engineered evaluator and REPL for reverse Polish (aka postfix) notation expressions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages