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