public class CppReader extends java.io.Reader implements java.io.Closeable
Reader
which preprocesses the input text.Preprocessor,
Reader| Constructor and Description |
|---|
CppReader(Preprocessor p) |
CppReader(java.io.Reader r) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMacro(java.lang.String name)
Defines the given name as a macro.
|
void |
addMacro(java.lang.String name,
java.lang.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(@Nonnull java.io.Reader r)
public CppReader(@Nonnull Preprocessor p)
@Nonnull public Preprocessor getPreprocessor()
public void addMacro(@Nonnull java.lang.String name) throws LexerException
LexerExceptionpublic void addMacro(@Nonnull java.lang.String name, @Nonnull java.lang.String value) throws LexerException
LexerExceptionpublic int read() throws java.io.IOException
read in class java.io.Readerjava.io.IOExceptionpublic int read(char[] cbuf, int off, int len) throws java.io.IOException
read in class java.io.Readerjava.io.IOExceptionpublic void close() throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.Readerjava.io.IOException