Skip to content

Commit a28c260

Browse files
authored
Merge pull request #14 from conflowio/move_to_conflowio
Move project to github.com/conflowio/parsley
2 parents 86e58e6 + b202551 commit a28c260

File tree

121 files changed

+1986
-535
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+1986
-535
lines changed

.circleci/config.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ version: 2
22
jobs:
33
test:
44
docker:
5-
- image: circleci/golang:1.16
6-
working_directory: /go/src/github.com/opsidian/parsley
5+
- image: circleci/golang:1.17
6+
working_directory: /go/src/github.com/conflowio/parsley
77
steps:
88
- checkout
9+
- run: make check
910
- run: make test
1011

1112
workflows:

.golangci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
run:
3+
tests: false
4+
timeout: 10m
5+
6+
linters:
7+
enable:
8+
- depguard
9+
- exportloopref
10+
- unparam
11+
- wastedassign
12+
13+
linters-settings:
14+
depguard:
15+
list-type: blacklist
16+
include-go-root: true
17+
packages-with-error-message:
18+
- github.com/davecgh/go-spew/spew: "used for debugging - should not appear in the codebase"
19+
- io/ioutil: "deprecated in go1.16 - see https://golang.org/doc/go1.16#ioutil"
20+
21+
govet:
22+
settings:
23+
printf:
24+
funcs:
25+
- parsley.NewErrorf

Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,24 @@ test: ## Runs all the tests
1111

1212
generate-mocks: ## Regenerates all mocks with mockery
1313
go generate ./...
14+
15+
.PHONY: update-dependencies
16+
update-dependencies: ## Updates all dependencies
17+
@echo "Updating Go dependencies"
18+
@cat go.mod | grep -E "^\t" | grep -v "// indirect" | cut -f 2 | cut -d ' ' -f 1 | xargs -n 1 -t go get -d -u
19+
@go mod vendor
20+
@go mod tidy
21+
22+
.PHONY: lint
23+
lint: ## Runs linting checks
24+
@echo "Running lint checks"
25+
@go run github.com/golangci/golangci-lint/cmd/golangci-lint run ./...
26+
27+
.PHONY: check
28+
check: lint check-go-generate
29+
30+
.PHONY: check-go-generate
31+
check-go-generate:
32+
@echo "Checking 'go generate ./...'"
33+
@go generate ./...
34+
@ scripts/check_git_changes.sh "make go-generate"

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Parsley - Parser combinator library written in Go
22

