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.
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 readname
- the name of the compilation unit
- Returns:
- an initialized
Lexer
that will read tokens from the
given reader