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 |
ERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE, ERR_CHAR_CLASS_VALUE_AT_START_OF_RANGE, ERR_CONTROL_CODE_SYNTAX, ERR_DEFAULT_ENCODING_IS_NOT_SETTED, ERR_EMPTY_CHAR_CLASS, ERR_EMPTY_GROUP_NAME, ERR_EMPTY_RANGE_IN_CHAR_CLASS, ERR_END_PATTERN_AT_CONTROL, ERR_END_PATTERN_AT_ESCAPE, ERR_END_PATTERN_AT_LEFT_BRACE, ERR_END_PATTERN_AT_LEFT_BRACKET, ERR_END_PATTERN_AT_META, ERR_END_PATTERN_IN_GROUP, ERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS, ERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY, ERR_INVALID_ARGUMENT, ERR_INVALID_BACKREF, ERR_INVALID_CHAR_IN_GROUP_NAME, ERR_INVALID_COMBINATION_OF_OPTIONS, ERR_INVALID_GROUP_NAME, ERR_INVALID_LOOK_BEHIND_PATTERN, ERR_INVALID_POSIX_BRACKET_TYPE, ERR_INVALID_REPEAT_RANGE_PATTERN, ERR_INVALID_WIDE_CHAR_VALUE, ERR_MATCH_STACK_LIMIT_OVER, ERR_MEMORY, ERR_META_CODE_SYNTAX, ERR_MISMATCH_CODE_LENGTH_IN_CLASS_RANGE, ERR_MULTIPLEX_DEFINED_NAME, ERR_MULTIPLEX_DEFINITION_NAME_CALL, ERR_NESTED_REPEAT_NOT_ALLOWED, ERR_NESTED_REPEAT_OPERATOR, ERR_NEVER_ENDING_RECURSION, ERR_NOT_SUPPORTED_ENCODING_COMBINATION, ERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED, ERR_OVER_THREAD_PASS_LIMIT_COUNT, ERR_PARSER_BUG, ERR_PREMATURE_END_OF_CHAR_CLASS, ERR_SPECIFIED_ENCODING_CANT_CONVERT_TO_WIDE_CHAR, ERR_STACK_BUG, ERR_TARGET_OF_REPEAT_OPERATOR_INVALID, ERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED, ERR_TOO_BIG_BACKREF_NUMBER, ERR_TOO_BIG_NUMBER, ERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE, ERR_TOO_BIG_SB_CHAR_VALUE, ERR_TOO_MANY_MULTI_BYTE_RANGES, ERR_TOO_SHORT_MULTI_BYTE_STRING, ERR_TYPE_BUG, ERR_UNDEFINED_BYTECODE, ERR_UNDEFINED_GROUP_OPTION, ERR_UNDEFINED_GROUP_REFERENCE, ERR_UNDEFINED_NAME_REFERENCE, ERR_UNEXPECTED_BYTECODE, ERR_UNMATCHED_CLOSE_PARENTHESIS, ERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS, ERR_UPPER_SMALLER_THAN_LOWER_IN_REPEAT_RANGE, MISMATCH, NO_SUPPORT_CONFIG
ERR_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
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 strLength,
boolean ignoreCase) |
private int |
addCompileStringlength(byte[] bytes,
int p,
int mbLength,
int strLength,
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 |
addObject(Object o) |
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 |
addPointer(Object o) |
private void |
addRelAddr(int addr) |
private void |
addStateCheckNum(int num) |
private void |
addTemplate(byte[] bytes) |
private static boolean |
cknOn(int ckn) |
protected void |
compileAltNode(ConsAltNode 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 strLength,
boolean ignoreCase) |
(package private) void |
setInt(int i,
int offset) |
compile, compileTree, compileTreeNTimes, newInternalException, newSyntaxException
private 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(ConsAltNode node)
compileAltNode
in class Compiler
private boolean isNeedStrLenOpExact(int op)
private boolean opTemplated(int op)
private int selectStrOpcode(int mbLength, int strLength, boolean ignoreCase)
private void compileTreeEmptyCheck(Node node, int emptyInfo)
private int addCompileStringlength(byte[] bytes, int p, int mbLength, int strLength, boolean ignoreCase)
protected final void addCompileString(byte[] bytes, int p, int mbLength, int strLength, boolean ignoreCase)
addCompileString
in class Compiler
private 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 Compiler
protected void compileCTypeNode(CTypeNode node)
compileCTypeNode
in class Compiler
protected void compileAnyCharNode()
compileAnyCharNode
in class Compiler
protected void compileCallNode(CallNode node)
compileCallNode
in class Compiler
protected void compileBackrefNode(BackRefNode node)
compileBackrefNode
in class Compiler
private 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 Compiler
private int compileNonCECLengthQuantifierNode(QuantifierNode qn)
protected void compileNonCECQuantifierNode(QuantifierNode qn)
compileNonCECQuantifierNode
in class Compiler
private int compileLengthOptionNode(EncloseNode node)
protected void compileOptionNode(EncloseNode node)
compileOptionNode
in class Compiler
private int compileLengthEncloseNode(EncloseNode node)
protected void compileEncloseNode(EncloseNode node)
compileEncloseNode
in class Compiler
private int compileLengthAnchorNode(AnchorNode node)
protected void compileAnchorNode(AnchorNode node)
compileAnchorNode
in class Compiler
private int compileLengthTree(Node node)
private void ensure(int size)
private void addInt(int i)
void setInt(int i, int offset)
private void addObject(Object o)
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 addPointer(Object o)
private void addOption(int option)
private void addOpcodeRelAddr(int opcode, int addr)
private void addOpcodeOption(int opcode, int option)
private void addTemplate(byte[] bytes)
Copyright © 2018. All rights reserved.