Documentation
¶
Overview ¶
Package auto compiles a parsed validator grammar into a visual pushdown automaton and executes it. Compilation into a VPA may result in an exponential explosion, since fully converting a grammar to VPA is O(2^n^2). Rather use the mem package. It gives comparable speed and has no exponential behaviour. This package is just here to provide a benchmark against the mem package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrTooBig = errors.New("a state explosion has occured")
A maximum number is set for bitsets as an option, when it is exceeded the number of options to consider is too large and we recommend rather using the memoized version of katydid.
Functions ¶
This section is empty.
Types ¶
type Auto ¶
type Auto struct {
// contains filtered or unexported fields
}
Auto is the structure that represents the automaton.
func (*Auto) MetricNumberOfStates ¶ added in v0.5.2
type Option ¶ added in v0.7.0
type Option func(o *options)
func WithFieldNameTable ¶ added in v0.7.0
func WithFieldNameTable() Option
creates a lookup strings found in field name expressions.
func WithMaxBitSetSize ¶ added in v0.7.0
func WithRecordSimplificationRules ¶ added in v0.7.0
func WithRecordSimplificationRules() Option
compiles a parsed validator grammar and optimizes it for the case where the input structures are records, by shrinking space with extra simplification rules. Do not use with XML, but JSON, Reflect and Protobufs are safe.
type PatternsSet ¶ added in v0.6.3
type PatternsSet struct {
// contains filtered or unexported fields
}
func NewPatternsSet ¶ added in v0.6.3
func NewPatternsSet() PatternsSet
func (*PatternsSet) Len ¶ added in v0.7.0
func (this *PatternsSet) Len() int