readme - ZBNF

readme - ZBNF

Inhalt


Topic:.readme_ZBNF.

pStyle=std tableStyle=stdTable

.


1 Why ZBNF

Topic:.readme_ZBNF.whyZbnf.

pStyle=std tableStyle=stdTable

If you should have a XML script, but you won't edit it elaborately, write the intrinsic content in plain text and convert it!

At example to get complexly ANT-Scripts:


If you have plain formatted text, a.e. from another tool-output, and you will process it with XML-techniques, convert it:

At example a bill of material from older computer software:


Why ZBNF ?

If you will translate a programming language in another one or you will extract some informations from Source code, you can parse the source text with ZBNF and write a translation in Java programming or with XSLT techniques. Therefore you also can implement a translator for an own DSL (Domain Specific Language):

An example is generating Reflection Informations in C or C++ from Header files.

Another example is build a XMI file from Headers and import it to an UML Modell.

The last but not least is a technique to access to data in Java programms. But the structure of data is described in C-Sources (Headerfiles, struct). Therefore Java code is generated from Headerfiles, using ByteDataAccess.java.


2 The Source of this download, licence

Topic:.readme_ZBNF..

pStyle=std tableStyle=stdTable

This download comes from http://sourceforge.net/projects/zbnf, Home-Internetpage is http://www.vishia.org/ZBNF.

For licence see licence.html.


3 Feedback, collaboration

Topic:.readme_ZBNF..

pStyle=std tableStyle=stdTable

There are some possibilities to post questions, hints or improvements on the sourceforge project page.

But you can also write your suggestions of improvement to my private email: hartmut.schorrig@vishia.de.

If you detect some mistakes in the english presentation, and you are a native speaker of english language, please send me a corrected version. If it is only a few corrected sentences, it may be nice to have them too. To find out the source please send also a part of the given wrong text. I'm not a native speaker. I think, the technical american version of english language is proper to use.

If you want to use some of this download as input for your own project, it may be fine to inform me. You have to use the LPGL licence with or without information of me. If you want to use any parts of this download with another licence as LPGL, especially without publishing, you have to contact me.


4 Platforms to use

Topic:.readme_ZBNF..

pStyle=std tableStyle=stdTable

The whole content of this download, including the ZBNF-Parser and the zbnfjax is developed and substantially used under Windows. Than it is tested under Linux too.

All Java-programs are running without binary differences as well under Windows as under Linux. It should be run under a Macintosh- or any Unix-environment too. - But all command scripts are strong incompatible between Windows and the other systems. There are fine differences in the syntax, which prevent a commonly using of the scripts. Scripts (Windows-batch-files, Unix-bash-shell-scripts) are used to start the execution of the Java-programs. This start scripts are contained twice in the examples of the download and twice in the zbnfjax.


5 Content

Topic:.readme_ZBNF.content.

pStyle=std tableStyle=stdTable

This download contains the pure ZBNF-Definition and -Parser with sources and examples and the zbnfjax, which uses ZBNF, but SAXON, JDOM and ANT too, with some examples.


5.1 ZBNF-Definition

Topic:.readme_ZBNF.content..

pStyle=std tableStyle=stdTable

The Main description for ZBNF is provided in english language. This description defines the qualities of the ZBNF. The Definition of ZBNF may be used in other contexts as the here provided ZBNF-parser too. It should be recognized as a independently language definition.


5.2 ZBNF-Parser

Topic:.readme_ZBNF.content..

pStyle=std tableStyle=stdTable

