Adding JMCR-Stable version
[Benchmarks_CSolver.git] / JMCR-Stable / real-world application / MyDerby-10.3 / java / engine / org / apache / derby / iapi / sql / compile / Parser.java
diff --git a/JMCR-Stable/real-world application/MyDerby-10.3/java/engine/org/apache/derby/iapi/sql/compile/Parser.java b/JMCR-Stable/real-world application/MyDerby-10.3/java/engine/org/apache/derby/iapi/sql/compile/Parser.java
new file mode 100644 (file)
index 0000000..69423e1
--- /dev/null
@@ -0,0 +1,75 @@
+/*\r
+\r
+   Derby - Class org.apache.derby.iapi.sql.compile.Parser\r
+\r
+   Licensed to the Apache Software Foundation (ASF) under one or more\r
+   contributor license agreements.  See the NOTICE file distributed with\r
+   this work for additional information regarding copyright ownership.\r
+   The ASF licenses this file to you under the Apache License, Version 2.0\r
+   (the "License"); you may not use this file except in compliance with\r
+   the License.  You may obtain a copy of the License at\r
+\r
+      http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+   Unless required by applicable law or agreed to in writing, software\r
+   distributed under the License is distributed on an "AS IS" BASIS,\r
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+   See the License for the specific language governing permissions and\r
+   limitations under the License.\r
+\r
+ */\r
+\r
+package org.apache.derby.iapi.sql.compile;\r
+\r
+import org.apache.derby.iapi.error.StandardException;\r
+\r
+/* Strictly speaking we shouldn't import classes under the impl hierarchy here\r
+ * but this is work in progress.\r
+ * manish - Wed Mar 28 13:05:19 PST 2001\r
+ */\r
+import org.apache.derby.impl.sql.compile.StatementNode;\r
+\r
+/**\r
+ * The Parser interface is intended to work with Jack-generated parsers (now JavaCC).\r
+ * We will specify "STATIC=false" when building Jack parsers - this specifies\r
+ * that the generated classes will not be static, which will allow there to be\r
+ * more than one parser (this is necessary in a multi-threaded server).\r
+ * Non-static parsers do not have to be re-initialized every time they are\r
+ * used (unlike static parsers, for which one must call ReInit() between calls\r
+ * to the parser).\r
+ *\r
+ */\r
+\r
+\r
+public interface Parser\r
+{\r
+\r
+       /**\r
+        * Parses the given statement and returns a query tree. The query tree\r
+        * at this point is a simple syntactic translation of the statement.\r
+        * No binding will have taken place, and no decisions will have been\r
+        * made regarding processing strategy.\r
+        *\r
+        * @param statementSQLText      The Statement to parse.\r
+        * @param paramDefaults Parameter defaults\r
+        * @return      A new QueryTree representing the syntax of the Statement\r
+        *\r
+        * @exception StandardException         Thrown on failure\r
+        */\r
+       public StatementNode    parseStatement(String statementSQLText,\r
+               Object[] paramDefaults) \r
+               throws StandardException;\r
+\r
+\r
+       public StatementNode parseStatement(String statementSQLText)\r
+               throws StandardException;\r
+\r
+       /**\r
+        * Returns the current SQL text string that is being parsed.\r
+        *\r
+        * @return      Current SQL text string.\r
+        *\r
+        */\r
+       public  String          getSQLtext();\r
+\r
+}\r