Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parser: Fix keywords & keywords not checked in CI #54371

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions pkg/parser/Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
.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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.PHONY: parser
parser: parser.go hintparser.go generate

.PHONY: genkeyword
breezewish marked this conversation as resolved.
Show resolved Hide resolved
genkeyword: generate_keyword/genkeyword.go
go build -C generate_keyword -o ../genkeyword

.PHONY: generate
generate: genkeyword parser.y
go generate

Expand All @@ -26,10 +29,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
Expand Down
1 change: 1 addition & 0 deletions pkg/parser/keywords.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down