Index: src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/generated/HQLParser.java =================================================================== --- src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/generated/HQLParser.java (revision 613005) +++ src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/generated/HQLParser.java (working copy) @@ -1,1397 +1,1412 @@ -/* Generated By:JavaCC: Do not edit this line. HQLParser.java */ -package org.apache.hadoop.hbase.hql.generated; - -/** - * 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. - */ - -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 java.io.Writer; -import java.net.URLEncoder; -import java.io.UnsupportedEncodingException; - -import org.apache.hadoop.hbase.hql.*; - -/** - * Parsing command line. - */ -public class HQLParser implements HQLParserConstants { - private String QueryString; - private TableFormatter formatter; - private Writer out; - - public HQLParser(final String query, final Writer o, final TableFormatter f) { - this((Reader)(new StringReader(query))); - this.QueryString = query; - this.formatter = f; - this.out = o; - } - - 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 ALTER: - case CLEAR: - case SHOW: - case DESCRIBE: - case DESC: - case CREATE: - case DROP: - case TRUNCATE: - case FS: - case JAR: - case EXIT: - case INSERT: - case DELETE: - case SELECT: - case ENABLE: - case DISABLE: - case 68: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case HELP: - case ALTER: - case CLEAR: - case SHOW: - case DESCRIBE: - case DESC: - case CREATE: - case DROP: - case TRUNCATE: - case FS: - case JAR: - case EXIT: - case INSERT: - case DELETE: - case SELECT: - case ENABLE: - case DISABLE: - statement = cmdStatement(); - break; - default: - jj_la1[0] = jj_gen; - ; - } - jj_consume_token(68); - 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: - case DESC: - cmd = descCommand(); - break; - case CREATE: - cmd = createCommand(); - break; - case DROP: - cmd = dropCommand(); - break; - case TRUNCATE: - cmd = truncateCommand(); - break; - case ALTER: - cmd = alterCommand(); - break; - case INSERT: - cmd = insertCommand(); - break; - case DELETE: - cmd = deleteCommand(); - break; - case SELECT: - cmd = selectCommand(); - break; - case ENABLE: - cmd = enableCommand(); - break; - case DISABLE: - cmd = disableCommand(); - break; - case CLEAR: - cmd = clearCommand(); - break; - case FS: - cmd = fsCommand(); - 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(this.out); - 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(this.out); - 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 JarCommand jarCommand() throws ParseException { - Token t = null; - JarCommand jar = new JarCommand(this.out); - List query = new ArrayList(); - jj_consume_token(JAR); - label_2: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case ID: - case INTEGER_LITERAL: - case FLOATING_POINT_LITERAL: - ; - break; - default: - jj_la1[4] = jj_gen; - break label_2; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case ID: - t = jj_consume_token(ID); - break; - case INTEGER_LITERAL: - t = jj_consume_token(INTEGER_LITERAL); - break; - case FLOATING_POINT_LITERAL: - t = jj_consume_token(FLOATING_POINT_LITERAL); - break; - default: - jj_la1[5] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - query.add(t.image.toString()); - } - jar.setQuery(query); - {if (true) return jar;} - throw new Error("Missing return statement in function"); - } - - final public TruncateCommand truncateCommand() throws ParseException { - TruncateCommand truncate = new TruncateCommand(this.out); - String tableName = null; - jj_consume_token(TRUNCATE); - jj_consume_token(TABLE); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case ID: - case QUOTED_IDENTIFIER: - case STRING_LITERAL: - tableName = identifier(); - break; - default: - jj_la1[6] = jj_gen; - ; - } - truncate.setTableName(tableName); - {if (true) return truncate;} - throw new Error("Missing return statement in function"); - } - - final public HelpCommand helpCommand() throws ParseException { - Token t = null; - HelpCommand help = new HelpCommand(this.out, this.formatter); - String argument = ""; - jj_consume_token(HELP); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case ALTER: - case CLEAR: - case SHOW: - case DESCRIBE: - case CREATE: - case DROP: - case FS: - 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 ALTER: - t = jj_consume_token(ALTER); - break; - case CLEAR: - t = jj_consume_token(CLEAR); - break; - case FS: - t = jj_consume_token(FS); - break; - case JAR: - t = jj_consume_token(JAR); - break; - case ID: - t = jj_consume_token(ID); - break; - default: - jj_la1[7] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - argument = t.image.toString(); - break; - default: - jj_la1[8] = 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(this.out, this.formatter); - String argument = null; - jj_consume_token(SHOW); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case ID: - case QUOTED_IDENTIFIER: - case STRING_LITERAL: - argument = identifier(); - break; - default: - jj_la1[9] = 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(this.out, this.formatter); - String argument = null; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case DESCRIBE: - jj_consume_token(DESCRIBE); - break; - case DESC: - jj_consume_token(DESC); - break; - default: - jj_la1[10] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - argument = identifier(); - desc.setArgument(argument); - {if (true) return desc;} - throw new Error("Missing return statement in function"); - } - - final public Map ColumnSpec() throws ParseException { - Map columnSpec = new HashMap(); - int n = -1; - Token t = null; - label_3: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case MAX_VERSIONS: - case MAX_LENGTH: - case COMPRESSION: - case IN_MEMORY: - case BLOOMFILTER: - case VECTOR_SIZE: - case NUM_HASH: - case NUM_ENTRIES: - ; - break; - default: - jj_la1[11] = jj_gen; - break label_3; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case MAX_VERSIONS: - jj_consume_token(MAX_VERSIONS); - jj_consume_token(EQUALS); - n = number(); - if(n < 0) { - n = Integer.MAX_VALUE; - } - columnSpec.put("MAX_VERSIONS", n); - break; - case MAX_LENGTH: - jj_consume_token(MAX_LENGTH); - jj_consume_token(EQUALS); - n = number(); - columnSpec.put("MAX_LENGTH", n); - break; - case COMPRESSION: - jj_consume_token(COMPRESSION); - jj_consume_token(EQUALS); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case NONE: - t = jj_consume_token(NONE); - break; - case BLOCK: - t = jj_consume_token(BLOCK); - break; - case RECORD: - t = jj_consume_token(RECORD); - break; - default: - jj_la1[12] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - columnSpec.put("COMPRESSION", t.image.toString()); - break; - case IN_MEMORY: - jj_consume_token(IN_MEMORY); - columnSpec.put("IN_MEMORY", true); - break; - case BLOOMFILTER: - jj_consume_token(BLOOMFILTER); - jj_consume_token(EQUALS); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case BLOOMFILTER: - t = jj_consume_token(BLOOMFILTER); - break; - case COUNTING_BLOOMFILTER: - t = jj_consume_token(COUNTING_BLOOMFILTER); - break; - case RETOUCHED_BLOOMFILTER: - t = jj_consume_token(RETOUCHED_BLOOMFILTER); - break; - default: - jj_la1[13] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - columnSpec.put("BLOOMFILTER", t.image.toString()); - break; - case VECTOR_SIZE: - jj_consume_token(VECTOR_SIZE); - jj_consume_token(EQUALS); - n = number(); - columnSpec.put("VECTOR_SIZE", n); - break; - case NUM_HASH: - jj_consume_token(NUM_HASH); - jj_consume_token(EQUALS); - n = number(); - columnSpec.put("NUM_HASH", n); - break; - case NUM_ENTRIES: - jj_consume_token(NUM_ENTRIES); - jj_consume_token(EQUALS); - n = number(); - columnSpec.put("NUM_ENTRIES", n); - break; - default: - jj_la1[14] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - {if (true) return columnSpec;} - throw new Error("Missing return statement in function"); - } - - final public CreateCommand createCommand() throws ParseException { - CreateCommand createCommand = new CreateCommand(this.out); - String table = null; - Map columnSpec = null; - String column = null; - jj_consume_token(CREATE); - jj_consume_token(TABLE); - table = identifier(); - createCommand.setTable(table); - jj_consume_token(LPAREN); - column = identifier(); - columnSpec = ColumnSpec(); - createCommand.addColumnSpec(column, columnSpec); - label_4: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case COMMA: - ; - break; - default: - jj_la1[15] = jj_gen; - break label_4; - } - jj_consume_token(COMMA); - column = identifier(); - columnSpec = ColumnSpec(); - createCommand.addColumnSpec(column, columnSpec); - } - jj_consume_token(RPAREN); - {if (true) return createCommand;} - throw new Error("Missing return statement in function"); - } - - final public AlterCommand alterCommand() throws ParseException { - AlterCommand alterCommand = new AlterCommand(this.out); - String table = null; - String column = null; - Map columnSpec = null; - jj_consume_token(ALTER); - jj_consume_token(TABLE); - table = identifier(); - alterCommand.setTable(table); - if (jj_2_1(2)) { - jj_consume_token(ADD); - column = identifier(); - columnSpec = ColumnSpec(); - alterCommand.setOperationType(AlterCommand.OperationType.ADD); - alterCommand.addColumnSpec(column, columnSpec); - } else { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case ADD: - jj_consume_token(ADD); - jj_consume_token(LPAREN); - alterCommand.setOperationType(AlterCommand.OperationType.ADD); - column = identifier(); - columnSpec = ColumnSpec(); - alterCommand.addColumnSpec(column, columnSpec); - label_5: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case COMMA: - ; - break; - default: - jj_la1[16] = jj_gen; - break label_5; - } - jj_consume_token(COMMA); - column = identifier(); - columnSpec = ColumnSpec(); - alterCommand.addColumnSpec(column, columnSpec); - } - jj_consume_token(RPAREN); - break; - case DROP: - jj_consume_token(DROP); - column = identifier(); - alterCommand.setOperationType(AlterCommand.OperationType.DROP); - alterCommand.setColumn(column); - break; - case CHANGE: - jj_consume_token(CHANGE); - column = identifier(); - columnSpec = ColumnSpec(); - alterCommand.setOperationType(AlterCommand.OperationType.CHANGE); - alterCommand.addColumnSpec(column, columnSpec); - break; - default: - jj_la1[17] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - {if (true) return alterCommand;} - throw new Error("Missing return statement in function"); - } - - final public DropCommand dropCommand() throws ParseException { - DropCommand drop = new DropCommand(this.out); - List tableList = null; - jj_consume_token(DROP); - jj_consume_token(TABLE); - tableList = tableList(); - drop.setTableList(tableList); - {if (true) return drop;} - throw new Error("Missing return statement in function"); - } - - final public InsertCommand insertCommand() throws ParseException { - InsertCommand in = new InsertCommand(this.out); - List columnfamilies = null; - List values = null; - String table = null; - String timestamp = null; - Token t = null; - jj_consume_token(INSERT); - jj_consume_token(INTO); - table = identifier(); - in.setTable(table); - columnfamilies = getColumns(); - in.setColumnfamilies(columnfamilies); - jj_consume_token(VALUES); - values = getLiteralValues(); - in.setValues(values); - jj_consume_token(WHERE); - jj_consume_token(ROW); - jj_consume_token(EQUALS); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case STRING_LITERAL: - t = jj_consume_token(STRING_LITERAL); - break; - case QUOTED_IDENTIFIER: - t = jj_consume_token(QUOTED_IDENTIFIER); - break; - default: - jj_la1[18] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - in.setRow(t.image.substring(1, t.image.length()-1)); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case TIMESTAMP: - jj_consume_token(TIMESTAMP); - timestamp = getStringLiteral(); - in.setTimestamp(timestamp); - break; - default: - jj_la1[19] = jj_gen; - ; - } - {if (true) return in;} - throw new Error("Missing return statement in function"); - } - - final public DeleteCommand deleteCommand() throws ParseException { - DeleteCommand deleteCommand = new DeleteCommand(this.out); - List columnList = null; - Token t = null; - String table = null; - jj_consume_token(DELETE); - columnList = columnList(); - deleteCommand.setColumnList(columnList); - jj_consume_token(FROM); - table = identifier(); - deleteCommand.setTable(table); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case WHERE: - jj_consume_token(WHERE); - jj_consume_token(ROW); - jj_consume_token(EQUALS); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case STRING_LITERAL: - t = jj_consume_token(STRING_LITERAL); - break; - case QUOTED_IDENTIFIER: - t = jj_consume_token(QUOTED_IDENTIFIER); - break; - default: - jj_la1[20] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - deleteCommand.setRow(t.image.substring(1, t.image.length()-1)); - break; - default: - jj_la1[21] = jj_gen; - ; - } - {if (true) return deleteCommand;} - throw new Error("Missing return statement in function"); - } - - final public SelectCommand selectCommand() throws ParseException { - SelectCommand select = new SelectCommand(this.out, this.formatter); - List columns = null; - String rowKey = ""; - String stopRow = ""; - String timestamp = null; - int numVersion = 0; - String tableName = null; - int limit; - jj_consume_token(SELECT); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case COUNT: - jj_consume_token(COUNT); - columns = getLiteralValues(); - select.setCountFunction(true); - break; - case ASTERISK: - case ID: - case INTEGER_LITERAL: - case QUOTED_IDENTIFIER: - case STRING_LITERAL: - columns = columnList(); - break; - default: - jj_la1[22] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - jj_consume_token(FROM); - tableName = identifier(); - select.setColumns(columns); - select.setTable(tableName); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case STARTING: - case WHERE: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case WHERE: - jj_consume_token(WHERE); - jj_consume_token(ROW); - jj_consume_token(EQUALS); - select.setWhere(true); - break; - case STARTING: - jj_consume_token(STARTING); - jj_consume_token(FROM); - break; - default: - jj_la1[23] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - rowKey = getStringLiteral(); - select.setRowKey(rowKey); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case UNTIL: - jj_consume_token(UNTIL); - stopRow = getStringLiteral(); - select.setStopRow(stopRow); - break; - default: - jj_la1[24] = jj_gen; - ; - } - break; - default: - jj_la1[25] = jj_gen; - ; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case TIMESTAMP: - jj_consume_token(TIMESTAMP); - timestamp = getStringLiteral(); - select.setTimestamp(timestamp); - break; - default: - jj_la1[26] = jj_gen; - ; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case NUM_VERSIONS: - jj_consume_token(NUM_VERSIONS); - jj_consume_token(EQUALS); - numVersion = number(); - select.setVersion(numVersion); - break; - default: - jj_la1[27] = jj_gen; - ; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case LIMIT: - jj_consume_token(LIMIT); - jj_consume_token(EQUALS); - limit = number(); - try{ - select.setLimit(limit); - }catch(ClassCastException ce) { - {if (true) throw generateParseException();} - } - break; - default: - jj_la1[28] = jj_gen; - ; - } - {if (true) return select;} - throw new Error("Missing return statement in function"); - } - - final public EnableCommand enableCommand() throws ParseException { - EnableCommand enableCommand = new EnableCommand(this.out); - String table = null; - jj_consume_token(ENABLE); - table = identifier(); - enableCommand.setTable(table); - {if (true) return enableCommand;} - throw new Error("Missing return statement in function"); - } - - final public DisableCommand disableCommand() throws ParseException { - DisableCommand disableCommand = new DisableCommand(this.out); - String table = null; - jj_consume_token(DISABLE); - table = identifier(); - disableCommand.setTable(table); - {if (true) return disableCommand;} - throw new Error("Missing return statement in function"); - } - - final public ClearCommand clearCommand() throws ParseException { - ClearCommand clear = new ClearCommand(this.out); - jj_consume_token(CLEAR); - {if (true) return clear;} - 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_6: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case COMMA: - ; - break; - default: - jj_la1[29] = jj_gen; - break label_6; - } - jj_consume_token(COMMA); - literal = getStringLiteral(); - if(literal != null) values.add(literal); - } - jj_consume_token(RPAREN); - {if (true) return values;} - throw new Error("Missing return statement in function"); - } - - final public String getStringLiteral() throws ParseException { - Token s; - String value = null; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case QUOTED_IDENTIFIER: - case STRING_LITERAL: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case STRING_LITERAL: - s = jj_consume_token(STRING_LITERAL); - break; - case QUOTED_IDENTIFIER: - s = jj_consume_token(QUOTED_IDENTIFIER); - break; - default: - jj_la1[30] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - value = s.image.toString(); - {if (true) return value.substring(1,value.length() - 1);} - break; - case ASTERISK: - case ID: - case INTEGER_LITERAL: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case ID: - s = jj_consume_token(ID); - break; - case INTEGER_LITERAL: - s = jj_consume_token(INTEGER_LITERAL); - break; - case ASTERISK: - s = jj_consume_token(ASTERISK); - break; - default: - jj_la1[31] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - value = s.image.toString(); - {if (true) return value;} - break; - default: - jj_la1[32] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - throw new Error("Missing return statement in function"); - } - - final public String getColumn() throws ParseException { - Token col; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case ASTERISK: - case ID: - case INTEGER_LITERAL: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case ID: - col = jj_consume_token(ID); - break; - case INTEGER_LITERAL: - col = jj_consume_token(INTEGER_LITERAL); - break; - case ASTERISK: - col = jj_consume_token(ASTERISK); - break; - default: - jj_la1[33] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - {if (true) return col.image.toString();} - break; - case QUOTED_IDENTIFIER: - case STRING_LITERAL: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case QUOTED_IDENTIFIER: - col = jj_consume_token(QUOTED_IDENTIFIER); - break; - case STRING_LITERAL: - col = jj_consume_token(STRING_LITERAL); - break; - default: - jj_la1[34] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - {if (true) return col.image.substring(1,col.image.toString().length() - 1);} - break; - default: - jj_la1[35] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - throw new Error("Missing return statement in function"); - } - - final public List getColumns() throws ParseException { - List values = new ArrayList(); - String literal = null; - jj_consume_token(LPAREN); - literal = getColumn(); - if(literal != null) values.add(literal); - label_7: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case COMMA: - ; - break; - default: - jj_la1[36] = jj_gen; - break label_7; - } - jj_consume_token(COMMA); - literal = getColumn(); - if(literal != null) values.add(literal); - } - jj_consume_token(RPAREN); - {if (true) return values;} - throw new Error("Missing return statement in function"); - } - - final public List tableList() throws ParseException { - List tableList = new ArrayList(); - String table = null; - table = identifier(); - tableList.add(table); - label_8: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case COMMA: - ; - break; - default: - jj_la1[37] = jj_gen; - break label_8; - } - jj_consume_token(COMMA); - table = identifier(); - tableList.add(table); - } - {if (true) return tableList;} - throw new Error("Missing return statement in function"); - } - - final public List columnList() throws ParseException { - List columnList = new ArrayList(); - String column = null; - column = getColumn(); - if(column != null) { - columnList.add(column); - } else { - {if (true) return columnList;} - } - label_9: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case COMMA: - ; - break; - default: - jj_la1[38] = jj_gen; - break label_9; - } - jj_consume_token(COMMA); - column = getColumn(); - columnList.add(column); - } - {if (true) return columnList;} - throw new Error("Missing return statement in function"); - } - - final public int number() throws ParseException { - Token t = null; - Token minusSignedInt = null; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case ID: - minusSignedInt = jj_consume_token(ID); - break; - case INTEGER_LITERAL: - t = jj_consume_token(INTEGER_LITERAL); - break; - default: - jj_la1[39] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - if(minusSignedInt != null) { - {if (true) return Integer.parseInt(minusSignedInt.image.toString());} - } else { - {if (true) return Integer.parseInt(t.image.toString());} - } - throw new Error("Missing return statement in function"); - } - - final public String identifier() throws ParseException { - Token t = null; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case ID: - t = jj_consume_token(ID); - {if (true) return t.image.toString();} - break; - case QUOTED_IDENTIFIER: - case STRING_LITERAL: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case QUOTED_IDENTIFIER: - t = jj_consume_token(QUOTED_IDENTIFIER); - break; - case STRING_LITERAL: - t = jj_consume_token(STRING_LITERAL); - break; - default: - jj_la1[40] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - {if (true) return t.image.substring(1,t.image.toString().length() - 1);} - break; - default: - jj_la1[41] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - throw new Error("Missing return statement in function"); - } - - final public String appendIndicator(String columnName) throws ParseException { - String column = columnName; - {if (true) return (!column.endsWith(":") && column.indexOf(":") == -1) - ? column + ":" : column;} - throw new Error("Missing return statement in function"); - } - - final private boolean jj_2_1(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_1(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(0, xla); } - } - - final private boolean jj_3R_11() { - if (jj_scan_token(ID)) return true; - return false; - } - - final private boolean jj_3R_10() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_11()) { - jj_scanpos = xsp; - if (jj_3R_12()) return true; - } - return false; - } - - final private boolean jj_3_1() { - if (jj_scan_token(ADD)) return true; - if (jj_3R_10()) return true; - return false; - } - - final private boolean jj_3R_12() { - Token xsp; - xsp = jj_scanpos; - if (jj_scan_token(66)) { - jj_scanpos = xsp; - if (jj_scan_token(67)) return true; - } - return false; - } - - public HQLParserTokenManager token_source; - SimpleCharStream jj_input_stream; - public Token token, jj_nt; - private int jj_ntk; - private Token jj_scanpos, jj_lastpos; - private int jj_la; - public boolean lookingAhead = false; - private boolean jj_semLA; - private int jj_gen; - final private int[] jj_la1 = new int[42]; - static private int[] jj_la1_0; - static private int[] jj_la1_1; - static private int[] jj_la1_2; - static { - jj_la1_0(); - jj_la1_1(); - jj_la1_2(); - } - private static void jj_la1_0() { - jj_la1_0 = new int[] {0xf3ffe0,0xf3ffe1,0xf3ffe0,0x0,0x0,0x0,0x0,0x33dbc0,0x33dbc0,0x0,0x600,0x0,0x0,0x0,0x0,0x0,0x0,0x1000,0x0,0x80000000,0x0,0x2000000,0x0,0x3000000,0x8000000,0x3000000,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; - } - private static void jj_la1_1() { - jj_la1_1 = new int[] {0x0,0x0,0x0,0x40000000,0xc0000000,0xc0000000,0x40000000,0x40000000,0x40000000,0x40000000,0x0,0x731c000,0xe0000,0xe00000,0x731c000,0x10,0x10,0x18000000,0x0,0x0,0x0,0x0,0xe0002000,0x0,0x0,0x0,0x0,0x1,0x2,0x10,0x0,0xc0002000,0xc0002000,0xc0002000,0x0,0xc0002000,0x10,0x10,0x10,0xc0000000,0x0,0x40000000,}; - } - private static void jj_la1_2() { - jj_la1_2 = new int[] {0x0,0x10,0x0,0x0,0x1,0x1,0xc,0x0,0x0,0xc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc,0x0,0xc,0x0,0xc,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc,0x0,0xc,0x0,0xc,0xc,0x0,0x0,0x0,0x0,0xc,0xc,}; - } - final private JJCalls[] jj_2_rtns = new JJCalls[1]; - private boolean jj_rescan = false; - private int jj_gc = 0; - - public HQLParser(java.io.InputStream stream) { - this(stream, null); - } - public HQLParser(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 HQLParserTokenManager(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 42; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - 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 < 42; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - public HQLParser(java.io.Reader stream) { - jj_input_stream = new SimpleCharStream(stream, 1, 1); - token_source = new HQLParserTokenManager(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 42; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - 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 < 42; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - public HQLParser(HQLParserTokenManager tm) { - token_source = tm; - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 42; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - public void ReInit(HQLParserTokenManager tm) { - token_source = tm; - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 42; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - 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++; - if (++jj_gc > 100) { - jj_gc = 0; - for (int i = 0; i < jj_2_rtns.length; i++) { - JJCalls c = jj_2_rtns[i]; - while (c != null) { - if (c.gen < jj_gen) c.first = null; - c = c.next; - } - } - } - return token; - } - token = oldToken; - jj_kind = kind; - throw generateParseException(); - } - - static private final class LookaheadSuccess extends java.lang.Error { } - final private LookaheadSuccess jj_ls = new LookaheadSuccess(); - final private boolean jj_scan_token(int kind) { - if (jj_scanpos == jj_lastpos) { - jj_la--; - if (jj_scanpos.next == null) { - jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken(); - } else { - jj_lastpos = jj_scanpos = jj_scanpos.next; - } - } else { - jj_scanpos = jj_scanpos.next; - } - if (jj_rescan) { - int i = 0; Token tok = token; - while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; } - if (tok != null) jj_add_error_token(kind, i); - } - if (jj_scanpos.kind != kind) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls; - return false; - } - - 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 = lookingAhead ? jj_scanpos : 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; - private int[] jj_lasttokens = new int[100]; - private int jj_endpos; - - private void jj_add_error_token(int kind, int pos) { - if (pos >= 100) return; - if (pos == jj_endpos + 1) { - jj_lasttokens[jj_endpos++] = kind; - } else if (jj_endpos != 0) { - jj_expentry = new int[jj_endpos]; - for (int i = 0; i < jj_endpos; i++) { - jj_expentry[i] = jj_lasttokens[i]; - } - boolean exists = false; - for (java.util.Enumeration e = jj_expentries.elements(); e.hasMoreElements();) { - int[] oldentry = (int[])(e.nextElement()); - if (oldentry.length == jj_expentry.length) { - exists = true; - for (int i = 0; i < jj_expentry.length; i++) { - if (oldentry[i] != jj_expentry[i]) { - exists = false; - break; - } - } - if (exists) break; - } - } - if (!exists) jj_expentries.addElement(jj_expentry); - if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind; - } - } - - public ParseException generateParseException() { - jj_expentries.removeAllElements(); - boolean[] la1tokens = new boolean[69]; - for (int i = 0; i < 69; i++) { - la1tokens[i] = false; - } - if (jj_kind >= 0) { - la1tokens[jj_kind] = true; - jj_kind = -1; - } - for (int i = 0; i < 42; i++) { - if (jj_la1[i] == jj_gen) { - for (int j = 0; j < 32; j++) { - if ((jj_la1_0[i] & (1< jj_gen) { - jj_la = p.arg; jj_lastpos = jj_scanpos = p.first; - switch (i) { - case 0: jj_3_1(); break; - } - } - p = p.next; - } while (p != null); - } catch(LookaheadSuccess ls) { } - } - jj_rescan = false; - } - - final private void jj_save(int index, int xla) { - JJCalls p = jj_2_rtns[index]; - while (p.gen > jj_gen) { - if (p.next == null) { p = p.next = new JJCalls(); break; } - p = p.next; - } - p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla; - } - - static final class JJCalls { - int gen; - Token first; - int arg; - JJCalls next; - } - -} +/* Generated By:JavaCC: Do not edit this line. HQLParser.java */ +package org.apache.hadoop.hbase.hql.generated; + +/** + * 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. + */ + +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 java.io.Writer; +import java.net.URLEncoder; +import java.io.UnsupportedEncodingException; + +import org.apache.hadoop.hbase.hql.*; + +/** + * Parsing command line. + */ +public class HQLParser implements HQLParserConstants { + private String QueryString; + private TableFormatter formatter; + private Writer out; + + public HQLParser(final String query, final Writer o, final TableFormatter f) { + this((Reader)(new StringReader(query))); + this.QueryString = query; + this.formatter = f; + this.out = o; + } + + 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 ALTER: + case CLEAR: + case SHOW: + case DESCRIBE: + case DESC: + case CREATE: + case DROP: + case TRUNCATE: + case FS: + case JAR: + case EXIT: + case START: + case INSERT: + case DELETE: + case SELECT: + case ENABLE: + case DISABLE: + case 69: + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case HELP: + case ALTER: + case CLEAR: + case SHOW: + case DESCRIBE: + case DESC: + case CREATE: + case DROP: + case TRUNCATE: + case FS: + case JAR: + case EXIT: + case START: + case INSERT: + case DELETE: + case SELECT: + case ENABLE: + case DISABLE: + statement = cmdStatement(); + break; + default: + jj_la1[0] = jj_gen; + ; + } + jj_consume_token(69); + 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: + case DESC: + cmd = descCommand(); + break; + case CREATE: + cmd = createCommand(); + break; + case DROP: + cmd = dropCommand(); + break; + case TRUNCATE: + cmd = truncateCommand(); + break; + case ALTER: + cmd = alterCommand(); + break; + case INSERT: + cmd = insertCommand(); + break; + case DELETE: + cmd = deleteCommand(); + break; + case SELECT: + cmd = selectCommand(); + break; + case ENABLE: + cmd = enableCommand(); + break; + case DISABLE: + cmd = disableCommand(); + break; + case CLEAR: + cmd = clearCommand(); + break; + case FS: + cmd = fsCommand(); + break; + case JAR: + cmd = jarCommand(); + break; + case START: + cmd = startCommand(); + 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(this.out); + 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(this.out); + 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 JarCommand jarCommand() throws ParseException { + Token t = null; + JarCommand jar = new JarCommand(this.out); + List query = new ArrayList(); + jj_consume_token(JAR); + label_2: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case ID: + case INTEGER_LITERAL: + case FLOATING_POINT_LITERAL: + ; + break; + default: + jj_la1[4] = jj_gen; + break label_2; + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case ID: + t = jj_consume_token(ID); + break; + case INTEGER_LITERAL: + t = jj_consume_token(INTEGER_LITERAL); + break; + case FLOATING_POINT_LITERAL: + t = jj_consume_token(FLOATING_POINT_LITERAL); + break; + default: + jj_la1[5] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + query.add(t.image.toString()); + } + jar.setQuery(query); + {if (true) return jar;} + throw new Error("Missing return statement in function"); + } + + final public StartCommand startCommand() throws ParseException { + String fileName = null; + StartCommand start = new StartCommand(this.out); + jj_consume_token(START); + fileName = getStringLiteral(); + start.setFile(fileName); + {if (true) return start;} + throw new Error("Missing return statement in function"); + } + + final public TruncateCommand truncateCommand() throws ParseException { + TruncateCommand truncate = new TruncateCommand(this.out); + String tableName = null; + jj_consume_token(TRUNCATE); + jj_consume_token(TABLE); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case ID: + case QUOTED_IDENTIFIER: + case STRING_LITERAL: + tableName = identifier(); + break; + default: + jj_la1[6] = jj_gen; + ; + } + truncate.setTableName(tableName); + {if (true) return truncate;} + throw new Error("Missing return statement in function"); + } + + final public HelpCommand helpCommand() throws ParseException { + Token t = null; + HelpCommand help = new HelpCommand(this.out, this.formatter); + String argument = ""; + jj_consume_token(HELP); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case ALTER: + case CLEAR: + case SHOW: + case DESCRIBE: + case CREATE: + case DROP: + case FS: + 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 ALTER: + t = jj_consume_token(ALTER); + break; + case CLEAR: + t = jj_consume_token(CLEAR); + break; + case FS: + t = jj_consume_token(FS); + break; + case JAR: + t = jj_consume_token(JAR); + break; + case ID: + t = jj_consume_token(ID); + break; + default: + jj_la1[7] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + argument = t.image.toString(); + break; + default: + jj_la1[8] = 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(this.out, this.formatter); + String argument = null; + jj_consume_token(SHOW); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case ID: + case QUOTED_IDENTIFIER: + case STRING_LITERAL: + argument = identifier(); + break; + default: + jj_la1[9] = 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(this.out, this.formatter); + String argument = null; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case DESCRIBE: + jj_consume_token(DESCRIBE); + break; + case DESC: + jj_consume_token(DESC); + break; + default: + jj_la1[10] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + argument = identifier(); + desc.setArgument(argument); + {if (true) return desc;} + throw new Error("Missing return statement in function"); + } + + final public Map ColumnSpec() throws ParseException { + Map columnSpec = new HashMap(); + int n = -1; + Token t = null; + label_3: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case MAX_VERSIONS: + case MAX_LENGTH: + case COMPRESSION: + case IN_MEMORY: + case BLOOMFILTER: + case VECTOR_SIZE: + case NUM_HASH: + case NUM_ENTRIES: + ; + break; + default: + jj_la1[11] = jj_gen; + break label_3; + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case MAX_VERSIONS: + jj_consume_token(MAX_VERSIONS); + jj_consume_token(EQUALS); + n = number(); + if(n < 0) { + n = Integer.MAX_VALUE; + } + columnSpec.put("MAX_VERSIONS", n); + break; + case MAX_LENGTH: + jj_consume_token(MAX_LENGTH); + jj_consume_token(EQUALS); + n = number(); + columnSpec.put("MAX_LENGTH", n); + break; + case COMPRESSION: + jj_consume_token(COMPRESSION); + jj_consume_token(EQUALS); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case NONE: + t = jj_consume_token(NONE); + break; + case BLOCK: + t = jj_consume_token(BLOCK); + break; + case RECORD: + t = jj_consume_token(RECORD); + break; + default: + jj_la1[12] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + columnSpec.put("COMPRESSION", t.image.toString()); + break; + case IN_MEMORY: + jj_consume_token(IN_MEMORY); + columnSpec.put("IN_MEMORY", true); + break; + case BLOOMFILTER: + jj_consume_token(BLOOMFILTER); + jj_consume_token(EQUALS); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case BLOOMFILTER: + t = jj_consume_token(BLOOMFILTER); + break; + case COUNTING_BLOOMFILTER: + t = jj_consume_token(COUNTING_BLOOMFILTER); + break; + case RETOUCHED_BLOOMFILTER: + t = jj_consume_token(RETOUCHED_BLOOMFILTER); + break; + default: + jj_la1[13] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + columnSpec.put("BLOOMFILTER", t.image.toString()); + break; + case VECTOR_SIZE: + jj_consume_token(VECTOR_SIZE); + jj_consume_token(EQUALS); + n = number(); + columnSpec.put("VECTOR_SIZE", n); + break; + case NUM_HASH: + jj_consume_token(NUM_HASH); + jj_consume_token(EQUALS); + n = number(); + columnSpec.put("NUM_HASH", n); + break; + case NUM_ENTRIES: + jj_consume_token(NUM_ENTRIES); + jj_consume_token(EQUALS); + n = number(); + columnSpec.put("NUM_ENTRIES", n); + break; + default: + jj_la1[14] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + {if (true) return columnSpec;} + throw new Error("Missing return statement in function"); + } + + final public CreateCommand createCommand() throws ParseException { + CreateCommand createCommand = new CreateCommand(this.out); + String table = null; + Map columnSpec = null; + String column = null; + jj_consume_token(CREATE); + jj_consume_token(TABLE); + table = identifier(); + createCommand.setTable(table); + jj_consume_token(LPAREN); + column = identifier(); + columnSpec = ColumnSpec(); + createCommand.addColumnSpec(column, columnSpec); + label_4: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COMMA: + ; + break; + default: + jj_la1[15] = jj_gen; + break label_4; + } + jj_consume_token(COMMA); + column = identifier(); + columnSpec = ColumnSpec(); + createCommand.addColumnSpec(column, columnSpec); + } + jj_consume_token(RPAREN); + {if (true) return createCommand;} + throw new Error("Missing return statement in function"); + } + + final public AlterCommand alterCommand() throws ParseException { + AlterCommand alterCommand = new AlterCommand(this.out); + String table = null; + String column = null; + Map columnSpec = null; + jj_consume_token(ALTER); + jj_consume_token(TABLE); + table = identifier(); + alterCommand.setTable(table); + if (jj_2_1(2)) { + jj_consume_token(ADD); + column = identifier(); + columnSpec = ColumnSpec(); + alterCommand.setOperationType(AlterCommand.OperationType.ADD); + alterCommand.addColumnSpec(column, columnSpec); + } else { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case ADD: + jj_consume_token(ADD); + jj_consume_token(LPAREN); + alterCommand.setOperationType(AlterCommand.OperationType.ADD); + column = identifier(); + columnSpec = ColumnSpec(); + alterCommand.addColumnSpec(column, columnSpec); + label_5: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COMMA: + ; + break; + default: + jj_la1[16] = jj_gen; + break label_5; + } + jj_consume_token(COMMA); + column = identifier(); + columnSpec = ColumnSpec(); + alterCommand.addColumnSpec(column, columnSpec); + } + jj_consume_token(RPAREN); + break; + case DROP: + jj_consume_token(DROP); + column = identifier(); + alterCommand.setOperationType(AlterCommand.OperationType.DROP); + alterCommand.setColumn(column); + break; + case CHANGE: + jj_consume_token(CHANGE); + column = identifier(); + columnSpec = ColumnSpec(); + alterCommand.setOperationType(AlterCommand.OperationType.CHANGE); + alterCommand.addColumnSpec(column, columnSpec); + break; + default: + jj_la1[17] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + {if (true) return alterCommand;} + throw new Error("Missing return statement in function"); + } + + final public DropCommand dropCommand() throws ParseException { + DropCommand drop = new DropCommand(this.out); + List tableList = null; + jj_consume_token(DROP); + jj_consume_token(TABLE); + tableList = tableList(); + drop.setTableList(tableList); + {if (true) return drop;} + throw new Error("Missing return statement in function"); + } + + final public InsertCommand insertCommand() throws ParseException { + InsertCommand in = new InsertCommand(this.out); + List columnfamilies = null; + List values = null; + String table = null; + String timestamp = null; + Token t = null; + jj_consume_token(INSERT); + jj_consume_token(INTO); + table = identifier(); + in.setTable(table); + columnfamilies = getColumns(); + in.setColumnfamilies(columnfamilies); + jj_consume_token(VALUES); + values = getLiteralValues(); + in.setValues(values); + jj_consume_token(WHERE); + jj_consume_token(ROW); + jj_consume_token(EQUALS); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case STRING_LITERAL: + t = jj_consume_token(STRING_LITERAL); + break; + case QUOTED_IDENTIFIER: + t = jj_consume_token(QUOTED_IDENTIFIER); + break; + default: + jj_la1[18] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + in.setRow(t.image.substring(1, t.image.length()-1)); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case TIMESTAMP: + jj_consume_token(TIMESTAMP); + timestamp = getStringLiteral(); + in.setTimestamp(timestamp); + break; + default: + jj_la1[19] = jj_gen; + ; + } + {if (true) return in;} + throw new Error("Missing return statement in function"); + } + + final public DeleteCommand deleteCommand() throws ParseException { + DeleteCommand deleteCommand = new DeleteCommand(this.out); + List columnList = null; + Token t = null; + String table = null; + jj_consume_token(DELETE); + columnList = columnList(); + deleteCommand.setColumnList(columnList); + jj_consume_token(FROM); + table = identifier(); + deleteCommand.setTable(table); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case WHERE: + jj_consume_token(WHERE); + jj_consume_token(ROW); + jj_consume_token(EQUALS); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case STRING_LITERAL: + t = jj_consume_token(STRING_LITERAL); + break; + case QUOTED_IDENTIFIER: + t = jj_consume_token(QUOTED_IDENTIFIER); + break; + default: + jj_la1[20] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + deleteCommand.setRow(t.image.substring(1, t.image.length()-1)); + break; + default: + jj_la1[21] = jj_gen; + ; + } + {if (true) return deleteCommand;} + throw new Error("Missing return statement in function"); + } + + final public SelectCommand selectCommand() throws ParseException { + SelectCommand select = new SelectCommand(this.out, this.formatter); + List columns = null; + String rowKey = ""; + String stopRow = ""; + String timestamp = null; + int numVersion = 0; + String tableName = null; + int limit; + jj_consume_token(SELECT); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COUNT: + jj_consume_token(COUNT); + columns = getLiteralValues(); + select.setCountFunction(true); + break; + case ASTERISK: + case ID: + case INTEGER_LITERAL: + case QUOTED_IDENTIFIER: + case STRING_LITERAL: + columns = columnList(); + break; + default: + jj_la1[22] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + jj_consume_token(FROM); + tableName = identifier(); + select.setColumns(columns); + select.setTable(tableName); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case STARTING: + case WHERE: + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case WHERE: + jj_consume_token(WHERE); + jj_consume_token(ROW); + jj_consume_token(EQUALS); + select.setWhere(true); + break; + case STARTING: + jj_consume_token(STARTING); + jj_consume_token(FROM); + break; + default: + jj_la1[23] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + rowKey = getStringLiteral(); + select.setRowKey(rowKey); + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case UNTIL: + jj_consume_token(UNTIL); + stopRow = getStringLiteral(); + select.setStopRow(stopRow); + break; + default: + jj_la1[24] = jj_gen; + ; + } + break; + default: + jj_la1[25] = jj_gen; + ; + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case TIMESTAMP: + jj_consume_token(TIMESTAMP); + timestamp = getStringLiteral(); + select.setTimestamp(timestamp); + break; + default: + jj_la1[26] = jj_gen; + ; + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case NUM_VERSIONS: + jj_consume_token(NUM_VERSIONS); + jj_consume_token(EQUALS); + numVersion = number(); + select.setVersion(numVersion); + break; + default: + jj_la1[27] = jj_gen; + ; + } + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case LIMIT: + jj_consume_token(LIMIT); + jj_consume_token(EQUALS); + limit = number(); + try{ + select.setLimit(limit); + }catch(ClassCastException ce) { + {if (true) throw generateParseException();} + } + break; + default: + jj_la1[28] = jj_gen; + ; + } + {if (true) return select;} + throw new Error("Missing return statement in function"); + } + + final public EnableCommand enableCommand() throws ParseException { + EnableCommand enableCommand = new EnableCommand(this.out); + String table = null; + jj_consume_token(ENABLE); + table = identifier(); + enableCommand.setTable(table); + {if (true) return enableCommand;} + throw new Error("Missing return statement in function"); + } + + final public DisableCommand disableCommand() throws ParseException { + DisableCommand disableCommand = new DisableCommand(this.out); + String table = null; + jj_consume_token(DISABLE); + table = identifier(); + disableCommand.setTable(table); + {if (true) return disableCommand;} + throw new Error("Missing return statement in function"); + } + + final public ClearCommand clearCommand() throws ParseException { + ClearCommand clear = new ClearCommand(this.out); + jj_consume_token(CLEAR); + {if (true) return clear;} + 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_6: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COMMA: + ; + break; + default: + jj_la1[29] = jj_gen; + break label_6; + } + jj_consume_token(COMMA); + literal = getStringLiteral(); + if(literal != null) values.add(literal); + } + jj_consume_token(RPAREN); + {if (true) return values;} + throw new Error("Missing return statement in function"); + } + + final public String getStringLiteral() throws ParseException { + Token s; + String value = null; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case QUOTED_IDENTIFIER: + case STRING_LITERAL: + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case STRING_LITERAL: + s = jj_consume_token(STRING_LITERAL); + break; + case QUOTED_IDENTIFIER: + s = jj_consume_token(QUOTED_IDENTIFIER); + break; + default: + jj_la1[30] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + value = s.image.toString(); + {if (true) return value.substring(1,value.length() - 1);} + break; + case ASTERISK: + case ID: + case INTEGER_LITERAL: + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case ID: + s = jj_consume_token(ID); + break; + case INTEGER_LITERAL: + s = jj_consume_token(INTEGER_LITERAL); + break; + case ASTERISK: + s = jj_consume_token(ASTERISK); + break; + default: + jj_la1[31] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + value = s.image.toString(); + {if (true) return value;} + break; + default: + jj_la1[32] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + throw new Error("Missing return statement in function"); + } + + final public String getColumn() throws ParseException { + Token col; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case ASTERISK: + case ID: + case INTEGER_LITERAL: + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case ID: + col = jj_consume_token(ID); + break; + case INTEGER_LITERAL: + col = jj_consume_token(INTEGER_LITERAL); + break; + case ASTERISK: + col = jj_consume_token(ASTERISK); + break; + default: + jj_la1[33] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + {if (true) return col.image.toString();} + break; + case QUOTED_IDENTIFIER: + case STRING_LITERAL: + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case QUOTED_IDENTIFIER: + col = jj_consume_token(QUOTED_IDENTIFIER); + break; + case STRING_LITERAL: + col = jj_consume_token(STRING_LITERAL); + break; + default: + jj_la1[34] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + {if (true) return col.image.substring(1,col.image.toString().length() - 1);} + break; + default: + jj_la1[35] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + throw new Error("Missing return statement in function"); + } + + final public List getColumns() throws ParseException { + List values = new ArrayList(); + String literal = null; + jj_consume_token(LPAREN); + literal = getColumn(); + if(literal != null) values.add(literal); + label_7: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COMMA: + ; + break; + default: + jj_la1[36] = jj_gen; + break label_7; + } + jj_consume_token(COMMA); + literal = getColumn(); + if(literal != null) values.add(literal); + } + jj_consume_token(RPAREN); + {if (true) return values;} + throw new Error("Missing return statement in function"); + } + + final public List tableList() throws ParseException { + List tableList = new ArrayList(); + String table = null; + table = identifier(); + tableList.add(table); + label_8: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COMMA: + ; + break; + default: + jj_la1[37] = jj_gen; + break label_8; + } + jj_consume_token(COMMA); + table = identifier(); + tableList.add(table); + } + {if (true) return tableList;} + throw new Error("Missing return statement in function"); + } + + final public List columnList() throws ParseException { + List columnList = new ArrayList(); + String column = null; + column = getColumn(); + if(column != null) { + columnList.add(column); + } else { + {if (true) return columnList;} + } + label_9: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case COMMA: + ; + break; + default: + jj_la1[38] = jj_gen; + break label_9; + } + jj_consume_token(COMMA); + column = getColumn(); + columnList.add(column); + } + {if (true) return columnList;} + throw new Error("Missing return statement in function"); + } + + final public int number() throws ParseException { + Token t = null; + Token minusSignedInt = null; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case ID: + minusSignedInt = jj_consume_token(ID); + break; + case INTEGER_LITERAL: + t = jj_consume_token(INTEGER_LITERAL); + break; + default: + jj_la1[39] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + if(minusSignedInt != null) { + {if (true) return Integer.parseInt(minusSignedInt.image.toString());} + } else { + {if (true) return Integer.parseInt(t.image.toString());} + } + throw new Error("Missing return statement in function"); + } + + final public String identifier() throws ParseException { + Token t = null; + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case ID: + t = jj_consume_token(ID); + {if (true) return t.image.toString();} + break; + case QUOTED_IDENTIFIER: + case STRING_LITERAL: + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case QUOTED_IDENTIFIER: + t = jj_consume_token(QUOTED_IDENTIFIER); + break; + case STRING_LITERAL: + t = jj_consume_token(STRING_LITERAL); + break; + default: + jj_la1[40] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + {if (true) return t.image.substring(1,t.image.toString().length() - 1);} + break; + default: + jj_la1[41] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + throw new Error("Missing return statement in function"); + } + + final public String appendIndicator(String columnName) throws ParseException { + String column = columnName; + {if (true) return (!column.endsWith(":") && column.indexOf(":") == -1) + ? column + ":" : column;} + throw new Error("Missing return statement in function"); + } + + final private boolean jj_2_1(int xla) { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_1(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(0, xla); } + } + + final private boolean jj_3_1() { + if (jj_scan_token(ADD)) return true; + if (jj_3R_10()) return true; + return false; + } + + final private boolean jj_3R_12() { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(67)) { + jj_scanpos = xsp; + if (jj_scan_token(68)) return true; + } + return false; + } + + final private boolean jj_3R_11() { + if (jj_scan_token(ID)) return true; + return false; + } + + final private boolean jj_3R_10() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_11()) { + jj_scanpos = xsp; + if (jj_3R_12()) return true; + } + return false; + } + + public HQLParserTokenManager token_source; + SimpleCharStream jj_input_stream; + public Token token, jj_nt; + private int jj_ntk; + private Token jj_scanpos, jj_lastpos; + private int jj_la; + public boolean lookingAhead = false; + private boolean jj_semLA; + private int jj_gen; + final private int[] jj_la1 = new int[42]; + static private int[] jj_la1_0; + static private int[] jj_la1_1; + static private int[] jj_la1_2; + static { + jj_la1_0(); + jj_la1_1(); + jj_la1_2(); + } + private static void jj_la1_0() { + jj_la1_0 = new int[] {0x1e7ffe0,0x1e7ffe1,0x1e7ffe0,0x0,0x0,0x0,0x0,0x65dbc0,0x65dbc0,0x0,0x600,0x0,0x0,0x0,0x0,0x0,0x0,0x1000,0x0,0x0,0x0,0x4000000,0x0,0x6000000,0x10000000,0x6000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; + } + private static void jj_la1_1() { + jj_la1_1 = new int[] {0x0,0x0,0x0,0x80000000,0x80000000,0x80000000,0x80000000,0x80000000,0x80000000,0x80000000,0x0,0xe638000,0x1c0000,0x1c00000,0xe638000,0x20,0x20,0x30000000,0x0,0x1,0x0,0x0,0xc0004000,0x0,0x0,0x0,0x1,0x2,0x4,0x20,0x0,0x80004000,0x80004000,0x80004000,0x0,0x80004000,0x20,0x20,0x20,0x80000000,0x0,0x80000000,}; + } + private static void jj_la1_2() { + jj_la1_2 = new int[] {0x0,0x20,0x0,0x0,0x3,0x3,0x18,0x0,0x0,0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x18,0x0,0x18,0x0,0x19,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x18,0x1,0x19,0x1,0x18,0x19,0x0,0x0,0x0,0x1,0x18,0x18,}; + } + final private JJCalls[] jj_2_rtns = new JJCalls[1]; + private boolean jj_rescan = false; + private int jj_gc = 0; + + public HQLParser(java.io.InputStream stream) { + this(stream, null); + } + public HQLParser(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 HQLParserTokenManager(jj_input_stream); + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 42; i++) jj_la1[i] = -1; + for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); + } + + 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 < 42; i++) jj_la1[i] = -1; + for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); + } + + public HQLParser(java.io.Reader stream) { + jj_input_stream = new SimpleCharStream(stream, 1, 1); + token_source = new HQLParserTokenManager(jj_input_stream); + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 42; i++) jj_la1[i] = -1; + for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); + } + + 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 < 42; i++) jj_la1[i] = -1; + for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); + } + + public HQLParser(HQLParserTokenManager tm) { + token_source = tm; + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 42; i++) jj_la1[i] = -1; + for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); + } + + public void ReInit(HQLParserTokenManager tm) { + token_source = tm; + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 42; i++) jj_la1[i] = -1; + for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); + } + + 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++; + if (++jj_gc > 100) { + jj_gc = 0; + for (int i = 0; i < jj_2_rtns.length; i++) { + JJCalls c = jj_2_rtns[i]; + while (c != null) { + if (c.gen < jj_gen) c.first = null; + c = c.next; + } + } + } + return token; + } + token = oldToken; + jj_kind = kind; + throw generateParseException(); + } + + static private final class LookaheadSuccess extends java.lang.Error { } + final private LookaheadSuccess jj_ls = new LookaheadSuccess(); + final private boolean jj_scan_token(int kind) { + if (jj_scanpos == jj_lastpos) { + jj_la--; + if (jj_scanpos.next == null) { + jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken(); + } else { + jj_lastpos = jj_scanpos = jj_scanpos.next; + } + } else { + jj_scanpos = jj_scanpos.next; + } + if (jj_rescan) { + int i = 0; Token tok = token; + while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; } + if (tok != null) jj_add_error_token(kind, i); + } + if (jj_scanpos.kind != kind) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls; + return false; + } + + 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 = lookingAhead ? jj_scanpos : 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; + private int[] jj_lasttokens = new int[100]; + private int jj_endpos; + + private void jj_add_error_token(int kind, int pos) { + if (pos >= 100) return; + if (pos == jj_endpos + 1) { + jj_lasttokens[jj_endpos++] = kind; + } else if (jj_endpos != 0) { + jj_expentry = new int[jj_endpos]; + for (int i = 0; i < jj_endpos; i++) { + jj_expentry[i] = jj_lasttokens[i]; + } + boolean exists = false; + for (java.util.Enumeration e = jj_expentries.elements(); e.hasMoreElements();) { + int[] oldentry = (int[])(e.nextElement()); + if (oldentry.length == jj_expentry.length) { + exists = true; + for (int i = 0; i < jj_expentry.length; i++) { + if (oldentry[i] != jj_expentry[i]) { + exists = false; + break; + } + } + if (exists) break; + } + } + if (!exists) jj_expentries.addElement(jj_expentry); + if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind; + } + } + + public ParseException generateParseException() { + jj_expentries.removeAllElements(); + boolean[] la1tokens = new boolean[70]; + for (int i = 0; i < 70; i++) { + la1tokens[i] = false; + } + if (jj_kind >= 0) { + la1tokens[jj_kind] = true; + jj_kind = -1; + } + for (int i = 0; i < 42; i++) { + if (jj_la1[i] == jj_gen) { + for (int j = 0; j < 32; j++) { + if ((jj_la1_0[i] & (1< jj_gen) { + jj_la = p.arg; jj_lastpos = jj_scanpos = p.first; + switch (i) { + case 0: jj_3_1(); break; + } + } + p = p.next; + } while (p != null); + } catch(LookaheadSuccess ls) { } + } + jj_rescan = false; + } + + final private void jj_save(int index, int xla) { + JJCalls p = jj_2_rtns[index]; + while (p.gen > jj_gen) { + if (p.next == null) { p = p.next = new JJCalls(); break; } + p = p.next; + } + p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla; + } + + static final class JJCalls { + int gen; + Token first; + int arg; + JJCalls next; + } + +} Index: src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/generated/HQLParserTokenManager.java =================================================================== --- src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/generated/HQLParserTokenManager.java (revision 613005) +++ src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/generated/HQLParserTokenManager.java (working copy) @@ -1,1605 +1,1610 @@ -/* Generated By:JavaCC: Do not edit this line. HQLParserTokenManager.java */ -package org.apache.hadoop.hbase.hql.generated; -/** - * 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. - */ - -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 java.io.Writer; -import java.net.URLEncoder; -import java.io.UnsupportedEncodingException; -import org.apache.hadoop.hbase.hql.*; - -public class HQLParserTokenManager implements HQLParserConstants -{ - public java.io.PrintStream debugStream = System.out; - public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; } +/* Generated By:JavaCC: Do not edit this line. HQLParserTokenManager.java */ +package org.apache.hadoop.hbase.hql.generated; +/** + * 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. + */ + +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 java.io.Writer; +import java.net.URLEncoder; +import java.io.UnsupportedEncodingException; +import org.apache.hadoop.hbase.hql.*; + +public class HQLParserTokenManager implements HQLParserConstants +{ + 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, long active1) -{ +{ switch (pos) - { - case 0: - if ((active0 & 0x3fffcc0fffffffe0L) != 0L) - { - jjmatchedKind = 62; - return 1; - } - return -1; - case 1: - if ((active0 & 0x3fefc407fff9bfe0L) != 0L) - { - if (jjmatchedPos != 1) - { - jjmatchedKind = 62; - jjmatchedPos = 1; - } - return 1; - } - if ((active0 & 0x10080800064000L) != 0L) - return 1; - return -1; - case 2: - if ((active0 & 0x37ffc003efff3fe0L) != 0L) - { - jjmatchedKind = 62; - jjmatchedPos = 2; - return 1; - } - if ((active0 & 0x800040410008000L) != 0L) - return 1; - return -1; - case 3: - if ((active0 & 0x37fdc003ebfa28c0L) != 0L) - { - if (jjmatchedPos != 3) - { - jjmatchedKind = 62; - jjmatchedPos = 3; - } - return 1; - } - if ((active0 & 0x2000004051720L) != 0L) - return 1; - return -1; - case 4: - if ((active0 & 0x17b9c001e1f22a00L) != 0L) - { - if (jjmatchedPos != 4) - { - jjmatchedKind = 62; - jjmatchedPos = 4; - } - return 1; - } - if ((active0 & 0x204400020a0800c0L) != 0L) - return 1; - return -1; - case 5: - if ((active0 & 0x1008000020720800L) != 0L) - return 1; - if ((active0 & 0x7f1c001c1802200L) != 0L) - { - jjmatchedKind = 62; - jjmatchedPos = 5; - return 1; - } - return -1; - case 6: - if ((active0 & 0x800000L) != 0L) - return 1; - if ((active0 & 0x7f1c001c1002200L) != 0L) - { - jjmatchedKind = 62; - jjmatchedPos = 6; - return 1; - } - return -1; - case 7: - if ((active0 & 0x200000001002200L) != 0L) - return 1; - if ((active0 & 0x5f1c001c0000000L) != 0L) - { - jjmatchedKind = 62; - jjmatchedPos = 7; - return 1; - } - return -1; - case 8: - if ((active0 & 0x10000080000000L) != 0L) - return 1; - if ((active0 & 0x5e1c00140000000L) != 0L) - { - jjmatchedKind = 62; - jjmatchedPos = 8; - return 1; - } - return -1; - case 9: - if ((active0 & 0x800000000000L) != 0L) - return 1; - if ((active0 & 0x5e1400140000000L) != 0L) - { - jjmatchedKind = 62; - jjmatchedPos = 9; - return 1; - } - return -1; - case 10: - if ((active0 & 0x521000000000000L) != 0L) - return 1; - if ((active0 & 0xc0400140000000L) != 0L) - { - jjmatchedKind = 62; - jjmatchedPos = 10; - return 1; - } - return -1; - case 11: - if ((active0 & 0x400100000000L) != 0L) - return 1; - if ((active0 & 0xc0000040000000L) != 0L) - { - jjmatchedKind = 62; - jjmatchedPos = 11; - return 1; - } - return -1; - case 12: - if ((active0 & 0xc0000040000000L) != 0L) - { - jjmatchedKind = 62; - jjmatchedPos = 12; - return 1; - } - return -1; - case 13: - if ((active0 & 0x40000000L) != 0L) - return 1; - if ((active0 & 0xc0000000000000L) != 0L) - { - jjmatchedKind = 62; - jjmatchedPos = 13; - return 1; - } - return -1; - case 14: - if ((active0 & 0xc0000000000000L) != 0L) - { - jjmatchedKind = 62; - jjmatchedPos = 14; - return 1; - } - return -1; - case 15: - if ((active0 & 0xc0000000000000L) != 0L) - { - jjmatchedKind = 62; - jjmatchedPos = 15; - return 1; - } - return -1; - case 16: - if ((active0 & 0xc0000000000000L) != 0L) - { - jjmatchedKind = 62; - jjmatchedPos = 16; - return 1; - } - return -1; - case 17: - if ((active0 & 0xc0000000000000L) != 0L) - { - jjmatchedKind = 62; - jjmatchedPos = 17; - return 1; - } - return -1; - case 18: - if ((active0 & 0xc0000000000000L) != 0L) - { - jjmatchedKind = 62; - jjmatchedPos = 18; - return 1; - } - return -1; - case 19: - if ((active0 & 0x80000000000000L) != 0L) - { - jjmatchedKind = 62; - jjmatchedPos = 19; - return 1; - } - if ((active0 & 0x40000000000000L) != 0L) - return 1; - return -1; - default : - return -1; - } -} + { + case 0: + if ((active0 & 0x7fff981fffffffe0L) != 0L) + { + jjmatchedKind = 63; + return 1; + } + return -1; + case 1: + if ((active0 & 0x201010000c4000L) != 0L) + return 1; + if ((active0 & 0x7fdf880ffff3bfe0L) != 0L) + { + if (jjmatchedPos != 1) + { + jjmatchedKind = 63; + jjmatchedPos = 1; + } + return 1; + } + return -1; + case 2: + if ((active0 & 0x1000080820008000L) != 0L) + return 1; + if ((active0 & 0x6fff8007dfff3fe0L) != 0L) + { + jjmatchedKind = 63; + jjmatchedPos = 2; + return 1; + } + return -1; + case 3: + if ((active0 & 0x6ffb8007d7f628c0L) != 0L) + { + if (jjmatchedPos != 3) + { + jjmatchedKind = 63; + jjmatchedPos = 3; + } + return 1; + } + if ((active0 & 0x4000008091720L) != 0L) + return 1; + return -1; + case 4: + if ((active0 & 0x2f738003c1e42a00L) != 0L) + { + if (jjmatchedPos != 4) + { + jjmatchedKind = 63; + jjmatchedPos = 4; + } + return 1; + } + if ((active0 & 0x40880004161200c0L) != 0L) + return 1; + return -1; + case 5: + if ((active0 & 0xfe3800383002200L) != 0L) + { + jjmatchedKind = 63; + jjmatchedPos = 5; + return 1; + } + if ((active0 & 0x2010000040e40800L) != 0L) + return 1; + return -1; + case 6: + if ((active0 & 0xfe3800382002200L) != 0L) + { + jjmatchedKind = 63; + jjmatchedPos = 6; + return 1; + } + if ((active0 & 0x1000000L) != 0L) + return 1; + return -1; + case 7: + if ((active0 & 0xbe3800380000000L) != 0L) + { + jjmatchedKind = 63; + jjmatchedPos = 7; + return 1; + } + if ((active0 & 0x400000002002200L) != 0L) + return 1; + return -1; + case 8: + if ((active0 & 0xbc3800280000000L) != 0L) + { + jjmatchedKind = 63; + jjmatchedPos = 8; + return 1; + } + if ((active0 & 0x20000100000000L) != 0L) + return 1; + return -1; + case 9: + if ((active0 & 0x1000000000000L) != 0L) + return 1; + if ((active0 & 0xbc2800280000000L) != 0L) + { + jjmatchedKind = 63; + jjmatchedPos = 9; + return 1; + } + return -1; + case 10: + if ((active0 & 0xa42000000000000L) != 0L) + return 1; + if ((active0 & 0x180800280000000L) != 0L) + { + jjmatchedKind = 63; + jjmatchedPos = 10; + return 1; + } + return -1; + case 11: + if ((active0 & 0x800200000000L) != 0L) + return 1; + if ((active0 & 0x180000080000000L) != 0L) + { + jjmatchedKind = 63; + jjmatchedPos = 11; + return 1; + } + return -1; + case 12: + if ((active0 & 0x180000080000000L) != 0L) + { + jjmatchedKind = 63; + jjmatchedPos = 12; + return 1; + } + return -1; + case 13: + if ((active0 & 0x80000000L) != 0L) + return 1; + if ((active0 & 0x180000000000000L) != 0L) + { + jjmatchedKind = 63; + jjmatchedPos = 13; + return 1; + } + return -1; + case 14: + if ((active0 & 0x180000000000000L) != 0L) + { + jjmatchedKind = 63; + jjmatchedPos = 14; + return 1; + } + return -1; + case 15: + if ((active0 & 0x180000000000000L) != 0L) + { + jjmatchedKind = 63; + jjmatchedPos = 15; + return 1; + } + return -1; + case 16: + if ((active0 & 0x180000000000000L) != 0L) + { + jjmatchedKind = 63; + jjmatchedPos = 16; + return 1; + } + return -1; + case 17: + if ((active0 & 0x180000000000000L) != 0L) + { + jjmatchedKind = 63; + jjmatchedPos = 17; + return 1; + } + return -1; + case 18: + if ((active0 & 0x180000000000000L) != 0L) + { + jjmatchedKind = 63; + jjmatchedPos = 18; + return 1; + } + return -1; + case 19: + if ((active0 & 0x100000000000000L) != 0L) + { + jjmatchedKind = 63; + jjmatchedPos = 19; + return 1; + } + if ((active0 & 0x80000000000000L) != 0L) + return 1; + return -1; + default : + return -1; + } +} private final int jjStartNfa_0(int pos, long active0, long active1) -{ - return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0, active1), 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 33: - return jjMoveStringLiteralDfa1_0(0x100000000000L); - case 40: - return jjStopAtPos(0, 37); - case 41: - return jjStopAtPos(0, 38); - case 42: - return jjStopAtPos(0, 45); - case 44: - return jjStopAtPos(0, 36); - case 59: - return jjStopAtPos(0, 68); - case 60: - return jjStopAtPos(0, 41); - case 61: - return jjStopAtPos(0, 39); - case 62: - return jjStopAtPos(0, 40); - case 65: - case 97: - return jjMoveStringLiteralDfa1_0(0x800000400000040L); - case 66: - case 98: - return jjMoveStringLiteralDfa1_0(0x24000000000000L); - case 67: - case 99: - return jjMoveStringLiteralDfa1_0(0x3041000040000880L); - case 68: - case 100: - return jjMoveStringLiteralDfa1_0(0x901600L); - case 69: - case 101: - return jjMoveStringLiteralDfa1_0(0x410000L); - case 70: - case 102: - return jjMoveStringLiteralDfa1_0(0x4004000L); - case 72: - case 104: - return jjMoveStringLiteralDfa1_0(0x20L); - case 73: - case 105: - return jjMoveStringLiteralDfa1_0(0x10080000060000L); - case 74: - case 106: - return jjMoveStringLiteralDfa1_0(0x8000L); - case 76: - case 108: - return jjMoveStringLiteralDfa1_0(0x200000000L); - case 77: - case 109: - return jjMoveStringLiteralDfa1_0(0xc00000000000L); - case 78: - case 110: - return jjMoveStringLiteralDfa1_0(0x602040100000000L); - case 79: - case 111: - return jjMoveStringLiteralDfa1_0(0x800000000L); - case 82: - case 114: - return jjMoveStringLiteralDfa1_0(0x88000010000000L); - case 83: - case 115: - return jjMoveStringLiteralDfa1_0(0x1200100L); - case 84: - case 116: - return jjMoveStringLiteralDfa1_0(0x80082000L); - case 85: - case 117: - return jjMoveStringLiteralDfa1_0(0x8000000L); - case 86: - case 118: - return jjMoveStringLiteralDfa1_0(0x100000020000000L); - case 87: - case 119: - return jjMoveStringLiteralDfa1_0(0x2000000L); - 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, 0L); - return 1; - } - switch(curChar) - { - case 61: - if ((active0 & 0x100000000000L) != 0L) - return jjStopAtPos(1, 44); - break; - case 65: - case 97: - return jjMoveStringLiteralDfa2_0(active0, 0xc00020088000L); - case 68: - case 100: - return jjMoveStringLiteralDfa2_0(active0, 0x800000000000000L); - case 69: - case 101: - return jjMoveStringLiteralDfa2_0(active0, 0x188000000300620L); - case 72: - case 104: - return jjMoveStringLiteralDfa2_0(active0, 0x1000000002000100L); - case 73: - case 105: - return jjMoveStringLiteralDfa2_0(active0, 0x280800000L); - case 76: - case 108: - return jjMoveStringLiteralDfa2_0(active0, 0x240000000000c0L); - case 78: - case 110: - if ((active0 & 0x80000000000L) != 0L) - { - jjmatchedKind = 43; - jjmatchedPos = 1; - } - return jjMoveStringLiteralDfa2_0(active0, 0x10000408460000L); - case 79: - case 111: - return jjMoveStringLiteralDfa2_0(active0, 0x2043040050000000L); - case 82: - case 114: - if ((active0 & 0x800000000L) != 0L) - return jjStartNfaWithStates_0(1, 35, 1); - return jjMoveStringLiteralDfa2_0(active0, 0x4003800L); - case 83: - case 115: - if ((active0 & 0x4000L) != 0L) - return jjStartNfaWithStates_0(1, 14, 1); - break; - case 84: - case 116: - return jjMoveStringLiteralDfa2_0(active0, 0x1000000L); - case 85: - case 117: - return jjMoveStringLiteralDfa2_0(active0, 0x600000100000000L); - case 88: - case 120: - return jjMoveStringLiteralDfa2_0(active0, 0x10000L); - default : - break; - } - return jjStartNfa_0(0, active0, 0L); -} -private final int jjMoveStringLiteralDfa2_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(0, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(1, active0, 0L); - return 2; - } - switch(curChar) - { - case 95: - return jjMoveStringLiteralDfa3_0(active0, 0x10000000000000L); - case 65: - case 97: - return jjMoveStringLiteralDfa3_0(active0, 0x1000000001400000L); - case 66: - case 98: - return jjMoveStringLiteralDfa3_0(active0, 0x80000L); - case 67: - case 99: - return jjMoveStringLiteralDfa3_0(active0, 0x108000000000000L); - case 68: - case 100: - if ((active0 & 0x400000000L) != 0L) - return jjStartNfaWithStates_0(2, 34, 1); - else if ((active0 & 0x800000000000000L) != 0L) - return jjStartNfaWithStates_0(2, 59, 1); - break; - case 69: - case 101: - return jjMoveStringLiteralDfa3_0(active0, 0x2000880L); - case 73: - case 105: - return jjMoveStringLiteralDfa3_0(active0, 0x10000L); - case 76: - case 108: - return jjMoveStringLiteralDfa3_0(active0, 0x60300020L); - case 77: - case 109: - return jjMoveStringLiteralDfa3_0(active0, 0x601000380000000L); - case 78: - case 110: - return jjMoveStringLiteralDfa3_0(active0, 0x2000000000000L); - case 79: - case 111: - return jjMoveStringLiteralDfa3_0(active0, 0x24000004001100L); - case 82: - case 114: - if ((active0 & 0x8000L) != 0L) - return jjStartNfaWithStates_0(2, 15, 1); - break; - case 83: - case 115: - return jjMoveStringLiteralDfa3_0(active0, 0x820600L); - case 84: - case 116: - if ((active0 & 0x40000000000L) != 0L) - return jjStartNfaWithStates_0(2, 42, 1); - return jjMoveStringLiteralDfa3_0(active0, 0x80000008040040L); - case 85: - case 117: - return jjMoveStringLiteralDfa3_0(active0, 0x2040000000002000L); - case 87: - case 119: - if ((active0 & 0x10000000L) != 0L) - return jjStartNfaWithStates_0(2, 28, 1); - break; - case 88: - case 120: - return jjMoveStringLiteralDfa3_0(active0, 0xc00000000000L); - default : - break; - } - return jjStartNfa_0(1, active0, 0L); -} -private final int jjMoveStringLiteralDfa3_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(1, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(2, active0, 0L); - return 3; - } - switch(curChar) - { - case 95: - return jjMoveStringLiteralDfa4_0(active0, 0x600c00100000000L); - case 65: - case 97: - return jjMoveStringLiteralDfa4_0(active0, 0x800880L); - case 66: - case 98: - return jjMoveStringLiteralDfa4_0(active0, 0x400000L); - case 67: - case 99: - if ((active0 & 0x400L) != 0L) - { - jjmatchedKind = 10; - jjmatchedPos = 3; - } - return jjMoveStringLiteralDfa4_0(active0, 0x4000000000200L); - case 69: - case 101: - if ((active0 & 0x2000000000000L) != 0L) - return jjStartNfaWithStates_0(3, 49, 1); - return jjMoveStringLiteralDfa4_0(active0, 0x80320040L); - case 73: - case 105: - return jjMoveStringLiteralDfa4_0(active0, 0x208000000L); - case 76: - case 108: - return jjMoveStringLiteralDfa4_0(active0, 0x80000L); - case 77: - case 109: - if ((active0 & 0x4000000L) != 0L) - return jjStartNfaWithStates_0(3, 26, 1); - return jjMoveStringLiteralDfa4_0(active0, 0x10000000000000L); - case 78: - case 110: - return jjMoveStringLiteralDfa4_0(active0, 0x3040000000002000L); - case 79: - case 111: - if ((active0 & 0x40000L) != 0L) - return jjStartNfaWithStates_0(3, 18, 1); - return jjMoveStringLiteralDfa4_0(active0, 0xa8000000000000L); - case 80: - case 112: - if ((active0 & 0x20L) != 0L) - return jjStartNfaWithStates_0(3, 5, 1); - else if ((active0 & 0x1000L) != 0L) - return jjStartNfaWithStates_0(3, 12, 1); - return jjMoveStringLiteralDfa4_0(active0, 0x1000000000000L); - case 82: - case 114: - return jjMoveStringLiteralDfa4_0(active0, 0x3000000L); - case 84: - case 116: - if ((active0 & 0x10000L) != 0L) - return jjStartNfaWithStates_0(3, 16, 1); - return jjMoveStringLiteralDfa4_0(active0, 0x100000000000000L); - case 85: - case 117: - return jjMoveStringLiteralDfa4_0(active0, 0x60000000L); - case 87: - case 119: - if ((active0 & 0x100L) != 0L) - return jjStartNfaWithStates_0(3, 8, 1); - break; - default : - break; - } - return jjStartNfa_0(2, active0, 0L); -} -private final int jjMoveStringLiteralDfa4_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(2, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(3, active0, 0L); - return 4; - } - switch(curChar) - { - case 66: - case 98: - return jjMoveStringLiteralDfa5_0(active0, 0x800000L); - case 67: - case 99: - return jjMoveStringLiteralDfa5_0(active0, 0x202000L); - case 69: - case 101: - if ((active0 & 0x80000L) != 0L) - return jjStartNfaWithStates_0(4, 19, 1); - else if ((active0 & 0x2000000L) != 0L) - return jjStartNfaWithStates_0(4, 25, 1); - return jjMoveStringLiteralDfa5_0(active0, 0x410000020000000L); - case 71: - case 103: - return jjMoveStringLiteralDfa5_0(active0, 0x1000000000000000L); - case 72: - case 104: - return jjMoveStringLiteralDfa5_0(active0, 0x200000000000000L); - case 75: - case 107: - if ((active0 & 0x4000000000000L) != 0L) - return jjStartNfaWithStates_0(4, 50, 1); - break; - case 76: - case 108: - if ((active0 & 0x8000000L) != 0L) - return jjStartNfaWithStates_0(4, 27, 1); - return jjMoveStringLiteralDfa5_0(active0, 0x800000400000L); - case 77: - case 109: - return jjMoveStringLiteralDfa5_0(active0, 0x20000040000000L); - case 79: - case 111: - return jjMoveStringLiteralDfa5_0(active0, 0x100000000000000L); - case 82: - case 114: - if ((active0 & 0x40L) != 0L) - return jjStartNfaWithStates_0(4, 6, 1); - else if ((active0 & 0x80L) != 0L) - return jjStartNfaWithStates_0(4, 7, 1); - return jjMoveStringLiteralDfa5_0(active0, 0x9000000020200L); - case 83: - case 115: - return jjMoveStringLiteralDfa5_0(active0, 0x80000000L); - case 84: - case 116: - if ((active0 & 0x200000000L) != 0L) - return jjStartNfaWithStates_0(4, 33, 1); - else if ((active0 & 0x2000000000000000L) != 0L) - { - jjmatchedKind = 61; - jjmatchedPos = 4; - } - return jjMoveStringLiteralDfa5_0(active0, 0x40000001100800L); - case 85: - case 117: - return jjMoveStringLiteralDfa5_0(active0, 0x80000000000000L); - case 86: - case 118: - return jjMoveStringLiteralDfa5_0(active0, 0x400100000000L); - default : - break; - } - return jjStartNfa_0(3, active0, 0L); -} -private final int jjMoveStringLiteralDfa5_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(3, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(4, active0, 0L); - return 5; - } - switch(curChar) - { - case 65: - case 97: - return jjMoveStringLiteralDfa6_0(active0, 0x200000000002000L); - case 67: - case 99: - return jjMoveStringLiteralDfa6_0(active0, 0x80000000000000L); - case 68: - case 100: - if ((active0 & 0x8000000000000L) != 0L) - return jjStartNfaWithStates_0(5, 51, 1); - break; - case 69: - case 101: - if ((active0 & 0x800L) != 0L) - return jjStartNfaWithStates_0(5, 11, 1); - else if ((active0 & 0x100000L) != 0L) - return jjStartNfaWithStates_0(5, 20, 1); - else if ((active0 & 0x400000L) != 0L) - return jjStartNfaWithStates_0(5, 22, 1); - else if ((active0 & 0x1000000000000000L) != 0L) - return jjStartNfaWithStates_0(5, 60, 1); - return jjMoveStringLiteralDfa6_0(active0, 0x1c00100000000L); - case 70: - case 102: - return jjMoveStringLiteralDfa6_0(active0, 0x20000000000000L); - case 73: - case 105: - return jjMoveStringLiteralDfa6_0(active0, 0x40000001000200L); - case 76: - case 108: - return jjMoveStringLiteralDfa6_0(active0, 0x800000L); - case 77: - case 109: - return jjMoveStringLiteralDfa6_0(active0, 0x10000000000000L); - case 78: - case 110: - return jjMoveStringLiteralDfa6_0(active0, 0x400000040000000L); - case 82: - case 114: - return jjMoveStringLiteralDfa6_0(active0, 0x100000000000000L); - case 83: - case 115: - if ((active0 & 0x20000000L) != 0L) - return jjStartNfaWithStates_0(5, 29, 1); - break; - case 84: - case 116: - if ((active0 & 0x20000L) != 0L) - return jjStartNfaWithStates_0(5, 17, 1); - else if ((active0 & 0x200000L) != 0L) - return jjStartNfaWithStates_0(5, 21, 1); - return jjMoveStringLiteralDfa6_0(active0, 0x80000000L); - default : - break; - } - return jjStartNfa_0(4, active0, 0L); -} -private final int jjMoveStringLiteralDfa6_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(4, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(5, active0, 0L); - return 6; - } - switch(curChar) - { - case 95: - return jjMoveStringLiteralDfa7_0(active0, 0x100000000000000L); - case 65: - case 97: - return jjMoveStringLiteralDfa7_0(active0, 0x80000000L); - case 66: - case 98: - return jjMoveStringLiteralDfa7_0(active0, 0x200L); - case 69: - case 101: - if ((active0 & 0x800000L) != 0L) - return jjStartNfaWithStates_0(6, 23, 1); - break; - case 70: - case 102: - return jjMoveStringLiteralDfa7_0(active0, 0x40000000L); - case 72: - case 104: - return jjMoveStringLiteralDfa7_0(active0, 0x80000000000000L); - case 73: - case 105: - return jjMoveStringLiteralDfa7_0(active0, 0x20000000000000L); - case 78: - case 110: - return jjMoveStringLiteralDfa7_0(active0, 0x40800001000000L); - case 79: - case 111: - return jjMoveStringLiteralDfa7_0(active0, 0x10000000000000L); - case 82: - case 114: - return jjMoveStringLiteralDfa7_0(active0, 0x400100000000L); - case 83: - case 115: - return jjMoveStringLiteralDfa7_0(active0, 0x201000000000000L); - case 84: - case 116: - return jjMoveStringLiteralDfa7_0(active0, 0x400000000002000L); - default : - break; - } - return jjStartNfa_0(5, active0, 0L); -} -private final int jjMoveStringLiteralDfa7_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(5, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(6, active0, 0L); - return 7; - } - switch(curChar) - { - case 65: - case 97: - return jjMoveStringLiteralDfa8_0(active0, 0x40000000L); - case 69: - case 101: - if ((active0 & 0x200L) != 0L) - return jjStartNfaWithStates_0(7, 9, 1); - else if ((active0 & 0x2000L) != 0L) - return jjStartNfaWithStates_0(7, 13, 1); - return jjMoveStringLiteralDfa8_0(active0, 0x80000000000000L); - case 71: - case 103: - if ((active0 & 0x1000000L) != 0L) - return jjStartNfaWithStates_0(7, 24, 1); - return jjMoveStringLiteralDfa8_0(active0, 0x40800000000000L); - case 72: - case 104: - if ((active0 & 0x200000000000000L) != 0L) - return jjStartNfaWithStates_0(7, 57, 1); - break; - case 76: - case 108: - return jjMoveStringLiteralDfa8_0(active0, 0x20000000000000L); - case 77: - case 109: - return jjMoveStringLiteralDfa8_0(active0, 0x80000000L); - case 82: - case 114: - return jjMoveStringLiteralDfa8_0(active0, 0x410000000000000L); - case 83: - case 115: - return jjMoveStringLiteralDfa8_0(active0, 0x101400100000000L); - default : - break; - } - return jjStartNfa_0(6, active0, 0L); -} -private final int jjMoveStringLiteralDfa8_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(6, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(7, active0, 0L); - return 8; - } - switch(curChar) - { - case 95: - return jjMoveStringLiteralDfa9_0(active0, 0x40000000000000L); - case 68: - case 100: - return jjMoveStringLiteralDfa9_0(active0, 0x80000000000000L); - case 73: - case 105: - return jjMoveStringLiteralDfa9_0(active0, 0x501400100000000L); - case 77: - case 109: - return jjMoveStringLiteralDfa9_0(active0, 0x40000000L); - case 80: - case 112: - if ((active0 & 0x80000000L) != 0L) - return jjStartNfaWithStates_0(8, 31, 1); - break; - case 84: - case 116: - return jjMoveStringLiteralDfa9_0(active0, 0x20800000000000L); - case 89: - case 121: - if ((active0 & 0x10000000000000L) != 0L) - return jjStartNfaWithStates_0(8, 52, 1); - break; - default : - break; - } - return jjStartNfa_0(7, active0, 0L); -} -private final int jjMoveStringLiteralDfa9_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(7, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(8, active0, 0L); - return 9; - } - switch(curChar) - { - case 95: - return jjMoveStringLiteralDfa10_0(active0, 0x80000000000000L); - case 66: - case 98: - return jjMoveStringLiteralDfa10_0(active0, 0x40000000000000L); - case 69: - case 101: - return jjMoveStringLiteralDfa10_0(active0, 0x420000000000000L); - case 72: - case 104: - if ((active0 & 0x800000000000L) != 0L) - return jjStartNfaWithStates_0(9, 47, 1); - break; - case 73: - case 105: - return jjMoveStringLiteralDfa10_0(active0, 0x40000000L); - case 79: - case 111: - return jjMoveStringLiteralDfa10_0(active0, 0x1400100000000L); - case 90: - case 122: - return jjMoveStringLiteralDfa10_0(active0, 0x100000000000000L); - default : - break; - } - return jjStartNfa_0(8, active0, 0L); -} -private final int jjMoveStringLiteralDfa10_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(8, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(9, active0, 0L); - return 10; - } - switch(curChar) - { - case 66: - case 98: - return jjMoveStringLiteralDfa11_0(active0, 0x80000000000000L); - case 69: - case 101: - if ((active0 & 0x100000000000000L) != 0L) - return jjStartNfaWithStates_0(10, 56, 1); - break; - case 76: - case 108: - return jjMoveStringLiteralDfa11_0(active0, 0x40000040000000L); - case 78: - case 110: - if ((active0 & 0x1000000000000L) != 0L) - return jjStartNfaWithStates_0(10, 48, 1); - return jjMoveStringLiteralDfa11_0(active0, 0x400100000000L); - case 82: - case 114: - if ((active0 & 0x20000000000000L) != 0L) - return jjStartNfaWithStates_0(10, 53, 1); - break; - case 83: - case 115: - if ((active0 & 0x400000000000000L) != 0L) - return jjStartNfaWithStates_0(10, 58, 1); - break; - default : - break; - } - return jjStartNfa_0(9, active0, 0L); -} -private final int jjMoveStringLiteralDfa11_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(9, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(10, active0, 0L); - return 11; - } - switch(curChar) - { - case 73: - case 105: - return jjMoveStringLiteralDfa12_0(active0, 0x40000000L); - case 76: - case 108: - return jjMoveStringLiteralDfa12_0(active0, 0x80000000000000L); - case 79: - case 111: - return jjMoveStringLiteralDfa12_0(active0, 0x40000000000000L); - case 83: - case 115: - if ((active0 & 0x100000000L) != 0L) - return jjStartNfaWithStates_0(11, 32, 1); - else if ((active0 & 0x400000000000L) != 0L) - return jjStartNfaWithStates_0(11, 46, 1); - break; - default : - break; - } - return jjStartNfa_0(10, active0, 0L); -} -private final int jjMoveStringLiteralDfa12_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(10, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(11, active0, 0L); - return 12; - } - switch(curChar) - { - case 69: - case 101: - return jjMoveStringLiteralDfa13_0(active0, 0x40000000L); - case 79: - case 111: - return jjMoveStringLiteralDfa13_0(active0, 0xc0000000000000L); - default : - break; - } - return jjStartNfa_0(11, active0, 0L); -} -private final int jjMoveStringLiteralDfa13_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(11, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(12, active0, 0L); - return 13; - } - switch(curChar) - { - case 77: - case 109: - return jjMoveStringLiteralDfa14_0(active0, 0x40000000000000L); - case 79: - case 111: - return jjMoveStringLiteralDfa14_0(active0, 0x80000000000000L); - case 83: - case 115: - if ((active0 & 0x40000000L) != 0L) - return jjStartNfaWithStates_0(13, 30, 1); - break; - default : - break; - } - return jjStartNfa_0(12, active0, 0L); -} -private final int jjMoveStringLiteralDfa14_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(12, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(13, active0, 0L); - return 14; - } - switch(curChar) - { - case 70: - case 102: - return jjMoveStringLiteralDfa15_0(active0, 0x40000000000000L); - case 77: - case 109: - return jjMoveStringLiteralDfa15_0(active0, 0x80000000000000L); - default : - break; - } - return jjStartNfa_0(13, active0, 0L); -} -private final int jjMoveStringLiteralDfa15_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(13, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(14, active0, 0L); - return 15; - } - switch(curChar) - { - case 70: - case 102: - return jjMoveStringLiteralDfa16_0(active0, 0x80000000000000L); - case 73: - case 105: - return jjMoveStringLiteralDfa16_0(active0, 0x40000000000000L); - default : - break; - } - return jjStartNfa_0(14, active0, 0L); -} -private final int jjMoveStringLiteralDfa16_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(14, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(15, active0, 0L); - return 16; - } - switch(curChar) - { - case 73: - case 105: - return jjMoveStringLiteralDfa17_0(active0, 0x80000000000000L); - case 76: - case 108: - return jjMoveStringLiteralDfa17_0(active0, 0x40000000000000L); - default : - break; - } - return jjStartNfa_0(15, active0, 0L); -} -private final int jjMoveStringLiteralDfa17_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(15, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(16, active0, 0L); - return 17; - } - switch(curChar) - { - case 76: - case 108: - return jjMoveStringLiteralDfa18_0(active0, 0x80000000000000L); - case 84: - case 116: - return jjMoveStringLiteralDfa18_0(active0, 0x40000000000000L); - default : - break; - } - return jjStartNfa_0(16, active0, 0L); -} -private final int jjMoveStringLiteralDfa18_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(16, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(17, active0, 0L); - return 18; - } - switch(curChar) - { - case 69: - case 101: - return jjMoveStringLiteralDfa19_0(active0, 0x40000000000000L); - case 84: - case 116: - return jjMoveStringLiteralDfa19_0(active0, 0x80000000000000L); - default : - break; - } - return jjStartNfa_0(17, active0, 0L); -} -private final int jjMoveStringLiteralDfa19_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(17, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(18, active0, 0L); - return 19; - } - switch(curChar) - { - case 69: - case 101: - return jjMoveStringLiteralDfa20_0(active0, 0x80000000000000L); - case 82: - case 114: - if ((active0 & 0x40000000000000L) != 0L) - return jjStartNfaWithStates_0(19, 54, 1); - break; - default : - break; - } - return jjStartNfa_0(18, active0, 0L); -} -private final int jjMoveStringLiteralDfa20_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(18, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(19, active0, 0L); - return 20; - } - switch(curChar) - { - case 82: - case 114: - if ((active0 & 0x80000000000000L) != 0L) - return jjStartNfaWithStates_0(20, 55, 1); - break; - default : - break; - } - return jjStartNfa_0(19, active0, 0L); -} -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, active1), 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 33: + return jjMoveStringLiteralDfa1_0(0x200000000000L); + case 40: + return jjStopAtPos(0, 38); + case 41: + return jjStopAtPos(0, 39); + case 42: + return jjStopAtPos(0, 46); + case 44: + return jjStopAtPos(0, 37); + case 59: + return jjStopAtPos(0, 69); + case 60: + return jjStopAtPos(0, 42); + case 61: + return jjStopAtPos(0, 40); + case 62: + return jjStopAtPos(0, 41); + case 65: + case 97: + return jjMoveStringLiteralDfa1_0(0x1000000800000040L); + case 66: + case 98: + return jjMoveStringLiteralDfa1_0(0x48000000000000L); + case 67: + case 99: + return jjMoveStringLiteralDfa1_0(0x6082000080000880L); + case 68: + case 100: + return jjMoveStringLiteralDfa1_0(0x1201600L); + case 69: + case 101: + return jjMoveStringLiteralDfa1_0(0x810000L); + case 70: + case 102: + return jjMoveStringLiteralDfa1_0(0x8004000L); + case 72: + case 104: + return jjMoveStringLiteralDfa1_0(0x20L); + case 73: + case 105: + return jjMoveStringLiteralDfa1_0(0x201000000c0000L); + case 74: + case 106: + return jjMoveStringLiteralDfa1_0(0x8000L); + case 76: + case 108: + return jjMoveStringLiteralDfa1_0(0x400000000L); + case 77: + case 109: + return jjMoveStringLiteralDfa1_0(0x1800000000000L); + case 78: + case 110: + return jjMoveStringLiteralDfa1_0(0xc04080200000000L); + case 79: + case 111: + return jjMoveStringLiteralDfa1_0(0x1000000000L); + case 82: + case 114: + return jjMoveStringLiteralDfa1_0(0x110000020000000L); + case 83: + case 115: + return jjMoveStringLiteralDfa1_0(0x2420100L); + case 84: + case 116: + return jjMoveStringLiteralDfa1_0(0x100102000L); + case 85: + case 117: + return jjMoveStringLiteralDfa1_0(0x10000000L); + case 86: + case 118: + return jjMoveStringLiteralDfa1_0(0x200000040000000L); + case 87: + case 119: + return jjMoveStringLiteralDfa1_0(0x4000000L); + 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, 0L); + return 1; + } + switch(curChar) + { + case 61: + if ((active0 & 0x200000000000L) != 0L) + return jjStopAtPos(1, 45); + break; + case 65: + case 97: + return jjMoveStringLiteralDfa2_0(active0, 0x1800040108000L); + case 68: + case 100: + return jjMoveStringLiteralDfa2_0(active0, 0x1000000000000000L); + case 69: + case 101: + return jjMoveStringLiteralDfa2_0(active0, 0x310000000600620L); + case 72: + case 104: + return jjMoveStringLiteralDfa2_0(active0, 0x2000000004000100L); + case 73: + case 105: + return jjMoveStringLiteralDfa2_0(active0, 0x501000000L); + case 76: + case 108: + return jjMoveStringLiteralDfa2_0(active0, 0x480000000000c0L); + case 78: + case 110: + if ((active0 & 0x100000000000L) != 0L) + { + jjmatchedKind = 44; + jjmatchedPos = 1; + } + return jjMoveStringLiteralDfa2_0(active0, 0x200008108c0000L); + case 79: + case 111: + return jjMoveStringLiteralDfa2_0(active0, 0x40860800a0000000L); + case 82: + case 114: + if ((active0 & 0x1000000000L) != 0L) + return jjStartNfaWithStates_0(1, 36, 1); + return jjMoveStringLiteralDfa2_0(active0, 0x8003800L); + case 83: + case 115: + if ((active0 & 0x4000L) != 0L) + return jjStartNfaWithStates_0(1, 14, 1); + break; + case 84: + case 116: + return jjMoveStringLiteralDfa2_0(active0, 0x2020000L); + case 85: + case 117: + return jjMoveStringLiteralDfa2_0(active0, 0xc00000200000000L); + case 88: + case 120: + return jjMoveStringLiteralDfa2_0(active0, 0x10000L); + default : + break; + } + return jjStartNfa_0(0, active0, 0L); +} +private final int jjMoveStringLiteralDfa2_0(long old0, long active0) +{ + if (((active0 &= old0)) == 0L) + return jjStartNfa_0(0, old0, 0L); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(1, active0, 0L); + return 2; + } + switch(curChar) + { + case 95: + return jjMoveStringLiteralDfa3_0(active0, 0x20000000000000L); + case 65: + case 97: + return jjMoveStringLiteralDfa3_0(active0, 0x2000000002820000L); + case 66: + case 98: + return jjMoveStringLiteralDfa3_0(active0, 0x100000L); + case 67: + case 99: + return jjMoveStringLiteralDfa3_0(active0, 0x210000000000000L); + case 68: + case 100: + if ((active0 & 0x800000000L) != 0L) + return jjStartNfaWithStates_0(2, 35, 1); + else if ((active0 & 0x1000000000000000L) != 0L) + return jjStartNfaWithStates_0(2, 60, 1); + break; + case 69: + case 101: + return jjMoveStringLiteralDfa3_0(active0, 0x4000880L); + case 73: + case 105: + return jjMoveStringLiteralDfa3_0(active0, 0x10000L); + case 76: + case 108: + return jjMoveStringLiteralDfa3_0(active0, 0xc0600020L); + case 77: + case 109: + return jjMoveStringLiteralDfa3_0(active0, 0xc02000700000000L); + case 78: + case 110: + return jjMoveStringLiteralDfa3_0(active0, 0x4000000000000L); + case 79: + case 111: + return jjMoveStringLiteralDfa3_0(active0, 0x48000008001100L); + case 82: + case 114: + if ((active0 & 0x8000L) != 0L) + return jjStartNfaWithStates_0(2, 15, 1); + break; + case 83: + case 115: + return jjMoveStringLiteralDfa3_0(active0, 0x1040600L); + case 84: + case 116: + if ((active0 & 0x80000000000L) != 0L) + return jjStartNfaWithStates_0(2, 43, 1); + return jjMoveStringLiteralDfa3_0(active0, 0x100000010080040L); + case 85: + case 117: + return jjMoveStringLiteralDfa3_0(active0, 0x4080000000002000L); + case 87: + case 119: + if ((active0 & 0x20000000L) != 0L) + return jjStartNfaWithStates_0(2, 29, 1); + break; + case 88: + case 120: + return jjMoveStringLiteralDfa3_0(active0, 0x1800000000000L); + default : + break; + } + return jjStartNfa_0(1, active0, 0L); +} +private final int jjMoveStringLiteralDfa3_0(long old0, long active0) +{ + if (((active0 &= old0)) == 0L) + return jjStartNfa_0(1, old0, 0L); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(2, active0, 0L); + return 3; + } + switch(curChar) + { + case 95: + return jjMoveStringLiteralDfa4_0(active0, 0xc01800200000000L); + case 65: + case 97: + return jjMoveStringLiteralDfa4_0(active0, 0x1000880L); + case 66: + case 98: + return jjMoveStringLiteralDfa4_0(active0, 0x800000L); + case 67: + case 99: + if ((active0 & 0x400L) != 0L) + { + jjmatchedKind = 10; + jjmatchedPos = 3; + } + return jjMoveStringLiteralDfa4_0(active0, 0x8000000000200L); + case 69: + case 101: + if ((active0 & 0x4000000000000L) != 0L) + return jjStartNfaWithStates_0(3, 50, 1); + return jjMoveStringLiteralDfa4_0(active0, 0x100640040L); + case 73: + case 105: + return jjMoveStringLiteralDfa4_0(active0, 0x410000000L); + case 76: + case 108: + return jjMoveStringLiteralDfa4_0(active0, 0x100000L); + case 77: + case 109: + if ((active0 & 0x8000000L) != 0L) + return jjStartNfaWithStates_0(3, 27, 1); + return jjMoveStringLiteralDfa4_0(active0, 0x20000000000000L); + case 78: + case 110: + return jjMoveStringLiteralDfa4_0(active0, 0x6080000000002000L); + case 79: + case 111: + if ((active0 & 0x80000L) != 0L) + return jjStartNfaWithStates_0(3, 19, 1); + return jjMoveStringLiteralDfa4_0(active0, 0x150000000000000L); + case 80: + case 112: + if ((active0 & 0x20L) != 0L) + return jjStartNfaWithStates_0(3, 5, 1); + else if ((active0 & 0x1000L) != 0L) + return jjStartNfaWithStates_0(3, 12, 1); + return jjMoveStringLiteralDfa4_0(active0, 0x2000000000000L); + case 82: + case 114: + return jjMoveStringLiteralDfa4_0(active0, 0x6020000L); + case 84: + case 116: + if ((active0 & 0x10000L) != 0L) + return jjStartNfaWithStates_0(3, 16, 1); + return jjMoveStringLiteralDfa4_0(active0, 0x200000000000000L); + case 85: + case 117: + return jjMoveStringLiteralDfa4_0(active0, 0xc0000000L); + case 87: + case 119: + if ((active0 & 0x100L) != 0L) + return jjStartNfaWithStates_0(3, 8, 1); + break; + default : + break; + } + return jjStartNfa_0(2, active0, 0L); +} +private final int jjMoveStringLiteralDfa4_0(long old0, long active0) +{ + if (((active0 &= old0)) == 0L) + return jjStartNfa_0(2, old0, 0L); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(3, active0, 0L); + return 4; + } + switch(curChar) + { + case 66: + case 98: + return jjMoveStringLiteralDfa5_0(active0, 0x1000000L); + case 67: + case 99: + return jjMoveStringLiteralDfa5_0(active0, 0x402000L); + case 69: + case 101: + if ((active0 & 0x100000L) != 0L) + return jjStartNfaWithStates_0(4, 20, 1); + else if ((active0 & 0x4000000L) != 0L) + return jjStartNfaWithStates_0(4, 26, 1); + return jjMoveStringLiteralDfa5_0(active0, 0x820000040000000L); + case 71: + case 103: + return jjMoveStringLiteralDfa5_0(active0, 0x2000000000000000L); + case 72: + case 104: + return jjMoveStringLiteralDfa5_0(active0, 0x400000000000000L); + case 75: + case 107: + if ((active0 & 0x8000000000000L) != 0L) + return jjStartNfaWithStates_0(4, 51, 1); + break; + case 76: + case 108: + if ((active0 & 0x10000000L) != 0L) + return jjStartNfaWithStates_0(4, 28, 1); + return jjMoveStringLiteralDfa5_0(active0, 0x1000000800000L); + case 77: + case 109: + return jjMoveStringLiteralDfa5_0(active0, 0x40000080000000L); + case 79: + case 111: + return jjMoveStringLiteralDfa5_0(active0, 0x200000000000000L); + case 82: + case 114: + if ((active0 & 0x40L) != 0L) + return jjStartNfaWithStates_0(4, 6, 1); + else if ((active0 & 0x80L) != 0L) + return jjStartNfaWithStates_0(4, 7, 1); + return jjMoveStringLiteralDfa5_0(active0, 0x12000000040200L); + case 83: + case 115: + return jjMoveStringLiteralDfa5_0(active0, 0x100000000L); + case 84: + case 116: + if ((active0 & 0x20000L) != 0L) + { + jjmatchedKind = 17; + jjmatchedPos = 4; + } + else if ((active0 & 0x400000000L) != 0L) + return jjStartNfaWithStates_0(4, 34, 1); + else if ((active0 & 0x4000000000000000L) != 0L) + { + jjmatchedKind = 62; + jjmatchedPos = 4; + } + return jjMoveStringLiteralDfa5_0(active0, 0x80000002200800L); + case 85: + case 117: + return jjMoveStringLiteralDfa5_0(active0, 0x100000000000000L); + case 86: + case 118: + return jjMoveStringLiteralDfa5_0(active0, 0x800200000000L); + default : + break; + } + return jjStartNfa_0(3, active0, 0L); +} +private final int jjMoveStringLiteralDfa5_0(long old0, long active0) +{ + if (((active0 &= old0)) == 0L) + return jjStartNfa_0(3, old0, 0L); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(4, active0, 0L); + return 5; + } + switch(curChar) + { + case 65: + case 97: + return jjMoveStringLiteralDfa6_0(active0, 0x400000000002000L); + case 67: + case 99: + return jjMoveStringLiteralDfa6_0(active0, 0x100000000000000L); + case 68: + case 100: + if ((active0 & 0x10000000000000L) != 0L) + return jjStartNfaWithStates_0(5, 52, 1); + break; + case 69: + case 101: + if ((active0 & 0x800L) != 0L) + return jjStartNfaWithStates_0(5, 11, 1); + else if ((active0 & 0x200000L) != 0L) + return jjStartNfaWithStates_0(5, 21, 1); + else if ((active0 & 0x800000L) != 0L) + return jjStartNfaWithStates_0(5, 23, 1); + else if ((active0 & 0x2000000000000000L) != 0L) + return jjStartNfaWithStates_0(5, 61, 1); + return jjMoveStringLiteralDfa6_0(active0, 0x3800200000000L); + case 70: + case 102: + return jjMoveStringLiteralDfa6_0(active0, 0x40000000000000L); + case 73: + case 105: + return jjMoveStringLiteralDfa6_0(active0, 0x80000002000200L); + case 76: + case 108: + return jjMoveStringLiteralDfa6_0(active0, 0x1000000L); + case 77: + case 109: + return jjMoveStringLiteralDfa6_0(active0, 0x20000000000000L); + case 78: + case 110: + return jjMoveStringLiteralDfa6_0(active0, 0x800000080000000L); + case 82: + case 114: + return jjMoveStringLiteralDfa6_0(active0, 0x200000000000000L); + case 83: + case 115: + if ((active0 & 0x40000000L) != 0L) + return jjStartNfaWithStates_0(5, 30, 1); + break; + case 84: + case 116: + if ((active0 & 0x40000L) != 0L) + return jjStartNfaWithStates_0(5, 18, 1); + else if ((active0 & 0x400000L) != 0L) + return jjStartNfaWithStates_0(5, 22, 1); + return jjMoveStringLiteralDfa6_0(active0, 0x100000000L); + default : + break; + } + return jjStartNfa_0(4, active0, 0L); +} +private final int jjMoveStringLiteralDfa6_0(long old0, long active0) +{ + if (((active0 &= old0)) == 0L) + return jjStartNfa_0(4, old0, 0L); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(5, active0, 0L); + return 6; + } + switch(curChar) + { + case 95: + return jjMoveStringLiteralDfa7_0(active0, 0x200000000000000L); + case 65: + case 97: + return jjMoveStringLiteralDfa7_0(active0, 0x100000000L); + case 66: + case 98: + return jjMoveStringLiteralDfa7_0(active0, 0x200L); + case 69: + case 101: + if ((active0 & 0x1000000L) != 0L) + return jjStartNfaWithStates_0(6, 24, 1); + break; + case 70: + case 102: + return jjMoveStringLiteralDfa7_0(active0, 0x80000000L); + case 72: + case 104: + return jjMoveStringLiteralDfa7_0(active0, 0x100000000000000L); + case 73: + case 105: + return jjMoveStringLiteralDfa7_0(active0, 0x40000000000000L); + case 78: + case 110: + return jjMoveStringLiteralDfa7_0(active0, 0x81000002000000L); + case 79: + case 111: + return jjMoveStringLiteralDfa7_0(active0, 0x20000000000000L); + case 82: + case 114: + return jjMoveStringLiteralDfa7_0(active0, 0x800200000000L); + case 83: + case 115: + return jjMoveStringLiteralDfa7_0(active0, 0x402000000000000L); + case 84: + case 116: + return jjMoveStringLiteralDfa7_0(active0, 0x800000000002000L); + default : + break; + } + return jjStartNfa_0(5, active0, 0L); +} +private final int jjMoveStringLiteralDfa7_0(long old0, long active0) +{ + if (((active0 &= old0)) == 0L) + return jjStartNfa_0(5, old0, 0L); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(6, active0, 0L); + return 7; + } + switch(curChar) + { + case 65: + case 97: + return jjMoveStringLiteralDfa8_0(active0, 0x80000000L); + case 69: + case 101: + if ((active0 & 0x200L) != 0L) + return jjStartNfaWithStates_0(7, 9, 1); + else if ((active0 & 0x2000L) != 0L) + return jjStartNfaWithStates_0(7, 13, 1); + return jjMoveStringLiteralDfa8_0(active0, 0x100000000000000L); + case 71: + case 103: + if ((active0 & 0x2000000L) != 0L) + return jjStartNfaWithStates_0(7, 25, 1); + return jjMoveStringLiteralDfa8_0(active0, 0x81000000000000L); + case 72: + case 104: + if ((active0 & 0x400000000000000L) != 0L) + return jjStartNfaWithStates_0(7, 58, 1); + break; + case 76: + case 108: + return jjMoveStringLiteralDfa8_0(active0, 0x40000000000000L); + case 77: + case 109: + return jjMoveStringLiteralDfa8_0(active0, 0x100000000L); + case 82: + case 114: + return jjMoveStringLiteralDfa8_0(active0, 0x820000000000000L); + case 83: + case 115: + return jjMoveStringLiteralDfa8_0(active0, 0x202800200000000L); + default : + break; + } + return jjStartNfa_0(6, active0, 0L); +} +private final int jjMoveStringLiteralDfa8_0(long old0, long active0) +{ + if (((active0 &= old0)) == 0L) + return jjStartNfa_0(6, old0, 0L); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(7, active0, 0L); + return 8; + } + switch(curChar) + { + case 95: + return jjMoveStringLiteralDfa9_0(active0, 0x80000000000000L); + case 68: + case 100: + return jjMoveStringLiteralDfa9_0(active0, 0x100000000000000L); + case 73: + case 105: + return jjMoveStringLiteralDfa9_0(active0, 0xa02800200000000L); + case 77: + case 109: + return jjMoveStringLiteralDfa9_0(active0, 0x80000000L); + case 80: + case 112: + if ((active0 & 0x100000000L) != 0L) + return jjStartNfaWithStates_0(8, 32, 1); + break; + case 84: + case 116: + return jjMoveStringLiteralDfa9_0(active0, 0x41000000000000L); + case 89: + case 121: + if ((active0 & 0x20000000000000L) != 0L) + return jjStartNfaWithStates_0(8, 53, 1); + break; + default : + break; + } + return jjStartNfa_0(7, active0, 0L); +} +private final int jjMoveStringLiteralDfa9_0(long old0, long active0) +{ + if (((active0 &= old0)) == 0L) + return jjStartNfa_0(7, old0, 0L); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(8, active0, 0L); + return 9; + } + switch(curChar) + { + case 95: + return jjMoveStringLiteralDfa10_0(active0, 0x100000000000000L); + case 66: + case 98: + return jjMoveStringLiteralDfa10_0(active0, 0x80000000000000L); + case 69: + case 101: + return jjMoveStringLiteralDfa10_0(active0, 0x840000000000000L); + case 72: + case 104: + if ((active0 & 0x1000000000000L) != 0L) + return jjStartNfaWithStates_0(9, 48, 1); + break; + case 73: + case 105: + return jjMoveStringLiteralDfa10_0(active0, 0x80000000L); + case 79: + case 111: + return jjMoveStringLiteralDfa10_0(active0, 0x2800200000000L); + case 90: + case 122: + return jjMoveStringLiteralDfa10_0(active0, 0x200000000000000L); + default : + break; + } + return jjStartNfa_0(8, active0, 0L); +} +private final int jjMoveStringLiteralDfa10_0(long old0, long active0) +{ + if (((active0 &= old0)) == 0L) + return jjStartNfa_0(8, old0, 0L); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(9, active0, 0L); + return 10; + } + switch(curChar) + { + case 66: + case 98: + return jjMoveStringLiteralDfa11_0(active0, 0x100000000000000L); + case 69: + case 101: + if ((active0 & 0x200000000000000L) != 0L) + return jjStartNfaWithStates_0(10, 57, 1); + break; + case 76: + case 108: + return jjMoveStringLiteralDfa11_0(active0, 0x80000080000000L); + case 78: + case 110: + if ((active0 & 0x2000000000000L) != 0L) + return jjStartNfaWithStates_0(10, 49, 1); + return jjMoveStringLiteralDfa11_0(active0, 0x800200000000L); + case 82: + case 114: + if ((active0 & 0x40000000000000L) != 0L) + return jjStartNfaWithStates_0(10, 54, 1); + break; + case 83: + case 115: + if ((active0 & 0x800000000000000L) != 0L) + return jjStartNfaWithStates_0(10, 59, 1); + break; + default : + break; + } + return jjStartNfa_0(9, active0, 0L); +} +private final int jjMoveStringLiteralDfa11_0(long old0, long active0) +{ + if (((active0 &= old0)) == 0L) + return jjStartNfa_0(9, old0, 0L); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(10, active0, 0L); + return 11; + } + switch(curChar) + { + case 73: + case 105: + return jjMoveStringLiteralDfa12_0(active0, 0x80000000L); + case 76: + case 108: + return jjMoveStringLiteralDfa12_0(active0, 0x100000000000000L); + case 79: + case 111: + return jjMoveStringLiteralDfa12_0(active0, 0x80000000000000L); + case 83: + case 115: + if ((active0 & 0x200000000L) != 0L) + return jjStartNfaWithStates_0(11, 33, 1); + else if ((active0 & 0x800000000000L) != 0L) + return jjStartNfaWithStates_0(11, 47, 1); + break; + default : + break; + } + return jjStartNfa_0(10, active0, 0L); +} +private final int jjMoveStringLiteralDfa12_0(long old0, long active0) +{ + if (((active0 &= old0)) == 0L) + return jjStartNfa_0(10, old0, 0L); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(11, active0, 0L); + return 12; + } + switch(curChar) + { + case 69: + case 101: + return jjMoveStringLiteralDfa13_0(active0, 0x80000000L); + case 79: + case 111: + return jjMoveStringLiteralDfa13_0(active0, 0x180000000000000L); + default : + break; + } + return jjStartNfa_0(11, active0, 0L); +} +private final int jjMoveStringLiteralDfa13_0(long old0, long active0) +{ + if (((active0 &= old0)) == 0L) + return jjStartNfa_0(11, old0, 0L); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(12, active0, 0L); + return 13; + } + switch(curChar) + { + case 77: + case 109: + return jjMoveStringLiteralDfa14_0(active0, 0x80000000000000L); + case 79: + case 111: + return jjMoveStringLiteralDfa14_0(active0, 0x100000000000000L); + case 83: + case 115: + if ((active0 & 0x80000000L) != 0L) + return jjStartNfaWithStates_0(13, 31, 1); + break; + default : + break; + } + return jjStartNfa_0(12, active0, 0L); +} +private final int jjMoveStringLiteralDfa14_0(long old0, long active0) +{ + if (((active0 &= old0)) == 0L) + return jjStartNfa_0(12, old0, 0L); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(13, active0, 0L); + return 14; + } + switch(curChar) + { + case 70: + case 102: + return jjMoveStringLiteralDfa15_0(active0, 0x80000000000000L); + case 77: + case 109: + return jjMoveStringLiteralDfa15_0(active0, 0x100000000000000L); + default : + break; + } + return jjStartNfa_0(13, active0, 0L); +} +private final int jjMoveStringLiteralDfa15_0(long old0, long active0) +{ + if (((active0 &= old0)) == 0L) + return jjStartNfa_0(13, old0, 0L); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(14, active0, 0L); + return 15; + } + switch(curChar) + { + case 70: + case 102: + return jjMoveStringLiteralDfa16_0(active0, 0x100000000000000L); + case 73: + case 105: + return jjMoveStringLiteralDfa16_0(active0, 0x80000000000000L); + default : + break; + } + return jjStartNfa_0(14, active0, 0L); +} +private final int jjMoveStringLiteralDfa16_0(long old0, long active0) +{ + if (((active0 &= old0)) == 0L) + return jjStartNfa_0(14, old0, 0L); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(15, active0, 0L); + return 16; + } + switch(curChar) + { + case 73: + case 105: + return jjMoveStringLiteralDfa17_0(active0, 0x100000000000000L); + case 76: + case 108: + return jjMoveStringLiteralDfa17_0(active0, 0x80000000000000L); + default : + break; + } + return jjStartNfa_0(15, active0, 0L); +} +private final int jjMoveStringLiteralDfa17_0(long old0, long active0) +{ + if (((active0 &= old0)) == 0L) + return jjStartNfa_0(15, old0, 0L); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(16, active0, 0L); + return 17; + } + switch(curChar) + { + case 76: + case 108: + return jjMoveStringLiteralDfa18_0(active0, 0x100000000000000L); + case 84: + case 116: + return jjMoveStringLiteralDfa18_0(active0, 0x80000000000000L); + default : + break; + } + return jjStartNfa_0(16, active0, 0L); +} +private final int jjMoveStringLiteralDfa18_0(long old0, long active0) +{ + if (((active0 &= old0)) == 0L) + return jjStartNfa_0(16, old0, 0L); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(17, active0, 0L); + return 18; + } + switch(curChar) + { + case 69: + case 101: + return jjMoveStringLiteralDfa19_0(active0, 0x80000000000000L); + case 84: + case 116: + return jjMoveStringLiteralDfa19_0(active0, 0x100000000000000L); + default : + break; + } + return jjStartNfa_0(17, active0, 0L); +} +private final int jjMoveStringLiteralDfa19_0(long old0, long active0) +{ + if (((active0 &= old0)) == 0L) + return jjStartNfa_0(17, old0, 0L); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(18, active0, 0L); + return 19; + } + switch(curChar) + { + case 69: + case 101: + return jjMoveStringLiteralDfa20_0(active0, 0x100000000000000L); + case 82: + case 114: + if ((active0 & 0x80000000000000L) != 0L) + return jjStartNfaWithStates_0(19, 55, 1); + break; + default : + break; + } + return jjStartNfa_0(18, active0, 0L); +} +private final int jjMoveStringLiteralDfa20_0(long old0, long active0) +{ + if (((active0 &= old0)) == 0L) + return jjStartNfa_0(18, old0, 0L); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(19, active0, 0L); + return 20; + } + switch(curChar) + { + case 82: + case 114: + if ((active0 & 0x100000000000000L) != 0L) + return jjStartNfaWithStates_0(20, 56, 1); + break; + default : + break; + } + return jjStartNfa_0(19, active0, 0L); +} +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 = 32; - 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 > 63) - kind = 63; - jjCheckNAddStates(0, 6); - } - else if ((0x400e00000000000L & l) != 0L) - { - if (kind > 62) - kind = 62; - jjCheckNAdd(1); - } - else if (curChar == 39) - jjCheckNAddStates(7, 9); - else if (curChar == 34) - jjCheckNAdd(8); - if (curChar == 46) - jjCheckNAdd(3); - break; - case 1: - if ((0x7ffe00000000000L & l) == 0L) - break; - if (kind > 62) - kind = 62; - jjCheckNAdd(1); - break; - case 2: - if (curChar == 46) - jjCheckNAdd(3); - break; - case 3: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 64) - kind = 64; - jjCheckNAddTwoStates(3, 4); - break; - case 5: - if ((0x280000000000L & l) != 0L) - jjCheckNAdd(6); - break; - case 6: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 64) - kind = 64; - jjCheckNAdd(6); - break; - case 7: - if (curChar == 34) - jjCheckNAdd(8); - break; - case 8: - if ((0xfffffffbffffffffL & l) != 0L) - jjCheckNAddTwoStates(8, 9); - break; - case 9: - if (curChar == 34 && kind > 66) - kind = 66; - break; - case 10: - if (curChar == 39) - jjCheckNAddStates(7, 9); - break; - case 11: - if ((0xffffff7fffffffffL & l) != 0L) - jjCheckNAddStates(7, 9); - break; - case 12: - if (curChar == 39) - jjCheckNAddStates(10, 12); - break; - case 13: - if (curChar == 39) - jjstateSet[jjnewStateCnt++] = 12; - break; - case 14: - if ((0xffffff7fffffffffL & l) != 0L) - jjCheckNAddStates(10, 12); - break; - case 15: - if (curChar == 39 && kind > 67) - kind = 67; - break; - case 16: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 63) - kind = 63; - jjCheckNAddStates(0, 6); - break; - case 17: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 63) - kind = 63; - jjCheckNAdd(17); - break; - case 18: - if ((0x3ff000000000000L & l) != 0L) - jjCheckNAddTwoStates(18, 19); - break; - case 19: - if (curChar == 46) - jjCheckNAdd(20); - break; - case 20: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 64) - kind = 64; - jjCheckNAddTwoStates(20, 21); - break; - case 22: - if ((0x280000000000L & l) != 0L) - jjCheckNAdd(23); - break; - case 23: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 64) - kind = 64; - jjCheckNAdd(23); - break; - case 24: - if ((0x3ff000000000000L & l) != 0L) - jjCheckNAddTwoStates(24, 25); - break; - case 26: - if ((0x280000000000L & l) != 0L) - jjCheckNAdd(27); - break; - case 27: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 64) - kind = 64; - jjCheckNAdd(27); - break; - case 28: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 64) - kind = 64; - jjCheckNAddTwoStates(28, 29); - break; - case 30: - if ((0x280000000000L & l) != 0L) - jjCheckNAdd(31); - break; - case 31: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 64) - kind = 64; - jjCheckNAdd(31); - break; - default : break; - } - } while(i != startsAt); - } - else if (curChar < 128) - { - long l = 1L << (curChar & 077); - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 0: - case 1: - if ((0x47fffffe87fffffeL & l) == 0L) - break; - if (kind > 62) - kind = 62; - jjCheckNAdd(1); - break; - case 4: - if ((0x2000000020L & l) != 0L) - jjAddStates(13, 14); - break; - case 8: - jjAddStates(15, 16); - break; - case 11: - jjCheckNAddStates(7, 9); - break; - case 14: - jjCheckNAddStates(10, 12); - break; - case 21: - if ((0x2000000020L & l) != 0L) - jjAddStates(17, 18); - break; - case 25: - if ((0x2000000020L & l) != 0L) - jjAddStates(19, 20); - break; - case 29: - if ((0x2000000020L & l) != 0L) - jjAddStates(21, 22); - break; - default : break; - } - } while(i != startsAt); - } - else - { - int i2 = (curChar & 0xff) >> 6; - long l2 = 1L << (curChar & 077); - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 8: - if ((jjbitVec0[i2] & l2) != 0L) - jjAddStates(15, 16); - break; - case 11: - if ((jjbitVec0[i2] & l2) != 0L) - jjCheckNAddStates(7, 9); - break; - case 14: - if ((jjbitVec0[i2] & l2) != 0L) - jjCheckNAddStates(10, 12); - break; - default : break; - } - } while(i != startsAt); - } - if (kind != 0x7fffffff) - { - jjmatchedKind = kind; - jjmatchedPos = curPos; - kind = 0x7fffffff; - } - ++curPos; - if ((i = jjnewStateCnt) == (startsAt = 32 - (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 = 32; + 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 > 64) + kind = 64; + jjCheckNAddStates(0, 6); + } + else if ((0x400e00000000000L & l) != 0L) + { + if (kind > 63) + kind = 63; + jjCheckNAdd(1); + } + else if (curChar == 39) + jjCheckNAddStates(7, 9); + else if (curChar == 34) + jjCheckNAdd(8); + if (curChar == 46) + jjCheckNAdd(3); + break; + case 1: + if ((0x7ffe00000000000L & l) == 0L) + break; + if (kind > 63) + kind = 63; + jjCheckNAdd(1); + break; + case 2: + if (curChar == 46) + jjCheckNAdd(3); + break; + case 3: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 65) + kind = 65; + jjCheckNAddTwoStates(3, 4); + break; + case 5: + if ((0x280000000000L & l) != 0L) + jjCheckNAdd(6); + break; + case 6: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 65) + kind = 65; + jjCheckNAdd(6); + break; + case 7: + if (curChar == 34) + jjCheckNAdd(8); + break; + case 8: + if ((0xfffffffbffffffffL & l) != 0L) + jjCheckNAddTwoStates(8, 9); + break; + case 9: + if (curChar == 34 && kind > 67) + kind = 67; + break; + case 10: + if (curChar == 39) + jjCheckNAddStates(7, 9); + break; + case 11: + if ((0xffffff7fffffffffL & l) != 0L) + jjCheckNAddStates(7, 9); + break; + case 12: + if (curChar == 39) + jjCheckNAddStates(10, 12); + break; + case 13: + if (curChar == 39) + jjstateSet[jjnewStateCnt++] = 12; + break; + case 14: + if ((0xffffff7fffffffffL & l) != 0L) + jjCheckNAddStates(10, 12); + break; + case 15: + if (curChar == 39 && kind > 68) + kind = 68; + break; + case 16: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 64) + kind = 64; + jjCheckNAddStates(0, 6); + break; + case 17: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 64) + kind = 64; + jjCheckNAdd(17); + break; + case 18: + if ((0x3ff000000000000L & l) != 0L) + jjCheckNAddTwoStates(18, 19); + break; + case 19: + if (curChar == 46) + jjCheckNAdd(20); + break; + case 20: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 65) + kind = 65; + jjCheckNAddTwoStates(20, 21); + break; + case 22: + if ((0x280000000000L & l) != 0L) + jjCheckNAdd(23); + break; + case 23: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 65) + kind = 65; + jjCheckNAdd(23); + break; + case 24: + if ((0x3ff000000000000L & l) != 0L) + jjCheckNAddTwoStates(24, 25); + break; + case 26: + if ((0x280000000000L & l) != 0L) + jjCheckNAdd(27); + break; + case 27: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 65) + kind = 65; + jjCheckNAdd(27); + break; + case 28: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 65) + kind = 65; + jjCheckNAddTwoStates(28, 29); + break; + case 30: + if ((0x280000000000L & l) != 0L) + jjCheckNAdd(31); + break; + case 31: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 65) + kind = 65; + jjCheckNAdd(31); + break; + default : break; + } + } while(i != startsAt); + } + else if (curChar < 128) + { + long l = 1L << (curChar & 077); + MatchLoop: do + { + switch(jjstateSet[--i]) + { + case 0: + case 1: + if ((0x47fffffe87fffffeL & l) == 0L) + break; + if (kind > 63) + kind = 63; + jjCheckNAdd(1); + break; + case 4: + if ((0x2000000020L & l) != 0L) + jjAddStates(13, 14); + break; + case 8: + jjAddStates(15, 16); + break; + case 11: + jjCheckNAddStates(7, 9); + break; + case 14: + jjCheckNAddStates(10, 12); + break; + case 21: + if ((0x2000000020L & l) != 0L) + jjAddStates(17, 18); + break; + case 25: + if ((0x2000000020L & l) != 0L) + jjAddStates(19, 20); + break; + case 29: + if ((0x2000000020L & l) != 0L) + jjAddStates(21, 22); + break; + default : break; + } + } while(i != startsAt); + } + else + { + int i2 = (curChar & 0xff) >> 6; + long l2 = 1L << (curChar & 077); + MatchLoop: do + { + switch(jjstateSet[--i]) + { + case 8: + if ((jjbitVec0[i2] & l2) != 0L) + jjAddStates(15, 16); + break; + case 11: + if ((jjbitVec0[i2] & l2) != 0L) + jjCheckNAddStates(7, 9); + break; + case 14: + if ((jjbitVec0[i2] & l2) != 0L) + jjCheckNAddStates(10, 12); + break; + default : break; + } + } while(i != startsAt); + } + if (kind != 0x7fffffff) + { + jjmatchedKind = kind; + jjmatchedPos = curPos; + kind = 0x7fffffff; + } + ++curPos; + if ((i = jjnewStateCnt) == (startsAt = 32 - (jjnewStateCnt = startsAt))) + return curPos; + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { return curPos; } + } +} static final int[] jjnextStates = { 17, 18, 19, 24, 25, 28, 29, 11, 13, 15, 13, 14, 15, 5, 6, 8, 9, 22, 23, 26, 27, 30, 31, -}; -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, null, -null, null, null, null, null, null, null, null, null, "\54", "\50", "\51", "\75", -"\76", "\74", null, null, "\41\75", "\52", null, null, null, null, null, null, null, -null, null, null, null, null, null, null, null, null, null, null, null, null, null, -null, "\73", }; -public static final String[] lexStateNames = { - "DEFAULT", -}; +}; +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, null, +null, null, null, null, null, null, null, null, null, null, "\54", "\50", "\51", +"\75", "\76", "\74", null, null, "\41\75", "\52", null, null, null, null, null, null, +null, null, null, null, null, null, null, null, null, null, null, null, null, null, +null, null, "\73", }; +public static final String[] lexStateNames = { + "DEFAULT", +}; static final long[] jjtoToken = { - 0xffffffffffffffe1L, 0x1dL, -}; + 0xffffffffffffffe1L, 0x3bL, +}; static final long[] jjtoSkip = { 0x1eL, 0x0L, -}; -protected SimpleCharStream input_stream; -private final int[] jjrounds = new int[32]; -private final int[] jjstateSet = new int[64]; -protected char curChar; -public HQLParserTokenManager(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 HQLParserTokenManager(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 = 32; 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[32]; +private final int[] jjstateSet = new int[64]; +protected char curChar; +public HQLParserTokenManager(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 HQLParserTokenManager(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 = 32; 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/hql/generated/HQLParserConstants.java =================================================================== --- src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/generated/HQLParserConstants.java (revision 613005) +++ src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/generated/HQLParserConstants.java (working copy) @@ -1,145 +1,147 @@ -/* Generated By:JavaCC: Do not edit this line. HQLParserConstants.java */ -package org.apache.hadoop.hbase.hql.generated; - -public interface HQLParserConstants { - - int EOF = 0; - int HELP = 5; - int ALTER = 6; - int CLEAR = 7; - int SHOW = 8; - int DESCRIBE = 9; - int DESC = 10; - int CREATE = 11; - int DROP = 12; - int TRUNCATE = 13; - int FS = 14; - int JAR = 15; - int EXIT = 16; - int INSERT = 17; - int INTO = 18; - int TABLE = 19; - int DELETE = 20; - int SELECT = 21; - int ENABLE = 22; - int DISABLE = 23; - int STARTING = 24; - int WHERE = 25; - int FROM = 26; - int UNTIL = 27; - int ROW = 28; - int VALUES = 29; - int COLUMNFAMILIES = 30; - int TIMESTAMP = 31; - int NUM_VERSIONS = 32; - int LIMIT = 33; - int AND = 34; - int OR = 35; - int COMMA = 36; - int LPAREN = 37; - int RPAREN = 38; - int EQUALS = 39; - int LCOMP = 40; - int RCOMP = 41; - int NOT = 42; - int IN = 43; - int NOTEQUAL = 44; - int ASTERISK = 45; - int MAX_VERSIONS = 46; - int MAX_LENGTH = 47; - int COMPRESSION = 48; - int NONE = 49; - int BLOCK = 50; - int RECORD = 51; - int IN_MEMORY = 52; - int BLOOMFILTER = 53; - int COUNTING_BLOOMFILTER = 54; - int RETOUCHED_BLOOMFILTER = 55; - int VECTOR_SIZE = 56; - int NUM_HASH = 57; - int NUM_ENTRIES = 58; - int ADD = 59; - int CHANGE = 60; - int COUNT = 61; - int ID = 62; - int INTEGER_LITERAL = 63; - int FLOATING_POINT_LITERAL = 64; - int EXPONENT = 65; - int QUOTED_IDENTIFIER = 66; - int STRING_LITERAL = 67; - - int DEFAULT = 0; - - String[] tokenImage = { - "", - "\" \"", - "\"\\t\"", - "\"\\r\"", - "\"\\n\"", - "\"help\"", - "\"alter\"", - "\"clear\"", - "\"show\"", - "\"describe\"", - "\"desc\"", - "\"create\"", - "\"drop\"", - "\"truncate\"", - "\"fs\"", - "\"jar\"", - "\"exit\"", - "\"insert\"", - "\"into\"", - "\"table\"", - "\"delete\"", - "\"select\"", - "\"enable\"", - "\"disable\"", - "\"starting\"", - "\"where\"", - "\"from\"", - "\"until\"", - "\"row\"", - "\"values\"", - "\"columnfamilies\"", - "\"timestamp\"", - "\"num_versions\"", - "\"limit\"", - "\"and\"", - "\"or\"", - "\",\"", - "\"(\"", - "\")\"", - "\"=\"", - "\">\"", - "\"<\"", - "\"not\"", - "\"in\"", - "\"!=\"", - "\"*\"", - "\"max_versions\"", - "\"max_length\"", - "\"compression\"", - "\"none\"", - "\"block\"", - "\"record\"", - "\"in_memory\"", - "\"bloomfilter\"", - "\"counting_bloomfilter\"", - "\"retouched_bloomfilter\"", - "\"vector_size\"", - "\"num_hash\"", - "\"num_entries\"", - "\"add\"", - "\"change\"", - "\"count\"", - "", - "", - "", - "", - "", - "", - "\";\"", - }; - -} +/* Generated By:JavaCC: Do not edit this line. HQLParserConstants.java */ +package org.apache.hadoop.hbase.hql.generated; + +public interface HQLParserConstants { + + int EOF = 0; + int HELP = 5; + int ALTER = 6; + int CLEAR = 7; + int SHOW = 8; + int DESCRIBE = 9; + int DESC = 10; + int CREATE = 11; + int DROP = 12; + int TRUNCATE = 13; + int FS = 14; + int JAR = 15; + int EXIT = 16; + int START = 17; + int INSERT = 18; + int INTO = 19; + int TABLE = 20; + int DELETE = 21; + int SELECT = 22; + int ENABLE = 23; + int DISABLE = 24; + int STARTING = 25; + int WHERE = 26; + int FROM = 27; + int UNTIL = 28; + int ROW = 29; + int VALUES = 30; + int COLUMNFAMILIES = 31; + int TIMESTAMP = 32; + int NUM_VERSIONS = 33; + int LIMIT = 34; + int AND = 35; + int OR = 36; + int COMMA = 37; + int LPAREN = 38; + int RPAREN = 39; + int EQUALS = 40; + int LCOMP = 41; + int RCOMP = 42; + int NOT = 43; + int IN = 44; + int NOTEQUAL = 45; + int ASTERISK = 46; + int MAX_VERSIONS = 47; + int MAX_LENGTH = 48; + int COMPRESSION = 49; + int NONE = 50; + int BLOCK = 51; + int RECORD = 52; + int IN_MEMORY = 53; + int BLOOMFILTER = 54; + int COUNTING_BLOOMFILTER = 55; + int RETOUCHED_BLOOMFILTER = 56; + int VECTOR_SIZE = 57; + int NUM_HASH = 58; + int NUM_ENTRIES = 59; + int ADD = 60; + int CHANGE = 61; + int COUNT = 62; + int ID = 63; + int INTEGER_LITERAL = 64; + int FLOATING_POINT_LITERAL = 65; + int EXPONENT = 66; + int QUOTED_IDENTIFIER = 67; + int STRING_LITERAL = 68; + + int DEFAULT = 0; + + String[] tokenImage = { + "", + "\" \"", + "\"\\t\"", + "\"\\r\"", + "\"\\n\"", + "\"help\"", + "\"alter\"", + "\"clear\"", + "\"show\"", + "\"describe\"", + "\"desc\"", + "\"create\"", + "\"drop\"", + "\"truncate\"", + "\"fs\"", + "\"jar\"", + "\"exit\"", + "\"start\"", + "\"insert\"", + "\"into\"", + "\"table\"", + "\"delete\"", + "\"select\"", + "\"enable\"", + "\"disable\"", + "\"starting\"", + "\"where\"", + "\"from\"", + "\"until\"", + "\"row\"", + "\"values\"", + "\"columnfamilies\"", + "\"timestamp\"", + "\"num_versions\"", + "\"limit\"", + "\"and\"", + "\"or\"", + "\",\"", + "\"(\"", + "\")\"", + "\"=\"", + "\">\"", + "\"<\"", + "\"not\"", + "\"in\"", + "\"!=\"", + "\"*\"", + "\"max_versions\"", + "\"max_length\"", + "\"compression\"", + "\"none\"", + "\"block\"", + "\"record\"", + "\"in_memory\"", + "\"bloomfilter\"", + "\"counting_bloomfilter\"", + "\"retouched_bloomfilter\"", + "\"vector_size\"", + "\"num_hash\"", + "\"num_entries\"", + "\"add\"", + "\"change\"", + "\"count\"", + "", + "", + "", + "", + "", + "", + "\";\"", + }; + +} Index: src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/HQLParser.jj =================================================================== --- src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/HQLParser.jj (revision 613005) +++ src/contrib/hbase/src/java/org/apache/hadoop/hbase/hql/HQLParser.jj (working copy) @@ -1,823 +1,839 @@ -options { - STATIC = false; - IGNORE_CASE = true; -} - -PARSER_BEGIN(HQLParser) -package org.apache.hadoop.hbase.hql.generated; - -/** - * 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. - */ - -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 java.io.Writer; -import java.net.URLEncoder; -import java.io.UnsupportedEncodingException; - -import org.apache.hadoop.hbase.hql.*; - -/** - * Parsing command line. - */ -public class HQLParser { - private String QueryString; - private TableFormatter formatter; - private Writer out; - - public HQLParser(final String query, final Writer o, final TableFormatter f) { - this((Reader)(new StringReader(query))); - this.QueryString = query; - this.formatter = f; - this.out = o; - } - - public String getQueryStr() { - return this.QueryString; - } -} - -PARSER_END(HQLParser) - -SKIP : -{ - " " - | "\t" - | "\r" - | "\n" -} - -TOKEN: /** for HQL statements */ -{ - - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | "> - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | -} - -TOKEN : /** Functions */ -{ - -} - -TOKEN : /** Literals */ -{ - - | - | )? - | "." (["0"-"9"])+ ()? - | (["0"-"9"])+ - | (["0"-"9"])+ ()? - > - | <#EXPONENT: ["e","E"] (["+","-"])? (["0"-"9"])+ > - | - | -} - -/** - * Parses the given array of command line arguments. - */ -Command terminatedCommand() : -{ - Command statement = null; -} -{ - ( - [statement = cmdStatement()] ";" | - ) - - { - return statement; - } -} - -Command cmdStatement() : -{ - Command cmd = null; -} -{ - ( - cmd = exitCommand() - | cmd = helpCommand() - | cmd = showCommand() - | cmd = descCommand() - | cmd = createCommand() - | cmd = dropCommand() - | cmd = truncateCommand() - | cmd = alterCommand() - | cmd = insertCommand() - | cmd = deleteCommand() - | cmd = selectCommand() - | cmd = enableCommand() - | cmd = disableCommand() - | cmd = clearCommand() - | cmd = fsCommand() - | cmd = jarCommand() - ) - { - return cmd; - } -} - -ExitCommand exitCommand() : -{ - ExitCommand exit = new ExitCommand(this.out); -} -{ - { return exit; } -} - -FsCommand fsCommand() : -{ - Token t = null; - FsCommand fs = new FsCommand(this.out); - List query = new ArrayList(); -} -{ - - ( - t = - { query.add(t.image.toString()); } - )* - - { - fs.setQuery(query); - return fs; - } -} - -JarCommand jarCommand() : -{ - Token t = null; - JarCommand jar = new JarCommand(this.out); - List query = new ArrayList(); -} -{ - - ( - ( t= | t= | t= ) - { query.add(t.image.toString()); } - )* - - { - jar.setQuery(query); - return jar; - } -} - -TruncateCommand truncateCommand() : -{ - TruncateCommand truncate = new TruncateCommand(this.out); - String tableName = null; -} -{ - - [ - tableName = identifier() - ] - { - truncate.setTableName(tableName); - return truncate; - } -} - -HelpCommand helpCommand() : -{ - Token t = null; - HelpCommand help = new HelpCommand(this.out, this.formatter); - String argument = ""; -} -{ - - [ - ( - t= - | t= - | t= - | t= - | t= - | t= - | t= - | t=
- table = identifier() - { - createCommand.setTable(table); - } - - - - column = identifier() - columnSpec = ColumnSpec() - { - createCommand.addColumnSpec(column, columnSpec); - } - - ( - - column = identifier() - columnSpec = ColumnSpec() - { - createCommand.addColumnSpec(column, columnSpec); - } - )* - - - { return createCommand; } -} - -AlterCommand alterCommand() : -{ - AlterCommand alterCommand = new AlterCommand(this.out); - String table = null; - String column = null; - Map columnSpec = null; -} -{ - -
table = identifier() - { alterCommand.setTable(table); } - - ( - LOOKAHEAD(2) - column = identifier() columnSpec = ColumnSpec() - { - alterCommand.setOperationType(AlterCommand.OperationType.ADD); - alterCommand.addColumnSpec(column, columnSpec); - } - | - - - { - alterCommand.setOperationType(AlterCommand.OperationType.ADD); - } - - column = identifier() columnSpec = ColumnSpec() - { - alterCommand.addColumnSpec(column, columnSpec); - } - - ( - - column = identifier() - columnSpec = ColumnSpec() - { - alterCommand.addColumnSpec(column, columnSpec); - } - )* - - | - column = identifier() - { - alterCommand.setOperationType(AlterCommand.OperationType.DROP); - alterCommand.setColumn(column); - } - | - column = identifier() columnSpec = ColumnSpec() - { - alterCommand.setOperationType(AlterCommand.OperationType.CHANGE); - alterCommand.addColumnSpec(column, columnSpec); - } - ) - { return alterCommand; } -} - -DropCommand dropCommand() : -{ - DropCommand drop = new DropCommand(this.out); - List tableList = null; -} -{ - -
- tableList = tableList() - { - drop.setTableList(tableList); - return drop; - } -} - -InsertCommand insertCommand() : -{ - InsertCommand in = new InsertCommand(this.out); - List columnfamilies = null; - List values = null; - String table = null; - String timestamp = null; - Token t = null; -} -{ - - - table = identifier() - { - in.setTable(table); - } - columnfamilies = getColumns() - { - in.setColumnfamilies(columnfamilies); - } - - values = getLiteralValues() - { - in.setValues(values); - } - - - ( t= | t= ) - { - in.setRow(t.image.substring(1, t.image.length()-1)); - } - - [ - timestamp = getStringLiteral() - { - in.setTimestamp(timestamp); - } - ] - - { - return in; - } -} - -DeleteCommand deleteCommand() : -{ - DeleteCommand deleteCommand = new DeleteCommand(this.out); - List columnList = null; - Token t = null; - String table = null; -} -{ - - columnList = columnList() - { - deleteCommand.setColumnList(columnList); - } - - - table = identifier() - { - deleteCommand.setTable(table); - } - - [ - - ( t= | t= ) - { - deleteCommand.setRow(t.image.substring(1, t.image.length()-1)); - } - ] - { return deleteCommand; } -} - -SelectCommand selectCommand() : -{ - SelectCommand select = new SelectCommand(this.out, this.formatter); - List columns = null; - String rowKey = ""; - String stopRow = ""; - String timestamp = null; - int numVersion = 0; - String tableName = null; - int limit; -} -{ -
+ [ + tableName = identifier() + ] + { + truncate.setTableName(tableName); + return truncate; + } +} + +HelpCommand helpCommand() : +{ + Token t = null; + HelpCommand help = new HelpCommand(this.out, this.formatter); + String argument = ""; +} +{ + + [ + ( + t= + | t= + | t= + | t= + | t= + | t= + | t= + | t=
+ table = identifier() + { + createCommand.setTable(table); + } + + + + column = identifier() + columnSpec = ColumnSpec() + { + createCommand.addColumnSpec(column, columnSpec); + } + + ( + + column = identifier() + columnSpec = ColumnSpec() + { + createCommand.addColumnSpec(column, columnSpec); + } + )* + + + { return createCommand; } +} + +AlterCommand alterCommand() : +{ + AlterCommand alterCommand = new AlterCommand(this.out); + String table = null; + String column = null; + Map columnSpec = null; +} +{ + +
table = identifier() + { alterCommand.setTable(table); } + + ( + LOOKAHEAD(2) + column = identifier() columnSpec = ColumnSpec() + { + alterCommand.setOperationType(AlterCommand.OperationType.ADD); + alterCommand.addColumnSpec(column, columnSpec); + } + | + + + { + alterCommand.setOperationType(AlterCommand.OperationType.ADD); + } + + column = identifier() columnSpec = ColumnSpec() + { + alterCommand.addColumnSpec(column, columnSpec); + } + + ( + + column = identifier() + columnSpec = ColumnSpec() + { + alterCommand.addColumnSpec(column, columnSpec); + } + )* + + | + column = identifier() + { + alterCommand.setOperationType(AlterCommand.OperationType.DROP); + alterCommand.setColumn(column); + } + | + column = identifier() columnSpec = ColumnSpec() + { + alterCommand.setOperationType(AlterCommand.OperationType.CHANGE); + alterCommand.addColumnSpec(column, columnSpec); + } + ) + { return alterCommand; } +} + +DropCommand dropCommand() : +{ + DropCommand drop = new DropCommand(this.out); + List tableList = null; +} +{ + +
+ tableList = tableList() + { + drop.setTableList(tableList); + return drop; + } +} + +InsertCommand insertCommand() : +{ + InsertCommand in = new InsertCommand(this.out); + List columnfamilies = null; + List values = null; + String table = null; + String timestamp = null; + Token t = null; +} +{ + + + table = identifier() + { + in.setTable(table); + } + columnfamilies = getColumns() + { + in.setColumnfamilies(columnfamilies); + } + + values = getLiteralValues() + { + in.setValues(values); + } + + + ( t= | t= ) + { + in.setRow(t.image.substring(1, t.image.length()-1)); + } + + [ + timestamp = getStringLiteral() + { + in.setTimestamp(timestamp); + } + ] + + { + return in; + } +} + +DeleteCommand deleteCommand() : +{ + DeleteCommand deleteCommand = new DeleteCommand(this.out); + List columnList = null; + Token t = null; + String table = null; +} +{ + + columnList = columnList() + { + deleteCommand.setColumnList(columnList); + } + + + table = identifier() + { + deleteCommand.setTable(table); + } + + [ + + ( t= | t= ) + { + deleteCommand.setRow(t.image.substring(1, t.image.length()-1)); + } + ] + { return deleteCommand; } +} + +SelectCommand selectCommand() : +{ + SelectCommand select = new SelectCommand(this.out, this.formatter); + List columns = null; + String rowKey = ""; + String stopRow = ""; + String timestamp = null; + int numVersion = 0; + String tableName = null; + int limit; +} +{ +