func (r *TermReader) all() ([]term.Term, error) {
	terms := make([]term.Term, 0)
	t, err := r.Next()
	for err == nil {
		terms = append(terms, t)
		t, err = r.Next()
	}
	if err == NoMoreTerms {
		err = nil
	}
	return terms, err
}
all returns a slice of all terms available from this reader
package read
import (
	"fmt"
	"io"
	"strings"
	"github.com/mndrix/golog/lex"
	"github.com/mndrix/golog/term"
)
var NoMoreTerms = fmt.Errorf("No more terms available")
type specifier int  
const (
	fx specifier = iota
	fy
	xfx
	xfy
	yfx
	xf
	yf
)
type priority int  
func Term(src interface{}) (term.Term, error) {
	r, err := NewTermReader(src)
	if err != nil {
		return nil, err
	}
	return r.Next()
}
func Term_(src interface{}) term.Term {
	t, err := Term(src)
	maybePanic(err)
	return t
}
func TermAll(src interface{}) ([]term.Term, error) {
	r, err := NewTermReader(src)
	if err != nil {
		return nil, err
	}
	return r.all()
}
func TermAll_(src interface{}) []term.Term {
	ts, err := TermAll(src)
	maybePanic(err)
	return ts
}
func toReader(src interface{}) (io.Reader, error) {
	if r, ok := src.(io.Reader); ok {
		return r, nil
	}
	switch x := src.(type) {
	case string:
		return strings.NewReader(x), nil
	}
	return nil, fmt.Errorf("Can't convert %#v into io.Reader\n", src)
}
type TermReader struct {
	operators map[string]*[7]priority
	ll        *lex.List
}
func NewTermReader(src interface{}) (*TermReader, error) {
	ioReader, err := toReader(src)
	if err != nil {
		return nil, err
	}
	tokens := lex.Scan(ioReader)
	r := TermReader{ll: lex.NewList(tokens)}
	r.ResetOperatorTable()
	return &r, nil
}
func (r *TermReader) Next() (term.Term, error) {
	var t term.Term
	var ll *lex.List
	if r.readTerm(1200, r.ll, &ll, &t) {
		if term.IsError(t) {
			return nil, fmt.Errorf("%s", t.String())
		}
		r.ll = ll
		return term.RenameVariables(t), nil
	}
	return nil, NoMoreTerms
}