Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Changed latest version
  • Loading branch information
gbenroscience authored Aug 17, 2024
1 parent 7ca27af commit 2b4932e
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ParserNG
v# ParserNG
<b>ParserNG</b> is a powerful open-source math tool that parses and evaluates algebraic expressions and also knows how to handle a lot of mathematical expressions.

* [ParserNG](#ParserNG)
Expand Down Expand Up @@ -49,7 +49,7 @@ If you need to access this library via Maven Central, do:
<dependency>
<groupId>com.github.gbenroscience</groupId>
<artifactId>parser-ng</artifactId>
<version>0.1.10</version>
<version>0.1.9-release</version>
</dependency>

Expand Down Expand Up @@ -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.10.jar 1+1
java -jar parser-ng-0.1.9-release.jar 1+1
2.0
```
Or as logical parser
```
java -jar parser-ng-0.1.10.jar -l true and true
java -jar parser-ng-0.1.9-release.jar -l true and true
true
java -jar parser-ng-0.1.10.jar -l "2 == (4-2)"
java -jar parser-ng-0.1.9-release.jar -l "2 == (4-2)"
true
```
You can get help by
```
java -jar parser-ng-0.1.10.jar -h
ParserNG 0.1.10 math.Main
java -jar parser-ng-0.1.9-release.jar -h
ParserNG 0.1.9-release 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
Expand All @@ -117,11 +117,11 @@ java -jar parser-ng-0.1.10.jar -h
```
You can get examples by verbose help:
```
java -jar parser-ng-0.1.10.jar -h -v
java -jar parser-ng-0.1.9-release.jar -h -v
```
you can list functions:
```
java -jar parser-ng-0.1.10.jar help
java -jar parser-ng-0.1.9-release.jar help
List of currently known methods:
acos - help not yet written. See https://github.com/gbenroscience/ParserNG
...
Expand All @@ -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.10.jar -l help
java -jar parser-ng-0.1.9-release.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.
Expand All @@ -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.10.jar -h
java -jar parser-ng-0.1.9-release.jar -h
this help
java -jar parser-ng-0.1.10.jar 1+1
java -jar parser-ng-0.1.9-release.jar 1+1
2.0
java -jar parser-ng-0.1.10.jar "1+1
java -jar parser-ng-0.1.9-release.jar "1+1
+2+2"
2.0
4.0
java -jar parser-ng-0.1.10.jar -t "1+1
java -jar parser-ng-0.1.9-release.jar -t "1+1
+2+2"
6.0
java -jar parser-ng-0.1.10.jar -i 1+1
java -jar parser-ng-0.1.9-release.jar -i 1+1
nothing, will expect manual output, and calculate line by line
java -jar parser-ng-0.1.10.jar -i -t 1+1
java -jar parser-ng-0.1.9-release.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.10.jar 1+1
echo 2+2 | java -jar parser-ng-0.1.9-release.jar 1+1
2.0
echo "1+1
+2+2 | java -jar parser-ng-0.1.10.jar -i
+2+2 | java -jar parser-ng-0.1.9-release.jar -i
2.0
4.0
echo "1+1
+2+2 | java -jar parser-ng-0.1.10.jar -i -t
+2+2 | java -jar parser-ng-0.1.9-release.jar -i -t
6.0
java -cp parser-ng-0.1.10.jar parser.cmd.ParserCmd "1+1
java -cp parser-ng-0.1.9-release.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.10.jar parser.cmd.ParserCmd 2>/dev/null
+2+2 | java -cp parser-ng-0.1.9-release.jar parser.cmd.ParserCmd 2>/dev/null
2.0
4.0
java -cp parser-ng-0.1.10.jar parser.MathExpression "1+1
java -cp parser-ng-0.1.9-release.jar parser.MathExpression "1+1
+2+2"
6.0
java -cp parser-ng-0.1.10.jar parser.LogicalExpression "true or false"
java -cp parser-ng-0.1.9-release.jar parser.LogicalExpression "true or false"
true
```
Expand Down

0 comments on commit 2b4932e

Please sign in to comment.