 $comment=(?...?).
 $endlineComment=\#\#.  ##The ## is the start chars for an endline-comment or commented line in the generator script.
 $keywords= new | cmd | cmd_check | start 
   | debug | java 
   | stdout | stdin | stderr 
   | subtext | sub | main | call | cd | CD | REM | Rem | rem 
   | Pipe | StringBuffer | Stringjar | String | List | Openfile | Fileset | Obj | Set | set | include | zbatch 
   | break | XXXreturn | exit | onerror | instanceof | for | while | do | if | elsif | else | throw . 
 
 JZcmd::= 
 [<*|==ZGen==?>==ZGen== ]
 [<*|==JZcmd==?>==JZcmd== ]
 [<*|//JZcmd?>//JZcmd ]
 [{ ! checkJZcmd = <textValue?checkJZcmdFile> ; 
  | ! checkXml = <textValue?checkXmlFile> ; 
 }]
 [{ [REM|Rem|rem] <*\n\r?> ##Remark like in batch files
  | include <include> ; 
  | currdir = <textDatapath?cd> ;
 }] 
 { [//] ==endJZcmd==<*\e?> 
 | //JZcmd      ##ignore //JZcmd, it may be a comment for another language
 | //<*\n\r?> ##line comment in C style
 | /*<*|*/?>*/ ##block commment in C style
 | [REM|Rem|rem] <*\n\r?> ##Remark like in batch files
 | <DefVariable?> ; 
 | subtext  <subtext?subroutine> 
 | sub <subroutine> 
 | class <subClass> 
 | main ( ) \{ <statementBlock?mainRoutine> \} 
 } \e.
 
 
 include::= [$<$?envVar>[/|\\]][ <""?path> | <*;\ ?path>].
 
 
 subClass::= <$?name> \{ 
 { subtext  <subtext?subroutine> 
 | sub <subroutine> 
 | class <subClass> 
 } \}. 
 
 
 subroutine::= <$?name> ( [ use-locals<?useLocals> | { add-locals<?addLocals> | <DefVariable?formalArgument> ? , }|] ) \{ [<statementBlock>] \}. 
 
 subtext::= <$?name> ( [ use-locals<?useLocals> | { add-locals<?addLocals> | <DefVariable?formalArgument> ? , }|] ) \<:\><textExpr>\<\.\>.
 
 
 statementBlock::= { <statement?> }.
 
 statement::=
   \{ [<statementBlock>] \} 
 | REM <*\n\r?> ##Remark like in batch files
 | ::{:}                ##Skip over :::
 | //JZcmd      ##ignore //JZcmd, it may be a comment for another language
 | //<*|\n|\r|\<+?>     ##line commment in C style but only till <+
 | /*<*|*/?>*/          ##block commment in C style
 | currdir = <textDatapath?cd> ;   ##set current directory
 | [cd|CD] [<textValue?cd> | <*\ ;?cd> ; ]  ##change current directory 
 | <DefVariable?> ; 
 | for <forCtrl> 
 | if <ifCtrl> 
 | while <whileCtrl> 
 | do <dowhileCtrl> 
 | start <cmdLine?cmdStart> 
 | zmake <zmake> 
 | move <srcdst?move> ; 
 | copy <srcdst?copy> ; 
 | [rm|del] <oneArg?del> ; 
 | break <?breakBlock> ; 
 | return <?return> ; 
 | exit <#?exitScript> ;
 | throw on errorlevel <#?throwonerror> 
 | throw <textDatapath?throw> 
 | onerror <onerror> 
 | errortoOutput off <?errorToOutput=0> 
 | errortoOutput <?errorToOutput=1> 
 | if errorlevel <iferrorlevel> 
 | debug [<textValue?debug>| <?debug>] ; 
 | <callSubroutine?call> 
 | <threadBlock> 
 | \<+<textOut> 
 | \<:\><textExpr>\<\.\> [;] 
 | <cmdLineWait?cmdWait> 
 | <assignExpr> 
 | ; 
 .
 
 
 srcdst::= [src=] <textValue?actualArgument> [dst=] <textValue?actualArgument> .
 oneArg::= <textValue?actualArgument> .
 
 
 DefVariable::=
   String\  <DefStringVar?textVariable> 
 | Stringjar\  <DefSpecVar?Stringjar> 
 | Num\  <DefNumVar> 
 | Bool\  <DefBoolVar> 
 | Pipe\  <DefSpecVar?Pipe> 
 | List\  <DefSpecVar?List> 
 | Map\  <DefMapVar> 
 | Obj\  <DefObjVar> 
 | Class\  <DefClassVar> 
 | Classpath\  <DefClasspath> 
 | Openfile\  <Openfile> 
 | Fileset\  <DefFileset> 
 | Filepath\ <DefFilepath> 
 | Set\  <DefStringVar?setEnvVar> 
 | set\  <DefStringVar?setEnvVar> 
 | SET\  <DefStringVar?setEnvVar> 
 .
 
 DefNumVar::= [const <?const>] <definePath?defVariable>  [ = <numExpr>].
 
 DefBoolVar::= [const <?const>] <definePath?defVariable>  [ = <boolExpr>].
 
 DefSpecVar::= [const <?const>] <definePath?defVariable>  [ = <objExpr?>].
 
 DefObjVar::= [const <?const>] <definePath?defVariable> [ : <$\.?type>]  [ = <objExpr?>].
 
 DefClassVar::= [const] <definePath?defVariable>  = 
   [: <dataAccess?loader> : ]  ## a datapath to a ClassLoader instance, a Classpath variable. 
   <textValue?>.               ## The package path maybe contained in any expression
 
 DefClasspath::= [const] <definePath?defVariable>  = [ : <$?parentClasspath> : ] { <filesetAccess> ? , }.
 
 DefStringVar::= [const <?const>] <definePath?defVariable> [ = <textDatapath?>].
 
 DefMapVar::= [const <?const>] <definePath?defVariable> [ = \{ <dataStruct> \}  ].
 
 Openfile::= [const <?const>] <definePath?defVariable> = <textDatapath?> .
 
 
 definePath::= <$-?startVariable>[ [?\. \>] \.{ <defineSubelement?datapathElement> ? [?\. \>] \.}].
 
 defineSubelement::= <$-?ident> [( [{ <objExpr?argument> ? ,}])<?whatisit=(>].
 
 
 DefFileset::= <definePath?defVariable> [ =  ( 
 [ commonpath = [<""?commonPath>|<*;,)(\ \r\n?commonPath>] , ] 
 { [{ //JZcmd | //<*\n\r?>}] [<""?filePath>|<*;,)(\ \r\n?filePath>] [{ //JZcmd | //<*\n\r?>}] ? , } 
 ) ] .
 
 DefFilepath::= <definePath?defVariable> [ = <textValue?> ]. 
 
 
 XXXFilepath::=<""?!prepFilePath>|<*;\ \r\n,)?!prepFilePath>. 
 
 prepFilePath::=<$NoWhiteSpaces><! *?>
 [ &$<$?@envVariable> [\\|/|]      ##path can start with a environment variable's content
 | &<$?@scriptVariable> [\\|/|]    ##path can start with a scriptvariable's content
 | [<!.?@drive>:]                  ## only 1 char with followed : is the drive letter
   [ [/|\\]<?@absPath>]            ## starting with / maybe after d: is absolute path
 |]
 [ <*:?@pathbase>[?:=]:]           ## all until : is pathbase, but not till a :=
 [ <toLastChar:/\\?@path>[\\|/|]] ## all until last \ or / is path
 [ <toLastChar:.?@name>              ## all until exclusive dot is the name
   <*\e?@ext>                       ## from dot to end is the extension
 | <*\e?@name>                      ## No dot is found, all is the name.
 ] . 
 
 
 
 
 
 textDatapath::=  <""?text> | \<:\><textExpr>\<\.\> | [& [?(] ] <dataAccess> .
 
 textValue::=  <""?text> | \<:\><textExpr>\<\.\> | & <dataAccess> | <*;,)(\ \r\n\>?text> .
 
 
 objExpr::= 
   File : <textValue?File>         ## A textValue which builds a java.lang.File in the currdir 
 | Filepath : <textValue?Filepath> ## A textValue which builds a Filepath in the currdir 
 | Fileset: <filesetAccess>  
 | \{ <dataStruct> \}              ## It is a Map of Variables. 
 | <""?text>                       ## It is a constant text. 
 | \<:\><textExpr>\<\.\>           ## It is a text assembled in runtime. 
 | <numExpr>.                      ## special detection of a simple dataAccess.
 
 dataStruct::= { <DefVariable?> ; }.
 
 
 
 
 dataAccess::= 
 [ $<$?envVariable> 
 | [<?startVariable> $<#?>| $<$?>]    ## $1 .. $999 are the arguments of JZcmd, $name for environment 
 | [java\ ] new\  <staticJavaAccess?newJavaClass> 
 | [%|java\ ] <staticJavaAccess?staticJavaMethod> 
 | <dataPath?> 
 ].
 
 
 ## Access to a Java class constructor or static method or field
 staticJavaAccess::=
   [ & <dataAccess?Class_Var> : [<$\.$?javapath>]       ## access via Class variable .element
   | [: <dataAccess?Classpath_Var> : ] <$\.$?javapath>  ## [Classpath] package.path.Class.element
   ] [( [ { <objExpr?argument> ? , } ])].               ## arguments
 
 dataPath::= <startDatapath>[ [?\. \>] \.{ <datapathElement> ? [?\. \>] \.}].
 
 ## A datapath cannot start with an JZcmd keyword! 
 startDatapath::= [ & ( <dataPath> ) | <$-?ident> ] <?whatisit=@> [( [{ <objExpr?argument> ? ,}])<?whatisit=+>].
 ## Use regex for the second datapath element, it can be a JZcmd keyword too! 
 datapathElement::= [ & ( <dataPath> ) |[<?ident>[@]<![\\w-]+?>]] [( [{ <objExpr?argument> ? ,}])<?whatisit=(>].
 
 
 
 
 condition::=<andExpr?> [{\|\| <?boolCheckOrOperation> <andExpr?boolOrOperation>}].
 
 andExpr::= <boolExpr?> [{ && <?boolCheckAndOperation> <boolExpr?boolAndOperation>}].
 
 boolExpr::= [<?boolNot> ! | not| NOT|]
 [ ( <condition?parenthesisCondition> ) 
 | <numExpr?> [<cmpOperation>]
 ].
 
 cmpOperation::=[ \?[<?cmpOperator>gt|ge|lt|le|eq|ne|instanceof] |  [<?cmpOperator> != | == | \>= | \> | \<= | \< ]] <numExpr?>.
 
 instanceof::=<objExpr> instanceof <staticJavaAccess>.
 
 conditionInText::=<andExprInText?> [{\|\| <?boolCheckOrOperation> <andExprInText?boolOrOperation>}].
 
 andExprInText::= <boolExprInText?> [{ && <?boolCheckAndOperation> <boolExprInText?boolAndOperation>}].
 
 boolExprInText::= [<?boolNot> ! | not|]
 [ ( <conditionInText?parenthesisCondition> ) 
 | <numExpr?> [<cmpOperationInText?cmpOperation>]
 ].
 
 cmpOperationInText::=[ \?[<?cmpOperator>gt|ge|lt|le|eq|ne] |  [<?cmpOperator> != | == ]] <numExpr?>.
 
 
 numExpr::=  bool ( <boolExpr?> ) 
             | <multExpr?> [{ + <multExpr?addOperation> | - <multExpr?subOperation>}].
 
 
 multExpr::= <value?> [{ * <value?multOperation> | / <value?divOperation> }].
 
 value::= 0x<#x?intValue> | <#?intValue>[?\.] | <#f?doubleValue> |    ##unary - associated to value.
 [{[<?unaryOperator> ! | ~ | - | + ]}]        ##additional unary operators.
 [ 0x<#x?intValue> | <#?intValue>  ##ones of kind of value:
 | '<!.?charValue>' | <""?textValue> 
 | ( <numExpr?parenthesisExpr> ) 
 | [& [?(] ] <dataAccess>   ## & is optional, don't confuse with &(variable) 
 ].
 
 
 textExpr::=<$NoWhiteSpaces>
 { [?\<\.\>]                             ##abort on <.> 
 [ \<&-<*\>?>\>                          ##<&- it is comment> 
 | \<:-<*\>?>\><textExpr?>\<\.-<*\>?>\> ##<:-comment> comment <.- > 
 | \#\#<*\r\n?>   ##comment to eol in a text Expression
 | \<:for:<forInText?forCtrl>
 | \<:if: <ifInText?ifCtrl>
 | \<:hasNext\> <textExpr?hasNext> \<\.hasNext\>
 | \<:subtext : <callSubtext?call>
 | \<:scriptdir<?scriptdir>\>
 | \<:debug[:<textDatapath?debug>| <?debug>]\>
 | \<&<dataText>
 | \<: [<?transliteration>n|r|t|[\<|#|\"]<*\>?>] \>
 | \<:lf\><?newline>
 | \<:\ \><!\\s*?> [ \#\#<*\r\n?> <!\\s*?> ]
 | \<:@<setColumn>\>  
 | \<:\><textExpr?>\<\.\>
 | <*|\<:|\<=|\<&|\#\#|\<\.?plainText>
 ]
 }.
 
 
 dataText::=<dataAccess>[ \: [<""?formatText>|<*\>?formatText>]] \>.     ##<*expr: format>
 
 textOut::= [<dataPath?assign>] \> <textExpr>[ \<\.+\> 
   | \<\.n+\><?newline> | \<\.+n\><?newline> 
   | \<\.+n+flush\><?newline><?flush> | \<\.+flush\><?flush>
   | \<\.+n+close\><?close> | \<\.+close\><?close>].
 
 setColumn::=<numExpr> [ : <numExpr?minSpaces>] | : <numExpr?minSpaces>.
 
 
 
 forCtrl::= ( <$?forVariable> : <dataAccess?forContainer> [ && <condition> ])  \{ <statementBlock> \} .
 
 forInText::= <$?forVariable> : <dataAccess?forContainer> [ && <condition> ] \> <textExpr> \<\.for[ : <$?@checkForVariable> ]\>. 
 ##name is the name of the container element data reference
 
 ifCtrl::= <ifBlock> [{ elsif <ifBlock>  }][ else \{ [<statementBlock?elseBlock>] \} ].
 
 ifBlock::= ( <condition> ) \{ <statementBlock> \} .
 
 ifInText::= <ifBlockInText?ifBlock> [{ \<:elsif : <ifBlockInText?ifBlock>  }][ \<:else\> <textExpr?elseBlock> ] \<\.if\>.
 
 ifBlockInText::= <conditionInText?condition> \> <textExpr>.
 
 whileCtrl::= ( <condition> ) \{ [<statementBlock>] \} .
 
 dowhileCtrl::=  \{ [<statementBlock>] \} while ( <condition> ) ; .
 
 
 onerror::= [ <#?errorLevel> 
            | [<?errortype> notfound | cmd | file | internal | exit ]
            |]
            \{ [<statementBlock>] \}.
 
 
 callSubroutine::= [{ <dataPath?assign> [ = | += <?append>] }] call <textValue?callName> ( [{ <namedArgument?actualArgument> ? , }] ) ; .
 
 callSubtext::=<textValue?callName> [ : { <namedArgument?actualArgument> ? , }] \>.
 
 namedArgument::= <$?name> = <objExpr?>.
 
 
 zmake::= [ : <$-?name> :[?=] ] <textValue?zmakeOutput> := <textValue?callName> ( { <namedArgument?actualArgument> | <filesetAccess> ? ,} ).
 
 
 
 ## An accessPath is a Filepath, see prepFilepath::=, but analyzed on Java level. 
 filesetAccess::= [ 
                    <""?accessPath> | \<:\><textExpr>\<\.\> 
                  | [<?accessPathOrFilesetVariable> [&]<*\ \r\n,)&;?>] 
                  ] [ & <$?zmakeFilesetVariable>] . 
 
 
 cmdLineWait::=[{ <dataPath?assign> += }] cmd\  <cmdLine?>.
 
 cmdLine::= [\!argsCheck!<?argsCheck>] <textValue?> [{[?;[\ |\n|\r]] [ \<\:arg\><textExpr?actualArgument>\<\.arg\> | \<\:args:<dataAccess?argList>\> |<textValue?actualArgument>] }] 
   [ \<:stdout:[ pipe<?pipe>| [$]<$?stdoutVariable>] \>] ;.
 
 iferrorlevel::= <#?errorLevel> \{ [<statementBlock>] \}.
 
 
 
 assignExpr::= [{ <dataPath?assign> [ = | += <?append>] }] <objExpr?> ;.
 
 
 threadBlock::= Thread <dataPath?defThreadVar> = [thread] \{ <statementBlock> \} 
              | thread \{ <statementBlock> \}.
 

Compilation and Execution of JZcmd-Files
made by HSchorrig, Version 1.0, 2013-07-11..2014-06-09
args JZcmd_SCRIPTFILE [-t:OUTEXT] [-debug:SCRIPTFILE.xml]
INPUT    pathTo JZcmd-File to execute
-t:OUTEXT pathTo text-File for output
-debug:INPUT.xml pathTo XML output of parsed script
-u:userArgs
==Standard arguments of MainCmd==
--arg:value    Use = or : as separator between arg and its value. Don't use space!
--about        show the help info
--help[=helpfile]  show the help info
---arg         ignore this argument
--@file        use file for further arguments, one argument per line.
--currdir=PATH Set the currdir variable.
--log=FILE     write the log (report) into the given file, create or clear the file.
-+log=FILE     add to the end of given file or create the log file.
--loglevel=R   set the level of log, R is number from 1 to 6.
--loglevel=DR  also write logs up to level D on display, sample: ..-rlevel:24
--loglevel=WDR write output also in log, W is nr from 1 to 3 (error, warning, info
==Syntax of a JZcmd script==
 $comment=(?...?).
 $endlineComment=\#\#.  ##The ## is the start chars for an endline-comment or commented line in the generator script.
 $keywords= new | cmd | cmd_check | start 
   | debug | java 
   | stdout | stdin | stderr 
   | subtext | sub | main | call | cd | CD | REM | Rem | rem 
   | Pipe | StringBuffer | Stringjar | String | List | Openfile | Fileset | Obj | Set | set | include | zbatch 
   | break | XXXreturn | exit | onerror | instanceof | for | while | do | if | elsif | else | throw . 
 
 JZcmd::= 
 [<*|==ZGen==?>==ZGen== ]
 [<*|==JZcmd==?>==JZcmd== ]
 [<*|//JZcmd?>//JZcmd ]
 [{ ! checkJZcmd = <textValue?checkJZcmdFile> ; 
  | ! checkXml = <textValue?checkXmlFile> ; 
 }]
 [{ [REM|Rem|rem] <*\n\r?> ##Remark like in batch files
  | include <include> ; 
  | currdir = <textDatapath?cd> ;
 }] 
 { ==endJZcmd==<*\e?> 
 | //endJZcmd<*\e?> 
 | [REM|Rem|rem] <*\n\r?> ##Remark like in batch files
 | <DefVariable?> ; 
 | subtext  <subtext?subroutine> 
 | sub <subroutine> 
 | class <subClass> 
 | main ( ) \{ <statementBlock?mainRoutine> \} 
 | //JZcmd      ##ignore //JZcmd, it may be a comment for another language
 | //<*\n\r?> ##line comment in C style
 | /*<*|*/?>*/ ##block commment in C style
 } \e.
 
 
 include::= [$<$?envVar>[/|\\]][ <""?path> | <*;\ ?path>].
 
 
 subClass::= <$?name> \{ 
 { subtext  <subtext?subroutine> 
 | sub <subroutine> 
 | class <subClass> 
 } \}. 
 
 
 subroutine::= <$?name> ( [ use-locals<?useLocals> | { add-locals<?addLocals> | <DefVariable?formalArgument> ? , }|] ) \{ [<statementBlock>] \}. 
 
 subtext::= <$?name> ( [ use-locals<?useLocals> | { add-locals<?addLocals> | <DefVariable?formalArgument> ? , }|] ) \<:\><textExpr>\<\.\>.
 
 
 statementBlock::= { <statement?> }.
 
 statement::=
   \{ [<statementBlock>] \} 
 | REM <*\n\r?> ##Remark like in batch files
 | ::{:}                ##Skip over :::
 | //JZcmd      ##ignore //JZcmd, it may be a comment for another language
 | //<*|\n|\r|\<+?>     ##line commment in C style but only till <+
 | /*<*|*/?>*/          ##block commment in C style
 | currdir = <textDatapath?cd> ;   ##set current directory
 | [cd|CD] [<textValue?cd> | <*\ ;?cd> ; ]  ##change current directory 
 | <DefVariable?> ; 
 | for <forCtrl> 
 | if <ifCtrl> 
 | while <whileCtrl> 
 | do <dowhileCtrl> 
 | start <cmdLine?cmdStart> 
 | zmake <zmake> 
 | move <srcdst?move> ; 
 | copy <srcdst?copy> ; 
 | [rm|del] <oneArg?del> ; 
 | break <?breakBlock> ; 
 | return <?return> ; 
 | exit <#?exitScript> ;
 | throw on errorlevel <#?throwonerror> 
 | throw <textDatapath?throw> 
 | onerror <onerror> 
 | errortoOutput off <?errorToOutput=0> 
 | errortoOutput <?errorToOutput=1> 
 | if errorlevel <iferrorlevel> 
 | debug [<textValue?debug>| <?debug>] ; 
 | <callSubroutine?call> 
 | <threadBlock> 
 | \<+<textOut> 
 | \<:\><textExpr>\<\.\> [;] 
 | <cmdLineWait?cmdWait> 
 | <assignExpr> 
 | ; 
 .
 
 
 srcdst::= [src=] <textValue?actualArgument> [dst=] <textValue?actualArgument> .
 oneArg::= <textValue?actualArgument> .
 
 
 DefVariable::=
   String\  <DefStringVar?textVariable> 
 | Stringjar\  <DefSpecVar?Stringjar> 
 | Num\  <DefNumVar> 
 | Bool\  <DefBoolVar> 
 | Pipe\  <DefSpecVar?Pipe> 
 | List\  <DefSpecVar?List> 
 | Map\  <DefMapVar> 
 | Obj\  <DefObjVar> 
 | Class\  <DefClassVar> 
 | Classpath\  <DefClasspath> 
 | Openfile\  <Openfile> 
 | Fileset\  <DefFileset> 
 | Filepath\ <DefFilepath> 
 | Set\  <DefStringVar?setEnvVar> 
 | set\  <DefStringVar?setEnvVar> 
 | SET\  <DefStringVar?setEnvVar> 
 .
 
 DefNumVar::= [const <?const>] <definePath?defVariable>  [ = <numExpr>].
 
 DefBoolVar::= [const <?const>] <definePath?defVariable>  [ = <boolExpr>].
 
 DefSpecVar::= [const <?const>] <definePath?defVariable>  [ = <objExpr?>].
 
 DefObjVar::= [const <?const>] <definePath?defVariable> [ : <$\.?type>]  [ = <objExpr?>].
 
 DefClassVar::= [const] <definePath?defVariable>  = 
   [: <dataAccess?loader> : ]  ## a datapath to a ClassLoader instance, a Classpath variable. 
   <textValue?>.               ## The package path maybe contained in any expression
 
 DefClasspath::= [const] <definePath?defVariable>  = [ : <$?parentClasspath> : ] { <filesetAccess> ? , }.
 
 DefStringVar::= [const <?const>] <definePath?defVariable> [ = <textDatapath?>].
 
 DefMapVar::= [const <?const>] <definePath?defVariable> [ = \{ <dataStruct> \}  ].
 
 Openfile::= [const <?const>] <definePath?defVariable> = <textDatapath?> .
 
 
 definePath::= <$-?startVariable>[ [?\. \>] \.{ <defineSubelement?datapathElement> ? [?\. \>] \.}].
 
 defineSubelement::= <$-?ident> [( [{ <objExpr?argument> ? ,}])<?whatisit=(>].
 
 
 DefFileset::= <definePath?defVariable> [ =  ( 
 [ commonpath = [<""?commonPath>|<*;,)(\ \r\n?commonPath>] , ] 
 { [{ //JZcmd | //<*\n\r?>}] [<""?filePath>|<*;,)(\ \r\n?filePath>] [{ //JZcmd | //<*\n\r?>}] ? , } 
 ) ] .
 
 DefFilepath::= <definePath?defVariable> [ = <textValue?> ]. 
 
 
 XXXFilepath::=<""?!prepFilePath>|<*;\ \r\n,)?!prepFilePath>. 
 
 prepFilePath::=<$NoWhiteSpaces><! *?>
 [ &$<$?@envVariable> [\\|/|]      ##path can start with a environment variable's content
 | &<$?@scriptVariable> [\\|/|]    ##path can start with a scriptvariable's content
 | [<!.?@drive>:]                  ## only 1 char with followed : is the drive letter
   [ [/|\\]<?@absPath>]            ## starting with / maybe after d: is absolute path
 |]
 [ <*:?@pathbase>[?:=]:]           ## all until : is pathbase, but not till a :=
 [ <toLastChar:/\\?@path>[\\|/|]] ## all until last \ or / is path
 [ <toLastChar:.?@name>              ## all until exclusive dot is the name
   <*\e?@ext>                       ## from dot to end is the extension
 | <*\e?@name>                      ## No dot is found, all is the name.
 ] . 
 
 
 
 
 
 textDatapath::=  <""?text> | \<:\><textExpr>\<\.\> | [& [?(] ] <dataAccess> .
 
 textValue::=  <""?text> | \<:\><textExpr>\<\.\> | & <dataAccess> | <*;,)(\ \r\n\>?text> .
 
 
 objExpr::= 
   File : <textValue?File>         ## A textValue which builds a java.lang.File in the currdir 
 | Filepath : <textValue?Filepath> ## A textValue which builds a Filepath in the currdir 
 | Fileset: <filesetAccess>  
 | \{ <dataStruct> \}              ## It is a Map of Variables. 
 | <""?text>                       ## It is a constant text. 
 | \<:\><textExpr>\<\.\>           ## It is a text assembled in runtime. 
 | <numExpr>.                      ## special detection of a simple dataAccess.
 
 dataStruct::= { <DefVariable?> ; }.
 
 
 
 
 dataAccess::= 
 [ $<$?envVariable> 
 | [<?startVariable> $<#?>| $<$?>]    ## $1 .. $999 are the arguments of JZcmd, $name for environment 
 | [java\ ] new\  <staticJavaAccess?newJavaClass> 
 | [%|java\ ] <staticJavaAccess?staticJavaMethod> 
 | <dataPath?> 
 ].
 
 
 ## Access to a Java class constructor or static method or field
 staticJavaAccess::=
   [ & <dataAccess?Class_Var> : [<$\.$?javapath>]       ## access via Class variable .element
   | [: <dataAccess?Classpath_Var> : ] <$\.$?javapath>  ## [Classpath] package.path.Class.element
   ] [( [ { <objExpr?argument> ? , } ])].               ## arguments
 
 dataPath::= <startDatapath>[ [?\. \>] \.{ <datapathElement> ? [?\. \>] \.}].
 
 ## A datapath cannot start with an JZcmd keyword! 
 startDatapath::= [ & ( <dataPath> ) | <$-?ident> ] <?whatisit=@> [( [{ <objExpr?argument> ? ,}])<?whatisit=+>].
 ## Use regex for the second datapath element, it can be a JZcmd keyword too! 
 datapathElement::= [ & ( <dataPath> ) |[<?ident>[@]<![\\w-]+?>]] [( [{ <objExpr?argument> ? ,}])<?whatisit=(>].
 
 
 
 
 condition::=<andExpr?> [{\|\| <?boolCheckOrOperation> <andExpr?boolOrOperation>}].
 
 andExpr::= <boolExpr?> [{ && <?boolCheckAndOperation> <boolExpr?boolAndOperation>}].
 
 boolExpr::= [<?boolNot> ! | not| NOT|]
 [ ( <condition?parenthesisCondition> ) 
 | <numExpr?> [<cmpOperation>]
 ].
 
 cmpOperation::=[ \?[<?cmpOperator>gt|ge|lt|le|eq|ne|instanceof] |  [<?cmpOperator> != | == | \>= | \> | \<= | \< ]] <numExpr?>.
 
 instanceof::=<objExpr> instanceof <staticJavaAccess>.
 
 conditionInText::=<andExprInText?> [{\|\| <?boolCheckOrOperation> <andExprInText?boolOrOperation>}].
 
 andExprInText::= <boolExprInText?> [{ && <?boolCheckAndOperation> <boolExprInText?boolAndOperation>}].
 
 boolExprInText::= [<?boolNot> ! | not|]
 [ ( <conditionInText?parenthesisCondition> ) 
 | <numExpr?> [<cmpOperationInText?cmpOperation>]
 ].
 
 cmpOperationInText::=[ \?[<?cmpOperator>gt|ge|lt|le|eq|ne] |  [<?cmpOperator> != | == ]] <numExpr?>.
 
 
 numExpr::=  bool ( <boolExpr?> ) 
             | <multExpr?> [{ + <multExpr?addOperation> | - <multExpr?subOperation>}].
 
 
 multExpr::= <value?> [{ * <value?multOperation> | / <value?divOperation> }].
 
 value::= 0x<#x?intValue> | <#?intValue>[?\.] | <#f?doubleValue> |    ##unary - associated to value.
 [{[<?unaryOperator> ! | ~ | - | + ]}]        ##additional unary operators.
 [ 0x<#x?intValue> | <#?intValue>  ##ones of kind of value:
 | '<!.?charValue>' | <""?textValue> 
 | ( <numExpr?parenthesisExpr> ) 
 | [& [?(] ] <dataAccess>   ## & is optional, don't confuse with &(variable) 
 ].
 
 
 textExpr::=<$NoWhiteSpaces>
 { [?\<\.\>]                             ##abort on <.> 
 [ \<&-<*\>?>\>                          ##<&- it is comment> 
 | \<:-<*\>?>\><textExpr?>\<\.-<*\>?>\> ##<:-comment> comment <.- > 
 | \#\#<*\r\n?>   ##comment to eol in a text Expression
 | \<:for:<forInText?forCtrl>
 | \<:if: <ifInText?ifCtrl>
 | \<:hasNext\> <textExpr?hasNext> \<\.hasNext\>
 | \<:subtext : <callSubtext?call>
 | \<:scriptdir<?scriptdir>\>
 | \<:debug[:<textDatapath?debug>| <?debug>]\>
 | \<&<dataText>
 | \<: [<?transliteration>n|r|t|[\<|#|\"]<*\>?>] \>
 | \<:lf\><?newline>
 | \<:\ \><!\\s*?> [ \#\#<*\r\n?> <!\\s*?> ]
 | \<:@<setColumn>\>  
 | \<:\><textExpr?>\<\.\>
 | <*|\<:|\<=|\<&|\#\#|\<\.?plainText>
 ]
 }.
 
 
 dataText::=<dataAccess>[ \: [<""?formatText>|<*\>?formatText>]] \>.     ##<*expr: format>
 
 textOut::= [<dataPath?assign>] \> <textExpr>[ \<\.+\> 
   | \<\.n+\><?newline> | \<\.+n\><?newline> 
   | \<\.+n+flush\><?newline><?flush> | \<\.+flush\><?flush>
   | \<\.+n+close\><?close> | \<\.+close\><?close>].
 
 setColumn::=<numExpr> [ : <numExpr?minSpaces>] | : <numExpr?minSpaces>.
 
 
 
 forCtrl::= ( <$?forVariable> : <dataAccess?forContainer> [ && <condition> ])  \{ <statementBlock> \} .
 
 forInText::= <$?forVariable> : <dataAccess?forContainer> [ && <condition> ] \> <textExpr> \<\.for[ : <$?@checkForVariable> ]\>. 
 ##name is the name of the container element data reference
 
 ifCtrl::= <ifBlock> [{ elsif <ifBlock>  }][ else \{ [<statementBlock?elseBlock>] \} ].
 
 ifBlock::= ( <condition> ) \{ <statementBlock> \} .
 
 ifInText::= <ifBlockInText?ifBlock> [{ \<:elsif : <ifBlockInText?ifBlock>  }][ \<:else\> <textExpr?elseBlock> ] \<\.if\>.
 
 ifBlockInText::= <conditionInText?condition> \> <textExpr>.
 
 whileCtrl::= ( <condition> ) \{ [<statementBlock>] \} .
 
 dowhileCtrl::=  \{ [<statementBlock>] \} while ( <condition> ) ; .
 
 
 onerror::= [ <#?errorLevel> 
            | [<?errortype> notfound | cmd | file | internal | exit ]
            |]
            \{ [<statementBlock>] \}.
 
 
 callSubroutine::= [{ <dataPath?assign> [ = | += <?append>] }] call <textValue?callName> ( [{ <namedArgument?actualArgument> ? , }] ) ; .
 
 callSubtext::=<textValue?callName> [ : { <namedArgument?actualArgument> ? , }] \>.
 
 namedArgument::= <$?name> = <objExpr?>.
 
 
 zmake::= [ : <$-?name> :[?=] ] <textValue?zmakeOutput> := <textValue?callName> ( { <namedArgument?actualArgument> | <filesetAccess> ? ,} ).
 
 
 
 ## An accessPath is a Filepath, see prepFilepath::=, but analyzed on Java level. 
 filesetAccess::= [ 
                    <""?accessPath> | \<:\><textExpr>\<\.\> 
                  | [<?accessPathOrFilesetVariable> [&]<*\ \r\n,)&;?>] 
                  ] [ & <$?zmakeFilesetVariable>] . 
 
 
 cmdLineWait::=[{ <dataPath?assign> += }] cmd\  <cmdLine?>.
 
 cmdLine::= [\!argsCheck!<?argsCheck>] <textValue?> [{[?;[\ |\n|\r]] [ \<\:arg\><textExpr?actualArgument>\<\.arg\> | \<\:args:<dataAccess?argList>\> |<textValue?actualArgument>] }] 
   [ \<:stdout:[ pipe<?pipe>| [$]<$?stdoutVariable>] \>] ;.
 
 iferrorlevel::= <#?errorLevel> \{ [<statementBlock>] \}.
 
 
 
 assignExpr::= [{ <dataPath?assign> [ = | += <?append>] }] <objExpr?> ;.
 
 
 threadBlock::= Thread <dataPath?defThreadVar> = [thread] \{ <statementBlock> \} 
              | thread \{ <statementBlock> \}.
 

