diff options
author | Ashlee Young <ashlee@onosfw.com> | 2015-10-23 10:00:02 -0700 |
---|---|---|
committer | Ashlee Young <ashlee@onosfw.com> | 2015-10-23 10:00:02 -0700 |
commit | 753a6c60f47f3ac4f270005b65e9d6481de8eb68 (patch) | |
tree | 3d0a1ae3b4d994550f6614b417b991eee3eb8911 /framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/antlr/antlr.xml | |
parent | c62d20eb3b4620c06d833be06f50b2600d96dd42 (diff) |
Adding maven and ant source trees
Change-Id: I0a39b9add833a31b9c3f98d193983ae2f3a5a445
Signed-off-by: Ashlee Young <ashlee@onosfw.com>
Diffstat (limited to 'framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/antlr/antlr.xml')
-rw-r--r-- | framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/antlr/antlr.xml | 128 |
1 files changed, 128 insertions, 0 deletions
diff --git a/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/antlr/antlr.xml b/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/antlr/antlr.xml new file mode 100644 index 00000000..c136d061 --- /dev/null +++ b/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/antlr/antlr.xml @@ -0,0 +1,128 @@ +<?xml version="1.0"?> +<!-- + 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. +--> + +<project name="antlr-test" basedir="." default="test1"> + + <import file="../../../buildfiletest-base.xml"/> + + <target name="setUp"> + <mkdir dir="${output}" /> + </target> + + <target name="test1"> + <antlr/> + </target> + + <target name="test2"> + <antlr target="antlr.g" outputdirectory="${output}"/> + </target> + + <target name="test3" depends="setUp"> + <antlr target="antlr.g" outputdirectory="${output}"/> + <fail> + <condition> + <!-- to prove each of these files exists; + ANTLR >= 2.7.6 leaves behind new (.smap) files as well. --> + <resourcecount when="ne" count="5"> + <fileset dir="${output}"> + <include name="CalcParserTokenTypes.txt" /> + <include name="CalcParserTokenTypes.java" /> + <include name="CalcLexer.java" /> + <include name="CalcParser.java" /> + <include name="CalcTreeWalker.java" /> + </fileset> + </resourcecount> + </condition> + </fail> + </target> + + <target name="test4" depends="setUp"> + <antlr target="java.g" outputdirectory="${output}"/> + <antlr dir="${output}" target="java.tree.g" outputdirectory="${output}"/> + </target> + + <target name="test5" depends="setUp"> + <antlr target="java.tree.g" outputdirectory="${output}" fork="yes"/> + </target> + + <target name="test6" depends="setUp"> + <antlr target="java.g" outputdirectory="${output}" /> + <antlr dir="${output}" + target="java.tree.g" + outputdirectory="${output}" + fork="yes"/> + </target> + + <target name="test7"> + <antlr target="antlr.xml"/> + </target> + + <target name="test8" depends="setUp"> + <antlr target="extended.calc.g" outputdirectory="${output}" glib="non-existent-file.g"/> + </target> + + <target name="test9" depends="setUp"> + <!-- Note that I had to copy the grammars over to the temporary directory. --> + <!-- This is because ANTLR expects the super grammar and its generated java --> + <!-- files to be in the same directory, which won't be the case if I use --> + <!-- the output directory option. --> + <copy file="antlr.g" todir="${output}"/> + <copy file="extended.calc.g" todir="${output}"/> + <antlr target="${output}/antlr.g"/> + <antlr target="${output}/extended.calc.g" glib="${output}/antlr.g"/> + </target> + + <target name="test10" depends="setUp"> + <antlr target="antlr.g" outputdirectory="${output}" html="yes"/> + </target> + + <target name="test11" depends="setUp"> + <antlr target="antlr.g" outputdirectory="${output}" diagnostic="yes"/> + </target> + + <target name="test12" depends="setUp"> + <antlr target="antlr.g" outputdirectory="${output}" trace="yes"/> + </target> + + <target name="test13" depends="setUp"> + <antlr target="antlr.g" outputdirectory="${output}" traceLexer="yes" traceParser="yes" traceTreeWalker="yes"/> + </target> + + <!-- test9 will have been run before that --> + <target name="noRecompile"> + <antlr target="${output}/extended.calc.g" glib="${output}/antlr.g"/> + </target> + + <!-- test9 will have been run before that --> + <target name="normalRecompile"> + <touch file="${output}/extended.calc.g"/> + <antlr target="${output}/extended.calc.g" glib="${output}/antlr.g"/> + </target> + + <!-- test9 will have been run before that --> + <target name="supergrammarChangeRecompile"> + <touch file="${output}/antlr.g"/> + <antlr target="${output}/extended.calc.g" glib="${output}/antlr.g"/> + </target> + + <target name="tearDown"> + <delete dir="${output}" /> + <delete file="../../../../../../CalcParserTokenTypes.txt"/> + </target> + +</project> |