## This is the ANT-variant of generating XMI from some headers.
## The advantage of ANT is: This file is shortenly and clearly in respect to the handled files, no algorithmus is interferingly.
## But you can't see how does it work. You must study the called and used scripts if you want to know somewhat about it.
## The usage of ANT is recommended, if other aspects of generation are also present.
## An important feature of ANT is the testability if a file is newer or existing.
## The algorithm is not executed if it is not necessary because the actual output is already present.

## The princip of work is:
## * ZmakeStd.bat converts the input file to an ANT.xml-script and starts ANT.
## * The conversion of the input to ANT.xml use ZBNF parsing using zbnfjax/zbnf/ZmakeStd.zbnf.
##   This script is independent of the concret problem Header2XMI.
## * Because here zbnfCheader and genXmiFromZbnfCheader are used, the appropriate algorithm for ANT
##   in zbnfjax/xsl/ZmakeStd.xslp are used.
## * That algorithms are transported to the generated tmp/ant.xml
## * You can visit the generated tmp/ant.xml to realize how does if work, in ANT syntax.

## To run the next cmd you should have installed the zbnfjax in the /usr/share and copied and adapted the /usr/bin/zbnfjax.
## See zbnfjax/readme.html

## Set the tmp directory to use.
export TMP_ZBNFJAX="tmp"
##call conversion
zbnfjax zmake testHeader2XMI_Ant.sh

## exit because the following text isn't a part of shell script. It is the Zmake-rules for this task.
exit

************************************************************************************************************
The own content is following now. Note that the file content from here is used not as batch file but as ZBNF input file.
Therefore after the keyword ZMAKE_RULES there is an other comment notation:

ZMAKE_RULES:
[?NOTE: this is a comment block. The /*...*/ is not useable because confusion with pathes. ?]
//NOTE: This is a comment to end-of-line.

//fileset as a variable. It will be transformed to a XML node.
$HeaderfilesForXmi = fileset
( Mystruct.h
);

//parsing all headerfiles using the named fileset. 
//The result is written to tmp/ with the source file name and the shown extension.
tmp/*.h.xml := zbnfCheader(target="CheaderXml", $HeaderfilesForXmi);

//XMI-Modell from all parsed headerfiles. The target which produces the xml from header have to be determined here.
test_ant.xmi := CHeaderXML2XMI
( srcpath="tmp"          //add this path to the files in the fileset
, srcext=".xml"         //add this extension to the file in the fileset
, $HeaderfilesForXmi    //use the fileset
);
