示例#1
0
 internal static Pattern getModifiersPattern()
 {
     return(Patterns.IsChar(CharPredicates.IsAlpha()).Many());
 }
示例#2
0
 /// <summary> scans a quoted string that is opened by c1 and closed by c2. </summary>
 /// <param name="c1">the opening character.
 /// </param>
 /// <param name="c2">the closing character.
 /// </param>
 /// <returns> the scanner.
 /// </returns>
 public static Scanner IsQuotedBy(char c1, char c2)
 {
     return(IsPattern("open quote and quoted",
                      Patterns.IsChar(c1).Seq(Patterns.Many(CharPredicates.NotChar(c2))), "" + c1)
            .Seq(IsChar(c2)).Rename("quoted"));
 }