Class ArrayCompiler
java.lang.Object
org.joni.Compiler
org.joni.ArrayCompiler
- All Implemented Interfaces:
org.jcodings.exception.ErrorMessages, ErrorMessages
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int[]private intprivate static final intprivate static final intprivate intprivate byte[][]Fields inherited from interface org.jcodings.exception.ErrorMessages
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, ERR_TYPE_BUGFields inherited from interface ErrorMessages
CHAR_CLASS_VALUE_AT_END_OF_RANGE, CHAR_CLASS_VALUE_AT_START_OF_RANGE, CONTROL_CODE_SYNTAX, 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, META_CODE_SYNTAX, MISMATCH_CODE_LENGTH_IN_CLASS_RANGE, MULTIPLEX_DEFINED_NAME, MULTIPLEX_DEFINITION_NAME_CALL, NESTED_REPEAT_NOT_ALLOWED, NESTED_REPEAT_OPERATOR, NEVER_ENDING_RECURSION, NOT_SUPPORTED_ENCODING_COMBINATION, NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED, OVER_THREAD_PASS_LIMIT_COUNT, PARSER_BUG, PREMATURE_END_OF_CHAR_CLASS, PROPERTY_NAME_NEVER_TERMINATED, 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, 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_RANGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddAbsAddr(int addr) private voidaddBytes(byte[] bytes, int p, int length) protected final voidaddCompileString(byte[] bytes, int p, int mbLength, int byteLength, boolean ignoreCase) private intaddCompileStringlength(byte[] bytes, int p, int mbLength, int byteLength, boolean ignoreCase) private voidaddInt(int i) private voidaddInts(int[] ints, int length) private voidaddLength(int length) private voidaddMemNum(int num) private voidprivate voidaddOpcode(int opcode) private voidaddOpcodeOption(int opcode, int option) private voidaddOpcodeRelAddr(int opcode, int addr) private voidaddOption(int option) private voidaddRelAddr(int addr) private voidaddStateCheckNum(int num) private voidaddTemplate(byte[] bytes) private static booleancknOn(int ckn) protected voidcompileAltNode(ListNode node) protected voidcompileAnchorNode(AnchorNode node) protected voidprotected voidprotected voidcompileCallNode(CallNode node) protected voidprivate intprotected voidprotected voidcompileCTypeNode(CTypeNode node) protected voidprivate intprivate intprivate intprivate intprivate intcompileLengthStringNode(Node node) private intprivate intcompileLengthTree(Node node) private intprotected voidprotected voidcompileOptionNode(EncloseNode node) private voidcompileRangeRepeatNode(QuantifierNode qn, int targetLen, int emptyInfo) private voidcompileTreeEmptyCheck(Node node, int emptyInfo) private voidensure(int size) private voidentryRepeatRange(int id, int lower, int upper) protected final voidfinish()private booleanisNeedStrLenOpExact(int op) private booleanopTemplated(int op) protected final voidprepare()private intselectStrOpcode(int mbLength, int byteLength, boolean ignoreCase) (package private) voidsetInt(int i, int offset) Methods inherited from class Compiler
compile, compileTree, compileTreeNTimes, newInternalException, newSyntaxException
-
Field Details
-
code
private int[] code -
codeLength
private int codeLength -
templates
private byte[][] templates -
templateNum
private int templateNum -
REPEAT_RANGE_ALLOC
private static final int REPEAT_RANGE_ALLOC- See Also:
-
QUANTIFIER_EXPAND_LIMIT_SIZE
private static final int QUANTIFIER_EXPAND_LIMIT_SIZE- See Also:
-
-
Constructor Details
-
ArrayCompiler
ArrayCompiler(Analyser analyser)
-
-
Method Details
-
prepare
-
finish
-
compileAltNode
- Specified by:
compileAltNodein classCompiler
-
isNeedStrLenOpExact
private boolean isNeedStrLenOpExact(int op) -
opTemplated
private boolean opTemplated(int op) -
selectStrOpcode
private int selectStrOpcode(int mbLength, int byteLength, boolean ignoreCase) -
compileTreeEmptyCheck
-
addCompileStringlength
private int addCompileStringlength(byte[] bytes, int p, int mbLength, int byteLength, boolean ignoreCase) -
addCompileString
protected final void addCompileString(byte[] bytes, int p, int mbLength, int byteLength, boolean ignoreCase) - Specified by:
addCompileStringin classCompiler
-
compileLengthStringNode
-
compileLengthStringRawNode
-
addMultiByteCClass
-
compileLengthCClassNode
-
compileCClassNode
- Specified by:
compileCClassNodein classCompiler
-
compileCTypeNode
- Specified by:
compileCTypeNodein classCompiler
-
compileAnyCharNode
protected void compileAnyCharNode()- Specified by:
compileAnyCharNodein classCompiler
-
compileCallNode
- Specified by:
compileCallNodein classCompiler
-
compileBackrefNode
- Specified by:
compileBackrefNodein classCompiler
-
entryRepeatRange
private void entryRepeatRange(int id, int lower, int upper) -
compileRangeRepeatNode
-
cknOn
private static boolean cknOn(int ckn) -
compileCECLengthQuantifierNode
-
compileCECQuantifierNode
- Specified by:
compileCECQuantifierNodein classCompiler
-
compileNonCECLengthQuantifierNode
-
compileNonCECQuantifierNode
- Specified by:
compileNonCECQuantifierNodein classCompiler
-
compileLengthOptionNode
-
compileOptionNode
- Specified by:
compileOptionNodein classCompiler
-
compileLengthEncloseNode
-
compileEncloseNode
- Specified by:
compileEncloseNodein classCompiler
-
compileLengthAnchorNode
-
compileAnchorNode
- Specified by:
compileAnchorNodein classCompiler
-
compileLengthTree
-
ensure
private void ensure(int size) -
addInt
private void addInt(int i) -
setInt
void setInt(int i, int offset) -
addBytes
private void addBytes(byte[] bytes, int p, int length) -
addInts
private void addInts(int[] ints, int length) -
addOpcode
private void addOpcode(int opcode) -
addStateCheckNum
private void addStateCheckNum(int num) -
addRelAddr
private void addRelAddr(int addr) -
addAbsAddr
private void addAbsAddr(int addr) -
addLength
private void addLength(int length) -
addMemNum
private void addMemNum(int num) -
addOption
private void addOption(int option) -
addOpcodeRelAddr
private void addOpcodeRelAddr(int opcode, int addr) -
addOpcodeOption
private void addOpcodeOption(int opcode, int option) -
addTemplate
private void addTemplate(byte[] bytes)
-