Skip to content

Commit

Permalink
Separate installation and development commands (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
meyermarcel authored Nov 30, 2024
1 parent 24c7895 commit 4a41cc1
Showing 1 changed file with 20 additions and 30 deletions.
50 changes: 20 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,10 @@ A [Parsing Expression Grammar](https://en.wikipedia.org/wiki/Parsing_expression_
* https://bford.info/packrat/
* https://piumarta.com/software/peg/

## Installing
## Installation

```
go get -u github.com/pointlander/peg
```

## Building

### Using Pre-Generated Files

```
go install
```

### Generating Files Yourself
You should only need to do this if you are contributing to the library, or if something gets messed up.

```
go run build.go
```
or
```
go generate
```

With tests:

```
go run build.go test
go install github.com/pointlander/peg@latest
```

## Usage
Expand All @@ -64,7 +39,6 @@ Usage of peg:
print out the syntax tree
-version
print the version and exit
```


Expand Down Expand Up @@ -239,13 +213,29 @@ Testing a grammar usually requires more than the average unit testing with multi
go install mvdan.cc/gofumpt@latest
```
### Lint code
### Build
```
go run build.go
```
or
```
go generate
```
### Test
```
go run build.go test
```
### Lint
```
golangci-lint run
```
### Format code
### Format
```
gofumpt -l -w .
Expand Down

0 comments on commit 4a41cc1

Please sign in to comment.