doc: add README

This commit is contained in:
Bruno BELANYI 2020-10-28 17:30:09 +01:00
parent 92ae5e3ab9
commit 23c94b1d06
1 changed files with 40 additions and 0 deletions

40 Normal file
View File

@ -0,0 +1,40 @@
# Evalexpr
This was a small experiment in writing a precedence climbing parser, using C.
I also have my reference parsing implementation, using recursive descent, to
compare the parsing results.
This is mostly based on the explanation found at this address: (use the Wayback Machine to
read it).
## How to build
Simply launch the following command
42sh$ make
If you want to build an `evalexpr` command using recursive descent instead, use:
42sh$ make USE_CLIMBING=0
Don't forget to use `make clean` when alternating between both.
## How to use
Simply launch the binary, and write an expression on its standard input. The
binary can parse exactly one expression per line, and reports parsing errors if
they happen.
Example use:
42sh$ ./evalexpr
1 + 2 * 3 - 3!