void () { final RegExpLexer lexer = new RegExpLexer(EnumSet.noneOf(RegExpCapability.class)); doTest("\\%\\ä", "REDUNDANT_ESCAPE ('\\%')\n" + "REDUNDANT_ESCAPE ('\\ä')", lexer); RegExpLexer lexer2 = new RegExpLexer(EnumSet.of(DANGLING_METACHARACTERS)); doTest("{\\}{33,34\\}{1\\}{1,\\}{,\\}{,2\\}", """ CHARACTER ('{') REDUNDANT_ESCAPE ('\\}') CHARACTER ('{') CHARACTER ('3') CHARACTER ('3') CHARACTER (',') CHARACTER ('3') CHARACTER ('4') ESC_CHARACTER ('\\}') CHARACTER ('{') CHARACTER ('1') ESC_CHARACTER ('\\}') CHARACTER ('{') CHARACTER ('1') CHARACTER (',') ESC_CHARACTER ('\\}') CHARACTER ('{') CHARACTER (',') REDUNDANT_ESCAPE ('\\}') CHARACTER ('{') CHARACTER (',') CHARACTER ('2') REDUNDANT_ESCAPE ('\\}')""", lexer2); RegExpLexer lexer3 = new RegExpLexer(EnumSet.of(DANGLING_METACHARACTERS, OMIT_NUMBERS_IN_QUANTIFIERS, OMIT_BOTH_NUMBERS_IN_QUANTIFIERS)); doTest("{\\}{,\\}{,2\\}", """ CHARACTER ('{') REDUNDANT_ESCAPE ('\\}') CHARACTER ('{') CHARACTER (',') ESC_CHARACTER ('\\}') CHARACTER ('{') CHARACTER (',') CHARACTER ('2') ESC_CHARACTER ('\\}')""", lexer3); }