Hegel 0.18.2
Property-based testing for C++
Loading...
Searching...
No Matches
hegel::generators::LarkParams Struct Reference

Parameters for from_lark() generator. More...

#include <strings.h>

Public Attributes

std::optional< std::string > start
 The rule whose strings to generate. Default: start.
std::vector< std::pair< std::string, AnyGenerator< std::string > > > explicit_terminals
std::optional< CharactersParams > alphabet
std::optional< size_t > max_size
std::optional< uint32_t > max_depth
 How deeply rules may nest. Default: 200. At most 500.
std::optional< std::string > import_path

Detailed Description

Parameters for from_lark() generator.

Member Data Documentation

◆ alphabet

std::optional<CharactersParams> hegel::generators::LarkParams::alphabet

The characters that terminals drawn from their patterns may contain. Default: all of Unicode.

◆ explicit_terminals

std::vector<std::pair<std::string, AnyGenerator<std::string> > > hegel::generators::LarkParams::explicit_terminals

Terminals whose values come from a generator instead of from the grammar, as pairs of a terminal name and a generator of strings. A terminal the grammar declares without a definition needs one; any other terminal may be given one to override its pattern. The generators need not be printable: their values print as part of the whole string.

◆ import_path

std::optional<std::string> hegel::generators::LarkParams::import_path

The directory imported grammar files are read from. Default: none, so only Lark's bundled grammars can be imported.

◆ max_size

std::optional<size_t> hegel::generators::LarkParams::max_size

Maximum string length in characters, explicit terminals' values included. Default: 8192. At most 1048576.


The documentation for this struct was generated from the following file: