edu.cornell.cs.cs4120.testing
Interface LexerFactory

All Known Subinterfaces:
CompilationUnitLexerFactory
All Known Implementing Classes:
DefaultLexerFactory

public interface LexerFactory

A factory for instantiating lexer instances. Implement this for PA1 and indicate your implementation class in your overview document.


Method Summary
 Lexer newLexer(Reader reader)
          Creates a lexer that reads tokens from the given reader.
 

Method Detail

newLexer

Lexer newLexer(Reader reader)
Creates a lexer that reads tokens from the given reader. The compilation unit for the given reader is anonymous.

Parameters:
reader - the reader from which tokens will be read
Returns:
an initialized Lexer that will read tokens from the given reader