Documentation ¶
Index ¶
- Constants
- Variables
- func FormatArgs(s *sysl.Module, appName, parameterTypeName string) string
- func FormatReturnParam(s *sysl.Module, payload string) []string
- func GetAndFmtParam(s *sysl.Module, params []*sysl.Param) []string
- func GetApplicationAttrs(m *sysl.Module, appName string) map[string]*sysl.Attribute
- func GetReturnPayload(stmts []*sysl.Statement) string
- func GetSortedISOCtrlSlice(attrs map[string]*sysl.Attribute) []string
- func GetSortedISOCtrlStr(attrs map[string]*sysl.Attribute) string
- func MergeAttributes(app, edpnt map[string]*sysl.Attribute) map[string]*sysl.Attribute
- func MergeAttributesMap(val map[string]string, attrs map[string]*sysl.Attribute)
- func NormalizeEndpointName(endpointName string) string
- func ParseBlackBoxesFromArgument(blackboxFlags map[string]string) [][]string
- func RemovePercentSymbol(src string) string
- func TransformBlackBoxes(blackboxes []*sysl.Attribute) [][]string
- func TransformBlackboxesToUptos(m map[string]*Upto, bbs [][]string, uptoType UptoType)
- type Agent
- type AppLabeler
- type ClassLabeler
- type CmdContextParamCodegen
- type CmdContextParamDatagen
- type CmdContextParamIntgen
- type CmdContextParamSeqgen
- type CmdDatabaseScriptParams
- type Command
- type DiagramCmd
- type Element
- type EndpointCollectionElement
- type EndpointElement
- type EndpointLabeler
- type EndpointLabelerParam
- type ExecuteArgs
- type FormatParser
- func (fp *FormatParser) Clear()
- func (fp *FormatParser) Eat(re *regexp.Regexp) bool
- func (fp *FormatParser) Expansions(re *regexp.Regexp, attrs map[string]string)
- func (fp *FormatParser) FmtOutput(appname, epname, eplongname string, attrs map[string]*sysl.Attribute) string
- func (fp *FormatParser) FmtSeq(epname, eplongname string, attrs map[string]*sysl.Attribute) string
- func (fp *FormatParser) LabelApp(appname, controls string, attrs map[string]*sysl.Attribute) string
- func (fp *FormatParser) LabelClass(classname string) string
- func (fp *FormatParser) LabelEndpoint(p *EndpointLabelerParam) string
- func (fp *FormatParser) Parse(attrs map[string]string) string
- func (fp *FormatParser) Pop() string
- type Labeler
- type SequenceDiagramVisitor
- type SequenceDiagramWriter
- func (s *SequenceDiagramWriter) Activate(agent string)
- func (s *SequenceDiagramWriter) Activated(agent string, suppressed bool) func()
- func (s *SequenceDiagramWriter) Deactivate(agent string)
- func (s *SequenceDiagramWriter) Indent()
- func (s *SequenceDiagramWriter) String() string
- func (s *SequenceDiagramWriter) Unindent()
- func (s *SequenceDiagramWriter) Write(p []byte) (n int, err error)
- func (s *SequenceDiagramWriter) WriteByte(c byte) error
- func (s *SequenceDiagramWriter) WriteHead(v string) (int, error)
- func (s *SequenceDiagramWriter) WriteIndent()
- func (s *SequenceDiagramWriter) WriteString(v string) (n int, err error)
- func (s *SequenceDiagramWriter) WriteTo(w io.Writer) (n int64, err error)
- type StatementElement
- type Upto
- type UptoType
- type Var
- type VarManager
- type Visitor
Constants ¶
View Source
const ( MatchSymbol = iota + 1 MatchWord MatchLookahead )
View Source
const ( UpTo = 0 BBApplication = 1 BBEndpointCollection = 2 BBCommandLine = 3 )
Variables ¶
View Source
var ( ItemReDefault = regexp.MustCompile(`((?:[^%]|%[^(\n]|\n)*?)($|%\()`) ItemReStatement = regexp.MustCompile(`((?:[^%]|%[^(\n]|\n)*?)($|[|)]|%\()`) ItemReEnd = regexp.MustCompile(`((?:[^%]|%[^(\n]|\n)*?)($|\)|%\()`) ItemReVarStart = regexp.MustCompile(`^%\(`) ItemReVar = regexp.MustCompile(`^(@?\w+)`) ItemReCondOper = regexp.MustCompile(`^[!=]=`) ItemReSearch = regexp.MustCompile(`^~/([^/]+)/`) ItemReCondVal = regexp.MustCompile(`^\'([\w ]+)\'`) ItemReStmtOper = regexp.MustCompile(`^[=?]`) ItemReNoStmtOper = regexp.MustCompile(`^\|`) ItemReStmtEnd = regexp.MustCompile(`^\)`) )
View Source
var ( IsoCtrlRE = regexp.MustCompile("^iso_ctrl_(.*)_txt$") ReturnTypeValueSpliterRE = regexp.MustCompile(`\s*<:\s*`) TypeSetOfRE = regexp.MustCompile(`set\s+of\s+(.+)$`) TypeOneOfRE = regexp.MustCompile(`one\s+of\s*{(.+)}$`) TypeListSpliterRE = regexp.MustCompile(`\s*,\s*`) EndpointLabelReplaceRE = regexp.MustCompile(`^.*? -> `) EndpointParserRE = regexp.MustCompile( `(?P<appname>.*?)\s*<-\s*(?P<epname>.*?)(?:\s*\[upto\s+(?P<upto>.*)\])*$`) )
Functions ¶
func GetApplicationAttrs ¶
func GetReturnPayload ¶
func MergeAttributes ¶
func MergeAttributesMap ¶
func NormalizeEndpointName ¶
func RemovePercentSymbol ¶
func TransformBlackBoxes ¶
Types ¶
type AppLabeler ¶
type ClassLabeler ¶
type CmdContextParamCodegen ¶
type CmdContextParamDatagen ¶
type CmdContextParamIntgen ¶
type CmdContextParamSeqgen ¶
type CmdDatabaseScriptParams ¶
type Command ¶
type Command interface { Configure(*kingpin.Application) *kingpin.CmdClause Execute(ExecuteArgs) error Name() string MaxSyslModule() int }
type DiagramCmd ¶ added in v0.77.0
type EndpointCollectionElement ¶
type EndpointCollectionElement struct {
// contains filtered or unexported fields
}
func MakeEndpointCollectionElement ¶
func MakeEndpointCollectionElement( title string, endpoints []string, blackboxes map[string]*Upto, ) *EndpointCollectionElement
func (*EndpointCollectionElement) Accept ¶
func (e *EndpointCollectionElement) Accept(v Visitor) error
type EndpointElement ¶
type EndpointElement struct {
// contains filtered or unexported fields
}
func (*EndpointElement) Accept ¶
func (e *EndpointElement) Accept(v Visitor) error
type EndpointLabeler ¶
type EndpointLabeler interface {
LabelEndpoint(*EndpointLabelerParam) string
}
type EndpointLabelerParam ¶
type ExecuteArgs ¶
type FormatParser ¶
func MakeFormatParser ¶
func MakeFormatParser(fmtStr string) *FormatParser
func (*FormatParser) Clear ¶
func (fp *FormatParser) Clear()
func (*FormatParser) Expansions ¶
func (fp *FormatParser) Expansions(re *regexp.Regexp, attrs map[string]string)
func (*FormatParser) LabelClass ¶
func (fp *FormatParser) LabelClass(classname string) string
func (*FormatParser) LabelEndpoint ¶
func (fp *FormatParser) LabelEndpoint(p *EndpointLabelerParam) string
func (*FormatParser) Pop ¶
func (fp *FormatParser) Pop() string
type Labeler ¶
type Labeler struct{}
func (*Labeler) LabelEndpoint ¶
func (l *Labeler) LabelEndpoint(p *EndpointLabelerParam) string
type SequenceDiagramVisitor ¶
type SequenceDiagramVisitor struct { AppLabeler EndpointLabeler Groupboxes map[string]syslutil.StrSet // contains filtered or unexported fields }
func MakeSequenceDiagramVisitor ¶
func MakeSequenceDiagramVisitor( a AppLabeler, e EndpointLabeler, w *SequenceDiagramWriter, m *sysl.Module, appName string, group string, logger *logrus.Logger, ) *SequenceDiagramVisitor
func (*SequenceDiagramVisitor) UniqueVarForAppName ¶
func (v *SequenceDiagramVisitor) UniqueVarForAppName(appName string) string
func (*SequenceDiagramVisitor) Visit ¶
func (v *SequenceDiagramVisitor) Visit(e Element) error
type SequenceDiagramWriter ¶
type SequenceDiagramWriter struct { Ind int AtBeginOfLine bool AutogenWarning bool Active map[string]int Properties []string Head bytes.Buffer Body bytes.Buffer }
func MakeSequenceDiagramWriter ¶
func MakeSequenceDiagramWriter(autogenWarning bool, properties ...string) *SequenceDiagramWriter
func (*SequenceDiagramWriter) Activate ¶
func (s *SequenceDiagramWriter) Activate(agent string)
func (*SequenceDiagramWriter) Activated ¶
func (s *SequenceDiagramWriter) Activated(agent string, suppressed bool) func()
func (*SequenceDiagramWriter) Deactivate ¶
func (s *SequenceDiagramWriter) Deactivate(agent string)
func (*SequenceDiagramWriter) Indent ¶
func (s *SequenceDiagramWriter) Indent()
func (*SequenceDiagramWriter) String ¶
func (s *SequenceDiagramWriter) String() string
func (*SequenceDiagramWriter) Unindent ¶
func (s *SequenceDiagramWriter) Unindent()
func (*SequenceDiagramWriter) Write ¶
func (s *SequenceDiagramWriter) Write(p []byte) (n int, err error)
func (*SequenceDiagramWriter) WriteByte ¶
func (s *SequenceDiagramWriter) WriteByte(c byte) error
func (*SequenceDiagramWriter) WriteHead ¶
func (s *SequenceDiagramWriter) WriteHead(v string) (int, error)
func (*SequenceDiagramWriter) WriteIndent ¶
func (s *SequenceDiagramWriter) WriteIndent()
func (*SequenceDiagramWriter) WriteString ¶
func (s *SequenceDiagramWriter) WriteString(v string) (n int, err error)
type StatementElement ¶
type StatementElement struct { EndpointElement // contains filtered or unexported fields }
func (*StatementElement) Accept ¶
func (e *StatementElement) Accept(v Visitor) error
type VarManager ¶
Click to show internal directories.
Click to hide internal directories.