[Mulgara-svn] r436 - branches/nw-interface/src/jar/parser/java/org/mulgara/parser

pag at mulgara.org pag at mulgara.org
Thu Sep 13 20:39:54 UTC 2007


Author: pag
Date: 2007-09-13 15:39:54 -0500 (Thu, 13 Sep 2007)
New Revision: 436

Modified:
   branches/nw-interface/src/jar/parser/java/org/mulgara/parser/Interpreter.java
   branches/nw-interface/src/jar/parser/java/org/mulgara/parser/MulgaraLexerException.java
   branches/nw-interface/src/jar/parser/java/org/mulgara/parser/MulgaraParserException.java
Log:
Updated exceptions to more easily wrap their SableCC counterparts.  The interpreter class now completely avoids SableCC

Modified: branches/nw-interface/src/jar/parser/java/org/mulgara/parser/Interpreter.java
===================================================================
--- branches/nw-interface/src/jar/parser/java/org/mulgara/parser/Interpreter.java	2007-09-13 20:38:37 UTC (rev 435)
+++ branches/nw-interface/src/jar/parser/java/org/mulgara/parser/Interpreter.java	2007-09-13 20:39:54 UTC (rev 436)
@@ -61,10 +61,10 @@
   * @return An AST for the command
   * @throws MulgaraParserException if the syntax of the command is incorrect
   * @throws MulgaraLexerException if the syntax of the command is incorrect
-  * @throws IOException if the <var>command</var> cannot be paersed
+  * @throws IOException if the <var>command</var> cannot be parsed
   * @throws IllegalArgumentException if the <var>command</var> is <code>null</code>
   */
-  public Command parseCommand(String command) throws MulgaraParserException, MulgaraLexerException, Exception;
+  public Command parseCommand(String command) throws MulgaraParserException, MulgaraLexerException, IllegalArgumentException, IOException;
   
   /**
   * Parses the given TQL command.
@@ -73,10 +73,10 @@
   * @return A {@link List} of ASTs, one for each command
   * @throws MulgaraParserException if the syntax of the command is incorrect
   * @throws MulgaraLexerException if the syntax of the command is incorrect
-  * @throws IOException if the <var>command</var> cannot be paersed
+  * @throws IOException if the <var>command</var> cannot be parsed
   * @throws IllegalArgumentException if the <var>command</var> is <code>null</code>
   */
-  public List<Command> parseCommands(String command) throws MulgaraParserException, MulgaraLexerException, Exception;
+  public List<Command> parseCommands(String command) throws MulgaraParserException, MulgaraLexerException, IOException, IllegalArgumentException;
   
   /**
   * Parse a string into a {@link Query}. Convenience method over parseCommand.

Modified: branches/nw-interface/src/jar/parser/java/org/mulgara/parser/MulgaraLexerException.java
===================================================================
--- branches/nw-interface/src/jar/parser/java/org/mulgara/parser/MulgaraLexerException.java	2007-09-13 20:38:37 UTC (rev 435)
+++ branches/nw-interface/src/jar/parser/java/org/mulgara/parser/MulgaraLexerException.java	2007-09-13 20:39:54 UTC (rev 436)
@@ -9,7 +9,7 @@
   }
 
   public MulgaraLexerException(Throwable cause) {
-    super(cause);
+    super(cause.getMessage(), cause);
   }
 
   public MulgaraLexerException(String message, Throwable cause) {

Modified: branches/nw-interface/src/jar/parser/java/org/mulgara/parser/MulgaraParserException.java
===================================================================
--- branches/nw-interface/src/jar/parser/java/org/mulgara/parser/MulgaraParserException.java	2007-09-13 20:38:37 UTC (rev 435)
+++ branches/nw-interface/src/jar/parser/java/org/mulgara/parser/MulgaraParserException.java	2007-09-13 20:39:54 UTC (rev 436)
@@ -9,7 +9,7 @@
   }
 
   public MulgaraParserException(Throwable cause) {
-    super(cause);
+    super(cause.getMessage(), cause);
   }
 
   public MulgaraParserException(String message, Throwable cause) {




More information about the Mulgara-svn mailing list