final class ArrayCompiler extends Compiler
| Modifier and Type | Field and Description |
|---|---|
private int[] |
code |
private int |
codeLength |
private static int |
QUANTIFIER_EXPAND_LIMIT_SIZE |
private static int |
REPEAT_RANGE_ALLOC |
private int |
templateNum |
private byte[][] |
templates |
CHAR_CLASS_VALUE_AT_END_OF_RANGE, CHAR_CLASS_VALUE_AT_START_OF_RANGE, CONTROL_CODE_SYNTAX, DEFAULT_ENCODING_IS_NOT_SETTED, EMPTY_CHAR_CLASS, EMPTY_GROUP_NAME, EMPTY_RANGE_IN_CHAR_CLASS, END_PATTERN_AT_CONTROL, END_PATTERN_AT_ESCAPE, END_PATTERN_AT_LEFT_BRACE, END_PATTERN_AT_LEFT_BRACKET, END_PATTERN_AT_META, END_PATTERN_IN_GROUP, END_PATTERN_WITH_UNMATCHED_PARENTHESIS, GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY, INVALID_ARGUMENT, INVALID_BACKREF, INVALID_CHAR_IN_GROUP_NAME, INVALID_COMBINATION_OF_OPTIONS, INVALID_CONDITION_PATTERN, INVALID_GROUP_NAME, INVALID_LOOK_BEHIND_PATTERN, INVALID_POSIX_BRACKET_TYPE, INVALID_REPEAT_RANGE_PATTERN, INVALID_WIDE_CHAR_VALUE, MATCH_STACK_LIMIT_OVER, MEMORY, META_CODE_SYNTAX, MISMATCH, MISMATCH_CODE_LENGTH_IN_CLASS_RANGE, MULTIPLEX_DEFINED_NAME, MULTIPLEX_DEFINITION_NAME_CALL, NESTED_REPEAT_NOT_ALLOWED, NESTED_REPEAT_OPERATOR, NEVER_ENDING_RECURSION, NO_SUPPORT_CONFIG, NOT_SUPPORTED_ENCODING_COMBINATION, NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED, OVER_THREAD_PASS_LIMIT_COUNT, PARSER_BUG, PREMATURE_END_OF_CHAR_CLASS, SPECIFIED_ENCODING_CANT_CONVERT_TO_WIDE_CHAR, STACK_BUG, TARGET_OF_REPEAT_OPERATOR_INVALID, TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED, TOO_BIG_BACKREF_NUMBER, TOO_BIG_NUMBER, TOO_BIG_NUMBER_FOR_REPEAT_RANGE, TOO_BIG_SB_CHAR_VALUE, TOO_MANY_CAPTURE_GROUPS, TOO_MANY_MULTI_BYTE_RANGES, TOO_SHORT_DIGITS, TOO_SHORT_MULTI_BYTE_STRING, TYPE_BUG, UNDEFINED_BYTECODE, UNDEFINED_GROUP_OPTION, UNDEFINED_GROUP_REFERENCE, UNDEFINED_NAME_REFERENCE, UNEXPECTED_BYTECODE, UNMATCHED_CLOSE_PARENTHESIS, UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS, UPPER_SMALLER_THAN_LOWER_IN_REPEAT_RANGEERR_COULD_NOT_REPLICATE, ERR_ENCODING_ALIAS_ALREADY_REGISTERED, ERR_ENCODING_ALREADY_REGISTERED, ERR_ENCODING_CLASS_DEF_NOT_FOUND, ERR_ENCODING_LOAD_ERROR, ERR_ENCODING_REPLICA_ALREADY_REGISTERED, ERR_ILLEGAL_CHARACTER, ERR_INVALID_CHAR_PROPERTY_NAME, ERR_INVALID_CODE_POINT_VALUE, ERR_NO_SUCH_ENCODNG, ERR_TOO_BIG_WIDE_CHAR_VALUE, ERR_TOO_LONG_WIDE_CHAR_VALUE, ERR_TRANSCODER_ALREADY_REGISTERED, ERR_TRANSCODER_CLASS_DEF_NOT_FOUND, ERR_TRANSCODER_LOAD_ERROR, ERR_TYPE_BUG| Constructor and Description |
|---|
ArrayCompiler(Analyser analyser) |
| Modifier and Type | Method and Description |
|---|---|
private void |
addAbsAddr(int addr) |
private void |
addBytes(byte[] bytes,
int p,
int length) |
protected void |
addCompileString(byte[] bytes,
int p,
int mbLength,
int byteLength,
boolean ignoreCase) |
private int |
addCompileStringlength(byte[] bytes,
int p,
int mbLength,
int byteLength,
boolean ignoreCase) |
private void |
addInt(int i) |
private void |
addInts(int[] ints,
int length) |
private void |
addLength(int length) |
private void |
addMemNum(int num) |
private void |
addMultiByteCClass(CodeRangeBuffer mbuf) |
private void |
addOpcode(int opcode) |
private void |
addOpcodeOption(int opcode,
int option) |
private void |
addOpcodeRelAddr(int opcode,
int addr) |
private void |
addOption(int option) |
private void |
addRelAddr(int addr) |
private void |
addStateCheckNum(int num) |
private void |
addTemplate(byte[] bytes) |
private static boolean |
cknOn(int ckn) |
protected void |
compileAltNode(ListNode node) |
protected void |
compileAnchorNode(AnchorNode node) |
protected void |
compileAnyCharNode() |
protected void |
compileBackrefNode(BackRefNode node) |
protected void |
compileCallNode(CallNode node) |
protected void |
compileCClassNode(CClassNode cc) |
private int |
compileCECLengthQuantifierNode(QuantifierNode qn) |
protected void |
compileCECQuantifierNode(QuantifierNode qn) |
protected void |
compileCTypeNode(CTypeNode node) |
protected void |
compileEncloseNode(EncloseNode node) |
private int |
compileLengthAnchorNode(AnchorNode node) |
private int |
compileLengthCClassNode(CClassNode cc) |
private int |
compileLengthEncloseNode(EncloseNode node) |
private int |
compileLengthOptionNode(EncloseNode node) |
private int |
compileLengthStringNode(Node node) |
private int |
compileLengthStringRawNode(StringNode sn) |
private int |
compileLengthTree(Node node) |
private int |
compileNonCECLengthQuantifierNode(QuantifierNode qn) |
protected void |
compileNonCECQuantifierNode(QuantifierNode qn) |
protected void |
compileOptionNode(EncloseNode node) |
private void |
compileRangeRepeatNode(QuantifierNode qn,
int targetLen,
int emptyInfo) |
private void |
compileTreeEmptyCheck(Node node,
int emptyInfo) |
private void |
ensure(int size) |
private void |
entryRepeatRange(int id,
int lower,
int upper) |
protected void |
finish() |
private boolean |
isNeedStrLenOpExact(int op) |
private boolean |
opTemplated(int op) |
protected void |
prepare() |
private int |
selectStrOpcode(int mbLength,
int byteLength,
boolean ignoreCase) |
(package private) void |
setInt(int i,
int offset) |
compile, compileTree, compileTreeNTimes, newInternalException, newSyntaxExceptionprivate int[] code
private int codeLength
private byte[][] templates
private int templateNum
private static final int REPEAT_RANGE_ALLOC
private static final int QUANTIFIER_EXPAND_LIMIT_SIZE
ArrayCompiler(Analyser analyser)
protected void compileAltNode(ListNode node)
compileAltNode in class Compilerprivate boolean isNeedStrLenOpExact(int op)
private boolean opTemplated(int op)
private int selectStrOpcode(int mbLength,
int byteLength,
boolean ignoreCase)
private void compileTreeEmptyCheck(Node node, int emptyInfo)
private int addCompileStringlength(byte[] bytes,
int p,
int mbLength,
int byteLength,
boolean ignoreCase)
protected final void addCompileString(byte[] bytes,
int p,
int mbLength,
int byteLength,
boolean ignoreCase)
addCompileString in class Compilerprivate int compileLengthStringNode(Node node)
private int compileLengthStringRawNode(StringNode sn)
private void addMultiByteCClass(CodeRangeBuffer mbuf)
private int compileLengthCClassNode(CClassNode cc)
protected void compileCClassNode(CClassNode cc)
compileCClassNode in class Compilerprotected void compileCTypeNode(CTypeNode node)
compileCTypeNode in class Compilerprotected void compileAnyCharNode()
compileAnyCharNode in class Compilerprotected void compileCallNode(CallNode node)
compileCallNode in class Compilerprotected void compileBackrefNode(BackRefNode node)
compileBackrefNode in class Compilerprivate void entryRepeatRange(int id,
int lower,
int upper)
private void compileRangeRepeatNode(QuantifierNode qn, int targetLen, int emptyInfo)
private static boolean cknOn(int ckn)
private int compileCECLengthQuantifierNode(QuantifierNode qn)
protected void compileCECQuantifierNode(QuantifierNode qn)
compileCECQuantifierNode in class Compilerprivate int compileNonCECLengthQuantifierNode(QuantifierNode qn)
protected void compileNonCECQuantifierNode(QuantifierNode qn)
compileNonCECQuantifierNode in class Compilerprivate int compileLengthOptionNode(EncloseNode node)
protected void compileOptionNode(EncloseNode node)
compileOptionNode in class Compilerprivate int compileLengthEncloseNode(EncloseNode node)
protected void compileEncloseNode(EncloseNode node)
compileEncloseNode in class Compilerprivate int compileLengthAnchorNode(AnchorNode node)
protected void compileAnchorNode(AnchorNode node)
compileAnchorNode in class Compilerprivate int compileLengthTree(Node node)
private void ensure(int size)
private void addInt(int i)
void setInt(int i,
int offset)
private void addBytes(byte[] bytes,
int p,
int length)
private void addInts(int[] ints,
int length)
private void addOpcode(int opcode)
private void addStateCheckNum(int num)
private void addRelAddr(int addr)
private void addAbsAddr(int addr)
private void addLength(int length)
private void addMemNum(int num)
private void addOption(int option)
private void addOpcodeRelAddr(int opcode,
int addr)
private void addOpcodeOption(int opcode,
int option)
private void addTemplate(byte[] bytes)