|
22 | 22 | import java.io.PrintStream;
|
23 | 23 |
|
24 | 24 | public interface Config extends org.jcodings.Config {
|
25 |
| - final int REGEX_MAX_LENGTH = ConfigSupport.getInt("joni.regex_max_length", -1); |
26 |
| - final int CHAR_TABLE_SIZE = ConfigSupport.getInt("joni.char_table_size", 256); |
27 |
| - final boolean USE_NO_INVALID_QUANTIFIER = ConfigSupport.getBoolean("joni.use_no_invalid_quantifier", true); |
28 |
| - final int SCANENV_MEMNODES_SIZE = ConfigSupport.getInt("joni.scanenv_memnodes_size", 8); |
29 |
| - |
30 |
| - final boolean USE_NAMED_GROUP = ConfigSupport.getBoolean("joni.use_named_group", true); |
31 |
| - final boolean USE_SUBEXP_CALL = ConfigSupport.getBoolean("joni.use_subexp_call", true); |
32 |
| - final boolean USE_PERL_SUBEXP_CALL = ConfigSupport.getBoolean("joni.use_perl_subexp_call", true); |
33 |
| - final boolean USE_BACKREF_WITH_LEVEL = ConfigSupport.getBoolean("joni.use_backref_with_level", true); /* \k<name+n>, \k<name-n> */ |
34 |
| - |
35 |
| - final boolean USE_MONOMANIAC_CHECK_CAPTURES_IN_ENDLESS_REPEAT = ConfigSupport.getBoolean("joni.use_monomaniac_check_captures_in_endless_repeat", true); /* /(?:()|())*\2/ */ |
36 |
| - final boolean USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE = ConfigSupport.getBoolean("joni.use_newline_at_end_of_string_has_empty_line", true); /* /\n$/ =~ "\n" */ |
37 |
| - final boolean USE_WARNING_REDUNDANT_NESTED_REPEAT_OPERATOR = ConfigSupport.getBoolean("joni.use_warning_redundant_nested_repeat_operator", true); |
38 |
| - |
39 |
| - final boolean CASE_FOLD_IS_APPLIED_INSIDE_NEGATIVE_CCLASS = ConfigSupport.getBoolean("joni.case_fold_is_applied_inside_negative_cclass", true); |
40 |
| - |
41 |
| - final boolean USE_MATCH_RANGE_MUST_BE_INSIDE_OF_SPECIFIED_RANGE = ConfigSupport.getBoolean("joni.use_match_range_must_be_inside_of_specified_range", false); |
42 |
| - final boolean USE_CAPTURE_HISTORY = ConfigSupport.getBoolean("joni.use_capture_history", false); |
43 |
| - final boolean USE_VARIABLE_META_CHARS = ConfigSupport.getBoolean("joni.use_variable_meta_chars", true); |
44 |
| - final boolean USE_WORD_BEGIN_END = ConfigSupport.getBoolean("joni.use_word_begin_end", true); /* "\<": word-begin, "\>": word-end */ |
45 |
| - final boolean USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE = ConfigSupport.getBoolean("joni.use_find_longest_search_all_of_range", true); |
46 |
| - final boolean USE_SUNDAY_QUICK_SEARCH = ConfigSupport.getBoolean("joni.use_sunday_quick_search", true); |
47 |
| - final boolean USE_CEC = ConfigSupport.getBoolean("joni.use_cec", false); |
48 |
| - final boolean USE_DYNAMIC_OPTION = ConfigSupport.getBoolean("joni.use_dynamic_option", false); |
49 |
| - final boolean USE_BYTE_MAP = ConfigSupport.getBoolean("joni.use_byte_map", OptExactInfo.OPT_EXACT_MAXLEN <= CHAR_TABLE_SIZE); |
50 |
| - final boolean USE_INT_MAP_BACKWARD = ConfigSupport.getBoolean("joni.use_int_map_backward", false); |
51 |
| - |
52 |
| - final int NREGION = ConfigSupport.getInt("joni.nregion", 10); |
53 |
| - final int MAX_BACKREF_NUM = ConfigSupport.getInt("joni.max_backref_num", 1000); |
54 |
| - final int MAX_CAPTURE_GROUP_NUM = ConfigSupport.getInt("joni.max_capture_group_num", 32767); |
55 |
| - final int MAX_REPEAT_NUM = ConfigSupport.getInt("joni.max_multi_byte_ranges_num", 100000); |
56 |
| - final int MAX_MULTI_BYTE_RANGES_NUM = ConfigSupport.getInt("joni.max_multi_byte_ranges_num", 10000); |
| 25 | + int REGEX_MAX_LENGTH = ConfigSupport.getInt("joni.regex_max_length", -1); |
| 26 | + int CHAR_TABLE_SIZE = ConfigSupport.getInt("joni.char_table_size", 256); |
| 27 | + boolean USE_NO_INVALID_QUANTIFIER = ConfigSupport.getBoolean("joni.use_no_invalid_quantifier", true); |
| 28 | + int SCANENV_MEMNODES_SIZE = ConfigSupport.getInt("joni.scanenv_memnodes_size", 8); |
| 29 | + |
| 30 | + boolean USE_NAMED_GROUP = ConfigSupport.getBoolean("joni.use_named_group", true); |
| 31 | + boolean USE_SUBEXP_CALL = ConfigSupport.getBoolean("joni.use_subexp_call", true); |
| 32 | + boolean USE_PERL_SUBEXP_CALL = ConfigSupport.getBoolean("joni.use_perl_subexp_call", true); |
| 33 | + boolean USE_BACKREF_WITH_LEVEL = ConfigSupport.getBoolean("joni.use_backref_with_level", true); /* \k<name+n>, \k<name-n> */ |
| 34 | + |
| 35 | + boolean USE_MONOMANIAC_CHECK_CAPTURES_IN_ENDLESS_REPEAT = ConfigSupport.getBoolean("joni.use_monomaniac_check_captures_in_endless_repeat", true); /* /(?:()|())*\2/ */ |
| 36 | + boolean USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE = ConfigSupport.getBoolean("joni.use_newline_at_end_of_string_has_empty_line", true); /* /\n$/ =~ "\n" */ |
| 37 | + boolean USE_WARNING_REDUNDANT_NESTED_REPEAT_OPERATOR = ConfigSupport.getBoolean("joni.use_warning_redundant_nested_repeat_operator", true); |
| 38 | + |
| 39 | + boolean CASE_FOLD_IS_APPLIED_INSIDE_NEGATIVE_CCLASS = ConfigSupport.getBoolean("joni.case_fold_is_applied_inside_negative_cclass", true); |
| 40 | + |
| 41 | + boolean USE_MATCH_RANGE_MUST_BE_INSIDE_OF_SPECIFIED_RANGE = ConfigSupport.getBoolean("joni.use_match_range_must_be_inside_of_specified_range", false); |
| 42 | + boolean USE_CAPTURE_HISTORY = ConfigSupport.getBoolean("joni.use_capture_history", false); |
| 43 | + boolean USE_VARIABLE_META_CHARS = ConfigSupport.getBoolean("joni.use_variable_meta_chars", true); |
| 44 | + boolean USE_WORD_BEGIN_END = ConfigSupport.getBoolean("joni.use_word_begin_end", true); /* "\<": word-begin, "\>": word-end */ |
| 45 | + boolean USE_FIND_LONGEST_SEARCH_ALL_OF_RANGE = ConfigSupport.getBoolean("joni.use_find_longest_search_all_of_range", true); |
| 46 | + boolean USE_SUNDAY_QUICK_SEARCH = ConfigSupport.getBoolean("joni.use_sunday_quick_search", true); |
| 47 | + boolean USE_CEC = ConfigSupport.getBoolean("joni.use_cec", false); |
| 48 | + boolean USE_DYNAMIC_OPTION = ConfigSupport.getBoolean("joni.use_dynamic_option", false); |
| 49 | + boolean USE_BYTE_MAP = ConfigSupport.getBoolean("joni.use_byte_map", OptExactInfo.OPT_EXACT_MAXLEN <= CHAR_TABLE_SIZE); |
| 50 | + boolean USE_INT_MAP_BACKWARD = ConfigSupport.getBoolean("joni.use_int_map_backward", false); |
| 51 | + |
| 52 | + int NREGION = ConfigSupport.getInt("joni.nregion", 10); |
| 53 | + int MAX_BACKREF_NUM = ConfigSupport.getInt("joni.max_backref_num", 1000); |
| 54 | + int MAX_CAPTURE_GROUP_NUM = ConfigSupport.getInt("joni.max_capture_group_num", 32767); |
| 55 | + int MAX_REPEAT_NUM = ConfigSupport.getInt("joni.max_multi_byte_ranges_num", 100000); |
| 56 | + int MAX_MULTI_BYTE_RANGES_NUM = ConfigSupport.getInt("joni.max_multi_byte_ranges_num", 10000); |
57 | 57 |
|
58 | 58 | // internal config
|
59 |
| - final boolean USE_OP_PUSH_OR_JUMP_EXACT = ConfigSupport.getBoolean("joni.use_op_push_or_jump_exact", true); |
60 |
| - final boolean USE_QTFR_PEEK_NEXT = ConfigSupport.getBoolean("joni.use_qtfr_peek_next", true); |
| 59 | + boolean USE_OP_PUSH_OR_JUMP_EXACT = ConfigSupport.getBoolean("joni.use_op_push_or_jump_exact", true); |
| 60 | + boolean USE_QTFR_PEEK_NEXT = ConfigSupport.getBoolean("joni.use_qtfr_peek_next", true); |
61 | 61 |
|
62 |
| - final int INIT_MATCH_STACK_SIZE = ConfigSupport.getInt("joni.init_match_stack_size", 64); |
| 62 | + int INIT_MATCH_STACK_SIZE = ConfigSupport.getInt("joni.init_match_stack_size", 64); |
63 | 63 |
|
64 |
| - final boolean OPTIMIZE = ConfigSupport.getBoolean("joni.optimize", true); |
65 |
| - @Deprecated |
66 |
| - final boolean DONT_OPTIMIZE = !OPTIMIZE; |
| 64 | + boolean OPTIMIZE = ConfigSupport.getBoolean("joni.optimize", true); |
| 65 | + @Deprecated boolean DONT_OPTIMIZE = !OPTIMIZE; |
67 | 66 |
|
68 | 67 | // use embedded string templates in Regex object as byte arrays instead of compiling them into int bytecode array
|
69 |
| - final boolean USE_STRING_TEMPLATES = ConfigSupport.getBoolean("joni.use_string_templates", true); |
| 68 | + boolean USE_STRING_TEMPLATES = ConfigSupport.getBoolean("joni.use_string_templates", true); |
70 | 69 |
|
71 | 70 |
|
72 |
| - final int MAX_CAPTURE_HISTORY_GROUP = ConfigSupport.getInt("joni.max_capture_history_group", 31); |
| 71 | + int MAX_CAPTURE_HISTORY_GROUP = ConfigSupport.getInt("joni.max_capture_history_group", 31); |
73 | 72 |
|
74 | 73 |
|
75 |
| - final int CHECK_STRING_THRESHOLD_LEN = ConfigSupport.getInt("joni.check_string_threshold_len", 7); |
76 |
| - final int CHECK_BUFF_MAX_SIZE = ConfigSupport.getInt("joni.check_buff_max_size", 0x4000); |
| 74 | + int CHECK_STRING_THRESHOLD_LEN = ConfigSupport.getInt("joni.check_string_threshold_len", 7); |
| 75 | + int CHECK_BUFF_MAX_SIZE = ConfigSupport.getInt("joni.check_buff_max_size", 0x4000); |
77 | 76 |
|
78 |
| - final PrintStream log = System.out; |
79 |
| - final PrintStream err = System.err; |
| 77 | + PrintStream log = System.out; |
| 78 | + PrintStream err = System.err; |
80 | 79 |
|
81 |
| - final boolean DEBUG_ALL = ConfigSupport.getBoolean("joni.debug.all", false); |
| 80 | + boolean DEBUG_ALL = ConfigSupport.getBoolean("joni.debug.all", false); |
82 | 81 |
|
83 |
| - final boolean DEBUG = ConfigSupport.getBoolean("joni.debug", false) || DEBUG_ALL; |
84 |
| - final boolean DEBUG_PARSE_TREE = ConfigSupport.getBoolean("joni.debug.parse.tree", false) || DEBUG_ALL; |
85 |
| - final boolean DEBUG_PARSE_TREE_RAW = ConfigSupport.getBoolean("joni.debug.parse.tree.raw", true) || DEBUG_ALL; |
86 |
| - final boolean DEBUG_COMPILE = ConfigSupport.getBoolean("joni.debug.compile", false) || DEBUG_ALL; |
87 |
| - final boolean DEBUG_COMPILE_BYTE_CODE_INFO = ConfigSupport.getBoolean("joni.debug.compile.bytecode.info", false) || DEBUG_ALL; |
88 |
| - final boolean DEBUG_SEARCH = ConfigSupport.getBoolean("joni.debug.search", false) || DEBUG_ALL; |
89 |
| - final boolean DEBUG_MATCH = ConfigSupport.getBoolean("joni.debug.match", false) || DEBUG_ALL; |
| 82 | + boolean DEBUG = ConfigSupport.getBoolean("joni.debug", false) || DEBUG_ALL; |
| 83 | + boolean DEBUG_PARSE_TREE = ConfigSupport.getBoolean("joni.debug.parse.tree", false) || DEBUG_ALL; |
| 84 | + boolean DEBUG_PARSE_TREE_RAW = ConfigSupport.getBoolean("joni.debug.parse.tree.raw", true) || DEBUG_ALL; |
| 85 | + boolean DEBUG_COMPILE = ConfigSupport.getBoolean("joni.debug.compile", false) || DEBUG_ALL; |
| 86 | + boolean DEBUG_COMPILE_BYTE_CODE_INFO = ConfigSupport.getBoolean("joni.debug.compile.bytecode.info", false) || DEBUG_ALL; |
| 87 | + boolean DEBUG_SEARCH = ConfigSupport.getBoolean("joni.debug.search", false) || DEBUG_ALL; |
| 88 | + boolean DEBUG_MATCH = ConfigSupport.getBoolean("joni.debug.match", false) || DEBUG_ALL; |
90 | 89 | }
|
0 commit comments