Class DefaultScanner

  • All Implemented Interfaces:
    Scanner
    Direct Known Subclasses:
    PostgresScanner

    public class DefaultScanner
    extends Object
    implements Scanner
    A Scanner for standard SQL and many common variants.
    Author:
    Carl Harris
    • Field Detail

      • INSTANCE

        public static final Scanner INSTANCE
    • Method Detail

      • scanTokens

        public final List<Token> scanTokens​(org.soulwing.jdbc.source.SourceReader reader,
                                            org.soulwing.jdbc.source.ErrorReporter errorReporter)
                                     throws IOException
        Specified by:
        scanTokens in interface Scanner
        Throws:
        IOException
      • nextToken

        protected Token nextToken​(org.soulwing.jdbc.source.DefaultScanner.Request request)
                           throws IOException
        Throws:
        IOException
      • scanToken

        protected Token scanToken​(char c,
                                  org.soulwing.jdbc.source.DefaultScanner.Request request)
                           throws IOException
        Throws:
        IOException
      • blockComment

        protected Token blockComment​(org.soulwing.jdbc.source.DefaultScanner.Request request)
                              throws IOException
        Throws:
        IOException
      • lineComment

        protected Token lineComment​(org.soulwing.jdbc.source.DefaultScanner.Request request)
                             throws IOException
        Throws:
        IOException
      • whitespace

        protected Token whitespace​(org.soulwing.jdbc.source.DefaultScanner.Request request)
                            throws IOException
        Throws:
        IOException
      • identifier

        protected Token identifier​(org.soulwing.jdbc.source.DefaultScanner.Request request)
                            throws IOException
        Throws:
        IOException
      • quotedIdentifier

        protected Token quotedIdentifier​(org.soulwing.jdbc.source.DefaultScanner.Request request)
                                  throws IOException
        Throws:
        IOException
      • operator

        protected Token operator​(org.soulwing.jdbc.source.DefaultScanner.Request request)
                          throws IOException
        Throws:
        IOException
      • tokenOf

        protected Token tokenOf​(Token.Type type,
                                org.soulwing.jdbc.source.DefaultScanner.Request request)
      • isOperator

        protected boolean isOperator​(char c)
      • isIdentifierStart

        protected boolean isIdentifierStart​(char c)
      • isIdentifierChar

        protected boolean isIdentifierChar​(char c)
      • isNumberChar

        protected boolean isNumberChar​(char c)
      • isAlphaNumeric

        protected boolean isAlphaNumeric​(char c)
      • isAlpha

        protected boolean isAlpha​(char c)
      • isNumeric

        protected boolean isNumeric​(char c)
      • isWhitespace

        protected boolean isWhitespace​(char c)