func (d *Directive) Yledger(db *Datastore) parsec.Parser {
	y := parsec.OrdChoice(
		Vector2scalar,
		d.yaccount(db),
		d.yapply(db),
		d.yalias(db),
		d.yassert(db),
		d.ybucket(db),
		d.ycheck(db),
		d.ycapture(db),
		d.ycheck(db),
		d.ycomment(db),
		d.ycommodity(db),
		d.ydefine(db),
		d.yfixed(db),
		d.yinclude(db),
		d.ypayee(db),
		d.ytest(db),
		d.yend(db),
		d.yyear(db),
	)
	return y
}
---- ledger parser
Yledger return a parser-combinator that can parse directives.
package dblentry
import "fmt"
import "strings"
import "strconv"
import "github.com/prataprc/goparsec"
import "github.com/bnclabs/golog"
import "github.com/tn47/goledger/api"
type Directive struct {
	dtype       string
	year        int       
	note        string    
	comments    []string  
	ndefault    bool      
	accname     string    
	accalias    string    
	accpayee    string    
	acccheck    string    
	accassert   string    
	acceval     string    
	acctypes    []string  
	aliasname   string    
	expression  string    
	capture     string    
	commdname   string    
	commdfmt    string    
	commdnmrkt  bool      
	commdcurrn  bool      
	includefile string    
	dpayee      string    
	dpayeealias []string  
	dpayeeuuid  []string  
	endargs     []string  
}
func NewDirective() *Directive {
	return &Directive{}
}
func (d *Directive) Type() string {
	return d.dtype
}
func (d *Directive) Includefile() string {
	if d.dtype == "include" {
		return d.includefile
	}
	panic("impossible situation")
}