From: Russ Cox Date: Sat, 6 Sep 2014 19:27:52 +0000 (-0400) Subject: cmd/yacc: move cmd/yacc/expr to cmd/yacc/testdata/expr X-Git-Tag: go1.4beta1~506 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=9c721aedd572c00d1a91549dda910ce74fe17d44;p=gostls13.git cmd/yacc: move cmd/yacc/expr to cmd/yacc/testdata/expr This will keep the go command from trying to build it when the cmd/ tree is no longer a special case. Also update doc.go to refer to the correct location. (It was incorrect even before this CL.) LGTM=r R=iant, r CC=golang-codereviews https://golang.org/cl/134560043 --- diff --git a/src/cmd/yacc/doc.go b/src/cmd/yacc/doc.go index ceaaf2448d..702c9f0d25 100644 --- a/src/cmd/yacc/doc.go +++ b/src/cmd/yacc/doc.go @@ -20,8 +20,9 @@ written in C and documented at Adepts of the original yacc will have no trouble adapting to this form of the tool. -The file expr.y in this directory is a yacc grammar for a very simple -expression parser. It needs the flag "-p expr" (see below). +The directory $GOROOT/cmd/yacc/testdata/expr is a yacc program +for a very simple expression parser. See expr.y and main.go in that +directory for examples of how to write and build yacc programs. The generated parser is reentrant. Parse expects to be given an argument that conforms to the following interface: diff --git a/src/cmd/yacc/expr/README b/src/cmd/yacc/testdata/expr/README similarity index 100% rename from src/cmd/yacc/expr/README rename to src/cmd/yacc/testdata/expr/README diff --git a/src/cmd/yacc/expr/expr.y b/src/cmd/yacc/testdata/expr/expr.y similarity index 100% rename from src/cmd/yacc/expr/expr.y rename to src/cmd/yacc/testdata/expr/expr.y diff --git a/src/cmd/yacc/expr/main.go b/src/cmd/yacc/testdata/expr/main.go similarity index 100% rename from src/cmd/yacc/expr/main.go rename to src/cmd/yacc/testdata/expr/main.go