parrotcode: Supporting file for the regular expression engine | |
Contents | C |
src/rx.c - Supporting file for the regular expression engine
rx.c and rx.h set up functions to be used by the regular expression engine.
They also define internal helper functions that add a layer of abstraction to the rx_is_X
family of functions.
Please also see rx.ops
,
rx.dev
,
rxstacks.c
,
and rxstacks.h
.
rxinfo
is the main structure involved in regular expressions; it's stuffed into a Handle
PMC and passed to all regular expression opcodes.
INTVAL rx_is_word_character(Interp *interpreter, INTVAL ch)
RX_WORDCHARS
to create a bitmap.
Please see docs/dev/rx.dev for a detailed explanation of bitmap.INTVAL rx_is_number_character(Interp *interpreter, INTVAL ch)
INTVAL rx_is_whitespace_character(Interp *interpreter, INTVAL ch)
INTVAL rx_is_newline(Interp *interpreter, INTVAL ch)
Bitmap bitmap_make(Interp *interpreter, STRING *str)
Bitmap bitmap_make_cstr(Interp *interpreter, const char *str)
bitmap_make()
,
except passed a const char*
arg.void bitmap_add(Interp *interpreter, Bitmap bmp, INTVAL ch)
INTVAL bitmap_match(Bitmap bmp, INTVAL ch)
void bitmap_destroy(Bitmap bmp)
include/parrot/rx.h, src/rxstacks.c, include/parrot/rxstacks.h, docs/dev/rx.dev.
|