github.com/cloudflare/circl@v1.5.0/abe/cpabe/tkn20/internal/dsl/dsl.go (about) 1 package dsl 2 3 import "github.com/cloudflare/circl/abe/cpabe/tkn20/internal/tkn" 4 5 var AttrHashKey = []byte("attribute value hashing") 6 7 func Run(source string) (*tkn.Policy, error) { 8 l := newLexer(source) 9 err := l.scanTokens() 10 if err != nil { 11 return nil, err 12 } 13 p := newParser(l.tokens) 14 ast, err := p.parse() 15 if err != nil { 16 return nil, err 17 } 18 return ast.RunPasses() 19 }