Ruby: pm_regexp_parser_t Struct Reference

Ruby 3.4.9p82 (2026-03-11 revision 76cca827ab52ab1d346a728f068d5b8da3e2952b)

Data Fields
pm_regexp_parser_t Struct Reference

This is the parser that is going to handle parsing regular expressions. More...

## Data Fields
pm_parser_t * | parser
| The parser that is currently being used.
const uint8_t * | start
| A pointer to the start of the source that we are parsing.
const uint8_t * | cursor
| A pointer to the current position in the source.
const uint8_t * | end
| A pointer to the end of the source that we are parsing.
bool | extended_mode
| Whether or not the regular expression currently being parsed is in extended mode, wherein whitespace is ignored and comments are allowed.
bool | encoding_changed
| Whether the encoding has changed from the default.
const pm_encoding_t * | encoding
| The encoding of the source.
pm_regexp_name_callback_t | name_callback
| The callback to call when a named capture group is found.
void * | name_data
| The data to pass to the name callback.
pm_regexp_error_callback_t | error_callback
| The callback to call when a parse error is found.
void * | error_data
| The data to pass to the error callback.

## Detailed Description

This is the parser that is going to handle parsing regular expressions.

Definition at line 8 of file regexp.c.

## Field Documentation

## ◆ cursor

const uint8_t* pm_regexp_parser_t::cursor

A pointer to the current position in the source.

Definition at line 16 of file regexp.c.

## ◆ encoding

const pm_encoding_t* pm_regexp_parser_t::encoding

The encoding of the source.

Definition at line 31 of file regexp.c.

## ◆ encoding_changed

bool pm_regexp_parser_t::encoding_changed

Whether the encoding has changed from the default.

Definition at line 28 of file regexp.c.

## ◆ end

const uint8_t* pm_regexp_parser_t::end

A pointer to the end of the source that we are parsing.

Definition at line 19 of file regexp.c.

## ◆ error_callback

pm_regexp_error_callback_t pm_regexp_parser_t::error_callback

The callback to call when a parse error is found.

Definition at line 40 of file regexp.c.

## ◆ error_data

void* pm_regexp_parser_t::error_data

The data to pass to the error callback.

Definition at line 43 of file regexp.c.

## ◆ extended_mode

bool pm_regexp_parser_t::extended_mode

Whether or not the regular expression currently being parsed is in extended mode, wherein whitespace is ignored and comments are allowed.

Definition at line 25 of file regexp.c.

## ◆ name_callback

pm_regexp_name_callback_t pm_regexp_parser_t::name_callback

The callback to call when a named capture group is found.

Definition at line 34 of file regexp.c.

## ◆ name_data

void* pm_regexp_parser_t::name_data

The data to pass to the name callback.

Definition at line 37 of file regexp.c.

## ◆ parser

pm_parser_t* pm_regexp_parser_t::parser

The parser that is currently being used.

Definition at line 10 of file regexp.c.

## ◆ start

const uint8_t* pm_regexp_parser_t::start

A pointer to the start of the source that we are parsing.

Definition at line 13 of file regexp.c.

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

- prism/regexp.c