Package jminusminus

Class Scanner

java.lang.Object
jminusminus.Scanner

class Scanner extends Object
A lexical analyzer for j--, that has no backtracking mechanism.
  • Field Details

  • Constructor Details

  • Method Details

    • getNextToken

      public TokenInfo getNextToken()
      Scans and returns the next token from input.
      Returns:
      the next scanned token.
    • errorHasOccurred

      public boolean errorHasOccurred()
      Returns true if an error has occurred, and false otherwise.
      Returns:
      true if an error has occurred, and false otherwise.
    • fileName

      public String fileName()
      Returns the name of the source file.
      Returns:
      the name of the source file.