diff --git a/Makefile b/Makefile index 28d5f75..fecaf1f 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,8 @@ SOURCES = $(shell find . -name '*.go') PARSERS = $(shell find . -name '*.treerack') +.PHONY: cpu.out + default: build deps: @@ -39,6 +41,7 @@ generate: $(SOURCES) $(PARSERS) fmt head install regenerate: $(SOURCES) $(PARSERS) fmt head install treerack generate -export -package-name self < syntax.treerack > self/self.go.next @mv self/self.go{.next,} + go install ./cmd/treerack treerack generate -export -package-name self < syntax.treerack > self/self.go.next @mv self/self.go{.next,} @gofmt -s -w self/self.go @@ -77,15 +80,15 @@ check-generate: $(SOURCES) $(PARSERS) @mv head.go.backup head.go @mv self/self.go.backup self/self.go -check: imports build $(PARSERS) +check: build $(PARSERS) go test -test.short -run ^Test go test ./cmd/treerack -test.short -run ^Test -checkall: imports build $(PARSERS) +checkall: build $(PARSERS) go test go test ./cmd/treerack -.coverprofile: $(SOURCES) imports +.coverprofile: $(SOURCES) go test -coverprofile .coverprofile cover: .coverprofile @@ -94,7 +97,7 @@ cover: .coverprofile showcover: .coverprofile go tool cover -html .coverprofile -.coverprofile-cmd: $(SOURCES) imports +.coverprofile-cmd: $(SOURCES) go test ./cmd/treerack -coverprofile .coverprofile-cmd cover-cmd: .coverprofile-cmd @@ -108,7 +111,7 @@ publishcoverage: .coverprofile curl -s https://codecov.io/bash -o codecov bash codecov -Zf .coverprofile -cpu.out: $(SOURCES) $(PARSERS) +cpu.out: go test -v -run TestMMLFile -cpuprofile cpu.out cpu: cpu.out diff --git a/notes.txt b/notes.txt index 023fe95..c25c548 100644 --- a/notes.txt +++ b/notes.txt @@ -1,9 +1,10 @@ [next] -no random generator output and generator output check errors generator 1 +documentation +parser 1 releasing -parser +parser 2 generator 2 formatter report unused parsers @@ -20,7 +21,9 @@ input name needed in command to differentiate between syntax and input in check allchars: can have char sequence make generator output non-random (track parsers in a list in definition order) fix the license in the output -play with the int sizes + +[generator 2] +js [releasing] spellcheck @@ -28,14 +31,15 @@ linting convert notes into issues try to remove some files -[parser] +[parser 1] +try winning on allChars +retry collapsing + +[parser 2] custom tokens indentation streaming support // ReadNode(io.Reader) -[generator 2] -js - [optimization] try preallocate larger store chunks @@ -44,3 +48,4 @@ how the char classes are different from regexp why need nows when using ws lib only useful for dynamic syntax definition warn nows usage in docs, e.g. spaces in symbol = [a-z]+ +tutorial