|
XenevaOS
|
#include <stdlib.h>#include <stdio.h>#include <stdarg.h>#include <inttypes.h>#include <string.h>#include <assert.h>#include "cutils.h"#include "libregexp.h"#include "libunicode.h"#include "libregexp-opcode.h"
Classes | |
| struct | REParseState |
| struct | REOpCode |
| struct | REString |
| struct | REStringList |
| union | StackElem |
| struct | REExecContext |
Macros | |
| #define | DEF(id, size) REOP_ ## id, |
| #define | CAPTURE_COUNT_MAX 255 |
| #define | REGISTER_COUNT_MAX 255 |
| #define | INTERRUPT_COUNTER_INIT 10000 |
| #define | CP_LS 0x2028 |
| #define | CP_PS 0x2029 |
| #define | TMP_BUF_SIZE 128 |
| #define | DEF(id, size) { size }, |
| #define | RE_HEADER_FLAGS 0 |
| #define | RE_HEADER_CAPTURE_COUNT 2 |
| #define | RE_HEADER_REGISTER_COUNT 3 |
| #define | RE_HEADER_BYTECODE_LEN 4 |
| #define | RE_HEADER_LEN 8 |
| #define | CLASS_RANGE_BASE 0x40000000 |
| #define | GET_CHAR(c, cptr, cbuf_end, cbuf_type) |
| #define | PEEK_CHAR(c, cptr, cbuf_end, cbuf_type) |
| #define | PEEK_PREV_CHAR(c, cptr, cbuf_start, cbuf_type) |
| #define | GET_PREV_CHAR(c, cptr, cbuf_start, cbuf_type) |
| #define | PREV_CHAR(cptr, cbuf_start, cbuf_type) |
| #define | BP_TYPE_BITS 3 |
| #define | CHECK_STACK_SPACE(n) |
| #define | SAVE_CAPTURE(idx, value) |
| #define | SAVE_CAPTURE_CHECK(idx, value) |
Typedefs | |
| typedef struct REString | REString |
Enumerations | |
| enum | REOPCodeEnum { REOP_COUNT } |
| enum | CharRangeEnum { CHAR_RANGE_d , CHAR_RANGE_D , CHAR_RANGE_s , CHAR_RANGE_S , CHAR_RANGE_w , CHAR_RANGE_W } |
| enum | REExecStateEnum { RE_EXEC_STATE_SPLIT , RE_EXEC_STATE_LOOKAHEAD , RE_EXEC_STATE_NEGATIVE_LOOKAHEAD } |
Functions | |
| int | lre_parse_escape (const uint8_t **pp, int allow_utf16) |
| uint8_t * | lre_compile (int *plen, char *error_msg, int error_msg_size, const char *buf, size_t buf_len, int re_flags, void *opaque) |
| int | lre_exec (uint8_t **capture, const uint8_t *bc_buf, const uint8_t *cbuf, int cindex, int clen, int cbuf_type, void *opaque) |
| int | lre_get_alloc_count (const uint8_t *bc_buf) |
| int | lre_get_capture_count (const uint8_t *bc_buf) |
| int | lre_get_flags (const uint8_t *bc_buf) |
| const char * | lre_get_groupnames (const uint8_t *bc_buf) |
| #define BP_TYPE_BITS 3 |
| #define CAPTURE_COUNT_MAX 255 |
| #define CHECK_STACK_SPACE | ( | n | ) |
| #define CLASS_RANGE_BASE 0x40000000 |
| #define CP_LS 0x2028 |
| #define CP_PS 0x2029 |
| #define DEF | ( | id, | |
| size | |||
| ) | REOP_ ## id, |
| #define GET_CHAR | ( | c, | |
| cptr, | |||
| cbuf_end, | |||
| cbuf_type | |||
| ) |
| #define GET_PREV_CHAR | ( | c, | |
| cptr, | |||
| cbuf_start, | |||
| cbuf_type | |||
| ) |
| #define INTERRUPT_COUNTER_INIT 10000 |
| #define PEEK_CHAR | ( | c, | |
| cptr, | |||
| cbuf_end, | |||
| cbuf_type | |||
| ) |
| #define PEEK_PREV_CHAR | ( | c, | |
| cptr, | |||
| cbuf_start, | |||
| cbuf_type | |||
| ) |
| #define PREV_CHAR | ( | cptr, | |
| cbuf_start, | |||
| cbuf_type | |||
| ) |
| #define RE_HEADER_BYTECODE_LEN 4 |
| #define RE_HEADER_CAPTURE_COUNT 2 |
| #define RE_HEADER_FLAGS 0 |
| #define RE_HEADER_LEN 8 |
| #define RE_HEADER_REGISTER_COUNT 3 |
| #define REGISTER_COUNT_MAX 255 |
| #define SAVE_CAPTURE | ( | idx, | |
| value | |||
| ) |
| #define SAVE_CAPTURE_CHECK | ( | idx, | |
| value | |||
| ) |
| #define TMP_BUF_SIZE 128 |
| enum CharRangeEnum |
| enum REExecStateEnum |
| enum REOPCodeEnum |
| uint8_t * lre_compile | ( | int * | plen, |
| char * | error_msg, | ||
| int | error_msg_size, | ||
| const char * | buf, | ||
| size_t | buf_len, | ||
| int | re_flags, | ||
| void * | opaque | ||
| ) |
| int lre_exec | ( | uint8_t ** | capture, |
| const uint8_t * | bc_buf, | ||
| const uint8_t * | cbuf, | ||
| int | cindex, | ||
| int | clen, | ||
| int | cbuf_type, | ||
| void * | opaque | ||
| ) |
| int lre_get_alloc_count | ( | const uint8_t * | bc_buf | ) |
| int lre_get_capture_count | ( | const uint8_t * | bc_buf | ) |
| int lre_get_flags | ( | const uint8_t * | bc_buf | ) |
| const char * lre_get_groupnames | ( | const uint8_t * | bc_buf | ) |
| int lre_parse_escape | ( | const uint8_t ** | pp, |
| int | allow_utf16 | ||
| ) |