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
/
ParseFailed.java
diff --git
a/src/edu/berkeley/sbp/ParseFailed.java
b/src/edu/berkeley/sbp/ParseFailed.java
index
eb11b11
..
619bf65
100644
(file)
--- a/
src/edu/berkeley/sbp/ParseFailed.java
+++ b/
src/edu/berkeley/sbp/ParseFailed.java
@@
-8,7
+8,8
@@
import java.io.*;
import java.util.*;
/** thrown when the parser arrives at a state from which it is clear that no valid parse can result */
import java.util.*;
/** thrown when the parser arrives at a state from which it is clear that no valid parse can result */
-public class ParseFailed extends RuntimeException {
+public class ParseFailed extends Exception {
+
private final Input.Location location;
private final String message;
public ParseFailed() { this("", null); }
private final Input.Location location;
private final String message;
public ParseFailed() { this("", null); }
@@
-22,11
+23,11
@@
public class ParseFailed extends RuntimeException {
if (touched.contains(n)) return;
touched.add(n);
for(Position p : n.state) {
if (touched.contains(n)) return;
touched.add(n);
for(Position p : n.state) {
- if (((p.isFirst() || p.isLast()) && !force) || p.owner().name==null) {
+ if (((p.isFirst() || p.isLast()) && !force)/* || p.owner().name==null*/) {
for(Node n2 : n.parents())
complain(n2, errors, force | p.isFirst());
} else {
for(Node n2 : n.parents())
complain(n2, errors, force | p.isFirst());
} else {
- String seqname = p.owner().name;
+ String seqname = p.owner()/*.name*/+"";
HashSet<String> hs = errors.get(seqname);
if (hs==null) errors.put(seqname, hs = new HashSet<String>());
hs.add(p.element()+"");
HashSet<String> hs = errors.get(seqname);
if (hs==null) errors.put(seqname, hs = new HashSet<String>());
hs.add(p.element()+"");