projects
/
sbp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
checkpoint
[sbp.git]
/
src
/
edu
/
berkeley
/
sbp
/
tib
/
Tib.java
diff --git
a/src/edu/berkeley/sbp/tib/Tib.java
b/src/edu/berkeley/sbp/tib/Tib.java
index
0237e64
..
a3fd568
100644
(file)
--- a/
src/edu/berkeley/sbp/tib/Tib.java
+++ b/
src/edu/berkeley/sbp/tib/Tib.java
@@
-1,6
+1,4
@@
-// Copyright 2005 the Contributors, as shown in the revision logs.
-// Licensed under the Apache Public Source License 2.0 ("the License").
-// You may not use this file except in compliance with the License.
+// Copyright 2006 all rights reserved; see LICENSE file for BSD-style license
package edu.berkeley.sbp.tib;
import edu.berkeley.sbp.*;
package edu.berkeley.sbp.tib;
import edu.berkeley.sbp.*;
@@
-26,6
+24,8
@@
import java.io.*;
*/
public class Tib implements Input<Character> {
*/
public class Tib implements Input<Character> {
+ public String showRegion(Region<Character> r) { return null; }
+
public Tib(String s) throws IOException { this(new StringReader(s)); }
public Tib(Reader r) throws IOException { this(new BufferedReader(r)); }
public Tib(InputStream is) throws IOException { this(new BufferedReader(new InputStreamReader(is))); }
public Tib(String s) throws IOException { this(new StringReader(s)); }
public Tib(Reader r) throws IOException { this(new BufferedReader(r)); }
public Tib(InputStream is) throws IOException { this(new BufferedReader(new InputStreamReader(is))); }
@@
-42,7
+42,8
@@
public class Tib implements Input<Character> {
int _row = 1;
int _col = 0;
int _row = 1;
int _col = 0;
- public Input.Location getLocation() { return new Cartesian.Location(_col, _row); }
+ int _scalar = 0;
+ public Input.Location getLocation() { return new Cartesian.Location(_col, _row, _scalar); }
private BufferedReader br;
char left = CharAtom.left;
private BufferedReader br;
char left = CharAtom.left;
@@
-83,6
+84,7
@@
public class Tib implements Input<Character> {
return null;
}
c = (char)i;
return null;
}
c = (char)i;
+ _scalar++;
if (c=='\n') { _row++; _col=0; }
else _col++;
}
if (c=='\n') { _row++; _col=0; }
else _col++;
}