java.lang.Object
org.jcodings.IntHolder
org.joni.ScannerSupport
org.joni.Lexer
org.joni.Parser
org.joni.Analyser
- All Implemented Interfaces:
org.jcodings.exception.ErrorMessages,ErrorMessages
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intFields inherited from class org.joni.Parser
returnCodeFields inherited from class org.jcodings.IntHolder
valueFields 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 org.joni.exception.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
ConstructorsModifierConstructorDescriptionprotectedAnalyser(Regex regex, Syntax syntax, byte[] bytes, int p, int end, WarnCallback warnings) -
Method Summary
Modifier and TypeMethodDescriptionprivate booleancheckTypeTree(Node node, int typeMask, int encloseMask, int anchorMask) protected final voidcompile()protected final Nodeprivate Nodeprivate StringencStringToString(byte[] bytes, int p, int end) private NodeexpandCaseFoldMakeRemString(byte[] bytes, int p, int end) private NodeexpandCaseFoldString(Node node) private booleanexpandCaseFoldStringAlt(int itemNum, org.jcodings.CaseFoldCodeItem[] items, byte[] bytes, int p, int slen, int end, org.jcodings.ObjPtr<Node> node) protected final intgetCharLengthTree(Node node) private intgetCharLengthTree(Node node, int level) private NodegetHeadValueNode(Node node, boolean exact) private intgetMaxMatchLength(Node node) private intgetMinMatchLength(Node node) private booleanisCaseFoldVariableLength(int itemNum, org.jcodings.CaseFoldCodeItem[] items, int slen) private booleanisNotIncluded(Node x, Node y) private voidprivate NodenoNameDisableMap(Node node, int[] map, org.jcodings.Ptr counter) private voidnoNameDisableMapFor_anchor(Node node, int[] map, org.jcodings.Ptr counter) private NodenoNameDisableMapFor_enclose(Node node, int[] map, org.jcodings.Ptr counter) private voidnoNameDisableMapFor_listAlt(Node node, int[] map, org.jcodings.Ptr counter) private voidnoNameDisableMapFor_quantifier(Node node, int[] map, org.jcodings.Ptr counter) protected final voidnumberedRefCheck(Node node) private voidoptimizeNodeLeft(Node node, NodeOptInfo opt, OptEnvironment oenv) private intquantifiersMemoryInfo(Node node) private voidrenumberByMap(Node node, int[] map) private voidsetCallAttr(CallNode cn) protected final voidsetOptimizedInfoFromTree(Node node) protected final intsetupCombExpCheck(Node node, int state) private NodesetupLookBehind(AnchorNode node) protected final voidsetupSubExpCall(Node node) protected final Nodeprivate intsubexpInfRecursiveCheck(Node node, boolean head) protected final intprivate intsubexpRecursiveCheck(Node node) protected final intsubexpRecursiveCheckTrav(Node node) private voidupdateStringNodeCaseFold(Node node) private voidprivate voidupdateStringNodeCaseFoldSingleByte(StringNode sn, byte[] toLower) Methods inherited from class org.joni.Parser
parseRegexpMethods inherited from class org.joni.Lexer
backrefRelToAbs, fetchCharPropertyToCType, fetchName, fetchNamedBackrefToken, fetchToken, fetchTokenInCC, syntaxWarn, syntaxWarnMethods inherited from class org.joni.ScannerSupport
fetch, fetchTo, getBegin, getEnd, inc, left, mark, newInternalException, newSyntaxException, newValueException, newValueException, newValueException, peek, peekIs, reset, restore, scanUnsignedHexadecimalNumber, scanUnsignedNumber, scanUnsignedOctalNumber, unfetch
-
Field Details
-
GET_CHAR_LEN_VARLEN
private static final int GET_CHAR_LEN_VARLEN- See Also:
-
GET_CHAR_LEN_TOP_ALT_VARLEN
private static final int GET_CHAR_LEN_TOP_ALT_VARLEN- See Also:
-
RECURSION_EXIST
private static final int RECURSION_EXIST- See Also:
-
RECURSION_INFINITE
private static final int RECURSION_INFINITE- See Also:
-
FOUND_CALLED_NODE
private static final int FOUND_CALLED_NODE- See Also:
-
THRESHOLD_CASE_FOLD_ALT_FOR_EXPANSION
private static final int THRESHOLD_CASE_FOLD_ALT_FOR_EXPANSION- See Also:
-
CEC_THRES_NUM_BIG_REPEAT
private static final int CEC_THRES_NUM_BIG_REPEAT- See Also:
-
CEC_INFINITE_NUM
private static final int CEC_INFINITE_NUM- See Also:
-
CEC_IN_INFINITE_REPEAT
private static final int CEC_IN_INFINITE_REPEAT- See Also:
-
CEC_IN_FINITE_REPEAT
private static final int CEC_IN_FINITE_REPEAT- See Also:
-
CEC_CONT_BIG_REPEAT
private static final int CEC_CONT_BIG_REPEAT- See Also:
-
IN_ALT
private static final int IN_ALT- See Also:
-
IN_NOT
private static final int IN_NOT- See Also:
-
IN_REPEAT
private static final int IN_REPEAT- See Also:
-
IN_VAR_REPEAT
private static final int IN_VAR_REPEAT- See Also:
-
IN_CALL
private static final int IN_CALL- See Also:
-
IN_RECCALL
private static final int IN_RECCALL- See Also:
-
EXPAND_STRING_MAX_LENGTH
private static final int EXPAND_STRING_MAX_LENGTH- See Also:
-
MAX_NODE_OPT_INFO_REF_COUNT
private static final int MAX_NODE_OPT_INFO_REF_COUNT- See Also:
-
-
Constructor Details
-
Analyser
-
-
Method Details
-
compile
protected final void compile() -
encStringToString
-
noNameDisableMapFor_listAlt
-
noNameDisableMapFor_quantifier
-
noNameDisableMapFor_enclose
-
noNameDisableMapFor_anchor
-
noNameDisableMap
-
renumberByMap
-
numberedRefCheck
-
disableNoNameGroupCapture
-
quantifiersMemoryInfo
-
getMinMatchLength
-
getMaxMatchLength
-
getCharLengthTree
-
getCharLengthTree
-
isNotIncluded
-
getHeadValueNode
-
checkTypeTree
-
subexpInfRecursiveCheck
-
subexpInfRecursiveCheckTrav
-
subexpRecursiveCheck
-
subexpRecursiveCheckTrav
-
setCallAttr
-
setupSubExpCall
-
divideLookBehindAlternatives
-
setupLookBehind
-
nextSetup
-
updateStringNodeCaseFoldSingleByte
-
updateStringNodeCaseFoldMultiByte
-
updateStringNodeCaseFold
-
expandCaseFoldMakeRemString
-
isCaseFoldVariableLength
private boolean isCaseFoldVariableLength(int itemNum, org.jcodings.CaseFoldCodeItem[] items, int slen) -
expandCaseFoldStringAlt
private boolean expandCaseFoldStringAlt(int itemNum, org.jcodings.CaseFoldCodeItem[] items, byte[] bytes, int p, int slen, int end, org.jcodings.ObjPtr<Node> node) -
expandCaseFoldString
-
setupCombExpCheck
-
setupTree
-
optimizeNodeLeft
-
setOptimizedInfoFromTree
-