Class SourceCodeTokenizerInternal


  • public final class SourceCodeTokenizerInternal
    extends Object
    This class is adapted from java.io.SourceCodeTokenizer. It adds the notion of operator to the mix. You can define your own operators or use the default set of operators, which are taken from the Java Language Spec. It also captures state information for use by our parser e.g., current token location, line number and column.
    • Constructor Detail

      • SourceCodeTokenizerInternal

        public SourceCodeTokenizerInternal​(CharSequence sourceCode)
      • SourceCodeTokenizerInternal

        public SourceCodeTokenizerInternal​(Reader reader)
      • SourceCodeTokenizerInternal

        public SourceCodeTokenizerInternal​(SourceCodeReader reader)
    • Method Detail

      • copy

        public Token copy()
      • reset

        public void reset()
      • reset

        public void reset​(Reader reader)
      • getSource

        public String getSource()
      • isWhitespaceSignificant

        public boolean isWhitespaceSignificant()
      • setWhitespaceSignificant

        public void setWhitespaceSignificant​(boolean bWhitespaceSignificant)
      • isCommentsSignificant

        public boolean isCommentsSignificant()
      • setCommentsSignificant

        public void setCommentsSignificant​(boolean bCommentsSignificant)
      • getLineNumber

        public int getLineNumber()
      • getLineOffset

        public int getLineOffset()
      • incrementLineNumber

        protected void incrementLineNumber()
      • getTokenColumn

        public int getTokenColumn()
      • wordChars

        public void wordChars​(int iLow,
                              int iHigh)
      • whitespaceChars

        public void whitespaceChars​(int iLow,
                                    int iHigh)
      • ordinaryChars

        public void ordinaryChars​(int iLow,
                                  int iHigh)
      • ordinaryChar

        public void ordinaryChar​(int ch)
      • getDefaultOperators

        public static String[] getDefaultOperators()
      • getDefaultBindingOperators

        public static List<String> getDefaultBindingOperators()
      • getBitshiftOperators

        public static String[] getBitshiftOperators()
      • operators

        public void operators​(String[] astrOperators)
      • operatorChars

        public void operatorChars​(int iLow,
                                  int iHigh)
      • bitshiftOperatorChars

        public void bitshiftOperatorChars​(int iLow,
                                          int iHigh)
      • isOperator

        public boolean isOperator​(String strOperator)
      • commentChar

        public void commentChar​(int ch)
      • quoteChar

        public void quoteChar​(int ch)
      • charQuoteChar

        public void charQuoteChar​(int ch)
      • parseNumbers

        public void parseNumbers()
      • eolIsSignificant

        public void eolIsSignificant​(boolean bFlag)
      • lowerCaseMode

        public void lowerCaseMode​(boolean bLowerCaseMode)
      • isUnterminatedString

        public boolean isUnterminatedString()
      • isUnterminatedComment

        public boolean isUnterminatedComment()
      • setParseDotsAsOperators

        public void setParseDotsAsOperators​(boolean parseDotsAsOperators)
      • isParseDotsAsOperators

        public boolean isParseDotsAsOperators()
      • getTokenStart

        public int getTokenStart()
      • getTokenEnd

        public int getTokenEnd()
      • isAnalyzingSeparately

        public boolean isAnalyzingSeparately()
      • isAnalyzingDirective

        public boolean isAnalyzingDirective()
      • getTokens

        public final Stack<Token> getTokens()
      • getType

        public int getType()
      • isEOF

        public boolean isEOF()
      • isNOTHING

        public boolean isNOTHING()
      • getEofToken

        public Token getEofToken()
      • isSupportsKeywords

        public boolean isSupportsKeywords()
      • setSupportsKeywords

        public void setSupportsKeywords​(boolean supportsKeywords)