Class LexerSource

java.lang.Object
foundry.veil.lib.anarres.cpp.Source
foundry.veil.lib.anarres.cpp.LexerSource
All Implemented Interfaces:
Closeable, AutoCloseable, Iterable<Token>
Direct Known Subclasses:
StringLexerSource

public class LexerSource extends Source
Does not handle digraphs.
  • Constructor Details

    • LexerSource

      public LexerSource(Reader r, boolean ppvalid)
  • Method Details

    • getLine

      public int getLine()
      Returns the line number of the last read character in this source.

      Lines are numbered from 1.

      Overrides:
      getLine in class Source
      Returns:
      the line number of the last read character in this source.
    • getColumn

      public int getColumn()
      Returns the column number of the last read character in this source.

      Columns are numbered from 0.

      Overrides:
      getColumn in class Source
      Returns:
      the column number of the last read character in this source.
    • token

      public Token token() throws IOException, LexerException
      Description copied from class: Source
      Returns the next Token parsed from this input stream.
      Specified by:
      token in class Source
      Throws:
      IOException
      LexerException
      See Also:
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class Source
      Throws:
      IOException