aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/sun/gluegen/pcpp/PCPP.java
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2006-10-14 21:53:55 +0000
committerKenneth Russel <[email protected]>2006-10-14 21:53:55 +0000
commit3e4b755db1bdcf103eb75deaed0b91a22c5a38ea (patch)
treeb8335cea6c128246f8734911266f5ac15f31dd09 /src/java/com/sun/gluegen/pcpp/PCPP.java
parent23fdd9dbd509c921e1408f8c36caa57252118963 (diff)
Fixed Issue 3: Support for backslash line-splitting by PCPP
Added ConcatenatingReader class and used it internally in PCPP to stitch together lines ending in backslash/newline. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/gluegen/trunk@49 a78bb65f-1512-4460-ba86-f6dc96a7bf27
Diffstat (limited to 'src/java/com/sun/gluegen/pcpp/PCPP.java')
-rw-r--r--src/java/com/sun/gluegen/pcpp/PCPP.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/java/com/sun/gluegen/pcpp/PCPP.java b/src/java/com/sun/gluegen/pcpp/PCPP.java
index 54bcda9..3978e18 100644
--- a/src/java/com/sun/gluegen/pcpp/PCPP.java
+++ b/src/java/com/sun/gluegen/pcpp/PCPP.java
@@ -58,7 +58,14 @@ public class PCPP {
public void setOut(OutputStream out) { this.out = out; writer = new PrintWriter(out); }
public void run(Reader reader, String filename) throws IOException {
- StreamTokenizer tok = new StreamTokenizer(reader);
+ StreamTokenizer tok = null;
+ BufferedReader bufReader = null;
+ if (reader instanceof BufferedReader) {
+ bufReader = (BufferedReader) reader;
+ } else {
+ bufReader = new BufferedReader(reader);
+ }
+ tok = new StreamTokenizer(new ConcatenatingReader(bufReader));
tok.resetSyntax();
tok.wordChars('a', 'z');
tok.wordChars('A', 'Z');