Skip to content

Commit dea6dab

Browse files
committed
cmd/yacc: remove go tool yacc
It is no longer used by Go. It's now moved to golang.org/x/tools/cmd/goyacc for anybody who needs it. Fixes #11229 Change-Id: Ia431d5a380c7ff784a2050dee2f5bc8acee015da Reviewed-on: https://go-review.googlesource.com/27325 Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Matthew Dempsky <[email protected]>
1 parent 795ad07 commit dea6dab

File tree

10 files changed

+27
-3977
lines changed

10 files changed

+27
-3977
lines changed

doc/articles/go_command.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,7 @@ <h2>Limitations</h2>
255255
source files <em>during</em> a build, although it does provide
256256
<a href="/cmd/go/#hdr-Generate_Go_files_by_processing_source"><code>go</code>
257257
<code>generate</code></a>,
258-
which can automate the creation of Go files <em>before</em>
259-
the build, such as by running <code>yacc</code>.
258+
which can automate the creation of Go files <em>before</em> the build.
260259
For more advanced build setups, you may need to write a
261260
makefile (or a configuration file for the build tool of your choice)
262261
to run whatever tool creates the Go files and then check those generated source files

doc/go_faq.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1670,8 +1670,7 @@ <h3 id="What_compiler_technology_is_used_to_build_the_compilers">
16701670

16711671
<p>
16721672
<code>Gccgo</code> has a front end written in C++, with a recursive descent parser coupled to the
1673-
standard GCC back end. <code>Gc</code> is written in Go using
1674-
<code>yacc</code>/<code>bison</code> for the parser
1673+
standard GCC back end. <code>Gc</code> is written in Go with a recursive descent parser
16751674
and uses a custom loader, also written in Go but
16761675
based on the Plan 9 loader, to generate ELF/Mach-O/PE binaries.
16771676
</p>

src/cmd/go/alldocs.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@
367367
//
368368
// Generate runs commands described by directives within existing
369369
// files. Those commands can run any process but the intent is to
370-
// create or update Go source files, for instance by running yacc.
370+
// create or update Go source files.
371371
//
372372
// Go generate is never run automatically by go build, go get, go test,
373373
// and so on. It must be run explicitly.
@@ -430,10 +430,10 @@
430430
// can be used to create aliases or to handle multiword generators.
431431
// For example,
432432
//
433-
// //go:generate -command yacc go tool yacc
433+
// //go:generate -command foo go tool foo
434434
//
435-
// specifies that the command "yacc" represents the generator
436-
// "go tool yacc".
435+
// specifies that the command "foo" represents the generator
436+
// "go tool foo".
437437
//
438438
// Generate processes packages in the order given on the command line,
439439
// one at a time. If the command line lists .go files, they are treated

src/cmd/go/generate.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var cmdGenerate = &Command{
2525
Long: `
2626
Generate runs commands described by directives within existing
2727
files. Those commands can run any process but the intent is to
28-
create or update Go source files, for instance by running yacc.
28+
create or update Go source files.
2929
3030
Go generate is never run automatically by go build, go get, go test,
3131
and so on. It must be run explicitly.
@@ -88,10 +88,10 @@ string xxx represents the command identified by the arguments. This
8888
can be used to create aliases or to handle multiword generators.
8989
For example,
9090
91-
//go:generate -command yacc go tool yacc
91+
//go:generate -command foo go tool foo
9292
93-
specifies that the command "yacc" represents the generator
94-
"go tool yacc".
93+
specifies that the command "foo" represents the generator
94+
"go tool foo".
9595
9696
Generate processes packages in the order given on the command line,
9797
one at a time. If the command line lists .go files, they are treated

src/cmd/go/pkg.go

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -691,24 +691,23 @@ const (
691691

692692
// goTools is a map of Go program import path to install target directory.
693693
var goTools = map[string]targetDir{
694-
"cmd/addr2line": toTool,
695-
"cmd/api": toTool,
696-
"cmd/asm": toTool,
697-
"cmd/compile": toTool,
698-
"cmd/cgo": toTool,
699-
"cmd/cover": toTool,
700-
"cmd/dist": toTool,
701-
"cmd/doc": toTool,
702-
"cmd/fix": toTool,
703-
"cmd/link": toTool,
704-
"cmd/newlink": toTool,
705-
"cmd/nm": toTool,
706-
"cmd/objdump": toTool,
707-
"cmd/pack": toTool,
708-
"cmd/pprof": toTool,
709-
"cmd/trace": toTool,
710-
"cmd/vet": toTool,
711-
"cmd/yacc": toTool,
694+
"cmd/addr2line": toTool,
695+
"cmd/api": toTool,
696+
"cmd/asm": toTool,
697+
"cmd/compile": toTool,
698+
"cmd/cgo": toTool,
699+
"cmd/cover": toTool,
700+
"cmd/dist": toTool,
701+
"cmd/doc": toTool,
702+
"cmd/fix": toTool,
703+
"cmd/link": toTool,
704+
"cmd/newlink": toTool,
705+
"cmd/nm": toTool,
706+
"cmd/objdump": toTool,
707+
"cmd/pack": toTool,
708+
"cmd/pprof": toTool,
709+
"cmd/trace": toTool,
710+
"cmd/vet": toTool,
712711
"code.google.com/p/go.tools/cmd/cover": stalePath,
713712
"code.google.com/p/go.tools/cmd/godoc": stalePath,
714713
"code.google.com/p/go.tools/cmd/vet": stalePath,

src/cmd/yacc/doc.go

Lines changed: 0 additions & 69 deletions
This file was deleted.

src/cmd/yacc/testdata/expr/README

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)