syntax

package
v0.0.0-...-6023aa6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2016 License: MPL-2.0 Imports: 2 Imported by: 6

Documentation

Overview

Package syntax contains the syntax for reading and writing graphs to files. It also comes with predefined variables for common syntaxes. The syntax struct assumes that every edge is written in a single line.

Index

Constants

View Source
const IGNOREFIELD = ""

to be used in Syntax to indicate that the field is not available in the syntax

Variables

View Source
var Dot = &Syntax{
	GraphPrefix:     "digraph{",
	EdgePrefix:      "",
	SourceDelimiter: "",
	EdgeInfix:       "->",
	TargetDelimiter: "",
	EdgeSuffix:      ";",
	GraphSuffix:     "}",
	StripWhitespace: true,
}
View Source
var MakeCall = []*Syntax{
	{
		GraphPrefix:     "",
		EdgePrefix:      "$(call DEPEND_ALL,",
		SourceDelimiter: "",
		EdgeInfix:       ",",
		TargetDelimiter: ",",
		EdgeSuffix:      ")",
		GraphSuffix:     "",
		StripWhitespace: true,
	},
	{
		GraphPrefix:     "",
		EdgePrefix:      "$(call ALL_SPECS,",
		SourceDelimiter: ",",
		EdgeInfix:       "):",
		TargetDelimiter: " ",
		EdgeSuffix:      "",
		GraphSuffix:     "",
		StripWhitespace: true,
	},
}
View Source
var Makefile = &Syntax{
	GraphPrefix:     "",
	EdgePrefix:      "",
	SourceDelimiter: " ",
	EdgeInfix:       ":",
	TargetDelimiter: " ",
	EdgeSuffix:      "",
	GraphSuffix:     "",
	StripWhitespace: true,
}

Functions

This section is empty.

Types

type Syntax

type Syntax struct {
	GraphPrefix     string
	EdgePrefix      string
	SourceDelimiter string
	EdgeInfix       string
	TargetDelimiter string
	EdgeSuffix      string
	GraphSuffix     string
	StripWhitespace bool
}

func Parse

func Parse(s string) ([]*Syntax, error)

Parse parses new syntaxes from the given string, supporting various formats.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL