1) Change default gofmt default settings for
                  parsing and printing to new syntax.

                  Use -oldparser to parse the old syntax,
                  use -oldprinter to print the old syntax.

               2) Change default gofmt formatting settings
                  to use tabs for indentation only and to use
                  spaces for alignment. This will make the code
                  alignment insensitive to an editor's tabwidth.

                  Use -spaces=false to use tabs for alignment.

               3) Manually changed src/exp/parser/parser_test.go
                  so that it doesn't try to parse the parser's
                  source files using the old syntax (they have
                  new syntax now).

               4) gofmt -w src misc test/bench

	       1st set of files.

R=rsc
CC=agl, golang-dev, iant, ken2, r
https://golang.org/cl/180047
diff --git a/src/pkg/bufio/bufio.go b/src/pkg/bufio/bufio.go
index 782bfe2..00bc53c 100644
--- a/src/pkg/bufio/bufio.go
+++ b/src/pkg/bufio/bufio.go
@@ -8,27 +8,27 @@
 package bufio
 
 import (
-	"bytes";
-	"io";
-	"os";
-	"strconv";
-	"utf8";
+	"bytes"
+	"io"
+	"os"
+	"strconv"
+	"utf8"
 )
 
 
 const (
-	defaultBufSize = 4096;
+	defaultBufSize = 4096
 )
 
 // Errors introduced by this package.
 type Error struct {
-	os.ErrorString;
+	os.ErrorString
 }
 
 var (
-	ErrInvalidUnreadByte	os.Error	= &Error{"bufio: invalid use of UnreadByte"};
-	ErrBufferFull		os.Error	= &Error{"bufio: buffer full"};
-	errInternal		os.Error	= &Error{"bufio: internal error"};
+	ErrInvalidUnreadByte os.Error = &Error{"bufio: invalid use of UnreadByte"}
+	ErrBufferFull        os.Error = &Error{"bufio: buffer full"}
+	errInternal          os.Error = &Error{"bufio: internal error"}
 )
 
 // BufSizeError is the error representing an invalid buffer size.
@@ -43,11 +43,11 @@
 
 // Reader implements buffering for an io.Reader object.
 type Reader struct {
-	buf		[]byte;
-	rd		io.Reader;
-	r, w		int;
-	err		os.Error;
-	lastbyte	int;
+	buf      []byte
+	rd       io.Reader
+	r, w     int
+	err      os.Error
+	lastbyte int
 }
 
 // NewReaderSize creates a new Reader whose buffer has the specified size,
@@ -59,41 +59,41 @@
 		return nil, BufSizeError(size)
 	}
 	// Is it already a Reader?
-	b, ok := rd.(*Reader);
+	b, ok := rd.(*Reader)
 	if ok && len(b.buf) >= size {
 		return b, nil
 	}
