<?xml version="1.0" encoding="UTF-8"?>
<!--
    Copyright (c) 2005, 2018 IBM Corporation and others.
    This program and the accompanying materials
    are made available under the terms of the Eclipse Public License 2.0
    which accompanies this distribution, and is available at
    https://www.eclipse.org/legal/epl-2.0/

    SPDX-License-Identifier: EPL-2.0

    Contributors:
        IBM Corporation - initial API and implementation
 -->

<project name="tokenizer" default="HeadTokenizer">
	
	<!-- Note: for Eclipse env., the JFlex 1.4 jar should be added 
	to the ant global entries  -->
	<taskdef classname="JFlex.anttask.JFlexTask" name="jflex" />
		
	<target name="init">
		<property name="src.file" value="XMLHeadTokenizer.jFlex"/>			
		<property name="src.dir" value="HeadParsers"/>
		<property name="dest.dir" value="../src"/>
		<!-- touch causes to always build, remove for real 'make' behavior -->
		<touch file="${src.dir}/${src.file}"/>
					
	</target>

	<target name="HeadTokenizer" depends="init">
		<antcall target="run-jflex"/>
	</target>

	<target name="run-jflex" depends="init">
		<jflex
	    	file="${src.dir}/${src.file}"
	    	destdir="${dest.dir}"
			verbose="true"
			nobak="true"
			time="on"
	    />
	</target>
	

</project>