func NewParser(r io.Reader, defaultField string) *Parser {
	return &Parser{s: NewLexer(r), defaultField: defaultField}
}
NewParser returns a new instance of Parser.
package query
import (
	"fmt"
	"io"
)
type Expr interface {
	node()
}
type FieldExpr struct {
	Field string
	Term  string
}
func (f *FieldExpr) node() {}
func (f *FieldExpr) String() string {
	return fmt.Sprintf("%s:%s", f.Field, f.Term)
}
type BinaryExpr struct {
	Op  Token
	LHS Expr
	RHS Expr
}
func (b *BinaryExpr) node() {}
func (b *BinaryExpr) String() string {
	return fmt.Sprintf("%s %s %s", b.LHS, tokens[b.Op], b.RHS)
}
type ParenExpr struct {
	Expr Expr
}
func (*ParenExpr) node() {}
type Statement struct {
	Expressions []*FieldExpr
}
func (s *Statement) String() string {
	var b string
	for _, e := range s.Expressions {
		b = b + e.String()
	}
	return b
}
type Parser struct {
	s   *Lexer
	buf struct {
		tok Token   
		lit string  
		n   int     
	}
	defaultField string  
}