Return-Path: Delivered-To: apmail-hadoop-core-commits-archive@www.apache.org Received: (qmail 41622 invoked from network); 21 Oct 2008 18:13:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Oct 2008 18:13:26 -0000 Received: (qmail 48169 invoked by uid 500); 21 Oct 2008 18:13:28 -0000 Delivered-To: apmail-hadoop-core-commits-archive@hadoop.apache.org Received: (qmail 48143 invoked by uid 500); 21 Oct 2008 18:13:28 -0000 Mailing-List: contact core-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-dev@hadoop.apache.org Delivered-To: mailing list core-commits@hadoop.apache.org Received: (qmail 48134 invoked by uid 99); 21 Oct 2008 18:13:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Oct 2008 11:13:28 -0700 X-ASF-Spam-Status: No, hits=-1997.2 required=10.0 tests=ALL_TRUSTED,WEIRD_QUOTING X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Oct 2008 18:12:19 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 5DCD1238989A; Tue, 21 Oct 2008 11:11:54 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r706704 [20/23] - in /hadoop/core/trunk: ./ src/contrib/hive/ src/contrib/hive/bin/ src/contrib/hive/cli/src/java/org/apache/hadoop/hive/cli/ src/contrib/hive/common/src/java/org/apache/hadoop/hive/conf/ src/contrib/hive/conf/ src/contrib/h... Date: Tue, 21 Oct 2008 18:11:18 -0000 To: core-commits@hadoop.apache.org From: dhruba@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20081021181154.5DCD1238989A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: hadoop/core/trunk/src/contrib/hive/serde/src/gen-java/org/apache/hadoop/hive/serde2/dynamic_type/thrift_grammar.jj URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hive/serde/src/gen-java/org/apache/hadoop/hive/serde2/dynamic_type/thrift_grammar.jj?rev=706704&view=auto ============================================================================== --- hadoop/core/trunk/src/contrib/hive/serde/src/gen-java/org/apache/hadoop/hive/serde2/dynamic_type/thrift_grammar.jj (added) +++ hadoop/core/trunk/src/contrib/hive/serde/src/gen-java/org/apache/hadoop/hive/serde2/dynamic_type/thrift_grammar.jj Tue Oct 21 11:11:05 2008 @@ -0,0 +1,2345 @@ +/*@bgen(jjtree) Generated By:JJTree: Do not edit this line. /data/users/zshao/tubbs-svnroot/projects/hadoop/trunk/VENDOR/hadoop-0.17/src/contrib/hive/serde/src/gen-java/org/apache/hadoop/hive/serde2/dynamic_type/thrift_grammar.jj */ +/*@egen*/options { + STATIC = false; +} + + +PARSER_BEGIN(thrift_grammar) + +package org.apache.hadoop.hive.serde2.dynamic_type; + +import java.util.*; +import java.io.*; +import java.net.*; +import com.facebook.thrift.protocol.*; +import com.facebook.thrift.transport.*; +import org.apache.hadoop.hive.serde2.dynamic_type.*; + +public class thrift_grammar/*@bgen(jjtree)*/implements thrift_grammarTreeConstants/*@egen*/ {/*@bgen(jjtree)*/ + protected JJTthrift_grammarState jjtree = new JJTthrift_grammarState(); + +/*@egen*/ + + private List include_path = null; + + // for computing the autogenerated field ids in thrift + private int field_val; + + // store types and tables + // separately because one cannot use a table (ie service.method) as a Struct like type. + protected Map types; + protected Map tables; + + // system include path + final private static String default_include_path[] = { "/usr/local/include","/usr/include","/usr/local/include/thrift/if","/usr/local/include/fb303/if" }; + + // need three params to differentiate between this and 2 param method auto generated since + // some calls in the autogenerated code use null param for 2nd param and thus ambiguous. + protected thrift_grammar(InputStream is, List include_path, boolean junk) { + this(is,null); + this.types = new HashMap () ; + this.tables = new HashMap () ; + this.include_path = include_path; + this.field_val = -1; + } + + // find the file on the include path + private static File findFile(String fname, List include_path) { + for(String path: include_path) { + final String full = path + "/" + fname; + File f = new File(full); + if(f.exists()) { + return f; + } + } + return null; + } + + public static void main(String args[]) { + String filename = null; + List include_path = new ArrayList(); + + for(String path: default_include_path) { + include_path.add(path); + } + for(int i = 0; i < args.length; i++) { + String arg = args[i]; + if(arg.equals("--include") && i + 1 < args.length) { + include_path.add(args[++i]); + } + if(arg.equals("--file") && i + 1 < args.length) { + filename = args[++i]; + } + } + + InputStream is = System.in; + if(filename != null) { + try { + is = new FileInputStream(findFile(filename, include_path)); + } catch(IOException e) { + } + } + thrift_grammar t = new thrift_grammar(is,include_path,false); + + try { + t.Start(); + } catch (Exception e) { + System.out.println("Parse error."); + System.out.println(e.getMessage()); + e.printStackTrace(); + } + } +} + +PARSER_END(thrift_grammar) + + + +SKIP : +{ + " " +| "\t" +| "\n" +| "\r" +| <"#"(~["\n"])* ("\n"|"\r"|"\r\n")> +| <"//" (~["\n","\r"])* ("\n"|"\r"|"\r\n")> +| <"/*" (~["*"])* "*" (~["/"] (~["*"])* "*")* "/"> +} + + +/** + * HELPER DEFINITIONS, COMMENTS, CONSTANTS, AND WHATNOT + */ + +TOKEN: +{ +| + | +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| + | + | + | + | + | + | + | + | + | + | + | + | + +} + +TOKEN: { + + +| +)*"."()+(["e","E"](["+","-"])?()+)?> +| +(||"."|"_")*> +| +<#LETTER: (["a"-"z", "A"-"Z" ]) > +| +<#DIGIT: ["0"-"9"] > +| + +| + +} + + +SimpleNode Start() : {/*@bgen(jjtree) Start */ + DynamicSerDeStart jjtn000 = new DynamicSerDeStart(JJTSTART); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) Start */ + try { +/*@egen*/ + HeaderList() (Definition())+/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + }/*@bgen(jjtree)*/ + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + throw (RuntimeException)jjte000; + } + if (jjte000 instanceof ParseException) { + throw (ParseException)jjte000; + } + throw (Error)jjte000; + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + +SimpleNode HeaderList() : {/*@bgen(jjtree) HeaderList */ + DynamicSerDeHeaderList jjtn000 = new DynamicSerDeHeaderList(JJTHEADERLIST); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) HeaderList */ + try { +/*@egen*/ + (Header())*/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + }/*@bgen(jjtree)*/ + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + throw (RuntimeException)jjte000; + } + if (jjte000 instanceof ParseException) { + throw (ParseException)jjte000; + } + throw (Error)jjte000; + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ + +} + +SimpleNode Header() : {/*@bgen(jjtree) Header */ + DynamicSerDeHeader jjtn000 = new DynamicSerDeHeader(JJTHEADER); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) Header */ + try { +/*@egen*/ + Include()/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + } +| Namespace()/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + }/*@bgen(jjtree)*/ + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + throw (RuntimeException)jjte000; + } + if (jjte000 instanceof ParseException) { + throw (ParseException)jjte000; + } + throw (Error)jjte000; + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + +SimpleNode Namespace() : {/*@bgen(jjtree) Namespace */ + DynamicSerDeNamespace jjtn000 = new DynamicSerDeNamespace(JJTNAMESPACE); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) Namespace */ + try { +/*@egen*/ + /*@bgen(jjtree)*/ +{ + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; +} +/*@egen*/ +{ + return jjtn000; +} +| + /*@bgen(jjtree)*/ +{ + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; +} +/*@egen*/ +{ + return jjtn000; +} +| + /*@bgen(jjtree)*/ +{ + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; +} +/*@egen*/ +{ + return jjtn000; +} +| + /*@bgen(jjtree)*/ +{ + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; +} +/*@egen*/ +{ + return jjtn000; +} +| + /*@bgen(jjtree)*/ +{ + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; +} +/*@egen*/ +{ + return jjtn000; +} +| + /*@bgen(jjtree)*/ +{ + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; +} +/*@egen*/ +{ + return jjtn000; +} +| + /*@bgen(jjtree)*/ +{ + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; +} +/*@egen*/ +{ + return jjtn000; +} +| + /*@bgen(jjtree)*/ +{ + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; +} +/*@egen*/ +{ + return jjtn000; +} +| + /*@bgen(jjtree)*/ +{ + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; +} +/*@egen*/ +{ + return jjtn000; +} +| + /*@bgen(jjtree)*/ +{ + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; +} +/*@egen*/ +{ + return jjtn000; +} +| + /*@bgen(jjtree)*/ +{ + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; +} +/*@egen*/ +{ + return jjtn000; +} +| + /*@bgen(jjtree)*/ +{ + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; +} +/*@egen*/ +{ + return jjtn000; +} +| + /*@bgen(jjtree)*/ +{ + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; +} +/*@egen*/ +{ + return jjtn000; +}/*@bgen(jjtree)*/ + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + + +SimpleNode Include() : {/*@bgen(jjtree) Include */ + DynamicSerDeInclude jjtn000 = new DynamicSerDeInclude(JJTINCLUDE); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/ + String fname; + boolean found = false; +} +{/*@bgen(jjtree) Include */ + try { +/*@egen*/ + + fname=.image/*@bgen(jjtree)*/ +{ + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; +} +/*@egen*/ +{ + // bugbug somewhat fragile below substring expression + fname = fname.substring(1,fname.length() - 1); + + // try to find the file on the include path + File f = thrift_grammar.findFile(fname, this.include_path); + if(f != null) { + found = true; + try { + FileInputStream fis = new FileInputStream(f); + thrift_grammar t = new thrift_grammar(fis,this.include_path, false); + t.Start(); + fis.close(); + found = true; + // add in what we found to our type and table tables. + this.tables.putAll(t.tables); + this.types.putAll(t.types); + } catch (Exception e) { + System.out.println("File: " + fname + " - Oops."); + System.out.println(e.getMessage()); + e.printStackTrace(); + } + } + if(!found) { + throw new RuntimeException("include file not found: " + fname); + } + return jjtn000; +}/*@bgen(jjtree)*/ + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + + +SimpleNode Definition() : {/*@bgen(jjtree) Definition */ + DynamicSerDeDefinition jjtn000 = new DynamicSerDeDefinition(JJTDEFINITION); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) Definition */ + try { +/*@egen*/ + Const()/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + } +| Service()/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + } +| TypeDefinition()/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + }/*@bgen(jjtree)*/ + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + throw (RuntimeException)jjte000; + } + if (jjte000 instanceof ParseException) { + throw (ParseException)jjte000; + } + throw (Error)jjte000; + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + +SimpleNode TypeDefinition() : {/*@bgen(jjtree) TypeDefinition */ + DynamicSerDeTypeDefinition jjtn000 = new DynamicSerDeTypeDefinition(JJTTYPEDEFINITION); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) TypeDefinition */ + try { +/*@egen*/ + Typedef()/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + } +| Enum()/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + } +| Senum()/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + } +| Struct()/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + } +| Xception()/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + }/*@bgen(jjtree)*/ + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + throw (RuntimeException)jjte000; + } + if (jjte000 instanceof ParseException) { + throw (ParseException)jjte000; + } + throw (Error)jjte000; + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ + +} + +DynamicSerDeTypedef Typedef() : {/*@bgen(jjtree) Typedef */ + DynamicSerDeTypedef jjtn000 = new DynamicSerDeTypedef(JJTTYPEDEF); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) Typedef */ + try { +/*@egen*/ + + DefinitionType() + jjtn000.name = .image/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + // store the type for later retrieval + this.types.put(jjtn000.name, jjtn000); + return jjtn000; + }/*@bgen(jjtree)*/ + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + throw (RuntimeException)jjte000; + } + if (jjte000 instanceof ParseException) { + throw (ParseException)jjte000; + } + throw (Error)jjte000; + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + + +// returning void because we ignore this production. +void CommaOrSemicolon() : {/*@bgen(jjtree) CommaOrSemicolon */ + DynamicSerDeCommaOrSemicolon jjtn000 = new DynamicSerDeCommaOrSemicolon(JJTCOMMAORSEMICOLON); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) CommaOrSemicolon */ + try { +/*@egen*/ + "," +| + ";"/*@bgen(jjtree)*/ +{ + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; +} +/*@egen*/ +{ +}/*@bgen(jjtree)*/ + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + +SimpleNode Enum() : {/*@bgen(jjtree) Enum */ + DynamicSerDeEnum jjtn000 = new DynamicSerDeEnum(JJTENUM); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) Enum */ + try { +/*@egen*/ + "{" EnumDefList() "}"/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + }/*@bgen(jjtree)*/ + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + throw (RuntimeException)jjte000; + } + if (jjte000 instanceof ParseException) { + throw (ParseException)jjte000; + } + throw (Error)jjte000; + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + +SimpleNode EnumDefList() : {/*@bgen(jjtree) EnumDefList */ + DynamicSerDeEnumDefList jjtn000 = new DynamicSerDeEnumDefList(JJTENUMDEFLIST); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) EnumDefList */ + try { +/*@egen*/ + (EnumDef())+/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + }/*@bgen(jjtree)*/ + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + throw (RuntimeException)jjte000; + } + if (jjte000 instanceof ParseException) { + throw (ParseException)jjte000; + } + throw (Error)jjte000; + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + +SimpleNode EnumDef() : {/*@bgen(jjtree) EnumDef */ + DynamicSerDeEnumDef jjtn000 = new DynamicSerDeEnumDef(JJTENUMDEF); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) EnumDef */ + try { +/*@egen*/ + ["=" ] [CommaOrSemicolon()]/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + }/*@bgen(jjtree)*/ + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + throw (RuntimeException)jjte000; + } + if (jjte000 instanceof ParseException) { + throw (ParseException)jjte000; + } + throw (Error)jjte000; + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + +SimpleNode Senum() : {/*@bgen(jjtree) Senum */ + DynamicSerDeSenum jjtn000 = new DynamicSerDeSenum(JJTSENUM); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) Senum */ + try { +/*@egen*/ + "{" SenumDefList() "}"/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + }/*@bgen(jjtree)*/ + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + throw (RuntimeException)jjte000; + } + if (jjte000 instanceof ParseException) { + throw (ParseException)jjte000; + } + throw (Error)jjte000; + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + +SimpleNode SenumDefList() : {/*@bgen(jjtree) SenumDefList */ + DynamicSerDeSenumDefList jjtn000 = new DynamicSerDeSenumDefList(JJTSENUMDEFLIST); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) SenumDefList */ + try { +/*@egen*/ + (SenumDef())+/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + }/*@bgen(jjtree)*/ + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + throw (RuntimeException)jjte000; + } + if (jjte000 instanceof ParseException) { + throw (ParseException)jjte000; + } + throw (Error)jjte000; + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + +SimpleNode SenumDef() : {/*@bgen(jjtree) SenumDef */ + DynamicSerDeSenumDef jjtn000 = new DynamicSerDeSenumDef(JJTSENUMDEF); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) SenumDef */ + try { +/*@egen*/ + [CommaOrSemicolon()]/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + }/*@bgen(jjtree)*/ + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + throw (RuntimeException)jjte000; + } + if (jjte000 instanceof ParseException) { + throw (ParseException)jjte000; + } + throw (Error)jjte000; + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + + +SimpleNode Const() : {/*@bgen(jjtree) Const */ + DynamicSerDeConst jjtn000 = new DynamicSerDeConst(JJTCONST); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) Const */ + try { +/*@egen*/ + FieldType() "=" ConstValue() [CommaOrSemicolon()]/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + }/*@bgen(jjtree)*/ + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + throw (RuntimeException)jjte000; + } + if (jjte000 instanceof ParseException) { + throw (ParseException)jjte000; + } + throw (Error)jjte000; + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + +SimpleNode ConstValue() : {/*@bgen(jjtree) ConstValue */ + DynamicSerDeConstValue jjtn000 = new DynamicSerDeConstValue(JJTCONSTVALUE); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) ConstValue */ + try { +/*@egen*/ + /*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + } +| /*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + } +| /*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + } +| /*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + } +| ConstList()/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + } +| ConstMap()/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + }/*@bgen(jjtree)*/ + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + throw (RuntimeException)jjte000; + } + if (jjte000 instanceof ParseException) { + throw (ParseException)jjte000; + } + throw (Error)jjte000; + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + +SimpleNode ConstList() : {/*@bgen(jjtree) ConstList */ + DynamicSerDeConstList jjtn000 = new DynamicSerDeConstList(JJTCONSTLIST); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) ConstList */ + try { +/*@egen*/ + "[" ConstListContents() "]"/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + }/*@bgen(jjtree)*/ + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + throw (RuntimeException)jjte000; + } + if (jjte000 instanceof ParseException) { + throw (ParseException)jjte000; + } + throw (Error)jjte000; + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + +SimpleNode ConstListContents() : {/*@bgen(jjtree) ConstListContents */ + DynamicSerDeConstListContents jjtn000 = new DynamicSerDeConstListContents(JJTCONSTLISTCONTENTS); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) ConstListContents */ + try { +/*@egen*/ + (ConstValue() [CommaOrSemicolon()])+/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + }/*@bgen(jjtree)*/ + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + throw (RuntimeException)jjte000; + } + if (jjte000 instanceof ParseException) { + throw (ParseException)jjte000; + } + throw (Error)jjte000; + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + +SimpleNode ConstMap() : {/*@bgen(jjtree) ConstMap */ + DynamicSerDeConstMap jjtn000 = new DynamicSerDeConstMap(JJTCONSTMAP); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) ConstMap */ + try { +/*@egen*/ + "{" ConstMapContents() "}"/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + }/*@bgen(jjtree)*/ + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + throw (RuntimeException)jjte000; + } + if (jjte000 instanceof ParseException) { + throw (ParseException)jjte000; + } + throw (Error)jjte000; + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + +SimpleNode ConstMapContents() : {/*@bgen(jjtree) ConstMapContents */ + DynamicSerDeConstMapContents jjtn000 = new DynamicSerDeConstMapContents(JJTCONSTMAPCONTENTS); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) ConstMapContents */ + try { +/*@egen*/ + (ConstValue() ":" ConstValue() [CommaOrSemicolon()])+/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + } +|/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + }/*@bgen(jjtree)*/ + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + throw (RuntimeException)jjte000; + } + if (jjte000 instanceof ParseException) { + throw (ParseException)jjte000; + } + throw (Error)jjte000; + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + +DynamicSerDeStruct Struct() : {/*@bgen(jjtree) Struct */ + DynamicSerDeStruct jjtn000 = new DynamicSerDeStruct(JJTSTRUCT); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/ + +} +{/*@bgen(jjtree) Struct */ + try { +/*@egen*/ + + jjtn000.name = .image + "{" + FieldList() + "}"/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + this.types.put(jjtn000.name,jjtn000); + return jjtn000; + }/*@bgen(jjtree)*/ + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + throw (RuntimeException)jjte000; + } + if (jjte000 instanceof ParseException) { + throw (ParseException)jjte000; + } + throw (Error)jjte000; + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + + +SimpleNode Xception() : {/*@bgen(jjtree) Xception */ + DynamicSerDeXception jjtn000 = new DynamicSerDeXception(JJTXCEPTION); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) Xception */ + try { +/*@egen*/ + "{" FieldList() "}"/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + }/*@bgen(jjtree)*/ + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + throw (RuntimeException)jjte000; + } + if (jjte000 instanceof ParseException) { + throw (ParseException)jjte000; + } + throw (Error)jjte000; + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + + +SimpleNode Service() : {/*@bgen(jjtree) Service */ + DynamicSerDeService jjtn000 = new DynamicSerDeService(JJTSERVICE); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) Service */ + try { +/*@egen*/ + + + Extends() + "{" + FlagArgs() + (Function())+ + UnflagArgs() + "}"/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + // at some point, these should be inserted as a "db" + return jjtn000; + }/*@bgen(jjtree)*/ + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + throw (RuntimeException)jjte000; + } + if (jjte000 instanceof ParseException) { + throw (ParseException)jjte000; + } + throw (Error)jjte000; + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + +SimpleNode FlagArgs() : {/*@bgen(jjtree) FlagArgs */ + DynamicSerDeFlagArgs jjtn000 = new DynamicSerDeFlagArgs(JJTFLAGARGS); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) FlagArgs */ + try { +/*@egen*//*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + }/*@bgen(jjtree)*/ + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + +SimpleNode UnflagArgs() : {/*@bgen(jjtree) UnflagArgs */ + DynamicSerDeUnflagArgs jjtn000 = new DynamicSerDeUnflagArgs(JJTUNFLAGARGS); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) UnflagArgs */ + try { +/*@egen*//*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + }/*@bgen(jjtree)*/ + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + +SimpleNode Extends() : {/*@bgen(jjtree) Extends */ + DynamicSerDeExtends jjtn000 = new DynamicSerDeExtends(JJTEXTENDS); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) Extends */ + try { +/*@egen*/ + /*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + } +|/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + }/*@bgen(jjtree)*/ + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + + +DynamicSerDeFunction Function() : {/*@bgen(jjtree) Function */ + DynamicSerDeFunction jjtn000 = new DynamicSerDeFunction(JJTFUNCTION); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) Function */ + try { +/*@egen*/ + // metastore ignores async and type + Async() + FunctionType() + + // the name of the function/table + jjtn000.name = .image + "(" + FieldList() + ")" + Throws() + [CommaOrSemicolon()]/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + + { + this.tables.put(jjtn000.name, jjtn000); + return jjtn000; + }/*@bgen(jjtree)*/ + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + throw (RuntimeException)jjte000; + } + if (jjte000 instanceof ParseException) { + throw (ParseException)jjte000; + } + throw (Error)jjte000; + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + +void Async() : {/*@bgen(jjtree) Async */ + DynamicSerDeAsync jjtn000 = new DynamicSerDeAsync(JJTASYNC); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) Async */ + try { +/*@egen*/ + +|/*@bgen(jjtree)*/ +{ + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; +} +/*@egen*/ +{}/*@bgen(jjtree)*/ + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + +void Throws() : {/*@bgen(jjtree) Throws */ + DynamicSerDeThrows jjtn000 = new DynamicSerDeThrows(JJTTHROWS); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) Throws */ + try { +/*@egen*/ + "(" FieldList() ")" +|/*@bgen(jjtree)*/ +{ + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; +} +/*@egen*/ +{}/*@bgen(jjtree)*/ + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + throw (RuntimeException)jjte000; + } + if (jjte000 instanceof ParseException) { + throw (ParseException)jjte000; + } + throw (Error)jjte000; + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + + +// nothing special - just use the DynamicSerDeFieldList's children methods to access the fields +DynamicSerDeFieldList FieldList() : {/*@bgen(jjtree) FieldList */ + DynamicSerDeFieldList jjtn000 = new DynamicSerDeFieldList(JJTFIELDLIST); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/ + this.field_val = -1; +} +{/*@bgen(jjtree) FieldList */ + try { +/*@egen*/ + (Field())*/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ { + return jjtn000; + }/*@bgen(jjtree)*/ + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + throw (RuntimeException)jjte000; + } + if (jjte000 instanceof ParseException) { + throw (ParseException)jjte000; + } + throw (Error)jjte000; + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + + +DynamicSerDeField Field() : {/*@bgen(jjtree) Field */ + DynamicSerDeField jjtn000 = new DynamicSerDeField(JJTFIELD); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/ + + String fidnum = ""; + String fid; +} +{/*@bgen(jjtree) Field */ + try { +/*@egen*/ + + // parse the field id which is optional + [fidnum=.image ":"] + + // is this field required or optional? default is optional + FieldRequiredness() + + // field type - obviously not optional + FieldType() + + // the name of the field - not optional + jjtn000.name = .image + + // does it have = some value? + FieldValue() + + // take it or leave it + [CommaOrSemicolon()]/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + + { + if(fidnum.length() > 0) { + int fidInt = Integer.valueOf(fidnum); + jjtn000.fieldid = fidInt; + } else { + jjtn000.fieldid = this.field_val--; + } + return jjtn000; + }/*@bgen(jjtree)*/ + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + throw (RuntimeException)jjte000; + } + if (jjte000 instanceof ParseException) { + throw (ParseException)jjte000; + } + throw (Error)jjte000; + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + + + +SimpleNode FieldRequiredness() : {/*@bgen(jjtree) FieldRequiredness */ + DynamicSerDeFieldRequiredness jjtn000 = new DynamicSerDeFieldRequiredness(JJTFIELDREQUIREDNESS); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) FieldRequiredness */ + try { +/*@egen*/ + /*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + } +| /*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + } +|/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + }/*@bgen(jjtree)*/ + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + +SimpleNode FieldValue() : {/*@bgen(jjtree) FieldValue */ + DynamicSerDeFieldValue jjtn000 = new DynamicSerDeFieldValue(JJTFIELDVALUE); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) FieldValue */ + try { +/*@egen*/ + "=" + ConstValue()/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + } +|/*@bgen(jjtree)*/ +{ + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; +} +/*@egen*/ +{ + return jjtn000; +}/*@bgen(jjtree)*/ + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + throw (RuntimeException)jjte000; + } + if (jjte000 instanceof ParseException) { + throw (ParseException)jjte000; + } + throw (Error)jjte000; + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + +SimpleNode DefinitionType() : {/*@bgen(jjtree) DefinitionType */ + DynamicSerDeDefinitionType jjtn000 = new DynamicSerDeDefinitionType(JJTDEFINITIONTYPE); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) DefinitionType */ + try { +/*@egen*/ +// BaseType() xxx + TypeString()/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + } +| TypeBool()/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + } +| Typei16()/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + } +| Typei32()/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + } +| Typei64()/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + } +| TypeDouble()/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + } +| TypeMap()/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + } +| TypeSet()/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + } +| TypeList()/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + }/*@bgen(jjtree)*/ + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + throw (RuntimeException)jjte000; + } + if (jjte000 instanceof ParseException) { + throw (ParseException)jjte000; + } + throw (Error)jjte000; + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + +void FunctionType() : {/*@bgen(jjtree) FunctionType */ + DynamicSerDeFunctionType jjtn000 = new DynamicSerDeFunctionType(JJTFUNCTIONTYPE); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) FunctionType */ + try { +/*@egen*/ + FieldType() +| /*@bgen(jjtree)*/ +{ + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; +} +/*@egen*/ +{}/*@bgen(jjtree)*/ + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + throw (RuntimeException)jjte000; + } + if (jjte000 instanceof ParseException) { + throw (ParseException)jjte000; + } + throw (Error)jjte000; + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + +DynamicSerDeFieldType FieldType() : {/*@bgen(jjtree) FieldType */ + DynamicSerDeFieldType jjtn000 = new DynamicSerDeFieldType(JJTFIELDTYPE); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/ +} + +{/*@bgen(jjtree) FieldType */ + try { +/*@egen*/ + TypeString()/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + } +| TypeBool()/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + } +| Typei16()/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + } +| Typei32()/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + } +| Typei64()/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + } +| TypeDouble()/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + } +| + TypeMap()/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + } +| + TypeSet()/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + } +| + TypeList()/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + } +| + jjtn000.name = .image/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + }/*@bgen(jjtree)*/ + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + throw (RuntimeException)jjte000; + } + if (jjte000 instanceof ParseException) { + throw (ParseException)jjte000; + } + throw (Error)jjte000; + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + +DynamicSerDeTypeString TypeString() : {/*@bgen(jjtree) TypeString */ + DynamicSerDeTypeString jjtn000 = new DynamicSerDeTypeString(JJTTYPESTRING); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) TypeString */ + try { +/*@egen*/ + /*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + }/*@bgen(jjtree)*/ + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + +DynamicSerDeTypeByte TypeByte() : {/*@bgen(jjtree) TypeByte */ + DynamicSerDeTypeByte jjtn000 = new DynamicSerDeTypeByte(JJTTYPEBYTE); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/ +} +{/*@bgen(jjtree) TypeByte */ + try { +/*@egen*/ + /*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + }/*@bgen(jjtree)*/ + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + +DynamicSerDeTypei16 Typei16() : {/*@bgen(jjtree) Typei16 */ + DynamicSerDeTypei16 jjtn000 = new DynamicSerDeTypei16(JJTTYPEI16); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/ +} +{/*@bgen(jjtree) Typei16 */ + try { +/*@egen*/ + /*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + }/*@bgen(jjtree)*/ + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + +DynamicSerDeTypei32 Typei32() : {/*@bgen(jjtree) Typei32 */ + DynamicSerDeTypei32 jjtn000 = new DynamicSerDeTypei32(JJTTYPEI32); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) Typei32 */ + try { +/*@egen*/ + /*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + }/*@bgen(jjtree)*/ + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + +DynamicSerDeTypei64 Typei64() : {/*@bgen(jjtree) Typei64 */ + DynamicSerDeTypei64 jjtn000 = new DynamicSerDeTypei64(JJTTYPEI64); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) Typei64 */ + try { +/*@egen*/ + /*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + }/*@bgen(jjtree)*/ + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + +DynamicSerDeTypeDouble TypeDouble() : {/*@bgen(jjtree) TypeDouble */ + DynamicSerDeTypeDouble jjtn000 = new DynamicSerDeTypeDouble(JJTTYPEDOUBLE); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) TypeDouble */ + try { +/*@egen*/ + /*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + }/*@bgen(jjtree)*/ + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + +DynamicSerDeTypeBool TypeBool() : {/*@bgen(jjtree) TypeBool */ + DynamicSerDeTypeBool jjtn000 = new DynamicSerDeTypeBool(JJTTYPEBOOL); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) TypeBool */ + try { +/*@egen*/ + /*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + }/*@bgen(jjtree)*/ + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + +DynamicSerDeTypeMap TypeMap() : {/*@bgen(jjtree) TypeMap */ + DynamicSerDeTypeMap jjtn000 = new DynamicSerDeTypeMap(JJTTYPEMAP); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) TypeMap */ + try { +/*@egen*/ + + "<" + FieldType() + "," + FieldType() + ">"/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + }/*@bgen(jjtree)*/ + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + throw (RuntimeException)jjte000; + } + if (jjte000 instanceof ParseException) { + throw (ParseException)jjte000; + } + throw (Error)jjte000; + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + +DynamicSerDeTypeSet TypeSet() : {/*@bgen(jjtree) TypeSet */ + DynamicSerDeTypeSet jjtn000 = new DynamicSerDeTypeSet(JJTTYPESET); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) TypeSet */ + try { +/*@egen*/ + + "<" + + FieldType() + + ">"/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + }/*@bgen(jjtree)*/ + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + throw (RuntimeException)jjte000; + } + if (jjte000 instanceof ParseException) { + throw (ParseException)jjte000; + } + throw (Error)jjte000; + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} + +DynamicSerDeTypeList TypeList() : {/*@bgen(jjtree) TypeList */ + DynamicSerDeTypeList jjtn000 = new DynamicSerDeTypeList(JJTTYPELIST); + boolean jjtc000 = true; + jjtree.openNodeScope(jjtn000); +/*@egen*/} +{/*@bgen(jjtree) TypeList */ + try { +/*@egen*/ + + "<" + + FieldType() + + ">"/*@bgen(jjtree)*/ + { + jjtree.closeNodeScope(jjtn000, true); + jjtc000 = false; + } +/*@egen*/ + { + return jjtn000; + }/*@bgen(jjtree)*/ + } catch (Throwable jjte000) { + if (jjtc000) { + jjtree.clearNodeScope(jjtn000); + jjtc000 = false; + } else { + jjtree.popNode(); + } + if (jjte000 instanceof RuntimeException) { + throw (RuntimeException)jjte000; + } + if (jjte000 instanceof ParseException) { + throw (ParseException)jjte000; + } + throw (Error)jjte000; + } finally { + if (jjtc000) { + jjtree.closeNodeScope(jjtn000, true); + } + } +/*@egen*/ +} Added: hadoop/core/trunk/src/contrib/hive/serde/src/gen-java/org/apache/hadoop/hive/serde2/dynamic_type/thrift_grammarConstants.java URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/hive/serde/src/gen-java/org/apache/hadoop/hive/serde2/dynamic_type/thrift_grammarConstants.java?rev=706704&view=auto ============================================================================== --- hadoop/core/trunk/src/contrib/hive/serde/src/gen-java/org/apache/hadoop/hive/serde2/dynamic_type/thrift_grammarConstants.java (added) +++ hadoop/core/trunk/src/contrib/hive/serde/src/gen-java/org/apache/hadoop/hive/serde2/dynamic_type/thrift_grammarConstants.java Tue Oct 21 11:11:05 2008 @@ -0,0 +1,133 @@ +/* Generated By:JJTree&JavaCC: Do not edit this line. thrift_grammarConstants.java */ +package org.apache.hadoop.hive.serde2.dynamic_type; + +public interface thrift_grammarConstants { + + int EOF = 0; + int tok_const = 8; + int tok_namespace = 9; + int tok_cpp_namespace = 10; + int tok_cpp_include = 11; + int tok_cpp_type = 12; + int tok_java_package = 13; + int tok_cocoa_prefix = 14; + int tok_csharp_namespace = 15; + int tok_php_namespace = 16; + int tok_py_module = 17; + int tok_perl_package = 18; + int tok_ruby_namespace = 19; + int tok_smalltalk_category = 20; + int tok_smalltalk_prefix = 21; + int tok_xsd_all = 22; + int tok_xsd_optional = 23; + int tok_xsd_nillable = 24; + int tok_xsd_namespace = 25; + int tok_xsd_attrs = 26; + int tok_include = 27; + int tok_void = 28; + int tok_bool = 29; + int tok_byte = 30; + int tok_i16 = 31; + int tok_i32 = 32; + int tok_i64 = 33; + int tok_double = 34; + int tok_string = 35; + int tok_slist = 36; + int tok_senum = 37; + int tok_map = 38; + int tok_list = 39; + int tok_set = 40; + int tok_async = 41; + int tok_typedef = 42; + int tok_struct = 43; + int tok_exception = 44; + int tok_extends = 45; + int tok_throws = 46; + int tok_service = 47; + int tok_enum = 48; + int tok_required = 49; + int tok_optional = 50; + int tok_int_constant = 51; + int tok_double_constant = 52; + int IDENTIFIER = 53; + int LETTER = 54; + int DIGIT = 55; + int tok_literal = 56; + int tok_st_identifier = 57; + + int DEFAULT = 0; + + String[] tokenImage = { + "", + "\" \"", + "\"\\t\"", + "\"\\n\"", + "\"\\r\"", + "", + "", + "", + "\"const\"", + "\"namespace\"", + "\"cpp_namespace\"", + "\"cpp_include\"", + "\"cpp_type\"", + "\"java_package\"", + "\"cocoa_prefix\"", + "\"csharp_namespace\"", + "\"php_namespace\"", + "\"py_module\"", + "\"perl_package\"", + "\"ruby_namespace\"", + "\"smalltalk_category\"", + "\"smalltalk_prefix\"", + "\"xsd_all\"", + "\"xsd_optional\"", + "\"xsd_nillable\"", + "\"xsd_namespace\"", + "\"xsd_attrs\"", + "\"include\"", + "\"void\"", + "\"bool\"", + "\"byte\"", + "\"i16\"", + "\"i32\"", + "\"i64\"", + "\"double\"", + "\"string\"", + "\"slist\"", + "\"senum\"", + "\"map\"", + "\"list\"", + "\"set\"", + "\"async\"", + "\"typedef\"", + "\"struct\"", + "\"exception\"", + "\"extends\"", + "\"throws\"", + "\"service\"", + "\"enum\"", + "\"required\"", + "\"optional\"", + "", + "", + "", + "", + "", + "", + "", + "\",\"", + "\";\"", + "\"{\"", + "\"}\"", + "\"=\"", + "\"[\"", + "\"]\"", + "\":\"", + "\"(\"", + "\")\"", + "\"<\"", + "\">\"", + }; + +}