-	b = new(Reader);
-	b.buf = make([]byte, size);
-	b.rd = rd;
-	b.lastbyte = -1;
-	return b, nil;
+	b = new(Reader)
+	b.buf = make([]byte, size)
+	b.rd = rd
+	b.lastbyte = -1
+	return b, nil
 }
 
 // NewReader returns a new Reader whose buffer has the default size.
 func NewReader(rd io.Reader) *Reader {
-	b, err := NewReaderSize(rd, defaultBufSize);
+	b, err := NewReaderSize(rd, defaultBufSize)
 	if err != nil {
 		// cannot happen - defaultBufSize is a valid size
 		panic("bufio: NewReader: ", err.String())
 	}
-	return b;
+	return b
 }
 
 // fill reads a new chunk into the buffer.
 func (b *Reader) fill() {
 	// Slide existing data to beginning.
 	if b.w > b.r {
-		copy(b.buf[0:b.w-b.r], b.buf[b.r:b.w]);
-		b.w -= b.r;
+		copy(b.buf[0:b.w-b.r], b.buf[b.r:b.w])
+		b.w -= b.r
 	} else {
 		b.w = 0
 	}
-	b.r = 0;
+	b.r = 0
 
 	// Read new data.
-	n, e := b.rd.Read(b.buf[b.w:]);
-	b.w += n;
+	n, e := b.rd.Read(b.buf[b.w:])
+	b.w += n
 	if e != nil {
 		b.err = e
 	}
@@ -105,9 +105,9 @@
 // why the read is short.  At EOF, the count will be
 // zero and err will be os.EOF.
 func (b *Reader) Read(p []byte) (nn int, err os.Error) {
-	nn = 0;
+	nn = 0
 	for len(p) > 0 {
-		n := len(p);
+		n := len(p)
 		if b.w == b.r {
 			if b.err != nil {
 				return nn, b.err
@@ -115,27 +115,27 @@
 			if len(p) >= len(b.buf) {
 				// Large read, empty buffer.
 				// Read directly into p to avoid copy.
-				n, b.err = b.rd.Read(p);
+				n, b.err = b.rd.Read(p)
 				if n > 0 {
 					b.lastbyte = int(p[n-1])
 				}
-				p = p[n:];
-				nn += n;
-				continue;
+				p = p[n:]
+				nn += n
+				continue
 			}
-			b.fill();
-			continue;
+			b.fill()
+			continue
 		}
 		if n > b.w-b.r {
 			n = b.w - b.r
 		}
-		copy(p[0:n], b.buf[b.r:b.r+n]);
-		p = p[n:];
-		b.r += n;
-		b.lastbyte = int(b.buf[b.r-1]);
-		nn += n;
+		copy(p[0:n], b.buf[b.r:b.r+n])
+		p = p[n:]
+		b.r += n
+		b.lastbyte = int(b.buf[b.r-1])
+		nn += n
 	}
-	return nn, nil;
+	return nn, nil
 }
 
 // ReadByte reads and returns a single byte.
@@ -145,29 +145,29 @@
 		if b.err != nil {
 			return 0, b.err
 		}
-		b.fill();
+		b.fill()
 	}
-	c = b.buf[b.r];
-	b.r++;
-	b.lastbyte = int(c);
-	return c, nil;
+	c = b.buf[b.r]
+	b.r++
+	b.lastbyte = int(c)
+	return c, nil
 }
 
 // UnreadByte unreads the last byte.  Only the most recently read byte can be unread.
 func (b *Reader) UnreadByte() os.Error {
 	if b.r == b.w && b.lastbyte >= 0 {
-		b.w = 1;
-		b.r = 0;
-		b.buf[0] = byte(b.lastbyte);
-		b.lastbyte = -1;
-		return nil;
+		b.w = 1
+		b.r = 0
+		b.buf[0] = byte(b.lastbyte)
+		b.lastbyte = -1
+		return nil
 	}
 	if b.r <= 0 {
 		return ErrInvalidUnreadByte
 	}
-	b.r--;
-	b.lastbyte = -1;
-	return nil;
+	b.r--
+	b.lastbyte = -1
+	return nil
 }
 
 // ReadRune reads a single UTF-8 encoded Unicode character and returns the
@@ -179,17 +179,17 @@
 	if b.r == b.w {
 		return 0, 0, b.err
 	}
-	rune, size = int(b.buf[b.r]), 1;
+	rune, size = int(b.buf[b.r]), 1
 	if rune >= 0x80 {
 		rune, size = utf8.DecodeRune(b.buf[b.r:b.w])
 	}
-	b.r += size;
-	b.lastbyte = int(b.buf[b.r-1]);
-	return rune, size, nil;
+	b.r += size
+	b.lastbyte = int(b.buf[b.r-1])
+	return rune, size, nil
 }
 
 // Buffered returns the number of bytes that can be read from the current buffer.
-func (b *Reader) Buffered() int	{ return b.w - b.r }
+func (b *Reader) Buffered() int { return b.w - b.r }
 
 // ReadSlice reads until the first occurrence of delim in the input,
 // returning a slice pointing at the bytes in the buffer.
@@ -204,27 +204,27 @@
 func (b *Reader) ReadSlice(delim byte) (line []byte, err os.Error) {
 	// Look in buffer.
 	if i := bytes.IndexByte(b.buf[b.r:b.w], delim); i >= 0 {
-		line1 := b.buf[b.r : b.r+i+1];
-		b.r += i + 1;
-		return line1, nil;
+		line1 := b.buf[b.r : b.r+i+1]
+		b.r += i + 1
+		return line1, nil
 	}
 
 	// Read more into buffer, until buffer fills or we find delim.
 	for {
 		if b.err != nil {
-			line := b.buf[b.r:b.w];
-			b.r = b.w;
-			return line, b.err;
+			line := b.buf[b.r:b.w]
+			b.r = b.w
+			return line, b.err
 		}
 
-		n := b.Buffered();
-		b.fill();
+		n := b.Buffered()
+		b.fill()
 
 		// Search new part of buffer
 		if i := bytes.IndexByte(b.buf[n:b.w], delim); i >= 0 {
-			line := b.buf[0 : n+i+1];
-			b.r = n + i + 1;
-			return line, nil;
+			line := b.buf[0 : n+i+1]
+			b.r = n + i + 1
+			return line, nil
 		}
 
 		// Buffer is full?
@@ -232,7 +232,7 @@
 			return nil, ErrBufferFull
 		}
 	}
