Package com.jogamp.gluegen.jcpp
Class LexerSource
- java.lang.Object
-
- com.jogamp.gluegen.jcpp.Source
-
- com.jogamp.gluegen.jcpp.LexerSource
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Iterable<Token>
- Direct Known Subclasses:
InputLexerSource
,StringLexerSource
public class LexerSource extends Source
Does not handle digraphs.
-
-
Constructor Summary
Constructors Constructor Description LexerSource(Reader r, boolean ppvalid)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
int
getColumn()
Returns the column number of the last read character in this source.int
getLine()
Returns the line number of the last read character in this source.protected static BufferedReader
toBufferedReader(Reader r)
Token
token()
Returns the next Token parsed from this input stream.-
Methods inherited from class com.jogamp.gluegen.jcpp.Source
error, getName, getParent, getPath, iterator, setListener, skipline, warning
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
LexerSource
public LexerSource(Reader r, boolean ppvalid)
-
-
Method Detail
-
toBufferedReader
@Nonnull protected static BufferedReader toBufferedReader(@Nonnull Reader r)
-
getLine
public int getLine()
Returns the line number of the last read character in this source. Lines are numbered from 1.
-
getColumn
public int getColumn()
Returns the column number of the last read character in this source. Columns are numbered from 0.
-
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 classSource
- Throws:
IOException
LexerException
- See Also:
Token
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classSource
- Throws:
IOException
-
-