IToken tkNestedComment = new Token(DeePartitions.DEE_NESTED_COMMENT);
IToken tkNestedDocComment = new Token(DeePartitions.DEE_NESTED_DOCCOMMENT);
ArrayList2<IPredicateRule> rules = new ArrayList2<>();
rules.add(new PatternRule_Fixed("`", "`", tkRawString, NO_ESCAPE_CHAR, false, true));
rules.add(new PatternRule_Fixed("r\"", "\"", tkRawString2, NO_ESCAPE_CHAR, false, true));
// TODO: this rule is not accurate, need to use something like HereDocEnabledPartitioner to make it work
rules.add(new PatternRule_Fixed("q\"", "\"", tkDelimString, NO_ESCAPE_CHAR, false, true));
rules.add(new PatternRule_Fixed("\"", "\"", tkString, '\\', false, true));
rules.add(new PatternRule_Fixed("'", "'", tkCharacter, '\\', true, true));
rules.add(new PatternRule_Fixed("///", null, tkSingleDocComment, NO_ESCAPE_CHAR, true, true));
rules.add(new PatternRule_Fixed("//", null, tkSingleComment, NO_ESCAPE_CHAR, true, true));
rules.add(new NestedDelimiterRule("/++", "/+", "+/", tkNestedDocComment, NO_ESCAPE_CHAR, true));
rules.add(new NestedDelimiterRule("/+", "/+", "+/", tkNestedComment, NO_ESCAPE_CHAR, true));
rules.add(new PatternRule_Fixed("/**", "*/", tkMultiDocComment, NO_ESCAPE_CHAR, false, true));
rules.add(new PatternRule_Fixed("/*", "*/", tkMultiComment, NO_ESCAPE_CHAR, false, true));
setPredicateRules(rules.toArray(IPredicateRule.class));
}