Commit 472576c6 authored by Rob Pike's avatar Rob Pike

make goyacc and units.y work again (minor tweaks).

document goyacc a little.

R=rsc
CC=go-dev
http://go/go-review/1017024
parent 70144004
......@@ -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
// 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";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment