edu.cornell.cs.cs4120.testing
Interface CompilationUnitLexerFactory

All Superinterfaces:
LexerFactory

public interface CompilationUnitLexerFactory
extends LexerFactory

A factory for instantiating lexer instances that also takes the name of the compilation unit. You may implement this for PA1, but this is not mandatory.


Method Summary
 Lexer newLexer(Reader reader, String name)
          Creates a lexer that reads tokens from the given reader.
 
Methods inherited from interface edu.cornell.cs.cs4120.testing.LexerFactory
newLexer
 

Method Detail

newLexer

Lexer newLexer(Reader reader,
               String name)
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
name - the name of the compilation unit
Returns:
an initialized Lexer that will read tokens from the given reader