-	panic("not reached");
+	panic("not reached")
 }
 
 // ReadBytes reads until the first occurrence of delim in the input,
@@ -243,69 +243,69 @@
 func (b *Reader) ReadBytes(delim byte) (line []byte, err os.Error) {
 	// Use ReadSlice to look for array,
 	// accumulating full buffers.
-	var frag []byte;
-	var full [][]byte;
-	nfull := 0;
-	err = nil;
+	var frag []byte
+	var full [][]byte
+	nfull := 0
+	err = nil
 
 	for {
-		var e os.Error;
-		frag, e = b.ReadSlice(delim);
-		if e == nil {	// got final fragment
+		var e os.Error
+		frag, e = b.ReadSlice(delim)
+		if e == nil { // got final fragment
 			break
 		}
-		if e != ErrBufferFull {	// unexpected error
-			err = e;
-			break;
+		if e != ErrBufferFull { // unexpected error
+			err = e
+			break
 		}
 
 		// Read bytes out of buffer.
-		buf := make([]byte, b.Buffered());
-		var n int;
-		n, e = b.Read(buf);
+		buf := make([]byte, b.Buffered())
+		var n int
+		n, e = b.Read(buf)
 		if e != nil {
-			frag = buf[0:n];
-			err = e;
-			break;
+			frag = buf[0:n]
+			err = e
+			break
 		}
 		if n != len(buf) {
-			frag = buf[0:n];
-			err = errInternal;
-			break;
+			frag = buf[0:n]
+			err = errInternal
+			break
 		}
 
 		// Grow list if needed.
 		if full == nil {
 			full = make([][]byte, 16)
 		} else if nfull >= len(full) {
-			newfull := make([][]byte, len(full)*2);
+			newfull := make([][]byte, len(full)*2)
 			for i := 0; i < len(full); i++ {
 				newfull[i] = full[i]
 			}
-			full = newfull;
+			full = newfull
 		}
 
 		// Save buffer
-		full[nfull] = buf;
-		nfull++;
+		full[nfull] = buf
+		nfull++
 	}
 
 	// Allocate new buffer to hold the full pieces and the fragment.
-	n := 0;
+	n := 0
 	for i := 0; i < nfull; i++ {
 		n += len(full[i])
 	}
-	n += len(frag);
+	n += len(frag)
 
 	// Copy full pieces and fragment in.
-	buf := make([]byte, n);
-	n = 0;
+	buf := make([]byte, n)
+	n = 0
 	for i := 0; i < nfull; i++ {
-		copy(buf[n:n+len(full[i])], full[i]);
-		n += len(full[i]);
+		copy(buf[n:n+len(full[i])], full[i])
+		n += len(full[i])
 	}
-	copy(buf[n:n+len(frag)], frag);
-	return buf, err;
+	copy(buf[n:n+len(frag)], frag)
+	return buf, err
 }
 
 // ReadString reads until the first occurrence of delim in the input,
@@ -314,8 +314,8 @@
 // it returns the data read before the error and the error itself (often os.EOF).
 // ReadString returns err != nil if and only if line does not end in delim.
 func (b *Reader) ReadString(delim byte) (line string, err os.Error) {
-	bytes, e := b.ReadBytes(delim);
-	return string(bytes), e;
+	bytes, e := b.ReadBytes(delim)
+	return string(bytes), e
 }
 
 
@@ -323,10 +323,10 @@
 
 // Writer implements buffering for an io.Writer object.
 type Writer struct {
-	err	os.Error;
-	buf	[]byte;
-	n	int;
-	wr	io.Writer;
+	err os.Error
+	buf []byte
+	n   int
+	wr  io.Writer
 }
 
 // NewWriterSize creates a new Writer whose buffer has the specified size,
@@ -338,24 +338,24 @@
 		return nil, BufSizeError(size)
 	}
 	// Is it already a Writer?
-	b, ok := wr.(*Writer);
+	b, ok := wr.(*Writer)
 	if ok && len(b.buf) >= size {
 		return b, nil
 	}
-	b = new(Writer);
-	b.buf = make([]byte, size);
-	b.wr = wr;
-	return b, nil;
+	b = new(Writer)
+	b.buf = make([]byte, size)
+	b.wr = wr
+	return b, nil
 }
 
 // NewWriter returns a new Writer whose buffer has the default size.
 func NewWriter(wr io.Writer) *Writer {
-	b, err := NewWriterSize(wr, defaultBufSize);
+	b, err := NewWriterSize(wr, defaultBufSize)
 	if err != nil {
 		// cannot happen - defaultBufSize is valid size
 		panic("bufio: NewWriter: ", err.String())
 	}
-	return b;
+	return b
 }
 
 // Flush writes any buffered data to the underlying io.Writer.
