From 0445377869901378c214185334ca4cbd1b900396 Mon Sep 17 00:00:00 2001 From: Harishankar Date: Sun, 31 May 2020 12:48:40 +0530 Subject: [PATCH] Readme added Added a Readme file --- Readme.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Readme.md diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..69a2db1 --- /dev/null +++ b/Readme.md @@ -0,0 +1,28 @@ +# evpf - postfix evaluator + +evpf (**ev**aluate **p**ost**f**ix is a simple postfix expression evaluator +written as a learning project in rust. It supports both command line and +interactive mode. + +## Command line mode + + evpf + +where `` is a postfix expression like `20 30 + 11 -` etc. +Currently only 4 operators are supported: `+`, `-`, `*` and `/`. (In command +line mode, `*` has to be escaped using `\*` to work properly.) + +## Interactive mode + +Interactive mode displays a prompt where expressions can be evaluated by +typing into the prompt (line editing and session-history supported by +`rustyline`. + + evpf> + +In interactive mode, apart from entering expressions, the following commands +are supported + +* `q` or `Q` - quit +* `?` or `h` or `H` - help + -- 2.20.1