Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
vadyushkins committed Apr 18, 2023
1 parent 2feaec4 commit d34da8b
Showing 1 changed file with 30 additions and 26 deletions.
56 changes: 30 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,29 @@
# kotgll
* About
* Usage
* [About](https://github.com/vadyushkins/kotgll#about)
* [Usage](https://github.com/vadyushkins/kotgll#usage)
* [From sources](https://github.com/vadyushkins/kotgll#from-sources)
* [Using JAR](https://github.com/vadyushkins/kotgll#using-jar)

## About
GLL implementation in Kotlin

## Usage

### Run from sources
### Command Line Interface

```text
Usage: kotgll options_list
Options:
--input -> Input format (always required) { Value should be one of [string, graph] }
--grammar -> Grammar format (always required) { Value should be one of [cfg, rsm] }
--sppf [ON] -> Sppf mode { Value should be one of [on, off] }
--inputPath -> Path to input txt file (always required) { String }
--grammarPath -> Path to grammar txt file (always required) { String }
--outputPath -> Path to output txt file (always required) { String }
--help, -h -> Usage info
```

### From sources

#### Step 1. Clone repository

Expand All @@ -29,36 +45,24 @@ or

`gradle run --args="--help"`

You will see the following message.
You will see the ["Options list"](https://github.com/vadyushkins/kotgll#command-line-interface) message.

#### Example

```text
Usage: kotgll options_list
Options:
--input -> Input format (always required) { Value should be one of [string, graph] }
--grammar -> Grammar format (always required) { Value should be one of [cfg, rsm] }
--sppf [ON] -> Sppf mode { Value should be one of [on, off] }
--inputPath -> Path to input txt file (always required) { String }
--grammarPath -> Path to grammar txt file (always required) { String }
--outputPath -> Path to output txt file (always required) { String }
--help, -h -> Usage info
gradle run --args="--input graph --grammar rsm --sppf off --inputPath src/test/resources/cli/TestGraphReadWriteCSV/dyck.csv --grammarPath src/test/resources/cli/TestRSMReadWriteTXT/dyck.txt --outputPath ./result.txt"
```

#### Example
### Using JAR

#### Step 1. Download the latest JAR

```text
gradle run --args="--input graph --grammar rsm --sppf off --inputPath src/test/resources/cli/TestGraphReadWriteCSV/dyck.csv --grammarPath src/test/resources/cli/TestRSMReadWriteTXT/dyck.txt --outputPath ./result.txt"
curl -L -O https://github.com/vadyushkins/kotgll/releases/download/test/kotgll-1.0.0.jar
```

In file `result.txt` you will see the following.
#### Step 2. Run JAR with Java

```text
0 0
0 2
0 3
1 1
1 2
1 3
2 2
2 3
3 3
```
java -jar --input graph --grammar rsm --sppf off --inputPath src/test/resources/cli/TestGraphReadWriteCSV/dyck.csv --grammarPath src/test/resources/cli/TestRSMReadWriteTXT/dyck.txt --outputPath ./result.txt
```

0 comments on commit d34da8b

Please sign in to comment.