Class InputLexerSource

All Implemented Interfaces:
Closeable, AutoCloseable, Iterable<Token>

public class InputLexerSource extends LexerSource
A Source which lexes a file. The input is buffered.
See Also:
  • Constructor Details

    • InputLexerSource

      public InputLexerSource(InputStream input) throws IOException
      Creates a new Source for lexing the given Reader. Preprocessor directives are honoured within the file.
      Throws:
      IOException
  • Method Details

    • getPath

      public String getPath()
      Description copied from class: Source
      Returns the File currently being lexed. If this Source is not a FileLexerSource, then it will ask the parent Source, and so forth recursively. If no Source on the stack is a FileLexerSource, returns null.
      Overrides:
      getPath in class Source
    • getName

      public String getName()
      Description copied from class: Source
      Returns the human-readable name of the current Source.
      Overrides:
      getName in class Source
    • toString

      public String toString()
      Overrides:
      toString in class Object