Package jminusminus
Class Scanner
java.lang.Object
jminusminus.Scanner
A lexical analyzer for j--, that has no backtracking mechanism.
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanReturns true if an error has occurred, and false otherwise.fileName()Returns the name of the source file.Scans and returns the next token from input.
- 
Field Details- 
EOFCHpublic static final char EOFCH- See Also:
 
 
- 
- 
Constructor Details- 
ScannerConstructs a Scanner from a file name.- Parameters:
- fileName- name of the source file.
- Throws:
- FileNotFoundException- when the named file cannot be found.
 
 
- 
- 
Method Details- 
getNextTokenScans and returns the next token from input.- Returns:
- the next scanned token.
 
- 
errorHasOccurredpublic boolean errorHasOccurred()Returns true if an error has occurred, and false otherwise.- Returns:
- true if an error has occurred, and false otherwise.
 
- 
fileNameReturns the name of the source file.- Returns:
- the name of the source file.
 
 
-