public class ContinuationReader extends Reader
Reader
which completely omits C/C++ continuation character
sequences from an underlying reader. Specifically the sequences \ \n
(backslash, carriage return), or \ \r \n
(backslash, line feed,
carriage return).
This reader exists because to modify a JavaCC lexer to understand arbitrary continuations inside of any token is cumbersome, and just removing them from the input entirely is easier to implement. See this discussion on the JavaCC mailing list on line continuation character.
Modifier and Type | Field and Description |
---|---|
protected PushbackReader |
in
the original stream is wrapped in this pushback reader.
|
Constructor and Description |
---|
ContinuationReader(Reader in)
Creates a new
ContinuationReader which filters the given reader. |
protected final PushbackReader in
public ContinuationReader(Reader in)
ContinuationReader
which filters the given reader.in
- the given readerpublic int read(char[] cbuf, int off, int len) throws IOException
read
in class Reader
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class Reader
IOException
Copyright © 2002-2016 InfoEther. All Rights Reserved.