public static class Java2C_Main.CmdlineArgs extends java.lang.Object
Constructor and Description |
---|
Java2C_Main.CmdlineArgs() |
Modifier and Type | Method and Description |
---|---|
boolean |
checkArguments() |
void |
setConfigFile(java.lang.String s)
Sets the file given with cmd line argument
-if:CFGFILE . |
void |
setPathOut(java.lang.String path) |
void |
setPathOutHeader(java.lang.String path) |
void |
setPathOutJavaXml(java.lang.String path) |
void |
setPathOutStcFiles(java.lang.String path) |
void |
setSyntaxPath(java.lang.String path) |
public Java2C_Main.CmdlineArgs()
public void setConfigFile(java.lang.String s)
-if:CFGFILE
.
The syntax of the config file is described in ZBNF with:
"input::={ " + " stcPath :The elements are:;" + " | srcPath : ; " + " | replace : ; " + " | translate : <\*\s;?srcToTranslate> ;" + "} \\e. " + "packageReplacement::=<* ;=?inputpath> =: <* ;*(?cfile_prefix> [*<* ;?cfile_suffix>] " + " [ ( <* ;*)?cname_prefix>[*<* ;)?cname_suffix>])]." + "stcPath::=>{ <\"\"?stcPath>| <\*\s:,;?stcPath> ? : | , }." //write path with spaces or : or ; in quotion. + "srcPath::=>{ <\"\"?srcPath>| <\*\s:,;?srcPath> ? : | , }."
stcPath |
Path where stc-files are located. A path may be absolute or relative from the current directory.
A stc-File may located in the addressed directory, and than in that sub-dir,
where the package replacement of the appropriate java file is located.
If a stc-file is searched, it may be contained in any of this paths. The first location
in the order of paths in the configFile are used, independent of the content of other concurrently existent stc-files. This entry can be written in the config file more as one time. Any entry can contain more as one path like represented in the syntax. |
srcPath |
Path where Java source-files are located. A path may be absolute or relative from the current directory.
A Java-File may located in the addressed directory, and than in the package sub-dir,
If a Java-file is searched, it may be contained in any of this paths.The first location
in the order of paths in the configFile are used, independent of the content of other concurrently existent java-files. This entry can be written in the config file more as one time. Any entry can contain more as one path like represented in the syntax. |
packageReplacement |
Rule how a package structure is mapped to a C-, Header- and stc-file-structure and the names in C. |
packageReplacement .inputpath |
java package/file-path written adequate like import -statement.
Either with .* on end or .javaFile on end, than without extension .java .
In opposite to the import -statement it is possible too
to use / or \ as separator between directories of the path and the /javaFile .
|
packageReplacement .cfile_prefix |
directory and/or prefix for file names at C-side, written with / as separators.
at example c_dir/pre if the file should stored in the output sub-dir c_dir
and all filenames should start with pre .
|
packageReplacement .cfile_suffix |
suffix for file names at C-side. If the option isn't use, it means no * is written,
than the packageReplacement.cfile_prefix is the whole file name. Normally the C-filename
is built with prefix, the Java-file-name and the suffix.
|
packageReplacement .cname_prefix |
prefix for class identifier at C-side. If this option isn't use, the file-prefix is used as name-prefix. |
packageReplacement .cname_suffix |
suffix for names at C-side. If the option isn't use, it means no * is written,
than the packageReplacement.cname_prefix is the whole name of the class at C-side.
Normally the class-name is built with prefix, the Java-class-name and the suffix. The class-name
is the name of the struct containing the data and the suffix of all C-routines
and other identifier associated to the Java-class.
If the whole option (prefix*suffix) isn't use, the file-prefix and suffix are used instead.
That should be the standard usage, because the files and classes should built normally with the same pre-
and suffixes, see examples.
|
srcToTranslate |
The sources to translate have to be named in its package tree, not with the full path. The here named sources will be translated, if the Java-files are newer against the c-, header and stc-files. Java-files, which are not named here, won't be translated. If their type-informations are necessary, the appropriate stc-file is red, independent of the timestamp of the Java file in comparision with the C-file. This is, because a translated version of the Java-file may be contained in a used C-library, the stc-file is matching to the library more closed as to the Java-File. |
stcPath: ../../CRuntimeJavalike, "../../CRuntimeJavalike/J1c" , "../../CRuntimeJavalike/stc"; srcPath: ../../srcJava,../../srcJava.zbnf,../positionControl/srcJava; replace: java.lang.Exception =: Fwc/fw_Exception; replace: java.lang.* =: Jc/*Jc; replace: java.util.* =: Jc/*Jc; replace: org.vishia/bridgeC.* =: Jc/*Jc; replace: org/vishia/byteData/* =: Jc/*Jc; replace: org/vishia/mainCmd/* =: Jc/*Jc; replace: org.vishia.util/* =: J1c/*Jc; replace: org/vishia/java2C/test/* =: *_Test; replace: org/vishia/java2C/test/ImplIfc =: Java2cTest/ImplTest (Test_IfcImpl); replace: org/vishia/exampleJava2C/emulationEnv/* =: PositionCtrl/test/*_PosCtrl; replace: org/vishia/exampleJava2C/java4c/* =: PositionCtrl/*_PosCtrl; #import: iRequireMainController =: testenv; translate: org/vishia/java2C/test/*.java; translate: org/vishia/util/StringPart.java
public void setPathOut(java.lang.String path)
public void setPathOutHeader(java.lang.String path)
public void setPathOutStcFiles(java.lang.String path)
public void setPathOutJavaXml(java.lang.String path)
public void setSyntaxPath(java.lang.String path)
public boolean checkArguments()