diff --git a/pkg/parser/Makefile b/pkg/parser/Makefile index f7a203f03951b..cb745a6702747 100644 --- a/pkg/parser/Makefile +++ b/pkg/parser/Makefile @@ -1,15 +1,17 @@ -.PHONY: all parser clean - -all: fmt parser generate +.PHONY: all +all: fmt parser +.PHONY: test test: fmt parser sh test.sh -parser: parser.go hintparser.go +.PHONY: parser +parser: parser.go hintparser.go generate genkeyword: generate_keyword/genkeyword.go go build -C generate_keyword -o ../genkeyword +.PHONY: generate generate: genkeyword parser.y go generate @@ -26,10 +28,12 @@ generate: genkeyword parser.y bin/goyacc: goyacc/main.go goyacc/format_yacc.go GO111MODULE=on go build -o bin/goyacc goyacc/main.go goyacc/format_yacc.go +.PHONY: fmt fmt: bin/goyacc parser_golden.y hintparser_golden.y @echo "gofmt (simplify)" @gofmt -s -l -w . 2>&1 | awk '{print} END{if(NR>0) {exit 1}}' +.PHONY: clean clean: go clean -i ./... rm -rf *.out diff --git a/pkg/parser/keywords.go b/pkg/parser/keywords.go index 74dc5a1b3214f..004d51d6616ef 100644 --- a/pkg/parser/keywords.go +++ b/pkg/parser/keywords.go @@ -622,6 +622,7 @@ var Keywords = []KeywordsType{ {"VALIDATION", false, "unreserved"}, {"VALUE", false, "unreserved"}, {"VARIABLES", false, "unreserved"}, + {"VECTOR", false, "unreserved"}, {"VIEW", false, "unreserved"}, {"VISIBLE", false, "unreserved"}, {"WAIT", false, "unreserved"}, diff --git a/pkg/parser/keywords_test.go b/pkg/parser/keywords_test.go index 8caca9048b7cf..2925623635dea 100644 --- a/pkg/parser/keywords_test.go +++ b/pkg/parser/keywords_test.go @@ -36,7 +36,7 @@ func TestKeywords(t *testing.T) { } func TestKeywordsLength(t *testing.T) { - require.Equal(t, 653, len(parser.Keywords)) + require.Equal(t, 654, len(parser.Keywords)) reservedNr := 0 for _, kw := range parser.Keywords {