@ Cached @ DontLabel public Rule unicodeRange ( final int low , final int high ) { if ( ! Character . isValidCodePoint ( low ) ) throw new InvalidGrammarException ( "invalid code point " + low ) ; if ( ! Character . isValidCodePoint ( high ) ) throw new InvalidGrammarException ( "invalid code point " + high ) ; if ( low > high ) throw new InvalidGrammarException ( "invalid code point range: " + low + " > " + high ) ; return low == high ? new CodePointMatcher ( low ) : new CodePointRangeMatcher ( low , high ) ; }
Match a Unicode character range