void () { final RegExpLexer lexer = new RegExpLexer(EnumSet.of(ONE_HEX_CHAR_ESCAPE)); doTest("\\x\\x1\\x01", """ BAD_HEX_VALUE ('\\x') HEX_CHAR ('\\x1') HEX_CHAR ('\\x01')""", lexer); final RegExpLexer lexer2 = new RegExpLexer(EnumSet.noneOf(RegExpCapability.class)); doTest("\\x\\x1\\x01", """ BAD_HEX_VALUE ('\\x') BAD_HEX_VALUE ('\\x') CHARACTER ('1') HEX_CHAR ('\\x01')""", lexer2); }