Skip to content

Commit

Permalink
Merge pull request #329 from cockroachdb/pmattis/sql.go
Browse files Browse the repository at this point in the history
Add generated sql.go file.
  • Loading branch information
petermattis committed Feb 18, 2015
2 parents ff69823 + a501846 commit ed60d23
Show file tree
Hide file tree
Showing 5 changed files with 1,790 additions and 19 deletions.
7 changes: 1 addition & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export CPLUS_INCLUDE_PATH := $(CURDIR)/_vendor/usr/include:$(CPLUS_INCLUDE_PATH)
export LIBRARY_PATH := $(CURDIR)/_vendor/usr/lib:$(LIBRARY_PATH)

ROACH_PROTO := proto
SQL_PARSER := sql/parser

# TODO(pmattis): Figure out where to clear the CGO_* variables when
# building "release" binaries.
Expand All @@ -54,7 +53,7 @@ endif

all: build test

auxiliary: storage/engine/engine.pc roach_proto sqlparser
auxiliary: storage/engine/engine.pc roach_proto

build: auxiliary
cd _vendor/src/github.com/coreos/etcd/raft ; $(GO) install $(GOFLAGS)
Expand All @@ -66,9 +65,6 @@ storage/engine/engine.pc: storage/engine/engine.pc.in
roach_proto:
make -C $(ROACH_PROTO) static_lib

sqlparser:
make -C $(SQL_PARSER)

test: auxiliary
$(GO) test $(GOFLAGS) -run $(TESTS) $(PKG) $(TESTFLAGS)

Expand Down Expand Up @@ -114,7 +110,6 @@ clean:
find . -name '*.test' -type f -exec rm -f {} \;
rm -f storage/engine/engine.pc
make -C $(ROACH_PROTO) clean
make -C $(SQL_PARSER) clean

# The gopath target outputs the GOPATH that should be used for building this
# package. It is used by the emacs go-projectile package for automatic
Expand Down
1 change: 0 additions & 1 deletion sql/parser/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
sql.go
y.output
12 changes: 0 additions & 12 deletions sql/parser/Makefile

This file was deleted.

2 changes: 2 additions & 0 deletions sql/parser/ast.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import (
"fmt"
)

//go:generate go tool yacc -o sql.go sql.y

// Instructions for creating new types: If a type needs to satisfy an
// interface, declare that function along with that interface. This
// will help users identify the list of types to which they can assert
Expand Down
Loading

0 comments on commit ed60d23

Please sign in to comment.