Index: src/contrib/hbase/src/java/org/apache/hadoop/hbase/Shell.java
===================================================================
--- src/contrib/hbase/src/java/org/apache/hadoop/hbase/Shell.java (revision 573490)
+++ src/contrib/hbase/src/java/org/apache/hadoop/hbase/Shell.java (working copy)
@@ -34,7 +34,7 @@
/**
* An hbase shell.
*
- * @see HBaseShell
+ * @see HbaseShell
*/
public class Shell {
/** audible keyboard bells */
@@ -92,7 +92,7 @@
/** Return the string of prompt start string */
private static String getPrompt(final StringBuilder queryStr) {
- return (queryStr.toString().equals("")) ? "HBase > " : " --> ";
+ return (queryStr.toString().equals("")) ? "Hbase > " : " --> ";
}
/**
Index: src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/HelpContents.java
===================================================================
--- src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/HelpContents.java (revision 573490)
+++ src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/HelpContents.java (working copy)
@@ -31,8 +31,11 @@
Map load = new HashMap();
load.put("SHOW", new String[] { "List all tables.", "SHOW TABLES;" });
- load.put("FS", new String[] { "Hadoop FsShell operations.",
- "FS -copyFromLocal /home/user/backup.dat fs/user/backup;" });
+ load.put("DFS", new String[] { "Hadoop FsShell operations.",
+ "DFS -copyFromLocal /home/user/backup.dat fs/user/backup;" });
+ load.put("JAR", new String[] { "Hadoop RunJar util.",
+ "JAR jarFile [mainClass] args...;" });
+
load.put("CLEAR", new String[] {"Clear the screen.", "CLEAR;"} );
load.put("DESCRIBE", new String[] { "Describe a table's columnfamilies.",
"DESCRIBE ;" });
Index: src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/FsCommand.java
===================================================================
--- src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/FsCommand.java (revision 573490)
+++ src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/FsCommand.java (working copy)
@@ -1,49 +0,0 @@
-/**
- * Copyright 2007 The Apache Software Foundation
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.hadoop.hbase.shell;
-
-import java.util.List;
-
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.fs.FsShell;
-import org.apache.hadoop.util.ToolRunner;
-
-public class FsCommand extends BasicCommand {
- private List query;
-
- public ReturnMsg execute(Configuration conf) {
- FsShell shell = new FsShell();
- try {
- ToolRunner.run(shell, getQuery());
- shell.close();
- } catch (Exception e) {
- e.printStackTrace();
- }
- return null;
- }
-
- public void setQuery(List query) {
- this.query = query;
- }
-
- private String[] getQuery() {
- return query.toArray(new String[] {});
- }
-}
Index: src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/DfsCommand.java
===================================================================
--- src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/DfsCommand.java (revision 0)
+++ src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/DfsCommand.java (revision 0)
@@ -0,0 +1,49 @@
+/**
+ * Copyright 2007 The Apache Software Foundation
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.shell;
+
+import java.util.List;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FsShell;
+import org.apache.hadoop.util.ToolRunner;
+
+public class DfsCommand extends BasicCommand {
+ private List query;
+
+ public ReturnMsg execute(Configuration conf) {
+ FsShell shell = new FsShell();
+ try {
+ ToolRunner.run(shell, getQuery());
+ shell.close();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ public void setQuery(List query) {
+ this.query = query;
+ }
+
+ private String[] getQuery() {
+ return query.toArray(new String[] {});
+ }
+}
\ No newline at end of file
Index: src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/JarCommand.java
===================================================================
--- src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/JarCommand.java (revision 0)
+++ src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/JarCommand.java (revision 0)
@@ -0,0 +1,144 @@
+/**
+ * Copyright 2007 The Apache Software Foundation
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.shell;
+
+import java.io.File;
+import java.io.IOException;
+import java.lang.reflect.Array;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.jar.JarFile;
+import java.util.jar.Manifest;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileUtil;
+import org.apache.hadoop.util.RunJar;
+
+public class JarCommand extends BasicCommand {
+
+ private List query;
+
+ public ReturnMsg execute(Configuration conf) {
+
+ try {
+ String[] args = getQuery();
+ String usage = "JAR jarFile [mainClass] args...;\n";
+
+ if (args.length < 1) {
+ return new ReturnMsg(0, usage);
+ }
+
+ int firstArg = 0;
+ String fileName = args[firstArg++];
+ File file = new File(fileName);
+ String mainClassName = null;
+
+ JarFile jarFile;
+ try {
+ jarFile = new JarFile(fileName);
+ } catch(IOException io) {
+ throw new IOException("Error opening job jar: " + fileName + "\n")
+ .initCause(io);
+ }
+
+ Manifest manifest = jarFile.getManifest();
+ if (manifest != null) {
+ mainClassName = manifest.getMainAttributes().getValue("Main-Class");
+ }
+ jarFile.close();
+
+ if (mainClassName == null) {
+ if (args.length < 2) {
+ return new ReturnMsg(0, usage);
+ }
+ mainClassName = args[firstArg++];
+ }
+ mainClassName = mainClassName.replaceAll("/", ".");
+
+ File tmpDir = new File(new Configuration().get("hadoop.tmp.dir"));
+ tmpDir.mkdirs();
+ if (!tmpDir.isDirectory()) {
+ return new ReturnMsg(0, "Mkdirs failed to create " + tmpDir + "\n");
+ }
+ final File workDir = File.createTempFile("hadoop-unjar", "", tmpDir);
+ workDir.delete();
+ workDir.mkdirs();
+ if (!workDir.isDirectory()) {
+ return new ReturnMsg(0, "Mkdirs failed to create " + workDir + "\n");
+ }
+
+ Runtime.getRuntime().addShutdownHook(new Thread() {
+ public void run() {
+ try {
+ FileUtil.fullyDelete(workDir);
+ } catch (IOException e) {
+ }
+ }
+ });
+
+ RunJar.unJar(file, workDir);
+
+ ArrayList classPath = new ArrayList();
+ classPath.add(new File(workDir+"/").toURL());
+ classPath.add(file.toURL());
+ classPath.add(new File(workDir, "classes/").toURL());
+ File[] libs = new File(workDir, "lib").listFiles();
+ if (libs != null) {
+ for (int i = 0; i < libs.length; i++) {
+ classPath.add(libs[i].toURL());
+ }
+ }
+ ClassLoader loader =
+ new URLClassLoader(classPath.toArray(new URL[0]));
+
+ Thread.currentThread().setContextClassLoader(loader);
+ Class> mainClass = Class.forName(mainClassName, true, loader);
+ Method main = mainClass.getMethod("main", new Class[] {
+ Array.newInstance(String.class, 0).getClass()
+ });
+ String[] newArgs = (String[])Arrays.asList(args)
+ .subList(firstArg, args.length).toArray(new String[0]);
+ try {
+ main.invoke(null, new Object[] { newArgs });
+ } catch (InvocationTargetException e) {
+ throw e.getTargetException();
+ }
+
+ } catch (Throwable e) {
+ e.printStackTrace();
+ }
+
+ return new ReturnMsg(0, "\n");
+ }
+
+ public void setQuery(List query) {
+ this.query = query;
+ }
+
+ private String[] getQuery() {
+ return query.toArray(new String[] {});
+ }
+
+}
Index: src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/DfsCommand.java
===================================================================
--- src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/DfsCommand.java (revision 573490)
+++ src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/DfsCommand.java (working copy)
@@ -25,7 +25,7 @@
import org.apache.hadoop.fs.FsShell;
import org.apache.hadoop.util.ToolRunner;
-public class FsCommand extends BasicCommand {
+public class DfsCommand extends BasicCommand {
private List query;
public ReturnMsg execute(Configuration conf) {
Index: src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/ParserTokenManager.java
===================================================================
--- src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/ParserTokenManager.java (revision 573490)
+++ src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/ParserTokenManager.java (working copy)
@@ -1,4 +1,5 @@
-/* Generated By:JavaCC: Do not edit this line. ParserTokenManager.java */
+/* Generated By:JavaCC: Do not edit this line. ParserTokenManager.java */
+package org.apache.hadoop.hbase.shell.generated;
/**
* Copyright 2007 The Apache Software Foundation
*
@@ -17,1016 +18,1017 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- */
-package org.apache.hadoop.hbase.shell.generated;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.HashMap;
-import java.io.StringReader;
-import java.io.Reader;
-import org.apache.hadoop.hbase.shell.*;
-
-public class ParserTokenManager implements ParserConstants
-{
- public java.io.PrintStream debugStream = System.out;
- public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
+ */
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.HashMap;
+import java.io.StringReader;
+import java.io.Reader;
+import org.apache.hadoop.hbase.shell.*;
+
+public class ParserTokenManager implements ParserConstants
+{
+ public java.io.PrintStream debugStream = System.out;
+ public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
private final int jjStopStringLiteralDfa_0(int pos, long active0)
-{
+{
switch (pos)
- {
- case 0:
- if ((active0 & 0x1ffffe0L) != 0L)
- {
- jjmatchedKind = 32;
- return 13;
- }
- if ((active0 & 0x84000000L) != 0L)
- return 1;
- return -1;
- case 1:
- if ((active0 & 0x1000800L) != 0L)
- return 13;
- if ((active0 & 0xfff7e0L) != 0L)
- {
- jjmatchedKind = 32;
- jjmatchedPos = 1;
- return 13;
- }
- return -1;
- case 2:
- if ((active0 & 0x810000L) != 0L)
- return 13;
- if ((active0 & 0x7ef7e0L) != 0L)
- {
- jjmatchedKind = 32;
- jjmatchedPos = 2;
- return 13;
- }
- return -1;
- case 3:
- if ((active0 & 0x7ae340L) != 0L)
- {
- jjmatchedKind = 32;
- jjmatchedPos = 3;
- return 13;
- }
- if ((active0 & 0x414a0L) != 0L)
- return 13;
- return -1;
- case 4:
- if ((active0 & 0x600040L) != 0L)
- return 13;
- if ((active0 & 0x1ae300L) != 0L)
- {
- jjmatchedKind = 32;
- jjmatchedPos = 4;
- return 13;
- }
- return -1;
- case 5:
- if ((active0 & 0x1ae200L) != 0L)
- return 13;
- if ((active0 & 0x100L) != 0L)
- {
- if (jjmatchedPos != 5)
- {
- jjmatchedKind = 32;
- jjmatchedPos = 5;
- }
- return 13;
- }
- return -1;
- case 6:
- if ((active0 & 0x100100L) != 0L)
- {
- jjmatchedKind = 32;
- jjmatchedPos = 6;
- return 13;
- }
- return -1;
- case 7:
- if ((active0 & 0x100L) != 0L)
- return 13;
- if ((active0 & 0x100000L) != 0L)
- {
- jjmatchedKind = 32;
- jjmatchedPos = 7;
- return 13;
- }
- return -1;
- case 8:
- if ((active0 & 0x100000L) != 0L)
- {
- jjmatchedKind = 32;
- jjmatchedPos = 8;
- return 13;
- }
- return -1;
- case 9:
- if ((active0 & 0x100000L) != 0L)
- {
- jjmatchedKind = 32;
- jjmatchedPos = 9;
- return 13;
- }
- return -1;
- case 10:
- if ((active0 & 0x100000L) != 0L)
- {
- jjmatchedKind = 32;
- jjmatchedPos = 10;
- return 13;
- }
- return -1;
- case 11:
- if ((active0 & 0x100000L) != 0L)
- {
- jjmatchedKind = 32;
- jjmatchedPos = 11;
- return 13;
- }
- return -1;
- case 12:
- if ((active0 & 0x100000L) != 0L)
- {
- jjmatchedKind = 32;
- jjmatchedPos = 12;
- return 13;
- }
- return -1;
- default :
- return -1;
- }
-}
+ {
+ case 0:
+ if ((active0 & 0x108000000L) != 0L)
+ return 0;
+ if ((active0 & 0x3ffffe0L) != 0L)
+ {
+ jjmatchedKind = 33;
+ return 12;
+ }
+ return -1;
+ case 1:
+ if ((active0 & 0x2000000L) != 0L)
+ return 12;
+ if ((active0 & 0x1ffffe0L) != 0L)
+ {
+ jjmatchedKind = 33;
+ jjmatchedPos = 1;
+ return 12;
+ }
+ return -1;
+ case 2:
+ if ((active0 & 0x1021800L) != 0L)
+ return 12;
+ if ((active0 & 0xfde7e0L) != 0L)
+ {
+ jjmatchedKind = 33;
+ jjmatchedPos = 2;
+ return 12;
+ }
+ return -1;
+ case 3:
+ if ((active0 & 0x824a0L) != 0L)
+ return 12;
+ if ((active0 & 0xf5c340L) != 0L)
+ {
+ jjmatchedKind = 33;
+ jjmatchedPos = 3;
+ return 12;
+ }
+ return -1;
+ case 4:
+ if ((active0 & 0xc00040L) != 0L)
+ return 12;
+ if ((active0 & 0x35c300L) != 0L)
+ {
+ jjmatchedKind = 33;
+ jjmatchedPos = 4;
+ return 12;
+ }
+ return -1;
+ case 5:
+ if ((active0 & 0x35c200L) != 0L)
+ return 12;
+ if ((active0 & 0x100L) != 0L)
+ {
+ if (jjmatchedPos != 5)
+ {
+ jjmatchedKind = 33;
+ jjmatchedPos = 5;
+ }
+ return 12;
+ }
+ return -1;
+ case 6:
+ if ((active0 & 0x200100L) != 0L)
+ {
+ jjmatchedKind = 33;
+ jjmatchedPos = 6;
+ return 12;
+ }
+ return -1;
+ case 7:
+ if ((active0 & 0x200000L) != 0L)
+ {
+ jjmatchedKind = 33;
+ jjmatchedPos = 7;
+ return 12;
+ }
+ if ((active0 & 0x100L) != 0L)
+ return 12;
+ return -1;
+ case 8:
+ if ((active0 & 0x200000L) != 0L)
+ {
+ jjmatchedKind = 33;
+ jjmatchedPos = 8;
+ return 12;
+ }
+ return -1;
+ case 9:
+ if ((active0 & 0x200000L) != 0L)
+ {
+ jjmatchedKind = 33;
+ jjmatchedPos = 9;
+ return 12;
+ }
+ return -1;
+ case 10:
+ if ((active0 & 0x200000L) != 0L)
+ {
+ jjmatchedKind = 33;
+ jjmatchedPos = 10;
+ return 12;
+ }
+ return -1;
+ case 11:
+ if ((active0 & 0x200000L) != 0L)
+ {
+ jjmatchedKind = 33;
+ jjmatchedPos = 11;
+ return 12;
+ }
+ return -1;
+ case 12:
+ if ((active0 & 0x200000L) != 0L)
+ {
+ jjmatchedKind = 33;
+ jjmatchedPos = 12;
+ return 12;
+ }
+ return -1;
+ default :
+ return -1;
+ }
+}
private final int jjStartNfa_0(int pos, long active0)
-{
- return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1);
-}
-private final int jjStopAtPos(int pos, int kind)
-{
- jjmatchedKind = kind;
- jjmatchedPos = pos;
- return pos + 1;
-}
-private final int jjStartNfaWithStates_0(int pos, int kind, int state)
-{
- jjmatchedKind = kind;
- jjmatchedPos = pos;
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) { return pos + 1; }
- return jjMoveNfa_0(state, pos + 1);
-}
-private final int jjMoveStringLiteralDfa0_0()
-{
- switch(curChar)
- {
- case 40:
- return jjStopAtPos(0, 27);
- case 41:
- return jjStopAtPos(0, 28);
- case 44:
- return jjStopAtPos(0, 25);
- case 45:
- return jjStartNfaWithStates_0(0, 31, 1);
- case 46:
- return jjStartNfaWithStates_0(0, 26, 1);
- case 59:
- return jjStopAtPos(0, 37);
- case 60:
- return jjMoveStringLiteralDfa1_0(0x40000000L);
- case 61:
- return jjStopAtPos(0, 29);
- case 65:
- case 97:
- return jjMoveStringLiteralDfa1_0(0x800000L);
- case 67:
- case 99:
- return jjMoveStringLiteralDfa1_0(0x120240L);
- case 68:
- case 100:
- return jjMoveStringLiteralDfa1_0(0x4500L);
- case 69:
- case 101:
- return jjMoveStringLiteralDfa1_0(0x1000L);
- case 70:
- case 102:
- return jjMoveStringLiteralDfa1_0(0x800L);
- case 72:
- case 104:
- return jjMoveStringLiteralDfa1_0(0x20L);
- case 73:
- case 105:
- return jjMoveStringLiteralDfa1_0(0x2000L);
- case 76:
- case 108:
- return jjMoveStringLiteralDfa1_0(0x400000L);
- case 79:
- case 111:
- return jjMoveStringLiteralDfa1_0(0x1000000L);
- case 82:
- case 114:
- return jjMoveStringLiteralDfa1_0(0x10000L);
- case 83:
- case 115:
- return jjMoveStringLiteralDfa1_0(0x8080L);
- case 84:
- case 116:
- return jjMoveStringLiteralDfa1_0(0x40000L);
- case 86:
- case 118:
- return jjMoveStringLiteralDfa1_0(0x80000L);
- case 87:
- case 119:
- return jjMoveStringLiteralDfa1_0(0x200000L);
- default :
- return jjMoveNfa_0(0, 0);
- }
-}
-private final int jjMoveStringLiteralDfa1_0(long active0)
-{
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(0, active0);
- return 1;
- }
- switch(curChar)
- {
- case 62:
- if ((active0 & 0x40000000L) != 0L)
- return jjStopAtPos(1, 30);
- break;
- case 65:
- case 97:
- return jjMoveStringLiteralDfa2_0(active0, 0x80000L);
- case 69:
- case 101:
- return jjMoveStringLiteralDfa2_0(active0, 0xc120L);
- case 72:
- case 104:
- return jjMoveStringLiteralDfa2_0(active0, 0x200080L);
- case 73:
- case 105:
- return jjMoveStringLiteralDfa2_0(active0, 0x440000L);
- case 76:
- case 108:
- return jjMoveStringLiteralDfa2_0(active0, 0x40L);
- case 78:
- case 110:
- return jjMoveStringLiteralDfa2_0(active0, 0x802000L);
- case 79:
- case 111:
- return jjMoveStringLiteralDfa2_0(active0, 0x130000L);
- case 82:
- case 114:
- if ((active0 & 0x1000000L) != 0L)
- return jjStartNfaWithStates_0(1, 24, 13);
- return jjMoveStringLiteralDfa2_0(active0, 0x600L);
- case 83:
- case 115:
- if ((active0 & 0x800L) != 0L)
- return jjStartNfaWithStates_0(1, 11, 13);
- break;
- case 88:
- case 120:
- return jjMoveStringLiteralDfa2_0(active0, 0x1000L);
- default :
- break;
- }
- return jjStartNfa_0(0, active0);
-}
-private final int jjMoveStringLiteralDfa2_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(0, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(1, active0);
- return 2;
- }
- switch(curChar)
- {
- case 68:
- case 100:
- if ((active0 & 0x800000L) != 0L)
- return jjStartNfaWithStates_0(2, 23, 13);
- break;
- case 69:
- case 101:
- return jjMoveStringLiteralDfa3_0(active0, 0x200240L);
- case 73:
- case 105:
- return jjMoveStringLiteralDfa3_0(active0, 0x1000L);
- case 76:
- case 108:
- return jjMoveStringLiteralDfa3_0(active0, 0x1ac020L);
- case 77:
- case 109:
- return jjMoveStringLiteralDfa3_0(active0, 0x440000L);
- case 79:
- case 111:
- return jjMoveStringLiteralDfa3_0(active0, 0x480L);
- case 83:
- case 115:
- return jjMoveStringLiteralDfa3_0(active0, 0x2100L);
- case 87:
- case 119:
- if ((active0 & 0x10000L) != 0L)
- return jjStartNfaWithStates_0(2, 16, 13);
- break;
- default :
- break;
- }
- return jjStartNfa_0(1, active0);
-}
-private final int jjMoveStringLiteralDfa3_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(1, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(2, active0);
- return 3;
- }
- switch(curChar)
- {
- case 65:
- case 97:
- return jjMoveStringLiteralDfa4_0(active0, 0x240L);
- case 67:
- case 99:
- return jjMoveStringLiteralDfa4_0(active0, 0x100L);
- case 69:
- case 101:
- if ((active0 & 0x40000L) != 0L)
- return jjStartNfaWithStates_0(3, 18, 13);
- return jjMoveStringLiteralDfa4_0(active0, 0xe000L);
- case 73:
- case 105:
- return jjMoveStringLiteralDfa4_0(active0, 0x400000L);
- case 80:
- case 112:
- if ((active0 & 0x20L) != 0L)
- return jjStartNfaWithStates_0(3, 5, 13);
- else if ((active0 & 0x400L) != 0L)
- return jjStartNfaWithStates_0(3, 10, 13);
- break;
- case 82:
- case 114:
- return jjMoveStringLiteralDfa4_0(active0, 0x200000L);
- case 84:
- case 116:
- if ((active0 & 0x1000L) != 0L)
- return jjStartNfaWithStates_0(3, 12, 13);
- break;
- case 85:
- case 117:
- return jjMoveStringLiteralDfa4_0(active0, 0x1a0000L);
- case 87:
- case 119:
- if ((active0 & 0x80L) != 0L)
- return jjStartNfaWithStates_0(3, 7, 13);
- break;
- default :
- break;
- }
- return jjStartNfa_0(2, active0);
-}
-private final int jjMoveStringLiteralDfa4_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(2, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(3, active0);
- return 4;
- }
- switch(curChar)
- {
- case 67:
- case 99:
- return jjMoveStringLiteralDfa5_0(active0, 0x8000L);
- case 69:
- case 101:
- if ((active0 & 0x200000L) != 0L)
- return jjStartNfaWithStates_0(4, 21, 13);
- return jjMoveStringLiteralDfa5_0(active0, 0x80000L);
- case 77:
- case 109:
- return jjMoveStringLiteralDfa5_0(active0, 0x120000L);
- case 82:
- case 114:
- if ((active0 & 0x40L) != 0L)
- return jjStartNfaWithStates_0(4, 6, 13);
- return jjMoveStringLiteralDfa5_0(active0, 0x2100L);
- case 84:
- case 116:
- if ((active0 & 0x400000L) != 0L)
- return jjStartNfaWithStates_0(4, 22, 13);
- return jjMoveStringLiteralDfa5_0(active0, 0x4200L);
- default :
- break;
- }
- return jjStartNfa_0(3, active0);
-}
-private final int jjMoveStringLiteralDfa5_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(3, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(4, active0);
- return 5;
- }
- switch(curChar)
- {
- case 69:
- case 101:
- if ((active0 & 0x200L) != 0L)
- return jjStartNfaWithStates_0(5, 9, 13);
- else if ((active0 & 0x4000L) != 0L)
- return jjStartNfaWithStates_0(5, 14, 13);
- break;
- case 73:
- case 105:
- return jjMoveStringLiteralDfa6_0(active0, 0x100L);
- case 78:
- case 110:
- if ((active0 & 0x20000L) != 0L)
- {
- jjmatchedKind = 17;
- jjmatchedPos = 5;
- }
- return jjMoveStringLiteralDfa6_0(active0, 0x100000L);
- case 83:
- case 115:
- if ((active0 & 0x80000L) != 0L)
- return jjStartNfaWithStates_0(5, 19, 13);
- break;
- case 84:
- case 116:
- if ((active0 & 0x2000L) != 0L)
- return jjStartNfaWithStates_0(5, 13, 13);
- else if ((active0 & 0x8000L) != 0L)
- return jjStartNfaWithStates_0(5, 15, 13);
- break;
- default :
- break;
- }
- return jjStartNfa_0(4, active0);
-}
-private final int jjMoveStringLiteralDfa6_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(4, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(5, active0);
- return 6;
- }
- switch(curChar)
- {
- case 66:
- case 98:
- return jjMoveStringLiteralDfa7_0(active0, 0x100L);
- case 70:
- case 102:
- return jjMoveStringLiteralDfa7_0(active0, 0x100000L);
- default :
- break;
- }
- return jjStartNfa_0(5, active0);
-}
-private final int jjMoveStringLiteralDfa7_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(5, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(6, active0);
- return 7;
- }
- switch(curChar)
- {
- case 65:
- case 97:
- return jjMoveStringLiteralDfa8_0(active0, 0x100000L);
- case 69:
- case 101:
- if ((active0 & 0x100L) != 0L)
- return jjStartNfaWithStates_0(7, 8, 13);
- break;
- default :
- break;
- }
- return jjStartNfa_0(6, active0);
-}
-private final int jjMoveStringLiteralDfa8_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(6, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(7, active0);
- return 8;
- }
- switch(curChar)
- {
- case 77:
- case 109:
- return jjMoveStringLiteralDfa9_0(active0, 0x100000L);
- default :
- break;
- }
- return jjStartNfa_0(7, active0);
-}
-private final int jjMoveStringLiteralDfa9_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(7, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(8, active0);
- return 9;
- }
- switch(curChar)
- {
- case 73:
- case 105:
- return jjMoveStringLiteralDfa10_0(active0, 0x100000L);
- default :
- break;
- }
- return jjStartNfa_0(8, active0);
-}
-private final int jjMoveStringLiteralDfa10_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(8, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(9, active0);
- return 10;
- }
- switch(curChar)
- {
- case 76:
- case 108:
- return jjMoveStringLiteralDfa11_0(active0, 0x100000L);
- default :
- break;
- }
- return jjStartNfa_0(9, active0);
-}
-private final int jjMoveStringLiteralDfa11_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(9, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(10, active0);
- return 11;
- }
- switch(curChar)
- {
- case 73:
- case 105:
- return jjMoveStringLiteralDfa12_0(active0, 0x100000L);
- default :
- break;
- }
- return jjStartNfa_0(10, active0);
-}
-private final int jjMoveStringLiteralDfa12_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(10, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(11, active0);
- return 12;
- }
- switch(curChar)
- {
- case 69:
- case 101:
- return jjMoveStringLiteralDfa13_0(active0, 0x100000L);
- default :
- break;
- }
- return jjStartNfa_0(11, active0);
-}
-private final int jjMoveStringLiteralDfa13_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(11, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(12, active0);
- return 13;
- }
- switch(curChar)
- {
- case 83:
- case 115:
- if ((active0 & 0x100000L) != 0L)
- return jjStartNfaWithStates_0(13, 20, 13);
- break;
- default :
- break;
- }
- return jjStartNfa_0(12, active0);
-}
-private final void jjCheckNAdd(int state)
-{
- if (jjrounds[state] != jjround)
- {
- jjstateSet[jjnewStateCnt++] = state;
- jjrounds[state] = jjround;
- }
-}
-private final void jjAddStates(int start, int end)
-{
- do {
- jjstateSet[jjnewStateCnt++] = jjnextStates[start];
- } while (start++ != end);
-}
-private final void jjCheckNAddTwoStates(int state1, int state2)
-{
- jjCheckNAdd(state1);
- jjCheckNAdd(state2);
-}
-private final void jjCheckNAddStates(int start, int end)
-{
- do {
- jjCheckNAdd(jjnextStates[start]);
- } while (start++ != end);
-}
-private final void jjCheckNAddStates(int start)
-{
- jjCheckNAdd(jjnextStates[start]);
- jjCheckNAdd(jjnextStates[start + 1]);
-}
+{
+ return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1);
+}
+private final int jjStopAtPos(int pos, int kind)
+{
+ jjmatchedKind = kind;
+ jjmatchedPos = pos;
+ return pos + 1;
+}
+private final int jjStartNfaWithStates_0(int pos, int kind, int state)
+{
+ jjmatchedKind = kind;
+ jjmatchedPos = pos;
+ try { curChar = input_stream.readChar(); }
+ catch(java.io.IOException e) { return pos + 1; }
+ return jjMoveNfa_0(state, pos + 1);
+}
+private final int jjMoveStringLiteralDfa0_0()
+{
+ switch(curChar)
+ {
+ case 40:
+ return jjStopAtPos(0, 28);
+ case 41:
+ return jjStopAtPos(0, 29);
+ case 44:
+ return jjStopAtPos(0, 26);
+ case 45:
+ return jjStartNfaWithStates_0(0, 32, 0);
+ case 46:
+ return jjStartNfaWithStates_0(0, 27, 0);
+ case 59:
+ return jjStopAtPos(0, 38);
+ case 60:
+ return jjMoveStringLiteralDfa1_0(0x80000000L);
+ case 61:
+ return jjStopAtPos(0, 30);
+ case 65:
+ case 97:
+ return jjMoveStringLiteralDfa1_0(0x1000000L);
+ case 67:
+ case 99:
+ return jjMoveStringLiteralDfa1_0(0x240240L);
+ case 68:
+ case 100:
+ return jjMoveStringLiteralDfa1_0(0x8d00L);
+ case 69:
+ case 101:
+ return jjMoveStringLiteralDfa1_0(0x2000L);
+ case 72:
+ case 104:
+ return jjMoveStringLiteralDfa1_0(0x20L);
+ case 73:
+ case 105:
+ return jjMoveStringLiteralDfa1_0(0x4000L);
+ case 74:
+ case 106:
+ return jjMoveStringLiteralDfa1_0(0x1000L);
+ case 76:
+ case 108:
+ return jjMoveStringLiteralDfa1_0(0x800000L);
+ case 79:
+ case 111:
+ return jjMoveStringLiteralDfa1_0(0x2000000L);
+ case 82:
+ case 114:
+ return jjMoveStringLiteralDfa1_0(0x20000L);
+ case 83:
+ case 115:
+ return jjMoveStringLiteralDfa1_0(0x10080L);
+ case 84:
+ case 116:
+ return jjMoveStringLiteralDfa1_0(0x80000L);
+ case 86:
+ case 118:
+ return jjMoveStringLiteralDfa1_0(0x100000L);
+ case 87:
+ case 119:
+ return jjMoveStringLiteralDfa1_0(0x400000L);
+ default :
+ return jjMoveNfa_0(3, 0);
+ }
+}
+private final int jjMoveStringLiteralDfa1_0(long active0)
+{
+ try { curChar = input_stream.readChar(); }
+ catch(java.io.IOException e) {
+ jjStopStringLiteralDfa_0(0, active0);
+ return 1;
+ }
+ switch(curChar)
+ {
+ case 62:
+ if ((active0 & 0x80000000L) != 0L)
+ return jjStopAtPos(1, 31);
+ break;
+ case 65:
+ case 97:
+ return jjMoveStringLiteralDfa2_0(active0, 0x101000L);
+ case 69:
+ case 101:
+ return jjMoveStringLiteralDfa2_0(active0, 0x18120L);
+ case 70:
+ case 102:
+ return jjMoveStringLiteralDfa2_0(active0, 0x800L);
+ case 72:
+ case 104:
+ return jjMoveStringLiteralDfa2_0(active0, 0x400080L);
+ case 73:
+ case 105:
+ return jjMoveStringLiteralDfa2_0(active0, 0x880000L);
+ case 76:
+ case 108:
+ return jjMoveStringLiteralDfa2_0(active0, 0x40L);
+ case 78:
+ case 110:
+ return jjMoveStringLiteralDfa2_0(active0, 0x1004000L);
+ case 79:
+ case 111:
+ return jjMoveStringLiteralDfa2_0(active0, 0x260000L);
+ case 82:
+ case 114:
+ if ((active0 & 0x2000000L) != 0L)
+ return jjStartNfaWithStates_0(1, 25, 12);
+ return jjMoveStringLiteralDfa2_0(active0, 0x600L);
+ case 88:
+ case 120:
+ return jjMoveStringLiteralDfa2_0(active0, 0x2000L);
+ default :
+ break;
+ }
+ return jjStartNfa_0(0, active0);
+}
+private final int jjMoveStringLiteralDfa2_0(long old0, long active0)
+{
+ if (((active0 &= old0)) == 0L)
+ return jjStartNfa_0(0, old0);
+ try { curChar = input_stream.readChar(); }
+ catch(java.io.IOException e) {
+ jjStopStringLiteralDfa_0(1, active0);
+ return 2;
+ }
+ switch(curChar)
+ {
+ case 68:
+ case 100:
+ if ((active0 & 0x1000000L) != 0L)
+ return jjStartNfaWithStates_0(2, 24, 12);
+ break;
+ case 69:
+ case 101:
+ return jjMoveStringLiteralDfa3_0(active0, 0x400240L);
+ case 73:
+ case 105:
+ return jjMoveStringLiteralDfa3_0(active0, 0x2000L);
+ case 76:
+ case 108:
+ return jjMoveStringLiteralDfa3_0(active0, 0x358020L);
+ case 77:
+ case 109:
+ return jjMoveStringLiteralDfa3_0(active0, 0x880000L);
+ case 79:
+ case 111:
+ return jjMoveStringLiteralDfa3_0(active0, 0x480L);
+ case 82:
+ case 114:
+ if ((active0 & 0x1000L) != 0L)
+ return jjStartNfaWithStates_0(2, 12, 12);
+ break;
+ case 83:
+ case 115:
+ if ((active0 & 0x800L) != 0L)
+ return jjStartNfaWithStates_0(2, 11, 12);
+ return jjMoveStringLiteralDfa3_0(active0, 0x4100L);
+ case 87:
+ case 119:
+ if ((active0 & 0x20000L) != 0L)
+ return jjStartNfaWithStates_0(2, 17, 12);
+ break;
+ default :
+ break;
+ }
+ return jjStartNfa_0(1, active0);
+}
+private final int jjMoveStringLiteralDfa3_0(long old0, long active0)
+{
+ if (((active0 &= old0)) == 0L)
+ return jjStartNfa_0(1, old0);
+ try { curChar = input_stream.readChar(); }
+ catch(java.io.IOException e) {
+ jjStopStringLiteralDfa_0(2, active0);
+ return 3;
+ }
+ switch(curChar)
+ {
+ case 65:
+ case 97:
+ return jjMoveStringLiteralDfa4_0(active0, 0x240L);
+ case 67:
+ case 99:
+ return jjMoveStringLiteralDfa4_0(active0, 0x100L);
+ case 69:
+ case 101:
+ if ((active0 & 0x80000L) != 0L)
+ return jjStartNfaWithStates_0(3, 19, 12);
+ return jjMoveStringLiteralDfa4_0(active0, 0x1c000L);
+ case 73:
+ case 105:
+ return jjMoveStringLiteralDfa4_0(active0, 0x800000L);
+ case 80:
+ case 112:
+ if ((active0 & 0x20L) != 0L)
+ return jjStartNfaWithStates_0(3, 5, 12);
+ else if ((active0 & 0x400L) != 0L)
+ return jjStartNfaWithStates_0(3, 10, 12);
+ break;
+ case 82:
+ case 114:
+ return jjMoveStringLiteralDfa4_0(active0, 0x400000L);
+ case 84:
+ case 116:
+ if ((active0 & 0x2000L) != 0L)
+ return jjStartNfaWithStates_0(3, 13, 12);
+ break;
+ case 85:
+ case 117:
+ return jjMoveStringLiteralDfa4_0(active0, 0x340000L);
+ case 87:
+ case 119:
+ if ((active0 & 0x80L) != 0L)
+ return jjStartNfaWithStates_0(3, 7, 12);
+ break;
+ default :
+ break;
+ }
+ return jjStartNfa_0(2, active0);
+}
+private final int jjMoveStringLiteralDfa4_0(long old0, long active0)
+{
+ if (((active0 &= old0)) == 0L)
+ return jjStartNfa_0(2, old0);
+ try { curChar = input_stream.readChar(); }
+ catch(java.io.IOException e) {
+ jjStopStringLiteralDfa_0(3, active0);
+ return 4;
+ }
+ switch(curChar)
+ {
+ case 67:
+ case 99:
+ return jjMoveStringLiteralDfa5_0(active0, 0x10000L);
+ case 69:
+ case 101:
+ if ((active0 & 0x400000L) != 0L)
+ return jjStartNfaWithStates_0(4, 22, 12);
+ return jjMoveStringLiteralDfa5_0(active0, 0x100000L);
+ case 77:
+ case 109:
+ return jjMoveStringLiteralDfa5_0(active0, 0x240000L);
+ case 82:
+ case 114:
+ if ((active0 & 0x40L) != 0L)
+ return jjStartNfaWithStates_0(4, 6, 12);
+ return jjMoveStringLiteralDfa5_0(active0, 0x4100L);
+ case 84:
+ case 116:
+ if ((active0 & 0x800000L) != 0L)
+ return jjStartNfaWithStates_0(4, 23, 12);
+ return jjMoveStringLiteralDfa5_0(active0, 0x8200L);
+ default :
+ break;
+ }
+ return jjStartNfa_0(3, active0);
+}
+private final int jjMoveStringLiteralDfa5_0(long old0, long active0)
+{
+ if (((active0 &= old0)) == 0L)
+ return jjStartNfa_0(3, old0);
+ try { curChar = input_stream.readChar(); }
+ catch(java.io.IOException e) {
+ jjStopStringLiteralDfa_0(4, active0);
+ return 5;
+ }
+ switch(curChar)
+ {
+ case 69:
+ case 101:
+ if ((active0 & 0x200L) != 0L)
+ return jjStartNfaWithStates_0(5, 9, 12);
+ else if ((active0 & 0x8000L) != 0L)
+ return jjStartNfaWithStates_0(5, 15, 12);
+ break;
+ case 73:
+ case 105:
+ return jjMoveStringLiteralDfa6_0(active0, 0x100L);
+ case 78:
+ case 110:
+ if ((active0 & 0x40000L) != 0L)
+ {
+ jjmatchedKind = 18;
+ jjmatchedPos = 5;
+ }
+ return jjMoveStringLiteralDfa6_0(active0, 0x200000L);
+ case 83:
+ case 115:
+ if ((active0 & 0x100000L) != 0L)
+ return jjStartNfaWithStates_0(5, 20, 12);
+ break;
+ case 84:
+ case 116:
+ if ((active0 & 0x4000L) != 0L)
+ return jjStartNfaWithStates_0(5, 14, 12);
+ else if ((active0 & 0x10000L) != 0L)
+ return jjStartNfaWithStates_0(5, 16, 12);
+ break;
+ default :
+ break;
+ }
+ return jjStartNfa_0(4, active0);
+}
+private final int jjMoveStringLiteralDfa6_0(long old0, long active0)
+{
+ if (((active0 &= old0)) == 0L)
+ return jjStartNfa_0(4, old0);
+ try { curChar = input_stream.readChar(); }
+ catch(java.io.IOException e) {
+ jjStopStringLiteralDfa_0(5, active0);
+ return 6;
+ }
+ switch(curChar)
+ {
+ case 66:
+ case 98:
+ return jjMoveStringLiteralDfa7_0(active0, 0x100L);
+ case 70:
+ case 102:
+ return jjMoveStringLiteralDfa7_0(active0, 0x200000L);
+ default :
+ break;
+ }
+ return jjStartNfa_0(5, active0);
+}
+private final int jjMoveStringLiteralDfa7_0(long old0, long active0)
+{
+ if (((active0 &= old0)) == 0L)
+ return jjStartNfa_0(5, old0);
+ try { curChar = input_stream.readChar(); }
+ catch(java.io.IOException e) {
+ jjStopStringLiteralDfa_0(6, active0);
+ return 7;
+ }
+ switch(curChar)
+ {
+ case 65:
+ case 97:
+ return jjMoveStringLiteralDfa8_0(active0, 0x200000L);
+ case 69:
+ case 101:
+ if ((active0 & 0x100L) != 0L)
+ return jjStartNfaWithStates_0(7, 8, 12);
+ break;
+ default :
+ break;
+ }
+ return jjStartNfa_0(6, active0);
+}
+private final int jjMoveStringLiteralDfa8_0(long old0, long active0)
+{
+ if (((active0 &= old0)) == 0L)
+ return jjStartNfa_0(6, old0);
+ try { curChar = input_stream.readChar(); }
+ catch(java.io.IOException e) {
+ jjStopStringLiteralDfa_0(7, active0);
+ return 8;
+ }
+ switch(curChar)
+ {
+ case 77:
+ case 109:
+ return jjMoveStringLiteralDfa9_0(active0, 0x200000L);
+ default :
+ break;
+ }
+ return jjStartNfa_0(7, active0);
+}
+private final int jjMoveStringLiteralDfa9_0(long old0, long active0)
+{
+ if (((active0 &= old0)) == 0L)
+ return jjStartNfa_0(7, old0);
+ try { curChar = input_stream.readChar(); }
+ catch(java.io.IOException e) {
+ jjStopStringLiteralDfa_0(8, active0);
+ return 9;
+ }
+ switch(curChar)
+ {
+ case 73:
+ case 105:
+ return jjMoveStringLiteralDfa10_0(active0, 0x200000L);
+ default :
+ break;
+ }
+ return jjStartNfa_0(8, active0);
+}
+private final int jjMoveStringLiteralDfa10_0(long old0, long active0)
+{
+ if (((active0 &= old0)) == 0L)
+ return jjStartNfa_0(8, old0);
+ try { curChar = input_stream.readChar(); }
+ catch(java.io.IOException e) {
+ jjStopStringLiteralDfa_0(9, active0);
+ return 10;
+ }
+ switch(curChar)
+ {
+ case 76:
+ case 108:
+ return jjMoveStringLiteralDfa11_0(active0, 0x200000L);
+ default :
+ break;
+ }
+ return jjStartNfa_0(9, active0);
+}
+private final int jjMoveStringLiteralDfa11_0(long old0, long active0)
+{
+ if (((active0 &= old0)) == 0L)
+ return jjStartNfa_0(9, old0);
+ try { curChar = input_stream.readChar(); }
+ catch(java.io.IOException e) {
+ jjStopStringLiteralDfa_0(10, active0);
+ return 11;
+ }
+ switch(curChar)
+ {
+ case 73:
+ case 105:
+ return jjMoveStringLiteralDfa12_0(active0, 0x200000L);
+ default :
+ break;
+ }
+ return jjStartNfa_0(10, active0);
+}
+private final int jjMoveStringLiteralDfa12_0(long old0, long active0)
+{
+ if (((active0 &= old0)) == 0L)
+ return jjStartNfa_0(10, old0);
+ try { curChar = input_stream.readChar(); }
+ catch(java.io.IOException e) {
+ jjStopStringLiteralDfa_0(11, active0);
+ return 12;
+ }
+ switch(curChar)
+ {
+ case 69:
+ case 101:
+ return jjMoveStringLiteralDfa13_0(active0, 0x200000L);
+ default :
+ break;
+ }
+ return jjStartNfa_0(11, active0);
+}
+private final int jjMoveStringLiteralDfa13_0(long old0, long active0)
+{
+ if (((active0 &= old0)) == 0L)
+ return jjStartNfa_0(11, old0);
+ try { curChar = input_stream.readChar(); }
+ catch(java.io.IOException e) {
+ jjStopStringLiteralDfa_0(12, active0);
+ return 13;
+ }
+ switch(curChar)
+ {
+ case 83:
+ case 115:
+ if ((active0 & 0x200000L) != 0L)
+ return jjStartNfaWithStates_0(13, 21, 12);
+ break;
+ default :
+ break;
+ }
+ return jjStartNfa_0(12, active0);
+}
+private final void jjCheckNAdd(int state)
+{
+ if (jjrounds[state] != jjround)
+ {
+ jjstateSet[jjnewStateCnt++] = state;
+ jjrounds[state] = jjround;
+ }
+}
+private final void jjAddStates(int start, int end)
+{
+ do {
+ jjstateSet[jjnewStateCnt++] = jjnextStates[start];
+ } while (start++ != end);
+}
+private final void jjCheckNAddTwoStates(int state1, int state2)
+{
+ jjCheckNAdd(state1);
+ jjCheckNAdd(state2);
+}
+private final void jjCheckNAddStates(int start, int end)
+{
+ do {
+ jjCheckNAdd(jjnextStates[start]);
+ } while (start++ != end);
+}
+private final void jjCheckNAddStates(int start)
+{
+ jjCheckNAdd(jjnextStates[start]);
+ jjCheckNAdd(jjnextStates[start + 1]);
+}
static final long[] jjbitVec0 = {
0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
-};
-private final int jjMoveNfa_0(int startState, int curPos)
-{
- int[] nextStates;
- int startsAt = 0;
- jjnewStateCnt = 13;
- int i = 1;
- jjstateSet[0] = startState;
- int j, kind = 0x7fffffff;
- for (;;)
- {
- if (++jjround == 0x7fffffff)
- ReInitRounds();
- if (curChar < 64)
- {
- long l = 1L << curChar;
- MatchLoop: do
- {
- switch(jjstateSet[--i])
- {
- case 0:
- if ((0x3ff000000000000L & l) != 0L)
- {
- if (kind > 34)
- kind = 34;
- jjCheckNAdd(3);
- }
- else if ((0xe00000000000L & l) != 0L)
- {
- if (kind > 32)
- kind = 32;
- jjCheckNAdd(1);
- }
- else if (curChar == 39)
- jjCheckNAddStates(0, 2);
- else if (curChar == 34)
- jjCheckNAdd(5);
- if ((0x3ff000000000000L & l) != 0L)
- {
- if (kind > 33)
- kind = 33;
- jjCheckNAdd(2);
- }
- break;
- case 13:
- if ((0x3ffe00000000000L & l) != 0L)
- {
- if (kind > 32)
- kind = 32;
- jjCheckNAdd(1);
- }
- if ((0x3ff000000000000L & l) != 0L)
- {
- if (kind > 34)
- kind = 34;
- jjCheckNAdd(3);
- }
- break;
- case 1:
- if ((0x3ffe00000000000L & l) == 0L)
- break;
- if (kind > 32)
- kind = 32;
- jjCheckNAdd(1);
- break;
- case 2:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 33)
- kind = 33;
- jjCheckNAdd(2);
- break;
- case 3:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 34)
- kind = 34;
- jjCheckNAdd(3);
- break;
- case 4:
- if (curChar == 34)
- jjCheckNAdd(5);
- break;
- case 5:
- if ((0xfffffffbffffffffL & l) != 0L)
- jjCheckNAddTwoStates(5, 6);
- break;
- case 6:
- if (curChar == 34 && kind > 35)
- kind = 35;
- break;
- case 7:
- if (curChar == 39)
- jjCheckNAddStates(0, 2);
- break;
- case 8:
- if ((0xffffff7fffffffffL & l) != 0L)
- jjCheckNAddStates(0, 2);
- break;
- case 9:
- if (curChar == 39)
- jjCheckNAddStates(3, 5);
- break;
- case 10:
- if (curChar == 39)
- jjstateSet[jjnewStateCnt++] = 9;
- break;
- case 11:
- if ((0xffffff7fffffffffL & l) != 0L)
- jjCheckNAddStates(3, 5);
- break;
- case 12:
- if (curChar == 39 && kind > 36)
- kind = 36;
- break;
- default : break;
- }
- } while(i != startsAt);
- }
- else if (curChar < 128)
- {
- long l = 1L << (curChar & 077);
- MatchLoop: do
- {
- switch(jjstateSet[--i])
- {
- case 0:
- if ((0x7fffffe87fffffeL & l) != 0L)
- {
- if (kind > 32)
- kind = 32;
- jjCheckNAdd(1);
- }
- if ((0x7fffffe07fffffeL & l) != 0L)
- {
- if (kind > 34)
- kind = 34;
- jjCheckNAdd(3);
- }
- break;
- case 13:
- if ((0x7fffffe87fffffeL & l) != 0L)
- {
- if (kind > 32)
- kind = 32;
- jjCheckNAdd(1);
- }
- if ((0x7fffffe07fffffeL & l) != 0L)
- {
- if (kind > 34)
- kind = 34;
- jjCheckNAdd(3);
- }
- break;
- case 1:
- if ((0x7fffffe87fffffeL & l) == 0L)
- break;
- if (kind > 32)
- kind = 32;
- jjCheckNAdd(1);
- break;
- case 3:
- if ((0x7fffffe07fffffeL & l) == 0L)
- break;
- if (kind > 34)
- kind = 34;
- jjCheckNAdd(3);
- break;
- case 5:
- jjAddStates(6, 7);
- break;
- case 8:
- jjCheckNAddStates(0, 2);
- break;
- case 11:
- jjCheckNAddStates(3, 5);
- break;
- default : break;
- }
- } while(i != startsAt);
- }
- else
- {
- int i2 = (curChar & 0xff) >> 6;
- long l2 = 1L << (curChar & 077);
- MatchLoop: do
- {
- switch(jjstateSet[--i])
- {
- case 5:
- if ((jjbitVec0[i2] & l2) != 0L)
- jjAddStates(6, 7);
- break;
- case 8:
- if ((jjbitVec0[i2] & l2) != 0L)
- jjCheckNAddStates(0, 2);
- break;
- case 11:
- if ((jjbitVec0[i2] & l2) != 0L)
- jjCheckNAddStates(3, 5);
- break;
- default : break;
- }
- } while(i != startsAt);
- }
- if (kind != 0x7fffffff)
- {
- jjmatchedKind = kind;
- jjmatchedPos = curPos;
- kind = 0x7fffffff;
- }
- ++curPos;
- if ((i = jjnewStateCnt) == (startsAt = 13 - (jjnewStateCnt = startsAt)))
- return curPos;
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) { return curPos; }
- }
-}
+};
+private final int jjMoveNfa_0(int startState, int curPos)
+{
+ int[] nextStates;
+ int startsAt = 0;
+ jjnewStateCnt = 12;
+ int i = 1;
+ jjstateSet[0] = startState;
+ int j, kind = 0x7fffffff;
+ for (;;)
+ {
+ if (++jjround == 0x7fffffff)
+ ReInitRounds();
+ if (curChar < 64)
+ {
+ long l = 1L << curChar;
+ MatchLoop: do
+ {
+ switch(jjstateSet[--i])
+ {
+ case 3:
+ if ((0x3ffe00000000000L & l) != 0L)
+ {
+ if (kind > 33)
+ kind = 33;
+ jjCheckNAdd(0);
+ }
+ else if (curChar == 39)
+ jjCheckNAddStates(0, 2);
+ else if (curChar == 34)
+ jjCheckNAdd(4);
+ if ((0x3ff000000000000L & l) != 0L)
+ {
+ if (kind > 35)
+ kind = 35;
+ jjCheckNAdd(2);
+ }
+ if ((0x3ff000000000000L & l) != 0L)
+ {
+ if (kind > 34)
+ kind = 34;
+ jjCheckNAdd(1);
+ }
+ break;
+ case 12:
+ if ((0x3ffe00000000000L & l) != 0L)
+ {
+ if (kind > 33)
+ kind = 33;
+ jjCheckNAdd(0);
+ }
+ if ((0x3ff000000000000L & l) != 0L)
+ {
+ if (kind > 35)
+ kind = 35;
+ jjCheckNAdd(2);
+ }
+ break;
+ case 0:
+ if ((0x3ffe00000000000L & l) == 0L)
+ break;
+ if (kind > 33)
+ kind = 33;
+ jjCheckNAdd(0);
+ break;
+ case 1:
+ if ((0x3ff000000000000L & l) == 0L)
+ break;
+ if (kind > 34)
+ kind = 34;
+ jjCheckNAdd(1);
+ break;
+ case 2:
+ if ((0x3ff000000000000L & l) == 0L)
+ break;
+ if (kind > 35)
+ kind = 35;
+ jjCheckNAdd(2);
+ break;
+ case 4:
+ if ((0xfffffffbffffffffL & l) != 0L)
+ jjCheckNAddTwoStates(4, 5);
+ break;
+ case 5:
+ if (curChar == 34 && kind > 36)
+ kind = 36;
+ break;
+ case 6:
+ if (curChar == 39)
+ jjCheckNAddStates(0, 2);
+ break;
+ case 7:
+ if ((0xffffff7fffffffffL & l) != 0L)
+ jjCheckNAddStates(0, 2);
+ break;
+ case 8:
+ if (curChar == 39)
+ jjCheckNAddStates(3, 5);
+ break;
+ case 9:
+ if (curChar == 39)
+ jjstateSet[jjnewStateCnt++] = 8;
+ break;
+ case 10:
+ if ((0xffffff7fffffffffL & l) != 0L)
+ jjCheckNAddStates(3, 5);
+ break;
+ case 11:
+ if (curChar == 39 && kind > 37)
+ kind = 37;
+ break;
+ default : break;
+ }
+ } while(i != startsAt);
+ }
+ else if (curChar < 128)
+ {
+ long l = 1L << (curChar & 077);
+ MatchLoop: do
+ {
+ switch(jjstateSet[--i])
+ {
+ case 3:
+ if ((0x7fffffe87fffffeL & l) != 0L)
+ {
+ if (kind > 33)
+ kind = 33;
+ jjCheckNAdd(0);
+ }
+ if ((0x7fffffe07fffffeL & l) != 0L)
+ {
+ if (kind > 35)
+ kind = 35;
+ jjCheckNAdd(2);
+ }
+ break;
+ case 12:
+ if ((0x7fffffe87fffffeL & l) != 0L)
+ {
+ if (kind > 33)
+ kind = 33;
+ jjCheckNAdd(0);
+ }
+ if ((0x7fffffe07fffffeL & l) != 0L)
+ {
+ if (kind > 35)
+ kind = 35;
+ jjCheckNAdd(2);
+ }
+ break;
+ case 0:
+ if ((0x7fffffe87fffffeL & l) == 0L)
+ break;
+ if (kind > 33)
+ kind = 33;
+ jjCheckNAdd(0);
+ break;
+ case 2:
+ if ((0x7fffffe07fffffeL & l) == 0L)
+ break;
+ if (kind > 35)
+ kind = 35;
+ jjCheckNAdd(2);
+ break;
+ case 4:
+ jjAddStates(6, 7);
+ break;
+ case 7:
+ jjCheckNAddStates(0, 2);
+ break;
+ case 10:
+ jjCheckNAddStates(3, 5);
+ break;
+ default : break;
+ }
+ } while(i != startsAt);
+ }
+ else
+ {
+ int i2 = (curChar & 0xff) >> 6;
+ long l2 = 1L << (curChar & 077);
+ MatchLoop: do
+ {
+ switch(jjstateSet[--i])
+ {
+ case 4:
+ if ((jjbitVec0[i2] & l2) != 0L)
+ jjAddStates(6, 7);
+ break;
+ case 7:
+ if ((jjbitVec0[i2] & l2) != 0L)
+ jjCheckNAddStates(0, 2);
+ break;
+ case 10:
+ if ((jjbitVec0[i2] & l2) != 0L)
+ jjCheckNAddStates(3, 5);
+ break;
+ default : break;
+ }
+ } while(i != startsAt);
+ }
+ if (kind != 0x7fffffff)
+ {
+ jjmatchedKind = kind;
+ jjmatchedPos = curPos;
+ kind = 0x7fffffff;
+ }
+ ++curPos;
+ if ((i = jjnewStateCnt) == (startsAt = 12 - (jjnewStateCnt = startsAt)))
+ return curPos;
+ try { curChar = input_stream.readChar(); }
+ catch(java.io.IOException e) { return curPos; }
+ }
+}
static final int[] jjnextStates = {
- 8, 10, 12, 10, 11, 12, 5, 6,
-};
-public static final String[] jjstrLiteralImages = {
-"", null, null, null, null, null, null, null, null, null, null, null, null,
-null, null, null, null, null, null, null, null, null, null, null, null, "\54",
-"\56", "\50", "\51", "\75", "\74\76", "\55", null, null, null, null, null, "\73", };
-public static final String[] lexStateNames = {
- "DEFAULT",
-};
+ 7, 9, 11, 9, 10, 11, 4, 5,
+};
+public static final String[] jjstrLiteralImages = {
+"", null, null, null, null, null, null, null, null, null, null, null, null,
+null, null, null, null, null, null, null, null, null, null, null, null, null, "\54",
+"\56", "\50", "\51", "\75", "\74\76", "\55", null, null, null, null, null, "\73", };
+public static final String[] lexStateNames = {
+ "DEFAULT",
+};
static final long[] jjtoToken = {
- 0x3fffffffe1L,
-};
+ 0x7fffffffe1L,
+};
static final long[] jjtoSkip = {
0x1eL,
-};
-protected SimpleCharStream input_stream;
-private final int[] jjrounds = new int[13];
-private final int[] jjstateSet = new int[26];
-protected char curChar;
-public ParserTokenManager(SimpleCharStream stream){
- if (SimpleCharStream.staticFlag)
- throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
- input_stream = stream;
-}
-public ParserTokenManager(SimpleCharStream stream, int lexState){
- this(stream);
- SwitchTo(lexState);
-}
-public void ReInit(SimpleCharStream stream)
-{
- jjmatchedPos = jjnewStateCnt = 0;
- curLexState = defaultLexState;
- input_stream = stream;
- ReInitRounds();
-}
-private final void ReInitRounds()
-{
- int i;
- jjround = 0x80000001;
- for (i = 13; i-- > 0;)
- jjrounds[i] = 0x80000000;
-}
-public void ReInit(SimpleCharStream stream, int lexState)
-{
- ReInit(stream);
- SwitchTo(lexState);
-}
-public void SwitchTo(int lexState)
-{
- if (lexState >= 1 || lexState < 0)
- throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
- else
- curLexState = lexState;
-}
-
-protected Token jjFillToken()
-{
- Token t = Token.newToken(jjmatchedKind);
- t.kind = jjmatchedKind;
- String im = jjstrLiteralImages[jjmatchedKind];
- t.image = (im == null) ? input_stream.GetImage() : im;
- t.beginLine = input_stream.getBeginLine();
- t.beginColumn = input_stream.getBeginColumn();
- t.endLine = input_stream.getEndLine();
- t.endColumn = input_stream.getEndColumn();
- return t;
-}
-
-int curLexState = 0;
-int defaultLexState = 0;
-int jjnewStateCnt;
-int jjround;
-int jjmatchedPos;
-int jjmatchedKind;
-
-public Token getNextToken()
-{
- int kind;
- Token specialToken = null;
- Token matchedToken;
- int curPos = 0;
-
+};
+protected SimpleCharStream input_stream;
+private final int[] jjrounds = new int[12];
+private final int[] jjstateSet = new int[24];
+protected char curChar;
+public ParserTokenManager(SimpleCharStream stream){
+ if (SimpleCharStream.staticFlag)
+ throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
+ input_stream = stream;
+}
+public ParserTokenManager(SimpleCharStream stream, int lexState){
+ this(stream);
+ SwitchTo(lexState);
+}
+public void ReInit(SimpleCharStream stream)
+{
+ jjmatchedPos = jjnewStateCnt = 0;
+ curLexState = defaultLexState;
+ input_stream = stream;
+ ReInitRounds();
+}
+private final void ReInitRounds()
+{
+ int i;
+ jjround = 0x80000001;
+ for (i = 12; i-- > 0;)
+ jjrounds[i] = 0x80000000;
+}
+public void ReInit(SimpleCharStream stream, int lexState)
+{
+ ReInit(stream);
+ SwitchTo(lexState);
+}
+public void SwitchTo(int lexState)
+{
+ if (lexState >= 1 || lexState < 0)
+ throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
+ else
+ curLexState = lexState;
+}
+
+protected Token jjFillToken()
+{
+ Token t = Token.newToken(jjmatchedKind);
+ t.kind = jjmatchedKind;
+ String im = jjstrLiteralImages[jjmatchedKind];
+ t.image = (im == null) ? input_stream.GetImage() : im;
+ t.beginLine = input_stream.getBeginLine();
+ t.beginColumn = input_stream.getBeginColumn();
+ t.endLine = input_stream.getEndLine();
+ t.endColumn = input_stream.getEndColumn();
+ return t;
+}
+
+int curLexState = 0;
+int defaultLexState = 0;
+int jjnewStateCnt;
+int jjround;
+int jjmatchedPos;
+int jjmatchedKind;
+
+public Token getNextToken()
+{
+ int kind;
+ Token specialToken = null;
+ Token matchedToken;
+ int curPos = 0;
+
EOFLoop :
- for (;;)
- {
- try
- {
- curChar = input_stream.BeginToken();
- }
- catch(java.io.IOException e)
- {
- jjmatchedKind = 0;
- matchedToken = jjFillToken();
- return matchedToken;
- }
-
- try { input_stream.backup(0);
- while (curChar <= 32 && (0x100002600L & (1L << curChar)) != 0L)
- curChar = input_stream.BeginToken();
- }
- catch (java.io.IOException e1) { continue EOFLoop; }
- jjmatchedKind = 0x7fffffff;
- jjmatchedPos = 0;
- curPos = jjMoveStringLiteralDfa0_0();
- if (jjmatchedKind != 0x7fffffff)
- {
- if (jjmatchedPos + 1 < curPos)
- input_stream.backup(curPos - jjmatchedPos - 1);
- if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
- {
- matchedToken = jjFillToken();
- return matchedToken;
- }
- else
- {
- continue EOFLoop;
- }
- }
- int error_line = input_stream.getEndLine();
- int error_column = input_stream.getEndColumn();
- String error_after = null;
- boolean EOFSeen = false;
- try { input_stream.readChar(); input_stream.backup(1); }
- catch (java.io.IOException e1) {
- EOFSeen = true;
- error_after = curPos <= 1 ? "" : input_stream.GetImage();
- if (curChar == '\n' || curChar == '\r') {
- error_line++;
- error_column = 0;
- }
- else
- error_column++;
- }
- if (!EOFSeen) {
- input_stream.backup(1);
- error_after = curPos <= 1 ? "" : input_stream.GetImage();
- }
- throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
- }
-}
-
-}
+ for (;;)
+ {
+ try
+ {
+ curChar = input_stream.BeginToken();
+ }
+ catch(java.io.IOException e)
+ {
+ jjmatchedKind = 0;
+ matchedToken = jjFillToken();
+ return matchedToken;
+ }
+
+ try { input_stream.backup(0);
+ while (curChar <= 32 && (0x100002600L & (1L << curChar)) != 0L)
+ curChar = input_stream.BeginToken();
+ }
+ catch (java.io.IOException e1) { continue EOFLoop; }
+ jjmatchedKind = 0x7fffffff;
+ jjmatchedPos = 0;
+ curPos = jjMoveStringLiteralDfa0_0();
+ if (jjmatchedKind != 0x7fffffff)
+ {
+ if (jjmatchedPos + 1 < curPos)
+ input_stream.backup(curPos - jjmatchedPos - 1);
+ if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
+ {
+ matchedToken = jjFillToken();
+ return matchedToken;
+ }
+ else
+ {
+ continue EOFLoop;
+ }
+ }
+ int error_line = input_stream.getEndLine();
+ int error_column = input_stream.getEndColumn();
+ String error_after = null;
+ boolean EOFSeen = false;
+ try { input_stream.readChar(); input_stream.backup(1); }
+ catch (java.io.IOException e1) {
+ EOFSeen = true;
+ error_after = curPos <= 1 ? "" : input_stream.GetImage();
+ if (curChar == '\n' || curChar == '\r') {
+ error_line++;
+ error_column = 0;
+ }
+ else
+ error_column++;
+ }
+ if (!EOFSeen) {
+ input_stream.backup(1);
+ error_after = curPos <= 1 ? "" : input_stream.GetImage();
+ }
+ throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
+ }
+}
+
+}
Index: src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/ParserConstants.java
===================================================================
--- src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/ParserConstants.java (revision 573490)
+++ src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/ParserConstants.java (working copy)
@@ -1,102 +1,85 @@
-/* Generated By:JavaCC: Do not edit this line. ParserConstants.java */
-/**
- * Copyright 2007 The Apache Software Foundation
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.hadoop.hbase.shell.generated;
-
-public interface ParserConstants {
-
- int EOF = 0;
- int HELP = 5;
- int CLEAR = 6;
- int SHOW = 7;
- int DESCRIBE = 8;
- int CREATE = 9;
- int DROP = 10;
- int FS = 11;
- int EXIT = 12;
- int INSERT = 13;
- int DELETE = 14;
- int SELECT = 15;
- int ROW = 16;
- int COLUMN = 17;
- int TIME = 18;
- int VALUES = 19;
- int COLUMNFAMILIES = 20;
- int WHERE = 21;
- int LIMIT = 22;
- int AND = 23;
- int OR = 24;
- int COMMA = 25;
- int DOT = 26;
- int LPAREN = 27;
- int RPAREN = 28;
- int EQUALS = 29;
- int NOTEQUAL = 30;
- int OPTIONS = 31;
- int ID = 32;
- int NUM = 33;
- int STRING = 34;
- int QUOTED_STRING = 35;
- int STRING_LITERAL = 36;
-
- int DEFAULT = 0;
-
- String[] tokenImage = {
- "",
- "\" \"",
- "\"\\t\"",
- "\"\\r\"",
- "\"\\n\"",
- "\"help\"",
- "\"clear\"",
- "\"show\"",
- "\"describe\"",
- "\"create\"",
- "\"drop\"",
- "\"fs\"",
- "\"exit\"",
- "\"insert\"",
- "\"delete\"",
- "\"select\"",
- "\"row\"",
- "\"column\"",
- "\"time\"",
- "\"values\"",
- "\"columnfamilies\"",
- "\"where\"",
- "\"limit\"",
- "\"and\"",
- "\"or\"",
- "\",\"",
- "\".\"",
- "\"(\"",
- "\")\"",
- "\"=\"",
- "\"<>\"",
- "\"-\"",
- "",
- "",
- "",
- "",
- "",
- "\";\"",
- };
-
-}
+/* Generated By:JavaCC: Do not edit this line. ParserConstants.java */
+package org.apache.hadoop.hbase.shell.generated;
+
+public interface ParserConstants {
+
+ int EOF = 0;
+ int HELP = 5;
+ int CLEAR = 6;
+ int SHOW = 7;
+ int DESCRIBE = 8;
+ int CREATE = 9;
+ int DROP = 10;
+ int DFS = 11;
+ int JAR = 12;
+ int EXIT = 13;
+ int INSERT = 14;
+ int DELETE = 15;
+ int SELECT = 16;
+ int ROW = 17;
+ int COLUMN = 18;
+ int TIME = 19;
+ int VALUES = 20;
+ int COLUMNFAMILIES = 21;
+ int WHERE = 22;
+ int LIMIT = 23;
+ int AND = 24;
+ int OR = 25;
+ int COMMA = 26;
+ int DOT = 27;
+ int LPAREN = 28;
+ int RPAREN = 29;
+ int EQUALS = 30;
+ int NOTEQUAL = 31;
+ int OPTIONS = 32;
+ int ID = 33;
+ int NUM = 34;
+ int STRING = 35;
+ int QUOTED_STRING = 36;
+ int STRING_LITERAL = 37;
+
+ int DEFAULT = 0;
+
+ String[] tokenImage = {
+ "",
+ "\" \"",
+ "\"\\t\"",
+ "\"\\r\"",
+ "\"\\n\"",
+ "\"help\"",
+ "\"clear\"",
+ "\"show\"",
+ "\"describe\"",
+ "\"create\"",
+ "\"drop\"",
+ "\"dfs\"",
+ "\"jar\"",
+ "\"exit\"",
+ "\"insert\"",
+ "\"delete\"",
+ "\"select\"",
+ "\"row\"",
+ "\"column\"",
+ "\"time\"",
+ "\"values\"",
+ "\"columnfamilies\"",
+ "\"where\"",
+ "\"limit\"",
+ "\"and\"",
+ "\"or\"",
+ "\",\"",
+ "\".\"",
+ "\"(\"",
+ "\")\"",
+ "\"=\"",
+ "\"<>\"",
+ "\"-\"",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "\";\"",
+ };
+
+}
Index: src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/Parser.java
===================================================================
--- src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/Parser.java (revision 573490)
+++ src/contrib/hbase/src/java/org/apache/hadoop/hbase/shell/generated/Parser.java (working copy)
@@ -1,4 +1,6 @@
-/* Generated By:JavaCC: Do not edit this line. Parser.java */
+/* Generated By:JavaCC: Do not edit this line. Parser.java */
+package org.apache.hadoop.hbase.shell.generated;
+
/**
* Copyright 2007 The Apache Software Foundation
*
@@ -17,774 +19,805 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- */
-package org.apache.hadoop.hbase.shell.generated;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.HashMap;
-import java.io.StringReader;
-import java.io.Reader;
-
-import org.apache.hadoop.hbase.shell.*;
-
+ */
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.HashMap;
+import java.io.StringReader;
+import java.io.Reader;
+
+import org.apache.hadoop.hbase.shell.*;
+
/**
* Parsing command line.
- */
-public class Parser implements ParserConstants {
- private String QueryString;
-
- public Parser(String query) {
- this((Reader)(new StringReader(query)));
- this.QueryString = query;
- }
-
- public String getQueryStr() {
- return this.QueryString;
- }
-
+ */
+public class Parser implements ParserConstants {
+ private String QueryString;
+
+ public Parser(String query) {
+ this((Reader)(new StringReader(query)));
+ this.QueryString = query;
+ }
+
+ public String getQueryStr() {
+ return this.QueryString;
+ }
+
/**
* Parses the given array of command line arguments.
- */
- final public Command terminatedCommand() throws ParseException {
- Command statement = null;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case HELP:
- case CLEAR:
- case SHOW:
- case DESCRIBE:
- case CREATE:
- case DROP:
- case FS:
- case EXIT:
- case INSERT:
- case DELETE:
- case SELECT:
- case 37:
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case HELP:
- case CLEAR:
- case SHOW:
- case DESCRIBE:
- case CREATE:
- case DROP:
- case FS:
- case EXIT:
- case INSERT:
- case DELETE:
- case SELECT:
- statement = cmdStatement();
- break;
- default:
- jj_la1[0] = jj_gen;
- ;
- }
- jj_consume_token(37);
- break;
- case 0:
- jj_consume_token(0);
- break;
- default:
- jj_la1[1] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- {if (true) return statement;}
- throw new Error("Missing return statement in function");
- }
-
- final public Command cmdStatement() throws ParseException {
- Command cmd = null;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case EXIT:
- cmd = exitCommand();
- break;
- case HELP:
- cmd = helpCommand();
- break;
- case SHOW:
- cmd = showCommand();
- break;
- case DESCRIBE:
- cmd = descCommand();
- break;
- case CREATE:
- cmd = createCommand();
- break;
- case DROP:
- cmd = dropCommand();
- break;
- case INSERT:
- cmd = insertCommand();
- break;
- case DELETE:
- cmd = deleteCommand();
- break;
- case SELECT:
- cmd = selectCommand();
- break;
- case CLEAR:
- cmd = clearCommand();
- break;
- case FS:
- cmd = fsCommand();
- break;
- default:
- jj_la1[2] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- {if (true) return cmd;}
- throw new Error("Missing return statement in function");
- }
-
- final public ExitCommand exitCommand() throws ParseException {
- ExitCommand exit = new ExitCommand();
- jj_consume_token(EXIT);
- {if (true) return exit;}
- throw new Error("Missing return statement in function");
- }
-
- final public FsCommand fsCommand() throws ParseException {
- Token t = null;
- FsCommand fs = new FsCommand();
- List query = new ArrayList();
- jj_consume_token(FS);
- label_1:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case ID:
- ;
- break;
- default:
- jj_la1[3] = jj_gen;
- break label_1;
- }
- t = jj_consume_token(ID);
- query.add(t.image.toString());
- }
- fs.setQuery(query);
- {if (true) return fs;}
- throw new Error("Missing return statement in function");
- }
-
- final public HelpCommand helpCommand() throws ParseException {
- Token t = null;
- HelpCommand help = new HelpCommand();
- String argument = "";
- jj_consume_token(HELP);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case CLEAR:
- case SHOW:
- case DESCRIBE:
- case CREATE:
- case DROP:
- case FS:
- case EXIT:
- case INSERT:
- case DELETE:
- case SELECT:
- case ID:
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case SHOW:
- t = jj_consume_token(SHOW);
- break;
- case DESCRIBE:
- t = jj_consume_token(DESCRIBE);
- break;
- case CREATE:
- t = jj_consume_token(CREATE);
- break;
- case DROP:
- t = jj_consume_token(DROP);
- break;
- case EXIT:
- t = jj_consume_token(EXIT);
- break;
- case INSERT:
- t = jj_consume_token(INSERT);
- break;
- case DELETE:
- t = jj_consume_token(DELETE);
- break;
- case SELECT:
- t = jj_consume_token(SELECT);
- break;
- case CLEAR:
- t = jj_consume_token(CLEAR);
- break;
- case FS:
- t = jj_consume_token(FS);
- break;
- case ID:
- t = jj_consume_token(ID);
- break;
- default:
- jj_la1[4] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- argument = t.image.toString();
- break;
- default:
- jj_la1[5] = jj_gen;
- ;
- }
- help.setArgument(argument);
- {if (true) return help;}
- throw new Error("Missing return statement in function");
- }
-
- final public ShowCommand showCommand() throws ParseException {
- ShowCommand show = new ShowCommand();
- String argument = null;
- jj_consume_token(SHOW);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case ID:
- case QUOTED_STRING:
- argument = getString();
- break;
- default:
- jj_la1[6] = jj_gen;
- ;
- }
- show.setArgument(argument);
- {if (true) return show;}
- throw new Error("Missing return statement in function");
- }
-
- final public DescCommand descCommand() throws ParseException {
- DescCommand desc = new DescCommand();
- String argument = null;
- jj_consume_token(DESCRIBE);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case ID:
- case QUOTED_STRING:
- argument = getString();
- break;
- default:
- jj_la1[7] = jj_gen;
- ;
- }
- desc.setArgument(argument);
- {if (true) return desc;}
- throw new Error("Missing return statement in function");
- }
-
- final public CreateCommand createCommand() throws ParseException {
- CreateCommand create = new CreateCommand();
- String argument = null;
- List columnfamilies = null;
- int limit = 1;
- jj_consume_token(CREATE);
- argument = getString();
- create.setTable(argument);
- jj_consume_token(COLUMNFAMILIES);
- columnfamilies = getLiteralValues();
- create.setColumnfamilies(columnfamilies);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case LIMIT:
- jj_consume_token(LIMIT);
- jj_consume_token(EQUALS);
- limit = getInt();
- try{
- create.setLimit(limit);
- }catch(ClassCastException ce) {
- {if (true) throw generateParseException();}
- }
- break;
- default:
- jj_la1[8] = jj_gen;
- ;
- }
- {if (true) return create;}
- throw new Error("Missing return statement in function");
- }
-
- final public DropCommand dropCommand() throws ParseException {
- DropCommand drop = new DropCommand();
- String argument = null;
- jj_consume_token(DROP);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case ID:
- case QUOTED_STRING:
- argument = getString();
- break;
- default:
- jj_la1[9] = jj_gen;
- ;
- }
- drop.setArgument(argument);
- {if (true) return drop;}
- throw new Error("Missing return statement in function");
- }
-
- final public InsertCommand insertCommand() throws ParseException {
- InsertCommand in = new InsertCommand();
- Map> cond = null;
- List columnfamilies = null;
- List values = null;
- String table = null;
- jj_consume_token(INSERT);
- table = getString();
- in.setTable(table);
- columnfamilies = getLiteralValues();
- in.setColumnfamilies(columnfamilies);
- jj_consume_token(VALUES);
- values = getLiteralValues();
- in.setValues(values);
- jj_consume_token(WHERE);
- cond = WhereClause();
- try{
- in.setCondition(cond);
- }catch(ClassCastException ce) {
- {if (true) throw generateParseException();}
- }
- {if (true) return in;}
- throw new Error("Missing return statement in function");
- }
-
- final public DeleteCommand deleteCommand() throws ParseException {
- DeleteCommand del = new DeleteCommand();
- Map> cond = null;
- String argument = null;
- jj_consume_token(DELETE);
- argument = getString();
- del.setTable(argument);
- jj_consume_token(WHERE);
- cond = WhereClause();
- try{
- del.setCondition(cond);
- }catch(ClassCastException ce) {
- {if (true) throw generateParseException();}
- }
- {if (true) return del;}
- throw new Error("Missing return statement in function");
- }
-
- final public SelectCommand selectCommand() throws ParseException {
- SelectCommand select = new SelectCommand();
- Map> cond = null;
- String argument = null;
- int limit;
- jj_consume_token(SELECT);
- argument = getString();
- select.setTable(argument);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case WHERE:
- jj_consume_token(WHERE);
- cond = WhereClause();
- try{
- select.setCondition(cond);
- }catch(ClassCastException ce) {
- {if (true) throw generateParseException();}
- }
- break;
- default:
- jj_la1[10] = jj_gen;
- ;
- }
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case LIMIT:
- jj_consume_token(LIMIT);
- jj_consume_token(EQUALS);
- limit = getInt();
- try{
- select.setLimit(limit);
- }catch(ClassCastException ce) {
- {if (true) throw generateParseException();}
- }
- break;
- default:
- jj_la1[11] = jj_gen;
- ;
- }
- {if (true) return select;}
- throw new Error("Missing return statement in function");
- }
-
- final public ClearCommand clearCommand() throws ParseException {
- ClearCommand clear = new ClearCommand();
- jj_consume_token(CLEAR);
- {if (true) return clear;}
- throw new Error("Missing return statement in function");
- }
-
+ */
+ final public Command terminatedCommand() throws ParseException {
+ Command statement = null;
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ case HELP:
+ case CLEAR:
+ case SHOW:
+ case DESCRIBE:
+ case CREATE:
+ case DROP:
+ case DFS:
+ case JAR:
+ case EXIT:
+ case INSERT:
+ case DELETE:
+ case SELECT:
+ case 38:
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ case HELP:
+ case CLEAR:
+ case SHOW:
+ case DESCRIBE:
+ case CREATE:
+ case DROP:
+ case DFS:
+ case JAR:
+ case EXIT:
+ case INSERT:
+ case DELETE:
+ case SELECT:
+ statement = cmdStatement();
+ break;
+ default:
+ jj_la1[0] = jj_gen;
+ ;
+ }
+ jj_consume_token(38);
+ break;
+ case 0:
+ jj_consume_token(0);
+ break;
+ default:
+ jj_la1[1] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ {if (true) return statement;}
+ throw new Error("Missing return statement in function");
+ }
+
+ final public Command cmdStatement() throws ParseException {
+ Command cmd = null;
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ case EXIT:
+ cmd = exitCommand();
+ break;
+ case HELP:
+ cmd = helpCommand();
+ break;
+ case SHOW:
+ cmd = showCommand();
+ break;
+ case DESCRIBE:
+ cmd = descCommand();
+ break;
+ case CREATE:
+ cmd = createCommand();
+ break;
+ case DROP:
+ cmd = dropCommand();
+ break;
+ case INSERT:
+ cmd = insertCommand();
+ break;
+ case DELETE:
+ cmd = deleteCommand();
+ break;
+ case SELECT:
+ cmd = selectCommand();
+ break;
+ case CLEAR:
+ cmd = clearCommand();
+ break;
+ case DFS:
+ cmd = dfsCommand();
+ break;
+ case JAR:
+ cmd = jarCommand();
+ break;
+ default:
+ jj_la1[2] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ {if (true) return cmd;}
+ throw new Error("Missing return statement in function");
+ }
+
+ final public ExitCommand exitCommand() throws ParseException {
+ ExitCommand exit = new ExitCommand();
+ jj_consume_token(EXIT);
+ {if (true) return exit;}
+ throw new Error("Missing return statement in function");
+ }
+
+ final public DfsCommand dfsCommand() throws ParseException {
+ Token t = null;
+ DfsCommand dfs = new DfsCommand();
+ List query = new ArrayList();
+ jj_consume_token(DFS);
+ label_1:
+ while (true) {
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ case ID:
+ ;
+ break;
+ default:
+ jj_la1[3] = jj_gen;
+ break label_1;
+ }
+ t = jj_consume_token(ID);
+ query.add(t.image.toString());
+ }
+ dfs.setQuery(query);
+ {if (true) return dfs;}
+ throw new Error("Missing return statement in function");
+ }
+
+ final public JarCommand jarCommand() throws ParseException {
+ Token t = null;
+ JarCommand jar = new JarCommand();
+ List query = new ArrayList();
+ jj_consume_token(JAR);
+ label_2:
+ while (true) {
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ case ID:
+ ;
+ break;
+ default:
+ jj_la1[4] = jj_gen;
+ break label_2;
+ }
+ t = jj_consume_token(ID);
+ query.add(t.image.toString());
+ }
+ jar.setQuery(query);
+ {if (true) return jar;}
+ throw new Error("Missing return statement in function");
+ }
+
+ final public HelpCommand helpCommand() throws ParseException {
+ Token t = null;
+ HelpCommand help = new HelpCommand();
+ String argument = "";
+ jj_consume_token(HELP);
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ case CLEAR:
+ case SHOW:
+ case DESCRIBE:
+ case CREATE:
+ case DROP:
+ case DFS:
+ case JAR:
+ case EXIT:
+ case INSERT:
+ case DELETE:
+ case SELECT:
+ case ID:
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ case SHOW:
+ t = jj_consume_token(SHOW);
+ break;
+ case DESCRIBE:
+ t = jj_consume_token(DESCRIBE);
+ break;
+ case CREATE:
+ t = jj_consume_token(CREATE);
+ break;
+ case DROP:
+ t = jj_consume_token(DROP);
+ break;
+ case EXIT:
+ t = jj_consume_token(EXIT);
+ break;
+ case INSERT:
+ t = jj_consume_token(INSERT);
+ break;
+ case DELETE:
+ t = jj_consume_token(DELETE);
+ break;
+ case SELECT:
+ t = jj_consume_token(SELECT);
+ break;
+ case CLEAR:
+ t = jj_consume_token(CLEAR);
+ break;
+ case DFS:
+ t = jj_consume_token(DFS);
+ break;
+ case JAR:
+ t = jj_consume_token(JAR);
+ break;
+ case ID:
+ t = jj_consume_token(ID);
+ break;
+ default:
+ jj_la1[5] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ argument = t.image.toString();
+ break;
+ default:
+ jj_la1[6] = jj_gen;
+ ;
+ }
+ help.setArgument(argument);
+ {if (true) return help;}
+ throw new Error("Missing return statement in function");
+ }
+
+ final public ShowCommand showCommand() throws ParseException {
+ ShowCommand show = new ShowCommand();
+ String argument = null;
+ jj_consume_token(SHOW);
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ case ID:
+ case QUOTED_STRING:
+ argument = getString();
+ break;
+ default:
+ jj_la1[7] = jj_gen;
+ ;
+ }
+ show.setArgument(argument);
+ {if (true) return show;}
+ throw new Error("Missing return statement in function");
+ }
+
+ final public DescCommand descCommand() throws ParseException {
+ DescCommand desc = new DescCommand();
+ String argument = null;
+ jj_consume_token(DESCRIBE);
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ case ID:
+ case QUOTED_STRING:
+ argument = getString();
+ break;
+ default:
+ jj_la1[8] = jj_gen;
+ ;
+ }
+ desc.setArgument(argument);
+ {if (true) return desc;}
+ throw new Error("Missing return statement in function");
+ }
+
+ final public CreateCommand createCommand() throws ParseException {
+ CreateCommand create = new CreateCommand();
+ String argument = null;
+ List columnfamilies = null;
+ int limit = 1;
+ jj_consume_token(CREATE);
+ argument = getString();
+ create.setTable(argument);
+ jj_consume_token(COLUMNFAMILIES);
+ columnfamilies = getLiteralValues();
+ create.setColumnfamilies(columnfamilies);
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ case LIMIT:
+ jj_consume_token(LIMIT);
+ jj_consume_token(EQUALS);
+ limit = getInt();
+ try{
+ create.setLimit(limit);
+ }catch(ClassCastException ce) {
+ {if (true) throw generateParseException();}
+ }
+ break;
+ default:
+ jj_la1[9] = jj_gen;
+ ;
+ }
+ {if (true) return create;}
+ throw new Error("Missing return statement in function");
+ }
+
+ final public DropCommand dropCommand() throws ParseException {
+ DropCommand drop = new DropCommand();
+ String argument = null;
+ jj_consume_token(DROP);
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ case ID:
+ case QUOTED_STRING:
+ argument = getString();
+ break;
+ default:
+ jj_la1[10] = jj_gen;
+ ;
+ }
+ drop.setArgument(argument);
+ {if (true) return drop;}
+ throw new Error("Missing return statement in function");
+ }
+
+ final public InsertCommand insertCommand() throws ParseException {
+ InsertCommand in = new InsertCommand();
+ Map> cond = null;
+ List columnfamilies = null;
+ List values = null;
+ String table = null;
+ jj_consume_token(INSERT);
+ table = getString();
+ in.setTable(table);
+ columnfamilies = getLiteralValues();
+ in.setColumnfamilies(columnfamilies);
+ jj_consume_token(VALUES);
+ values = getLiteralValues();
+ in.setValues(values);
+ jj_consume_token(WHERE);
+ cond = WhereClause();
+ try{
+ in.setCondition(cond);
+ }catch(ClassCastException ce) {
+ {if (true) throw generateParseException();}
+ }
+ {if (true) return in;}
+ throw new Error("Missing return statement in function");
+ }
+
+ final public DeleteCommand deleteCommand() throws ParseException {
+ DeleteCommand del = new DeleteCommand();
+ Map> cond = null;
+ String argument = null;
+ jj_consume_token(DELETE);
+ argument = getString();
+ del.setTable(argument);
+ jj_consume_token(WHERE);
+ cond = WhereClause();
+ try{
+ del.setCondition(cond);
+ }catch(ClassCastException ce) {
+ {if (true) throw generateParseException();}
+ }
+ {if (true) return del;}
+ throw new Error("Missing return statement in function");
+ }
+
+ final public SelectCommand selectCommand() throws ParseException {
+ SelectCommand select = new SelectCommand();
+ Map> cond = null;
+ String argument = null;
+ int limit;
+ jj_consume_token(SELECT);
+ argument = getString();
+ select.setTable(argument);
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ case WHERE:
+ jj_consume_token(WHERE);
+ cond = WhereClause();
+ try{
+ select.setCondition(cond);
+ }catch(ClassCastException ce) {
+ {if (true) throw generateParseException();}
+ }
+ break;
+ default:
+ jj_la1[11] = jj_gen;
+ ;
+ }
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ case LIMIT:
+ jj_consume_token(LIMIT);
+ jj_consume_token(EQUALS);
+ limit = getInt();
+ try{
+ select.setLimit(limit);
+ }catch(ClassCastException ce) {
+ {if (true) throw generateParseException();}
+ }
+ break;
+ default:
+ jj_la1[12] = jj_gen;
+ ;
+ }
+ {if (true) return select;}
+ throw new Error("Missing return statement in function");
+ }
+
+ final public ClearCommand clearCommand() throws ParseException {
+ ClearCommand clear = new ClearCommand();
+ jj_consume_token(CLEAR);
+ {if (true) return clear;}
+ throw new Error("Missing return statement in function");
+ }
+
/**
* TODO : expressions codes need more love.
-*/
- final public String getString() throws ParseException {
- Token t = null;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case ID:
- t = jj_consume_token(ID);
- break;
- case QUOTED_STRING:
- t = jj_consume_token(QUOTED_STRING);
- break;
- default:
- jj_la1[12] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- {if (true) return t.image.toString();}
- throw new Error("Missing return statement in function");
- }
-
- final public int getInt() throws ParseException {
- Token t = null;
- t = jj_consume_token(NUM);
- {if (true) return Integer.parseInt(t.image.toString());}
- throw new Error("Missing return statement in function");
- }
-
- final public Map> WhereClause() throws ParseException {
- Map> result =
- new HashMap>();
- List exception =
- new ArrayList();
- try{
- result.putAll(ConditionExpression());
- }catch(ParseException pe) {
- exception.add(pe.toString());
- result.put("error", exception);
- }
- label_2:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case AND:
- ;
- break;
- default:
- jj_la1[13] = jj_gen;
- break label_2;
- }
- jj_consume_token(AND);
- try{
- result.putAll(ConditionExpression());
- }catch(ParseException pe) {
- exception.add(pe.toString());
- result.put("error", exception);
- }
- }
- {if (true) return result;}
- throw new Error("Missing return statement in function");
- }
-
- final public Map> ConditionExpression() throws ParseException {
- Token tSearchName, tComparator, tComparand;
- Map> tmp =
- new HashMap>();
- List values =
- new ArrayList();
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case ROW:
- tSearchName = jj_consume_token(ROW);
- break;
- case COLUMN:
- tSearchName = jj_consume_token(COLUMN);
- break;
- case TIME:
- tSearchName = jj_consume_token(TIME);
- break;
- case ID:
- tSearchName = jj_consume_token(ID);
- break;
- case VALUES:
- tSearchName = jj_consume_token(VALUES);
- break;
- case COLUMNFAMILIES:
- tSearchName = jj_consume_token(COLUMNFAMILIES);
- break;
- default:
- jj_la1[14] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case EQUALS:
- tComparator = jj_consume_token(EQUALS);
- break;
- case NOTEQUAL:
- tComparator = jj_consume_token(NOTEQUAL);
- break;
- default:
- jj_la1[15] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case QUOTED_STRING:
- tComparand = jj_consume_token(QUOTED_STRING);
- values.add("quoted string");
- tmp.put("error", values);
- {if (true) return tmp;}
- break;
- case STRING_LITERAL:
- tComparand = jj_consume_token(STRING_LITERAL);
- values.add(tComparator.image);
- values.add(tComparand.image.substring(1,tComparand.image.length() - 1));
-
- if(tSearchName.image.toString().equals("row") ||
- tSearchName.image.toString().equals("column") ||
- tSearchName.image.toString().equals("time"))
- { tmp.put(tSearchName.image, values); }
- else
- {
- values.add(tSearchName.image.toString());
- tmp.put("error", values);
- }
-
- {if (true) return tmp;}
- break;
- default:
- jj_la1[16] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- throw new Error("Missing return statement in function");
- }
-
- final public List getLiteralValues() throws ParseException {
- List values = new ArrayList();
- String literal = null;
- jj_consume_token(LPAREN);
- literal = getStringLiteral();
- if(literal != null) values.add(literal);
- label_3:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case COMMA:
- case ID:
- case STRING:
- case QUOTED_STRING:
- case STRING_LITERAL:
- ;
- break;
- default:
- jj_la1[17] = jj_gen;
- break label_3;
- }
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case COMMA:
- jj_consume_token(COMMA);
- literal = getStringLiteral();
- if(literal != null) values.add(literal);
- break;
- case ID:
- case STRING:
- case QUOTED_STRING:
- case STRING_LITERAL:
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case ID:
- jj_consume_token(ID);
- break;
- case STRING_LITERAL:
- jj_consume_token(STRING_LITERAL);
- break;
- case QUOTED_STRING:
- jj_consume_token(QUOTED_STRING);
- break;
- case STRING:
- jj_consume_token(STRING);
- break;
- default:
- jj_la1[18] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- values.removeAll(values);
- break;
- default:
- jj_la1[19] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- }
- jj_consume_token(RPAREN);
- {if (true) return values;}
- throw new Error("Missing return statement in function");
- }
-
- final public String getStringLiteral() throws ParseException {
- Token stringLiteral;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case STRING_LITERAL:
- stringLiteral = jj_consume_token(STRING_LITERAL);
- {if (true) return stringLiteral.image.substring(1,stringLiteral.image.length() - 1);}
- break;
- case QUOTED_STRING:
- jj_consume_token(QUOTED_STRING);
- {if (true) return null;}
- break;
- default:
- jj_la1[20] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- throw new Error("Missing return statement in function");
- }
-
- public ParserTokenManager token_source;
- SimpleCharStream jj_input_stream;
- public Token token, jj_nt;
- private int jj_ntk;
- private int jj_gen;
- final private int[] jj_la1 = new int[21];
- static private int[] jj_la1_0;
- static private int[] jj_la1_1;
- static {
- jj_la1_0();
- jj_la1_1();
- }
- private static void jj_la1_0() {
- jj_la1_0 = new int[] {0xffe0,0xffe1,0xffe0,0x0,0xffc0,0xffc0,0x0,0x0,0x400000,0x0,0x200000,0x400000,0x0,0x800000,0x1f0000,0x60000000,0x0,0x2000000,0x0,0x2000000,0x0,};
- }
- private static void jj_la1_1() {
- jj_la1_1 = new int[] {0x0,0x20,0x0,0x1,0x1,0x1,0x9,0x9,0x0,0x9,0x0,0x0,0x9,0x0,0x1,0x0,0x18,0x1d,0x1d,0x1d,0x18,};
- }
-
- public Parser(java.io.InputStream stream) {
- this(stream, null);
- }
- public Parser(java.io.InputStream stream, String encoding) {
- try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
- token_source = new ParserTokenManager(jj_input_stream);
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 21; i++) jj_la1[i] = -1;
- }
-
- public void ReInit(java.io.InputStream stream) {
- ReInit(stream, null);
- }
- public void ReInit(java.io.InputStream stream, String encoding) {
- try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
- token_source.ReInit(jj_input_stream);
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 21; i++) jj_la1[i] = -1;
- }
-
- public Parser(java.io.Reader stream) {
- jj_input_stream = new SimpleCharStream(stream, 1, 1);
- token_source = new ParserTokenManager(jj_input_stream);
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 21; i++) jj_la1[i] = -1;
- }
-
- public void ReInit(java.io.Reader stream) {
- jj_input_stream.ReInit(stream, 1, 1);
- token_source.ReInit(jj_input_stream);
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 21; i++) jj_la1[i] = -1;
- }
-
- public Parser(ParserTokenManager tm) {
- token_source = tm;
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 21; i++) jj_la1[i] = -1;
- }
-
- public void ReInit(ParserTokenManager tm) {
- token_source = tm;
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 21; i++) jj_la1[i] = -1;
- }
-
- final private Token jj_consume_token(int kind) throws ParseException {
- Token oldToken;
- if ((oldToken = token).next != null) token = token.next;
- else token = token.next = token_source.getNextToken();
- jj_ntk = -1;
- if (token.kind == kind) {
- jj_gen++;
- return token;
- }
- token = oldToken;
- jj_kind = kind;
- throw generateParseException();
- }
-
- final public Token getNextToken() {
- if (token.next != null) token = token.next;
- else token = token.next = token_source.getNextToken();
- jj_ntk = -1;
- jj_gen++;
- return token;
- }
-
- final public Token getToken(int index) {
- Token t = token;
- for (int i = 0; i < index; i++) {
- if (t.next != null) t = t.next;
- else t = t.next = token_source.getNextToken();
- }
- return t;
- }
-
- final private int jj_ntk() {
- if ((jj_nt=token.next) == null)
- return (jj_ntk = (token.next=token_source.getNextToken()).kind);
- else
- return (jj_ntk = jj_nt.kind);
- }
-
- private java.util.Vector jj_expentries = new java.util.Vector();
- private int[] jj_expentry;
- private int jj_kind = -1;
-
- public ParseException generateParseException() {
- jj_expentries.removeAllElements();
- boolean[] la1tokens = new boolean[38];
- for (int i = 0; i < 38; i++) {
- la1tokens[i] = false;
- }
- if (jj_kind >= 0) {
- la1tokens[jj_kind] = true;
- jj_kind = -1;
- }
- for (int i = 0; i < 21; i++) {
- if (jj_la1[i] == jj_gen) {
- for (int j = 0; j < 32; j++) {
- if ((jj_la1_0[i] & (1<> WhereClause() throws ParseException {
+ Map> result =
+ new HashMap>();
+ List exception =
+ new ArrayList();
+ try{
+ result.putAll(ConditionExpression());
+ }catch(ParseException pe) {
+ exception.add(pe.toString());
+ result.put("error", exception);
+ }
+ label_3:
+ while (true) {
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ case AND:
+ ;
+ break;
+ default:
+ jj_la1[14] = jj_gen;
+ break label_3;
+ }
+ jj_consume_token(AND);
+ try{
+ result.putAll(ConditionExpression());
+ }catch(ParseException pe) {
+ exception.add(pe.toString());
+ result.put("error", exception);
+ }
+ }
+ {if (true) return result;}
+ throw new Error("Missing return statement in function");
+ }
+
+ final public Map> ConditionExpression() throws ParseException {
+ Token tSearchName, tComparator, tComparand;
+ Map> tmp =
+ new HashMap>();
+ List values =
+ new ArrayList();
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ case ROW:
+ tSearchName = jj_consume_token(ROW);
+ break;
+ case COLUMN:
+ tSearchName = jj_consume_token(COLUMN);
+ break;
+ case TIME:
+ tSearchName = jj_consume_token(TIME);
+ break;
+ case ID:
+ tSearchName = jj_consume_token(ID);
+ break;
+ case VALUES:
+ tSearchName = jj_consume_token(VALUES);
+ break;
+ case COLUMNFAMILIES:
+ tSearchName = jj_consume_token(COLUMNFAMILIES);
+ break;
+ default:
+ jj_la1[15] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ case EQUALS:
+ tComparator = jj_consume_token(EQUALS);
+ break;
+ case NOTEQUAL:
+ tComparator = jj_consume_token(NOTEQUAL);
+ break;
+ default:
+ jj_la1[16] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ case QUOTED_STRING:
+ tComparand = jj_consume_token(QUOTED_STRING);
+ values.add("quoted string");
+ tmp.put("error", values);
+ {if (true) return tmp;}
+ break;
+ case STRING_LITERAL:
+ tComparand = jj_consume_token(STRING_LITERAL);
+ values.add(tComparator.image);
+ values.add(tComparand.image.substring(1,tComparand.image.length() - 1));
+
+ if(tSearchName.image.toString().equals("row") ||
+ tSearchName.image.toString().equals("column") ||
+ tSearchName.image.toString().equals("time"))
+ { tmp.put(tSearchName.image, values); }
+ else
+ {
+ values.add(tSearchName.image.toString());
+ tmp.put("error", values);
+ }
+
+ {if (true) return tmp;}
+ break;
+ default:
+ jj_la1[17] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ throw new Error("Missing return statement in function");
+ }
+
+ final public List getLiteralValues() throws ParseException {
+ List values = new ArrayList();
+ String literal = null;
+ jj_consume_token(LPAREN);
+ literal = getStringLiteral();
+ if(literal != null) values.add(literal);
+ label_4:
+ while (true) {
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ case COMMA:
+ case ID:
+ case STRING:
+ case QUOTED_STRING:
+ case STRING_LITERAL:
+ ;
+ break;
+ default:
+ jj_la1[18] = jj_gen;
+ break label_4;
+ }
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ case COMMA:
+ jj_consume_token(COMMA);
+ literal = getStringLiteral();
+ if(literal != null) values.add(literal);
+ break;
+ case ID:
+ case STRING:
+ case QUOTED_STRING:
+ case STRING_LITERAL:
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ case ID:
+ jj_consume_token(ID);
+ break;
+ case STRING_LITERAL:
+ jj_consume_token(STRING_LITERAL);
+ break;
+ case QUOTED_STRING:
+ jj_consume_token(QUOTED_STRING);
+ break;
+ case STRING:
+ jj_consume_token(STRING);
+ break;
+ default:
+ jj_la1[19] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ values.removeAll(values);
+ break;
+ default:
+ jj_la1[20] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ }
+ jj_consume_token(RPAREN);
+ {if (true) return values;}
+ throw new Error("Missing return statement in function");
+ }
+
+ final public String getStringLiteral() throws ParseException {
+ Token stringLiteral;
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
+ case STRING_LITERAL:
+ stringLiteral = jj_consume_token(STRING_LITERAL);
+ {if (true) return stringLiteral.image.substring(1,stringLiteral.image.length() - 1);}
+ break;
+ case QUOTED_STRING:
+ jj_consume_token(QUOTED_STRING);
+ {if (true) return null;}
+ break;
+ default:
+ jj_la1[21] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ throw new Error("Missing return statement in function");
+ }
+
+ public ParserTokenManager token_source;
+ SimpleCharStream jj_input_stream;
+ public Token token, jj_nt;
+ private int jj_ntk;
+ private int jj_gen;
+ final private int[] jj_la1 = new int[22];
+ static private int[] jj_la1_0;
+ static private int[] jj_la1_1;
+ static {
+ jj_la1_0();
+ jj_la1_1();
+ }
+ private static void jj_la1_0() {
+ jj_la1_0 = new int[] {0x1ffe0,0x1ffe1,0x1ffe0,0x0,0x0,0x1ffc0,0x1ffc0,0x0,0x0,0x800000,0x0,0x400000,0x800000,0x0,0x1000000,0x3e0000,0xc0000000,0x0,0x4000000,0x0,0x4000000,0x0,};
+ }
+ private static void jj_la1_1() {
+ jj_la1_1 = new int[] {0x0,0x40,0x0,0x2,0x2,0x2,0x2,0x12,0x12,0x0,0x12,0x0,0x0,0x12,0x0,0x2,0x0,0x30,0x3a,0x3a,0x3a,0x30,};
+ }
+
+ public Parser(java.io.InputStream stream) {
+ this(stream, null);
+ }
+ public Parser(java.io.InputStream stream, String encoding) {
+ try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
+ token_source = new ParserTokenManager(jj_input_stream);
+ token = new Token();
+ jj_ntk = -1;
+ jj_gen = 0;
+ for (int i = 0; i < 22; i++) jj_la1[i] = -1;
+ }
+
+ public void ReInit(java.io.InputStream stream) {
+ ReInit(stream, null);
+ }
+ public void ReInit(java.io.InputStream stream, String encoding) {
+ try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
+ token_source.ReInit(jj_input_stream);
+ token = new Token();
+ jj_ntk = -1;
+ jj_gen = 0;
+ for (int i = 0; i < 22; i++) jj_la1[i] = -1;
+ }
+
+ public Parser(java.io.Reader stream) {
+ jj_input_stream = new SimpleCharStream(stream, 1, 1);
+ token_source = new ParserTokenManager(jj_input_stream);
+ token = new Token();
+ jj_ntk = -1;
+ jj_gen = 0;
+ for (int i = 0; i < 22; i++) jj_la1[i] = -1;
+ }
+
+ public void ReInit(java.io.Reader stream) {
+ jj_input_stream.ReInit(stream, 1, 1);
+ token_source.ReInit(jj_input_stream);
+ token = new Token();
+ jj_ntk = -1;
+ jj_gen = 0;
+ for (int i = 0; i < 22; i++) jj_la1[i] = -1;
+ }
+
+ public Parser(ParserTokenManager tm) {
+ token_source = tm;
+ token = new Token();
+ jj_ntk = -1;
+ jj_gen = 0;
+ for (int i = 0; i < 22; i++) jj_la1[i] = -1;
+ }
+
+ public void ReInit(ParserTokenManager tm) {
+ token_source = tm;
+ token = new Token();
+ jj_ntk = -1;
+ jj_gen = 0;
+ for (int i = 0; i < 22; i++) jj_la1[i] = -1;
+ }
+
+ final private Token jj_consume_token(int kind) throws ParseException {
+ Token oldToken;
+ if ((oldToken = token).next != null) token = token.next;
+ else token = token.next = token_source.getNextToken();
+ jj_ntk = -1;
+ if (token.kind == kind) {
+ jj_gen++;
+ return token;
+ }
+ token = oldToken;
+ jj_kind = kind;
+ throw generateParseException();
+ }
+
+ final public Token getNextToken() {
+ if (token.next != null) token = token.next;
+ else token = token.next = token_source.getNextToken();
+ jj_ntk = -1;
+ jj_gen++;
+ return token;
+ }
+
+ final public Token getToken(int index) {
+ Token t = token;
+ for (int i = 0; i < index; i++) {
+ if (t.next != null) t = t.next;
+ else t = t.next = token_source.getNextToken();
+ }
+ return t;
+ }
+
+ final private int jj_ntk() {
+ if ((jj_nt=token.next) == null)
+ return (jj_ntk = (token.next=token_source.getNextToken()).kind);
+ else
+ return (jj_ntk = jj_nt.kind);
+ }
+
+ private java.util.Vector jj_expentries = new java.util.Vector();
+ private int[] jj_expentry;
+ private int jj_kind = -1;
+
+ public ParseException generateParseException() {
+ jj_expentries.removeAllElements();
+ boolean[] la1tokens = new boolean[39];
+ for (int i = 0; i < 39; i++) {
+ la1tokens[i] = false;
+ }
+ if (jj_kind >= 0) {
+ la1tokens[jj_kind] = true;
+ jj_kind = -1;
+ }
+ for (int i = 0; i < 22; i++) {
+ if (jj_la1[i] == jj_gen) {
+ for (int j = 0; j < 32; j++) {
+ if ((jj_la1_0[i] & (1<
|
|
- |
+ |
+ |
|
|
|
@@ -93,7 +96,7 @@
TOKEN :
{
-
+
|
|
|
@@ -130,7 +133,8 @@
| cmd = deleteCommand()
| cmd = selectCommand()
| cmd = clearCommand()
- | cmd = fsCommand()
+ | cmd = dfsCommand()
+ | cmd = jarCommand()
)
{
return cmd;
@@ -145,25 +149,44 @@
{ return exit; }
}
-FsCommand fsCommand() :
+DfsCommand dfsCommand() :
{
Token t = null;
- FsCommand fs = new FsCommand();
+ DfsCommand dfs = new DfsCommand();
List query = new ArrayList();
}
{
-
+
(
t =
{ query.add(t.image.toString()); }
)*
{
- fs.setQuery(query);
- return fs;
+ dfs.setQuery(query);
+ return dfs;
}
}
+JarCommand jarCommand() :
+{
+ Token t = null;
+ JarCommand jar = new JarCommand();
+ List query = new ArrayList();
+}
+{
+
+ (
+ t =
+ { query.add(t.image.toString()); }
+ )*
+
+ {
+ jar.setQuery(query);
+ return jar;
+ }
+}
+
HelpCommand helpCommand() :
{
Token t = null;
@@ -183,7 +206,8 @@
| t=
| t=