func (l *Language) Parse(source io.Reader) (*ParseTree, error) {
	s, err := NewSource(source)
	if err != nil {
		return nil, err
	}
	tree, err, _ := l.root.Lexer(s, 0)
	return tree, err
}
Parse attemps to turn the input reader into a valid parse tree.
package peg
import (
	"errors"
	"fmt"
	"io"
	"regexp"
	"strings"
)
type Lexeme struct {
	Name         string
	Dependencies []*Lexeme
	isResolved   bool  
	Lexer func(*Source, int) (*ParseTree, error, int)
}
func (l *Lexeme) dumpTree(indent string) string {
	s := fmt.Sprintln(indent, l.Name, l.isResolved)
	for _, child := range l.Dependencies {
		s += child.dumpTree(indent + " ")
	}
	return s
}
func (l *Lexeme) String() string {
	return l.dumpTree("")
}
type Language struct {
	root *Lexeme
}
func (l *Language) ParseString(source string) (*ParseTree, error) {
	return l.Parse(strings.NewReader(source))
}