Github User Fetcher 1.0.0
C Application with Server and GUI
|
#include "duk_internal.h"
Go to the source code of this file.
Data Structures | |
struct | duk__re_disjunction_info |
Macros | |
#define | DUK__RE_INITIAL_BUFSIZE 64 |
#define | DUK__RE_BUFLEN(re_ctx) DUK_BW_GET_SIZE(re_ctx->thr, &re_ctx->bw) |
Functions | |
DUK_LOCAL duk_uint32_t | duk__encode_i32 (duk_int32_t x) |
DUK_LOCAL duk_uint32_t | duk__insert_u32 (duk_re_compiler_ctx *re_ctx, duk_uint32_t offset, duk_uint32_t x) |
DUK_LOCAL duk_uint32_t | duk__append_u32 (duk_re_compiler_ctx *re_ctx, duk_uint32_t x) |
DUK_LOCAL duk_uint32_t | duk__insert_i32 (duk_re_compiler_ctx *re_ctx, duk_uint32_t offset, duk_int32_t x) |
DUK_LOCAL void | duk__append_u16_list (duk_re_compiler_ctx *re_ctx, const duk_uint16_t *values, duk_uint32_t count) |
DUK_LOCAL void | duk__insert_slice (duk_re_compiler_ctx *re_ctx, duk_uint32_t offset, duk_uint32_t data_offset, duk_uint32_t data_length) |
DUK_LOCAL void | duk__append_slice (duk_re_compiler_ctx *re_ctx, duk_uint32_t data_offset, duk_uint32_t data_length) |
DUK_LOCAL void | duk__remove_slice (duk_re_compiler_ctx *re_ctx, duk_uint32_t data_offset, duk_uint32_t data_length) |
DUK_LOCAL duk_uint32_t | duk__insert_jump_offset (duk_re_compiler_ctx *re_ctx, duk_uint32_t offset, duk_int32_t skip) |
DUK_LOCAL duk_uint32_t | duk__append_jump_offset (duk_re_compiler_ctx *re_ctx, duk_int32_t skip) |
DUK_LOCAL void | duk__generate_ranges (void *userdata, duk_codepoint_t r1, duk_codepoint_t r2, duk_bool_t direct) |
DUK_LOCAL void | duk__parse_disjunction (duk_re_compiler_ctx *re_ctx, duk_bool_t expect_eof, duk__re_disjunction_info *out_atom_info) |
DUK_LOCAL duk_uint32_t | duk__parse_regexp_flags (duk_hthread *thr, duk_hstring *h) |
DUK_LOCAL void | duk__create_escaped_source (duk_hthread *thr, int idx_pattern) |
DUK_INTERNAL void | duk_regexp_compile (duk_hthread *thr) |
DUK_INTERNAL void | duk_regexp_create_instance (duk_hthread *thr) |
#define DUK__RE_BUFLEN | ( | re_ctx | ) | DUK_BW_GET_SIZE(re_ctx->thr, &re_ctx->bw) |
Definition at line 32 of file duktape-1.5.2/src-separate/duk_regexp_compiler.c.
Referenced by duk__append_jump_offset(), and duk__parse_disjunction().
#define DUK__RE_INITIAL_BUFSIZE 64 |
Definition at line 29 of file duktape-1.5.2/src-separate/duk_regexp_compiler.c.
Referenced by duk_regexp_compile().
DUK_LOCAL duk_uint32_t duk__append_jump_offset | ( | duk_re_compiler_ctx * | re_ctx, |
duk_int32_t | skip ) |
Definition at line 162 of file duktape-1.5.2/src-separate/duk_regexp_compiler.c.
References duk__insert_jump_offset(), and DUK__RE_BUFLEN.
Referenced by duk__parse_disjunction().
DUK_LOCAL void duk__append_slice | ( | duk_re_compiler_ctx * | re_ctx, |
duk_uint32_t | data_offset, | ||
duk_uint32_t | data_length ) |
Definition at line 126 of file duktape-1.5.2/src-separate/duk_regexp_compiler.c.
References duk_re_compiler_ctx::bw, DUK_BW_WRITE_ENSURE_SLICE, and duk_re_compiler_ctx::thr.
Referenced by duk__parse_disjunction().
DUK_LOCAL void duk__append_u16_list | ( | duk_re_compiler_ctx * | re_ctx, |
const duk_uint16_t * | values, | ||
duk_uint32_t | count ) |
Definition at line 114 of file duktape-1.5.2/src-separate/duk_regexp_compiler.c.
References duk__append_u32().
Referenced by duk__parse_disjunction().
DUK_LOCAL duk_uint32_t duk__append_u32 | ( | duk_re_compiler_ctx * | re_ctx, |
duk_uint32_t | x ) |
Definition at line 94 of file duktape-1.5.2/src-separate/duk_regexp_compiler.c.
References duk_re_compiler_ctx::bw, DUK_BW_WRITE_ENSURE_BYTES, duk_unicode_encode_xutf8(), DUK_UNICODE_MAX_XUTF8_LENGTH, and duk_re_compiler_ctx::thr.
Referenced by duk__append_u16_list(), duk__generate_ranges(), duk__parse_disjunction(), and duk_regexp_compile().
DUK_LOCAL void duk__create_escaped_source | ( | duk_hthread * | thr, |
int | idx_pattern ) |
Definition at line 834 of file duktape-1.5.2/src-separate/duk_regexp_compiler.c.
References DUK_ASC_BACKSLASH, DUK_ASSERT, DUK_BW_ENSURE_RAW, DUK_BW_GET_PTR, DUK_BW_INIT_PUSHBUF, DUK_BW_SETPTR_AND_COMPACT, duk_get_hstring(), DUK_HSTRING_GET_BYTELEN, DUK_HSTRING_GET_DATA, duk_push_hstring_stridx(), DUK_STRIDX_ESCAPED_EMPTY_REGEXP, duk_to_string(), and NULL.
Referenced by duk_regexp_compile().
DUK_LOCAL duk_uint32_t duk__encode_i32 | ( | duk_int32_t | x | ) |
Definition at line 74 of file duktape-1.5.2/src-separate/duk_regexp_compiler.c.
Referenced by duk__insert_i32(), and duk__insert_jump_offset().
DUK_LOCAL void duk__generate_ranges | ( | void * | userdata, |
duk_codepoint_t | r1, | ||
duk_codepoint_t | r2, | ||
duk_bool_t | direct ) |
Definition at line 185 of file duktape-1.5.2/src-separate/duk_regexp_compiler.c.
References duk__append_u32(), DUK_DD, DUK_DDPRINT, DUK_RE_FLAG_IGNORE_CASE, duk_unicode_re_canonicalize_char(), duk_re_compiler_ctx::nranges, duk_re_compiler_ctx::re_flags, and duk_re_compiler_ctx::thr.
Referenced by duk__parse_disjunction().
DUK_LOCAL duk_uint32_t duk__insert_i32 | ( | duk_re_compiler_ctx * | re_ctx, |
duk_uint32_t | offset, | ||
duk_int32_t | x ) |
Definition at line 103 of file duktape-1.5.2/src-separate/duk_regexp_compiler.c.
References duk__encode_i32(), and duk__insert_u32().
Referenced by duk__insert_jump_offset().
DUK_LOCAL duk_uint32_t duk__insert_jump_offset | ( | duk_re_compiler_ctx * | re_ctx, |
duk_uint32_t | offset, | ||
duk_int32_t | skip ) |
Definition at line 147 of file duktape-1.5.2/src-separate/duk_regexp_compiler.c.
References duk__encode_i32(), duk__insert_i32(), DUK_ASSERT, and duk_unicode_get_xutf8_length().
Referenced by duk__append_jump_offset(), and duk__parse_disjunction().
DUK_LOCAL void duk__insert_slice | ( | duk_re_compiler_ctx * | re_ctx, |
duk_uint32_t | offset, | ||
duk_uint32_t | data_offset, | ||
duk_uint32_t | data_length ) |
Definition at line 122 of file duktape-1.5.2/src-separate/duk_regexp_compiler.c.
References duk_re_compiler_ctx::bw, DUK_BW_INSERT_ENSURE_SLICE, and duk_re_compiler_ctx::thr.
Referenced by duk__parse_disjunction().
DUK_LOCAL duk_uint32_t duk__insert_u32 | ( | duk_re_compiler_ctx * | re_ctx, |
duk_uint32_t | offset, | ||
duk_uint32_t | x ) |
Definition at line 85 of file duktape-1.5.2/src-separate/duk_regexp_compiler.c.
References duk_re_compiler_ctx::bw, DUK_BW_INSERT_ENSURE_BYTES, duk_unicode_encode_xutf8(), DUK_UNICODE_MAX_XUTF8_LENGTH, and duk_re_compiler_ctx::thr.
Referenced by duk__insert_i32(), duk__parse_disjunction(), and duk_regexp_compile().
DUK_LOCAL void duk__parse_disjunction | ( | duk_re_compiler_ctx * | re_ctx, |
duk_bool_t | expect_eof, | ||
duk__re_disjunction_info * | out_atom_info ) |
Definition at line 286 of file duktape-1.5.2/src-separate/duk_regexp_compiler.c.
References duk_re_compiler_ctx::captures, duk__re_disjunction_info::charlen, duk_re_compiler_ctx::curr_token, duk__append_jump_offset(), duk__append_slice(), duk__append_u16_list(), duk__append_u32(), duk__generate_ranges(), duk__insert_jump_offset(), duk__insert_slice(), duk__insert_u32(), duk__parse_disjunction(), DUK__RE_BUFLEN, duk__remove_slice(), DUK_ASSERT, DUK_DD, DUK_DDD, DUK_DDDPRINT, DUK_DDPRINT, DUK_ERROR_RANGE, DUK_ERROR_SYNTAX, duk_lexer_parse_re_ranges(), duk_lexer_parse_re_token(), DUK_RE_FLAG_IGNORE_CASE, DUK_RE_MAX_ATOM_COPIES, DUK_RE_QUANTIFIER_INFINITE, DUK_REOP_ASSERT_END, DUK_REOP_ASSERT_NOT_WORD_BOUNDARY, DUK_REOP_ASSERT_START, DUK_REOP_ASSERT_WORD_BOUNDARY, DUK_REOP_BACKREFERENCE, DUK_REOP_CHAR, DUK_REOP_INVRANGES, DUK_REOP_JUMP, DUK_REOP_LOOKNEG, DUK_REOP_LOOKPOS, DUK_REOP_MATCH, DUK_REOP_PERIOD, DUK_REOP_RANGES, DUK_REOP_SAVE, DUK_REOP_SPLIT1, DUK_REOP_SPLIT2, DUK_REOP_SQGREEDY, DUK_REOP_SQMINIMAL, DUK_REOP_WIPERANGE, DUK_RETOK_ASSERT_END, DUK_RETOK_ASSERT_NOT_WORD_BOUNDARY, DUK_RETOK_ASSERT_START, DUK_RETOK_ASSERT_START_NEG_LOOKAHEAD, DUK_RETOK_ASSERT_START_POS_LOOKAHEAD, DUK_RETOK_ASSERT_WORD_BOUNDARY, DUK_RETOK_ATOM_BACKREFERENCE, DUK_RETOK_ATOM_CHAR, DUK_RETOK_ATOM_DIGIT, DUK_RETOK_ATOM_END_GROUP, DUK_RETOK_ATOM_NOT_DIGIT, DUK_RETOK_ATOM_NOT_WHITE, DUK_RETOK_ATOM_NOT_WORD_CHAR, DUK_RETOK_ATOM_PERIOD, DUK_RETOK_ATOM_START_CAPTURE_GROUP, DUK_RETOK_ATOM_START_CHARCLASS, DUK_RETOK_ATOM_START_CHARCLASS_INVERTED, DUK_RETOK_ATOM_START_NONCAPTURE_GROUP, DUK_RETOK_ATOM_WHITE, DUK_RETOK_ATOM_WORD_CHAR, DUK_RETOK_DISJUNCTION, DUK_RETOK_EOF, DUK_RETOK_QUANTIFIER, DUK_STR_INVALID_QUANTIFIER_NO_ATOM, DUK_STR_INVALID_QUANTIFIER_VALUES, DUK_STR_QUANTIFIER_TOO_MANY_COPIES, DUK_STR_REGEXP_COMPILER_RECURSION_LIMIT, DUK_STR_UNEXPECTED_CLOSING_PAREN, DUK_STR_UNEXPECTED_END_OF_PATTERN, DUK_STR_UNEXPECTED_REGEXP_TOKEN, duk_unicode_re_canonicalize_char(), duk_unicode_re_ranges_digit, duk_unicode_re_ranges_white, duk_unicode_re_ranges_wordchar, DUK_UNREF, duk_re_token::greedy, duk_re_compiler_ctx::highest_backref, duk_re_compiler_ctx::lex, duk_re_compiler_ctx::nranges, NULL, duk_re_token::num, duk_re_token::qmax, duk_re_token::qmin, duk_re_compiler_ctx::re_flags, duk_re_compiler_ctx::recursion_depth, duk_re_compiler_ctx::recursion_limit, duk_re_token::t, and duk_re_compiler_ctx::thr.
Referenced by duk__parse_disjunction(), and duk_regexp_compile().
DUK_LOCAL duk_uint32_t duk__parse_regexp_flags | ( | duk_hthread * | thr, |
duk_hstring * | h ) |
Definition at line 767 of file duktape-1.5.2/src-separate/duk_regexp_compiler.c.
References DUK_ERROR_SYNTAX, DUK_HSTRING_GET_BYTELEN, DUK_HSTRING_GET_DATA, DUK_RE_FLAG_GLOBAL, DUK_RE_FLAG_IGNORE_CASE, DUK_RE_FLAG_MULTILINE, DUK_STR_INVALID_REGEXP_FLAGS, and error().
Referenced by duk_regexp_compile().
DUK_LOCAL void duk__remove_slice | ( | duk_re_compiler_ctx * | re_ctx, |
duk_uint32_t | data_offset, | ||
duk_uint32_t | data_length ) |
Definition at line 130 of file duktape-1.5.2/src-separate/duk_regexp_compiler.c.
References duk_re_compiler_ctx::bw, DUK_BW_REMOVE_ENSURE_SLICE, and duk_re_compiler_ctx::thr.
Referenced by duk__parse_disjunction().
DUK_INTERNAL void duk_regexp_compile | ( | duk_hthread * | thr | ) |
Definition at line 896 of file duktape-1.5.2/src-separate/duk_regexp_compiler.c.
References duk_re_compiler_ctx::bw, duk_re_compiler_ctx::captures, duk__append_u32(), duk__create_escaped_source(), duk__insert_u32(), duk__parse_disjunction(), duk__parse_regexp_flags(), DUK__RE_INITIAL_BUFSIZE, DUK_ASSERT, DUK_BW_COMPACT, DUK_BW_INIT_PUSHBUF, DUK_DD, DUK_DDPRINT, DUK_ERROR_SYNTAX, duk_get_tval(), DUK_HSTRING_GET_BYTELEN, DUK_HSTRING_GET_DATA, DUK_LEXER_INITCTX, DUK_LEXER_SETPOINT, DUK_MEMZERO, DUK_RE_COMPILE_TOKEN_LIMIT, duk_remove(), DUK_REOP_MATCH, DUK_REOP_SAVE, duk_require_hstring(), DUK_STR_INVALID_BACKREFS, duk_to_string(), DUK_USE_REGEXP_COMPILER_RECLIMIT, duk_re_compiler_ctx::highest_backref, duk_lexer_ctx::input, duk_lexer_ctx::input_length, duk_re_compiler_ctx::lex, duk_lexer_point::line, NULL, duk_lexer_point::offset, duk_re_compiler_ctx::re_flags, duk_re_compiler_ctx::recursion_limit, duk_lexer_ctx::thr, duk_re_compiler_ctx::thr, and duk_lexer_ctx::token_limit.
DUK_INTERNAL void duk_regexp_create_instance | ( | duk_hthread * | thr | ) |
Definition at line 1016 of file duktape-1.5.2/src-separate/duk_regexp_compiler.c.
References duk_hthread::builtins, DUK_ASSERT, DUK_BIDX_REGEXP_PROTOTYPE, duk_get_hobject(), duk_get_hstring(), DUK_HOBJECT_CLASS_REGEXP, DUK_HOBJECT_SET_CLASS_NUMBER, DUK_HOBJECT_SET_PROTOTYPE_UPDREF, DUK_HSTRING_GET_BYTELEN, DUK_HSTRING_GET_CHARLEN, DUK_HSTRING_GET_DATA, duk_insert(), DUK_PROPDESC_FLAGS_NONE, DUK_PROPDESC_FLAGS_W, duk_push_boolean(), duk_push_int(), duk_push_object(), DUK_RE_FLAG_GLOBAL, DUK_RE_FLAG_IGNORE_CASE, DUK_RE_FLAG_MULTILINE, DUK_STRIDX_GLOBAL, DUK_STRIDX_IGNORE_CASE, DUK_STRIDX_INT_BYTECODE, DUK_STRIDX_LAST_INDEX, DUK_STRIDX_MULTILINE, DUK_STRIDX_SOURCE, duk_xdef_prop_stridx(), and NULL.