Class LexicalAnalyzer


  • class LexicalAnalyzer
    extends java.lang.Object
    Version:
    4.8
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) static int Beginning  
      (package private) static int DOT  
      (package private) static int EOF  
      private java.io.StreamTokenizer input  
      (package private) static int INVALID_CHAR  
      (package private) static int LEFT_PAREN  
      (package private) static int NO_TOKEN  
      (package private) static int Operator  
      (package private) static int PLUS  
      (package private) static int RIGHT_PAREN  
      (package private) static int STAR  
      (package private) static int WORD  
    • Constructor Summary

      Constructors 
      Constructor Description
      LexicalAnalyzer​(java.io.StringReader in)
      Constructor creating a Lexical Analyzer.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) java.lang.String getString()
      Return the string recognized as word token or the body of a quoted string.
      (package private) int nextToken()
      Return the type of the next token.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LexicalAnalyzer

        LexicalAnalyzer​(java.io.StringReader in)
        Constructor creating a Lexical Analyzer.
        Parameters:
        in - the StringReader providing the characters which are being analyzed.
    • Method Detail

      • getString

        java.lang.String getString()
        Return the string recognized as word token or the body of a quoted string.
      • nextToken

        int nextToken()
        Return the type of the next token. For word and quoted string tokens, the string that the token represents can be fetched by calling the getString method.