Scanners { @Deprecated public static Parser<Void> notAmong(String chars, String name) { return isChar(CharPredicates.notAmong(chars), name); } private  Scanners(); static Parser<Void> many(CharPredicate predicate); static Parser<Void> many1(CharPredicate predicate); @Deprecated static Parser<Void> many(Pattern pattern, String name); @Deprecated static Parser<Void> many1(Pattern pattern, String name); static Parser<Void> string(String str); @Deprecated static Parser<Void> string(String str, String name); @Deprecated static Parser<Void> pattern(final Pattern pattern, final String name); @Deprecated static Parser<Void> stringCaseInsensitive(String str, String name); static Parser<Void> stringCaseInsensitive(String str); static Parser<Void> isChar(final CharPredicate predicate); @Deprecated static Parser<Void> isChar(CharPredicate predicate, String name); @Deprecated static Parser<Void> isChar(char ch, String name); static Parser<Void> isChar(char ch); @Deprecated static Parser<Void> notChar(char ch, String name); static Parser<Void> notChar(char ch); @Deprecated static Parser<Void> among(String chars, String name); static Parser<Void> among(String chars); @Deprecated static Parser<Void> notAmong(String chars, String name); static Parser<Void> notAmong(String chars); static Parser<Void> lineComment(String begin); static Parser<Void> blockComment(String begin, String end); static Parser<Void> blockComment(String begin, String end, Pattern commented); static Parser<Void> blockComment(Parser<Void> begin, Parser<Void> end, Parser<?> commented); static Parser<Void> nestableBlockComment(String begin, String end); static Parser<Void> nestableBlockComment(String begin, String end, Pattern commented); static Parser<Void> nestableBlockComment(
      Parser<?> begin, Parser<?> end, Parser<?> commented); static Parser<String> quoted(char begin, char end); @Deprecated static Parser<String> quoted(Parser<Void> begin, Parser<Void> end, Parser<?> quoted); static Parser<Void> nestedScanner(final Parser<?> outer, final Parser<Void> inner); static final Parser<Void> WHITESPACES; static final Parser<Void> ANY_CHAR; static final Parser<Void> JAVA_LINE_COMMENT; static final Parser<Void> SQL_LINE_COMMENT; static final Parser<Void> HASKELL_LINE_COMMENT; static final Parser<Void> JAVA_BLOCK_COMMENT; static final Parser<Void> SQL_BLOCK_COMMENT; static final Parser<Void> HASKELL_BLOCK_COMMENT; static final Parser<String> SINGLE_QUOTE_STRING; static final Parser<String> DOUBLE_QUOTE_STRING; static final Parser<String> SINGLE_QUOTE_CHAR; static final Parser<Void> JAVA_DELIMITER; static final Parser<Void> HASKELL_DELIMITER; static final Parser<Void> SQL_DELIMITER; static final Parser<String> IDENTIFIER; static final Parser<String> INTEGER; static final Parser<String> DECIMAL; static final Parser<String> DEC_INTEGER; static final Parser<String> OCT_INTEGER; static final Parser<String> HEX_INTEGER; static final Parser<String> SCIENTIFIC_NOTATION; }
@Test public void testNotAmong() { Parser<Void> scanner = Scanners.notAmong("ab"); assertNull(scanner.parse("0")); assertScanner(mode, scanner, "0a", "a"); assertFailure(mode, scanner, "a", 1, 1, "^[ab] expected, a encountered."); assertFailure(mode, scanner, "b", 1, 1); assertFailure(mode, scanner, "", 1, 1); }
@Test public void testNotAmong_noChars() { Parser<Void> scanner = Scanners.notAmong(""); assertNull(scanner.parse("0")); assertScanner(mode, scanner, "ab", "b"); assertFailure(mode, scanner, "", 1, 1, "any character expected, EOF encountered."); }
@Test public void testNotAmong_oneChar() { Parser<Void> scanner = Scanners.notAmong("a"); assertNull(scanner.parse("0")); assertScanner(mode, scanner, "0a", "a"); assertFailure(mode, scanner, "a", 1, 1); assertFailure(mode, scanner, "", 1, 1); }