Skip to main content

Module regparse

Module regparse 

Source
Expand description

Port of regparse.c: the parser, which turns a pattern (a byte string) into the AST of node trees that regcomp compiles. It also holds the global warning hooks and the parse limits.

Functions§

onig_get_ast_node_limit
Returns the per-pattern AST budget, in expression nodes (see onig_set_ast_node_limit).
onig_get_callout_name_by_name_id
Get the name of a registered callout by its name ID. Port of C’s onig_get_callout_name_by_name_id.
onig_get_parse_depth_limit
Returns the nesting limit, in parser units (see onig_set_parse_depth_limit).
onig_set_ast_node_limit
Sets the per-pattern AST budget: how many expression nodes one pattern may parse into, flat concatenation and alternation cells included. A pattern over the budget fails with ParseDepthLimitOver.
onig_set_callout_of_name
Register a user-defined named callout. Port of C’s onig_set_callout_of_name.
onig_set_capture_num_limit
onig_set_parse_depth_limit
Sets the nesting limit: how deeply a pattern may nest before it fails with ParseDepthLimitOver. Only nesting is limited; the number of expressions in a pattern is limited by onig_set_ast_node_limit.
onig_set_verb_warn_func
onig_set_warn_func

Type Aliases§

OnigWarnFunc