go/src/internal/dag/parse.go

type Graph

func newGraph() *Graph {}

func (g *Graph) addNode(label string) bool {}

func (g *Graph) AddEdge(from, to string) {}

func (g *Graph) DelEdge(from, to string) {}

func (g *Graph) HasEdge(from, to string) bool {}

func (g *Graph) Edges(from string) []string {}

// Parse parses the DAG language and returns the transitive closure of
// the described graph. In the returned graph, there is an edge from "b"
// to "a" if b < a (or a > b) in the partial order.
func Parse(dag string) (*Graph, error) {}

type rule

type syntaxError

func (e syntaxError) Error() string {}

// parseRules parses the rules of a DAG.
func parseRules(rules string) (out []rule, err error) {}

type rulesParser

// syntaxError reports a parsing error.
func (p *rulesParser) syntaxError(msg string) {}

// nextList parses and returns a comma-separated list of names.
func (p *rulesParser) nextList() (list []string, token string) {}

// nextToken returns the next token in the deps rules,
// one of ";" "," "<" "!<" or a name.
func (p *rulesParser) nextToken() string {}