Thank you. I went through antlr. Just curious -- was there any comparison done 
between JavaCC and antlr ? How is the quality of code generated by antlr 
compared to JavaCC ? This could be an issue if in future we like to embed XML 
or java script inside Hive QL (not very important at this point).
Advanced SQL syntax embeds XML and Java scripts.

Thanks,
Shyam


--- On Tue, 2/17/09, Zheng Shao <zsh...@gmail.com> wrote:

> From: Zheng Shao <zsh...@gmail.com>
> Subject: Re: Need help on Hive.g and parser!
> To: hive-dev@hadoop.apache.org, shyam_sar...@yahoo.com
> Date: Tuesday, February 17, 2009, 10:01 PM
> We are using antlr.
> 
> Basically, the rule checks the timestamp of
> HiveParser.java. If it's newer
> than Hive.g, then we don't need to regenerate
> HiveParse.java from Hive.g
> again.
> 
> Zheng
> 
> On Tue, Feb 17, 2009 at 12:15 PM, Shyam Sarkar
> <shyam_sar...@yahoo.com>wrote:
> 
> > Hello,
> >
> > Someone please explain the following build.xml spec
> for grammar build
> > (required and not required) ::
> >
> >
> ===================================================================
> >
> > <uptodate
> property="grammarBuild.notRequired">
> >    <srcfiles dir=
> "${src.dir}/org/apache/hadoop/hive/ql/parse"
> > includes="**/*.g"/>
> >    <mapper type="merge"
> >
> to="${build.dir.hive}/ql/gen-java/org/apache/hadoop/hive/ql/parse/HiveParser.java"/>
> >  </uptodate>
> >
> >  <target name="build-grammar"
> unless="grammarBuild.notRequired">
> >    <echo>Building Grammar
> ${src.dir}/org/apache/hadoop/hive/ql/parse/Hive.g
> >  ....</echo>
> >    <java classname="org.antlr.Tool"
> classpathref="classpath" fork="true">
> >       <arg value="-fo" />
> >       <arg
> >
> value="${build.dir.hive}/ql/gen-java/org/apache/hadoop/hive/ql/parse"
> />
> >       <arg
> value="${src.dir}/org/apache/hadoop/hive/ql/parse/Hive.g"
> />
> >    </java>
> >  </target>
> >
> =============================================================
> >
> > Also can someone tell me which parser generator is
> used? I used JavaCC
> > in the past.
> >
> > Thanks,
> > shyam_sar...@yahoo.com
> >
> >
> >
> >
> >
> 
> 
> -- 
> Yours,
> Zheng


      

Reply via email to