class Crowbar::Builder

Overview

Top-level DSL Builder for Crowbar

Defined in:

crowbar/dsl/builder.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(seed : UInt64 | Nil = nil) #

Instance Method Detail

def add_sample(sample : Buffer | Bytes | String) #

Add secondary sample for inter-sample splicing


def bmp(&) #

def build : Engine #

Build and return the configured Engine


def engine : Engine #

def evolution(&) #

Configure Genetic Algorithm & Feedback


def fixup(&block : Buffer -> Nil) #

Register post-mutation fixup callback


def frame(name : String | Symbol, &) #

Define a declarative binary protocol frame


def ftp(&) #

def grammar(name : String | Symbol, max_depth : Int32 = 8, &) #

Define a context-free generative grammar


def harvest(feedback : String) : Array(String) #

Extracts diagnostic tokens from error text into the active dictionary


def http(&) #

def markdown(&) #

def match(pattern : Regex, group : Int32 = 0, name : String | Nil = nil, &) #

Define a scoped regex match


def mp3(&) #

def packet(&) #

def pattern(name : Symbol) #

Configure mutation pattern (:once, :many, :burst)


def pdf(&) #

def png(&) #

def preserve(format : Symbol) #

Enable structure-preserving rules (:json, :yaml, :http, :dns, :csv, :xml, :url, :tlv, :base64, :varint, :ftp, :sql, :png, :bmp, :wav, :mp3, :wad, :pdf)


def preserve(format : Symbol, &block : Rule -> Nil) #

def preserve_format(format : Symbol) #

def preserve_format(format : Symbol, &block : Rule -> Nil) #

def scope(name : String | Symbol, bytes range : Range(B, E), &) forall B, E #

Define a scoped byte range


def scope(name : String | Symbol, selector : Selector, &) #

Define a scoped region with an explicit selector instance


def scope(name : String | Symbol, field index : Int32, delimiter : UInt8 | Char | String = ',', &) #

Define a scoped delimited field/column


def scope(name : String | Symbol, chars kind : Selectors::CharacterClass::Kind | Symbol, &) #

Define a scoped character class


def scope(name : String | Symbol, stride step : Int32, offset : Int32 = 0, length : Int32 = 1, &) #

Define a scoped stride / periodic pattern


def scope(name : String | Symbol, entropy mode : Selectors::Entropy::Mode | Symbol, &) #

Define a scoped entropy target


def seed(val : UInt64 | Int32 | Int64) #

Set PRNG seed


def seek(offset : Int) #

Fast-forwards PRNG state by offset


def seven_zip(&) #

def sql(&) #

def tar(&) #

def template(spec : String) #

Configure output envelope / template


def unique(capacity : Int32 = 10000) #

Configure deduplication uniqueness filter


def wad(&) #

def wav(&) #

def zip(&) #