factored exceptions into non-inner classes
[sbp.git] / src / edu / berkeley / sbp / GSS.java
index cff543d..8053ae8 100644 (file)
@@ -154,10 +154,10 @@ class GSS {
             return ret.toString();
         }
         
-        public boolean isDone() throws Parser.Failed {
+        public boolean isDone() throws ParseFailed {
             if (token != null) return false;
             if (token==null && finalResult==null)
-                throw new Parser.Failed(error(red("unexpected end of file\n")),
+                throw new ParseFailed(error(red("unexpected end of file\n")),
                                         getLocation());
             return true;
         }
@@ -304,7 +304,7 @@ class GSS {
         }
 
         /** perform all shift operations, adding promoted nodes to <tt>next</tt> */
-        public void shift(Phase next, Forest result) throws Parser.Failed {
+        public void shift(Phase next, Forest result) throws ParseFailed {
             if (prev!=null) prev.hash = null;
             this.next = next;
             closed = true;
@@ -320,10 +320,10 @@ class GSS {
             }
 
             if (!good && token!=null)
-                throw new Parser.Failed(error(red("unexpected character")+" "+purple(token)+" encountered at "+green(getLocation())+"\n"),
+                throw new ParseFailed(error(red("unexpected character")+" "+purple(token)+" encountered at "+green(getLocation())+"\n"),
                                         getLocation());
             if (token==null && finalResult==null)
-                throw new Parser.Failed(error(red("unexpected end of file\n")),
+                throw new ParseFailed(error(red("unexpected end of file\n")),
                                         getLocation());
 
             // this massively improves GC performance