From 0e6fb9a83edcc35230fa0572e57434e476ba0983 Mon Sep 17 00:00:00 2001 From: Gbemiro Jiboye Date: Sat, 17 Aug 2024 02:41:51 +0100 Subject: [PATCH] Update README.md Change README to reflect latest version... 0.1.10 --- README.md | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 42d6a6c..5cc992e 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ If you need to access this library via Maven Central, do: com.github.gbenroscience parser-ng - 0.1.9 + 0.1.10 @@ -82,20 +82,20 @@ ParserNG is written completely in (pure) Java and so is as cross-platform as Jav ## Using ParserNG as commandline tool You can use jar directly as commandline calculus. Unless the tool is packed to your distribution: ``` -java -jar parser-ng-0.1.8.jar 1+1 +java -jar parser-ng-0.1.10.jar 1+1 2.0 ``` Or as logical parser ``` -java -jar parser-ng-0.1.8.jar -l true and true +java -jar parser-ng-0.1.10.jar -l true and true true -java -jar parser-ng-0.1.8.jar -l "2 == (4-2)" +java -jar parser-ng-0.1.10.jar -l "2 == (4-2)" true ``` You can get help by ``` -java -jar parser-ng-0.1.8.jar -h - ParserNG 0.1.8 math.Main +java -jar parser-ng-0.1.10.jar -h + ParserNG 0.1.10 math.Main -h/-H/--help this text; do not change for help (witout dashes), which lists functions -v/-V/--verbose output is reprinted to stderr with some inter-steps -l/-L/--logic will add logical expression wrapper around the expression @@ -117,11 +117,11 @@ java -jar parser-ng-0.1.8.jar -h ``` You can get examples by verbose help: ``` -java -jar parser-ng-0.1.8.jar -h -v +java -jar parser-ng-0.1.10.jar -h -v ``` you can list functions: ``` -java -jar parser-ng-0.1.8.jar help +java -jar parser-ng-0.1.10.jar help List of currently known methods: acos - help not yet written. See https://github.com/gbenroscience/ParserNG ... @@ -130,7 +130,7 @@ List of functions is just tip of iceberg, see: https://github.com/gbenroscience/ ``` you can list logical operators: ``` -java -jar parser-ng-0.1.8.jar -l help +java -jar parser-ng-0.1.10.jar -l help Comparing operators: !=, ==, >=, <=, le, ge, lt, gt, <, > Logical operators: impl, xor, imp, eq, or, and, |, & As Mathematical parts are using () as brackets, Logical parts must be grouped by [] eg. @@ -145,40 +145,40 @@ Program can work with stdin, out and err properly. Can work with multiline input ### cmdline examples Following lines describes, how stdin/arguments are processed, and how different is input/output with `-t` on/off ``` - java -jar parser-ng-0.1.8.jar -h + java -jar parser-ng-0.1.10.jar -h this help - java -jar parser-ng-0.1.8.jar 1+1 + java -jar parser-ng-0.1.10.jar 1+1 2.0 - java -jar parser-ng-0.1.8.jar "1+1 + java -jar parser-ng-0.1.10.jar "1+1 +2+2" 2.0 4.0 - java -jar parser-ng-0.1.8.jar -t "1+1 + java -jar parser-ng-0.1.10.jar -t "1+1 +2+2" 6.0 - java -jar parser-ng-0.1.8.jar -i 1+1 + java -jar parser-ng-0.1.10.jar -i 1+1 nothing, will expect manual output, and calculate line by line - java -jar parser-ng-0.1.8.jar -i -t 1+1 + java -jar parser-ng-0.1.10.jar -i -t 1+1 nothing, will expect manual output and calcualte it all as one expression - echo 2+2 | java -jar parser-ng-0.1.8.jar 1+1 + echo 2+2 | java -jar parser-ng-0.1.10.jar 1+1 2.0 echo "1+1 - +2+2 | java -jar parser-ng-0.1.8.jar -i + +2+2 | java -jar parser-ng-0.1.10.jar -i 2.0 4.0 echo "1+1 - +2+2 | java -jar parser-ng-0.1.8.jar -i -t + +2+2 | java -jar parser-ng-0.1.10.jar -i -t 6.0 - java -cp parser-ng-0.1.8.jar parser.cmd.ParserCmd "1+1 + java -cp parser-ng-0.1.10.jar parser.cmd.ParserCmd "1+1 will ask for manual imput en evaluate per line echo "1+1 - +2+2 | java -cp parser-ng-0.1.8.jar parser.cmd.ParserCmd 2>/dev/null + +2+2 | java -cp parser-ng-0.1.10.jar parser.cmd.ParserCmd 2>/dev/null 2.0 4.0 - java -cp parser-ng-0.1.8.jar parser.MathExpression "1+1 + java -cp parser-ng-0.1.10.jar parser.MathExpression "1+1 +2+2" 6.0 - java -cp parser-ng-0.1.8.jar parser.LogicalExpression "true or false" + java -cp parser-ng-0.1.10.jar parser.LogicalExpression "true or false" true ```