@@ -363,7 +363,7 @@
 	if b.err != nil {
 		return b.err
 	}
-	n, e := b.wr.Write(b.buf[0:b.n]);
+	n, e := b.wr.Write(b.buf[0:b.n])
 	if n < b.n && e == nil {
 		e = io.ErrShortWrite
 	}
@@ -371,19 +371,19 @@
 		if n > 0 && n < b.n {
 			copy(b.buf[0:b.n-n], b.buf[n:b.n])
 		}
-		b.n -= n;
-		b.err = e;
-		return e;
+		b.n -= n
+		b.err = e
+		return e
 	}
-	b.n = 0;
-	return nil;
+	b.n = 0
+	return nil
 }
 
 // Available returns how many bytes are unused in the buffer.
-func (b *Writer) Available() int	{ return len(b.buf) - b.n }
+func (b *Writer) Available() int { return len(b.buf) - b.n }
 
 // Buffered returns the number of bytes that have been written into the current buffer.
-func (b *Writer) Buffered() int	{ return b.n }
+func (b *Writer) Buffered() int { return b.n }
 
 // Write writes the contents of p into the buffer.
 // It returns the number of bytes written.
@@ -393,35 +393,35 @@
 	if b.err != nil {
 		return 0, b.err
 	}
-	nn = 0;
+	nn = 0
 	for len(p) > 0 {
-		n := b.Available();
+		n := b.Available()
 		if n <= 0 {
 			if b.Flush(); b.err != nil {
 				break
 			}
-			n = b.Available();
+			n = b.Available()
 		}
 		if b.Available() == 0 && len(p) >= len(b.buf) {
 			// Large write, empty buffer.
 			// Write directly from p to avoid copy.
-			n, b.err = b.wr.Write(p);
-			nn += n;
-			p = p[n:];
+			n, b.err = b.wr.Write(p)
+			nn += n
+			p = p[n:]
 			if b.err != nil {
 				break
 			}
-			continue;
+			continue
 		}
 		if n > len(p) {
 			n = len(p)
 		}
-		copy(b.buf[b.n:b.n+n], p[0:n]);
-		b.n += n;
-		nn += n;
-		p = p[n:];
+		copy(b.buf[b.n:b.n+n], p[0:n])
+		b.n += n
+		nn += n
+		p = p[n:]
 	}
-	return nn, b.err;
+	return nn, b.err
 }
 
 // WriteByte writes a single byte.
@@ -432,9 +432,9 @@
 	if b.Available() <= 0 && b.Flush() != nil {
 		return b.err
 	}
-	b.buf[b.n] = c;
-	b.n++;
-	return nil;
+	b.buf[b.n] = c
+	b.n++
+	return nil
 }
 
 // WriteString writes a string.
@@ -444,16 +444,16 @@
 	}
 	// Common case, worth making fast.
 	if b.Available() >= len(s) || len(b.buf) >= len(s) && b.Flush() == nil {
-		for i := 0; i < len(s); i++ {	// loop over bytes, not runes.
-			b.buf[b.n] = s[i];
-			b.n++;
+		for i := 0; i < len(s); i++ { // loop over bytes, not runes.
+			b.buf[b.n] = s[i]
+			b.n++
 		}
-		return nil;
+		return nil
 	}
-	for i := 0; i < len(s); i++ {	// loop over bytes, not runes.
+	for i := 0; i < len(s); i++ { // loop over bytes, not runes.
 		b.WriteByte(s[i])
 	}
-	return b.err;
+	return b.err
 }
 
 // buffered input and output
@@ -461,8 +461,8 @@
 // ReadWriter stores pointers to a Reader and a Writer.
 // It implements io.ReadWriter.
 type ReadWriter struct {
-	*Reader;
-	*Writer;
+	*Reader
+	*Writer
 }
 
 // NewReadWriter allocates a new ReadWriter that dispatches to r and w.