public class CppReader extends Reader implements Closeable
Reader
which preprocesses the input text.Preprocessor,
Reader| Constructor and Description |
|---|
CppReader(Preprocessor p) |
CppReader(Reader r) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMacro(String name)
Defines the given name as a macro.
|
void |
addMacro(String name,
String value)
Defines the given name as a macro.
|
void |
close() |
Preprocessor |
getPreprocessor()
Returns the Preprocessor used by this CppReader.
|
int |
read() |
int |
read(char[] cbuf,
int off,
int len) |
public CppReader(Reader r)
public CppReader(Preprocessor p)
public Preprocessor getPreprocessor()
public void addMacro(String name) throws LexerException
LexerExceptionpublic void addMacro(String name, String value) throws LexerException
LexerExceptionpublic int read()
throws IOException
read in class ReaderIOExceptionpublic int read(char[] cbuf,
int off,
int len)
throws IOException
read in class ReaderIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class ReaderIOException