mirror of
https://github.com/golang/go
synced 2024-11-19 15:05:00 -07:00
make goyacc and units.y work again (minor tweaks).
document goyacc a little. R=rsc CC=go-dev http://go/go-review/1017024
This commit is contained in:
parent
701440043b
commit
472576c615
@ -11,7 +11,7 @@ GOFILES=\
|
||||
include $(GOROOT)/src/Make.cmd
|
||||
|
||||
units: goyacc units.y
|
||||
goyacc units.y
|
||||
./goyacc units.y
|
||||
$(GC) y.go
|
||||
$(LD) -o units y.$O
|
||||
|
||||
|
23
src/cmd/goyacc/doc.go
Normal file
23
src/cmd/goyacc/doc.go
Normal file
@ -0,0 +1,23 @@
|
||||
// Copyright 2009 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
/*
|
||||
|
||||
The program goyacc is a version of yacc written in Go and generating
|
||||
as output a parser also in Go.
|
||||
|
||||
It is largely transliterated from the Inferno version written in Limbo
|
||||
which in turn was largely transliterated from the Plan 9 version
|
||||
written in C and documented at
|
||||
|
||||
http://plan9.bell-labs.com/magic/man2html/1/yacc
|
||||
|
||||
Yacc adepts will have no trouble adapting to this form of the tool.
|
||||
|
||||
The file units.y in this directory is a yacc grammar for a version of
|
||||
the Unix tool units, also written in Go and largely transliterated
|
||||
from the Plan 9 C version.
|
||||
|
||||
*/
|
||||
package documentation
|
@ -47,7 +47,6 @@ package main
|
||||
import
|
||||
(
|
||||
"flag";
|
||||
"io";
|
||||
"fmt";
|
||||
"bufio";
|
||||
"os";
|
||||
@ -1472,8 +1471,6 @@ cpyact(curprod []int, max int)
|
||||
func
|
||||
openup()
|
||||
{
|
||||
var buf string;
|
||||
|
||||
infile = flag.Arg(0);
|
||||
finput = open(infile);
|
||||
if(finput == nil) {
|
||||
|
@ -26,7 +26,6 @@ package main
|
||||
import
|
||||
(
|
||||
"flag";
|
||||
"io";
|
||||
"fmt";
|
||||
"bufio";
|
||||
"os";
|
||||
|
Loading…
Reference in New Issue
Block a user