3-
[![CircleCI status](https://circleci.com/gh/opsidian/parsley.svg?style=shield&circle-token=c42cce0e1ae1496645d1d6dc640d86a9e6de808d)](https://circleci.com/gh/opsidian/parsley) [![GoDoc](https://godoc.org/github.com/opsidian/parsley?status.svg)](https://godoc.org/github.com/opsidian/parsley) [![Latest release](https://img.shields.io/github/release/opsidian/parsley.svg)](https://github.com/opsidian/parsley/releases/latest)
3+
[![CircleCI status](https://circleci.com/gh/conflowio/parsley.svg?style=shield&circle-token=c42cce0e1ae1496645d1d6dc640d86a9e6de808d)](https://circleci.com/gh/conflowio/parsley) [![GoDoc](https://godoc.org/github.com/conflowio/parsley?status.svg)](https://godoc.org/github.com/conflowio/parsley) [![Latest release](https://img.shields.io/github/release/conflowio/parsley.svg)](https://github.com/conflowio/parsley/releases/latest)
44

55
Parsley is a general parser combinator library which can be used to parse context-free, left-recursive languages. It handles indirect as well as direct left-recursion in polynomial time and defines a memoization helper for speeding up parsing time. The language grammar can be easily translated to a set of rules using parsers and combinators.
66

@@ -119,13 +119,13 @@ The **add** variable will contain a parser which is able to parse the given expr
119119

120120
#### More examples
121121

122-
There is a JSON-like parser implementation in the [examples/json](examples/json) directory. It also gives you some
122+
There is a JSON-like parser implementation in the [examples/json](examples/json) directory.
123123

124-
For a more complex expression parser you can check out the [Flint interpolation language](https://github.com/opsidian/flint).
124+
For a more complex expression parser you can check out the [Conflow language](https://github.com/conflowio/conflow).
125125

126126
### Documentation
127127

128-
Please more information about the available parsers and combinators please check out the [Go docs](https://godoc.org/github.com/opsidian/parsley).
128+
Please more information about the available parsers and combinators please check out the [Go docs](https://godoc.org/github.com/conflowio/parsley).
129129

130130
## Library packages
131131

@@ -164,15 +164,15 @@ $ cd examples/json/json
164164
$ go test -bench=. -benchmem
165165
goos: darwin
166166
goarch: amd64
167-
pkg: github.com/opsidian/parsley/examples/json/json
167+
pkg: github.com/conflowio/parsley/examples/json/json
168168
BenchmarkParsleyJSON1k-4 20000 79929 ns/op 26557 B/op 570 allocs/op
169169
BenchmarkParsleyJSON10k-4 2000 681273 ns/op 248000 B/op 4435 allocs/op
170170
BenchmarkParsleyJSON100k-4 200 6999517 ns/op 6011530 B/op 41647 allocs/op
171171
BenchmarkEncodingJSON1k-4 50000 23834 ns/op 5794 B/op 113 allocs/op
172172
BenchmarkEncodingJSON10k-4 10000 190699 ns/op 44140 B/op 869 allocs/op
173173
BenchmarkEncodingJSON100k-4 1000 1880887 ns/op 418492 B/op 8153 allocs/op
174174
PASS
175-
ok github.com/opsidian/parsley/examples/json/json 11.410s
175+
ok github.com/conflowio/parsley/examples/json/json 11.410s
176176
```
177177

178178
## LICENSE

ast/astfakes/fake_reader_pos_setter_node.go

Lines changed: 20 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ast/empty_node.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ package ast
99
import (
1010
"fmt"
1111

12-
"github.com/opsidian/parsley/parsley"
12+
"github.com/conflowio/parsley/parsley"
1313
)
1414

1515
// EmptyNode represents an empty node

ast/empty_node_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ package ast_test
99
import (
1010
. "github.com/onsi/ginkgo"
1111
. "github.com/onsi/gomega"
12-
"github.com/opsidian/parsley/ast"
13-
"github.com/opsidian/parsley/parsley"
12+
13+
"github.com/conflowio/parsley/ast"
14+
"github.com/conflowio/parsley/parsley"
1415
)
1516

1617
var _ = Describe("EmptyNode", func() {

ast/helpers.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
package ast
88

9-
import "github.com/opsidian/parsley/parsley"
9+
import "github.com/conflowio/parsley/parsley"
1010

1111
// AppendNode appends
1212
func AppendNode(n1, n2 parsley.Node) parsley.Node {
@@ -33,7 +33,7 @@ type ReaderPosSetter interface {
3333
}
3434

3535
// ReaderPosSetterNode defines a node which also implements the ReaderPosSetter interface
36-
//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . ReaderPosSetterNode
36+
//counterfeiter:generate . ReaderPosSetterNode
3737
type ReaderPosSetterNode interface {
3838
parsley.Node
3939
ReaderPosSetter

ast/helpers_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ import (
1010
. "github.com/onsi/ginkgo"
1111
. "github.com/onsi/ginkgo/extensions/table"
1212
. "github.com/onsi/gomega"
13-
"github.com/opsidian/parsley/ast"
14-
"github.com/opsidian/parsley/parsley"
15-
"github.com/opsidian/parsley/parsley/parsleyfakes"
13+
14+
"github.com/conflowio/parsley/ast"
15+
"github.com/conflowio/parsley/parsley"
16+
"github.com/conflowio/parsley/parsley/parsleyfakes"
1617
)
1718

1819
var _ = Describe("AppendNode", func() {

ast/interpreter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
package ast
88

9-
import "github.com/opsidian/parsley/parsley"
9+
import "github.com/conflowio/parsley/parsley"
1010

1111
// InterpreterFunc defines a helper to implement the Interpreter interface with functions
1212
type InterpreterFunc func(userCtx interface{}, node parsley.NonTerminalNode) (interface{}, parsley.Error)

0 commit comments

Comments
 (0)