class MyDecafLexer extends DecafLexer
Constructor and Description |
---|
MyDecafLexer() |
Modifier and Type | Method and Description |
---|---|
Queue<Token> |
lex(BufferedReader input,
String filename)
Perform lexical analysis, converting Decaf source code into a stream of
Token objects. |
addIgnoredPattern, addTokenPattern, discardIgnored, extract, getLastMatch, lex, lex, lex, nextToken
public Queue<Token> lex(BufferedReader input, String filename) throws IOException, InvalidTokenException
Token
objects.lex
in class DecafLexer
input
- Input text readerfilename
- Source file name (for source info)IOException
- Thrown if there is an error reading from the inputInvalidTokenException
- Thrown if an invalid token is encounteredCopyright © 2019. All rights reserved.