org.anarres.cpp
Class LexerSource
java.lang.Object
org.anarres.cpp.Source
org.anarres.cpp.LexerSource
- All Implemented Interfaces:
- Closeable, Iterable<Token>
- Direct Known Subclasses:
- FileLexerSource, InputLexerSource, StringLexerSource
public class LexerSource
- extends Source
Does not handle digraphs.
Method Summary |
void |
close()
|
int |
getColumn()
Returns the current column number within this Source. |
int |
getLine()
Returns the current line number within this Source. |
Token |
token()
Returns the next Token parsed from this input stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LexerSource
public LexerSource(Reader r,
boolean ppvalid)
getLine
public int getLine()
- Description copied from class:
Source
- Returns the current line number within this Source.
- Overrides:
getLine
in class Source
getColumn
public int getColumn()
- Description copied from class:
Source
- Returns the current column number within this Source.
- Overrides:
getColumn
in class Source
token
public Token token()
throws IOException,
LexerException
- Description copied from class:
Source
- Returns the next Token parsed from this input stream.
- Specified by:
token
in class Source
- Throws:
IOException
LexerException
- See Also:
Token
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Overrides:
close
in class Source
- Throws:
IOException
Copyright © 2007 Shevek, Anarres. All Rights Reserved.