Documentation
¶
Overview ¶
Package boolexpr evaluates boolean expressions over integers. Used by ExpressionRecognition (OCR node placeholders) and IMS R1 (cached item IDs).
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // PlaceholderPattern matches {name} tokens in an expression. PlaceholderPattern = regexp.MustCompile(`\{([^{}]+)\}`) IntMax = int(^uint(0) >> 1) IntMin = -IntMax - 1 )
Functions ¶
func Evaluate ¶
Evaluate parses and evaluates a boolean or integer expression. Callers that need a recognition hit must assert the result is bool.
func ParseIntLiteral ¶
ParseIntLiteral parses an integer literal; out-of-range values clamp to IntMax/IntMin.
func ResolvePlaceholders ¶
ResolvePlaceholders replaces every {name} in expression via resolve. Returns the numeric expression string and a map of placeholder → value.
Types ¶
type ResolveFunc ¶
ResolveFunc maps a placeholder name to an integer value.
Click to show internal directories.
Click to hide internal directories.