projects
/
org.ibex.core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
2003/06/09 06:38:36
[org.ibex.core.git]
/
src
/
org
/
xwt
/
js
/
Lexer.java
diff --git
a/src/org/xwt/js/Lexer.java
b/src/org/xwt/js/Lexer.java
index
f7039f4
..
4752c64
100644
(file)
--- a/
src/org/xwt/js/Lexer.java
+++ b/
src/org/xwt/js/Lexer.java
@@
-25,7
+25,7
@@
class Lexer implements Tokens {
/** for debugging */
public static void main(String[] s) throws Exception {
/** for debugging */
public static void main(String[] s) throws Exception {
- Lexer l = new Lexer(new InputStreamReader(System.in));
+ Lexer l = new Lexer(new InputStreamReader(System.in), "stdin", 0);
int tok = 0;
while((tok = l.getToken()) != -1) System.out.println(codeToString[tok]);
}
int tok = 0;
while((tok = l.getToken()) != -1) System.out.println(codeToString[tok]);
}
@@
-46,10
+46,14
@@
class Lexer implements Tokens {
protected int col = 0;
/** the name of the source code file being lexed */
protected int col = 0;
/** the name of the source code file being lexed */
- protected String sourceName = "unknown";
+ protected String sourceName;
private SmartReader in;
private SmartReader in;
- public Lexer(Reader r) throws IOException { in = new SmartReader(r); }
+ public Lexer(Reader r, String sourceName, int line) throws IOException {
+ this.sourceName = sourceName;
+ this.line = line;
+ in = new SmartReader(r);
+ }
// Predicates ///////////////////////////////////////////////////////////////////////
// Predicates ///////////////////////////////////////////////////////////////////////