The ZBNF-Parser is supplied as Executable (jar-File, Java Version 1.6 / 6 or higher is required) to transform any textual inputs to XML, and as Java-Sources to use in Java-applications, which may be postprocessing the parsers result. This solution is independent from other organisations and companies. Only a Java system should be present: The Java-Runtime-Environment (http://java.com/en/download/index.jsp) to run programs, which uses ZBNF, and the Java-development environment (http://www.java.sun.com) to compile Java-Programs.


5.3 ZBNF-Parser-Core-Examples

Topic:.readme_ZBNF.content..

pStyle=std tableStyle=stdTable

The core examples only use the ZBNF-Parser and additional Java-sources to demonstrate post-processing. This examples are present to explain and demonstrate, but also to test the parser. Older versions of the *.reference-Outputs may be compared with newer invocations to check the consistence respectively changes.


5.3.1 Simple Example: BillOfMaterial

Topic:.readme_ZBNF.content...

pStyle=std tableStyle=stdTable

The BillOfMaterial is a basicly example to explain ZBNF.


5.3.2 C-Header parsing

Topic:.readme_ZBNF.content...

pStyle=std tableStyle=stdTable

The CheaderParsing shows a complexly ZBNF-syntax scripts to parse Headerfiles from C-language. The same script is used for examples_ZBNF_core/Header2Reflection/readme.html and for examples_XML/Header2XMI/readme.html.


5.3.3 Java parsing

Topic:.readme_ZBNF.content...

pStyle=std tableStyle=stdTable

The JavaParsing shows another complexly ZBNF-syntax scripts to parse Java-Files. The same script is used for examples_XML/Java2XMI/readme.html and for Java2C.


5.3.4 Test all features

Topic:.readme_ZBNF.content...

pStyle=std tableStyle=stdTable

The testAllFeatures Contains some scripts, which should be test all features of ZBNF. A comparision with the reference-outputs can be done after changes in the sources of ZBNF or if environment conditions are modified.


5.3.5 Test encoding

Topic:.readme_ZBNF.content...

pStyle=std tableStyle=stdTable

The testEncodings shows how encoding works.


5.3.6 Vhdl-Script parsing and post processing

Topic:.readme_ZBNF.content...

pStyle=std tableStyle=stdTable

The VhdlScript is another application. The Java-src-example shows, how a VHDL-inputscript is parsed and translated to Headerfiles. The VHDL-script contains some constant definitions of ports for an FPGA-design and is used in development of FPGA. From this source data a header file is produced which contains the access informations to the FPGA in an address space of a microprocessor. It is typically for embedded control.


5.3.7 Header2Reflection

Topic:.readme_ZBNF.content...

pStyle=std tableStyle=stdTable

The Header2Reflection is a ready-to-use-executable contained in the zbnfjax-directory. This Translator reads Headerfiles from a C or C++ development and generates so named Reflection-C-files. The generated reflection files can be added to the users C/C++-Project to access data in a symbolic way. The user needs parts of the CRuntimeJavalike-C/C++-Sourcefiles additional to use this concept, see Jc-Reflection. This download doesn't contains this complex source base, it contains only the Translator header2Reflection.jar with its sources. That is because the translator is a pure ZBNF application too.


5.4 zbnfjax

Topic:.readme_ZBNF.content..

pStyle=std tableStyle=stdTable

The zbnfjax-Folder contains scripts and jars for the usage of ZBNF: The ZBNF-parser is settled mostly in a XML-environment. ZBNF translates text-files to XML, further processing is done using XSLT. The zbnfjax is a complexly ready to use folder for some applications such as Zmake and Documentation generation. The usage of the most tools needs SAXON as XSLT-Translator and JDOM as Java-source base for processing XML-Files. Both are not part of this download. The user, who want to use the XML-processing features should download this parts from its originally internet pages. See below.

All Examples in this download are able to use as test bench. For dayly working only the zbnfjax-Folder are needed. You may disposed this directory at a suitable.position in your file system. The file zbnfjax/batch_template/setZBNFJAX_HOME.bat should be copied in a directory, which is obtainable by the systems PATH. Its content is to be adapted to your system environment. The additional downloads from SAXON and JDOM are disposed at a adequate directory. It may be suitable to put this files in the zbnfjax-folder too.


5.4.1 What contains the zbnfjax-Folder ?

Topic:.readme_ZBNF.content...

pStyle=std tableStyle=stdTable


5.4.2 Which other tools and sources are needed ?

Topic:.readme_ZBNF.content...

pStyle=std tableStyle=stdTable


5.5 Examples using zbnfjax

Topic:.readme_ZBNF.content..

pStyle=std tableStyle=stdTable

The examples are present to explain and demonstrate the usage, but also to test the tool chain. Older versions of the *.reference-Outputs may be compared with newer invocations to check the consistence respectively changes.


5.5.1 vishia-XML-Documentation generation

Topic:.readme_ZBNF.content...

pStyle=std tableStyle=stdTable

The DocuGenerationViaXML is contained here completly. The scripts and jars are contained exclusively in the zbnfjax-Folder. The description is visible at www.vishia.org/XmlDocu in german language. The example is used to generate the documentation of this download inclusively this documentation. The Sources of all readme-files are given here as plain texts.


5.5.2 vishia-Zmake-System

Topic:.readme_ZBNF.content...

pStyle=std tableStyle=stdTable

The Zmake is contained here completly. The scripts and jars are contained exclusively in the zbnfjax-Folder. The description is visible at www.vishia.org/Zmake in german language.


5.5.3 ByteDataAccess in Java programs

Topic:.readme_ZBNF.content...

pStyle=std tableStyle=stdTable

The ByteDataAccessJava describes an Example to access byte data which are given in a structure in file described in C-language-header-files.ZBNF helps to generate Java-Sources, which are useful to access such data in byte[]-arrays in Java. The byte[]-arrays are contents (read from files, got from socket-communication data, write in files or translated with sockets). The script and batch-file to do the generation are contained in zbnfjax. This directory contains a example and the test base for the scripts. See also www.vishia.org/Java/indexByteDataAccess.html


5.5.4 Header to XMI/UML

Topic:.readme_ZBNF.content...

pStyle=std tableStyle=stdTable

The Header2XMI contains examples to generate an XMI-File for UML-Model-Oriented-Development. The script and batchfile to do the generation are contained in zbnfjax. This directory contains a example and the test base for the scripts.


5.5.5 Java to XMI/UML

Topic:.readme_ZBNF.content...

pStyle=std tableStyle=stdTable

The Java2XMI is the counterpart to generate an XMI-File for UML-Model-Oriented-Development from a Java base. The script and batchfile to do the generation are contained in zbnfjax. This directory contains all files to generate an UML-Model from the Java-Sources of ZBNF. A project in Rhapsody are included. To use this project, you need a Rhapsody software and licence. It is able to download (evluation licence) from http://www.ibm.com/developerworks/downloads/r/rhapsodydeveloper/learn.html


6 This version, differences to previous versions

Topic:.readme_ZBNF..

pStyle=std tableStyle=stdTable

The last version of ZBNF on sourceforge was published on april-04, 2008. Some more versions are published on the vishia_Downloadpage. But the software was used in professional. Some corrections were done, the software is stable. Therefore this version is designated as

 Version 1.0

ready to use.

The differences to the last publishing on sourceforge for one and a half years are:


6.1 Changes ZBNF Parser-core

Topic:.readme_ZBNF...

pStyle=std tableStyle=stdTable

The last version on sourceforge were the Version 0.8.

?semantic/subsemantic::="help text.".
 float a,b,c;
<type?-?> {<variableInstance?+variableDefinition>  ? , }

6.2 Changes zbnfjax

Topic:.readme_ZBNF...

pStyle=std tableStyle=stdTable

The directory tree zbnfjax was supplied in the past inside the enhanced examples/Xml_Toolbase. Now the folder zbnfjax is arranged in the main tree of ZBNF. The zbnfjax are now an official component of the ZBNF-download on sourceforge now. It means, all changes are reported and the performances are able to track, it isn't only an example.

The content of zbnfjax is supplied the first one with this conventions, therefore no change report is given yet, first one in the next revision.