Class Tokenizer


  • public final class Tokenizer
    extends java.lang.Object
    Internal tokenizer to extract next token from reader.
    • Field Detail

      • blockCommentsAllowed

        private final boolean blockCommentsAllowed
      • zeroSingleQuotationAllowed

        private final boolean zeroSingleQuotationAllowed
      • zeroQuotationAllowsWhitespaceChar

        private final boolean zeroQuotationAllowsWhitespaceChar
      • reader

        private final java.io.Reader reader
      • prevTokenLine

        private int prevTokenLine
      • prevTokenPos

        private int prevTokenPos
      • lastTokenLine

        private int lastTokenLine
      • lastTokenPos

        private int lastTokenPos
      • prevPos

        private int prevPos
      • prevLine

        private int prevLine
      • pos

        private int pos
      • line

        private int line
    • Method Detail

      • isCharAllowedForRadix

        public static boolean isCharAllowedForRadix​(char chr,
                                                    int radix)
      • doReadChar

        private int doReadChar()
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • calcDiffAndPushResultBack

        public void calcDiffAndPushResultBack​(java.lang.String etalon,
                                              StringBuilderEx buffer)
      • push

        public void push​(char ch)
      • close

        public void close​(boolean closeReader)
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • hasOperatorStartsWith

        public boolean hasOperatorStartsWith​(java.lang.String operatorNameStartSubstring)
      • findOperatorForName

        public OpContainer findOperatorForName​(java.lang.String operatorName)
      • findOperatorForSingleChar

        public OpContainer findOperatorForSingleChar​(char c)
      • getLastTokenPos

        public int getLastTokenPos()
      • getLastTokenLine

        public int getLastTokenLine()
      • fixPosition

        public void fixPosition()
      • skipUntilBlockCommentEnd

        private void skipUntilBlockCommentEnd()
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • skipUntilNextString

        private void skipUntilNextString()
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • readNextToken

        public TokenizerResult readNextToken()
        Read next token
        Returns:
        next token or null if not found or stream ended
      • getLine

        public int getLine()
      • getPos

        public int getPos()