public class Zbnf2Text extends Zbnf2Xml
JZtxtcmdScript
to describe the text generation and the JZtxtcmdExecuter
to generate the text.
The translator from the generate control script is parsed with JZtxtcmd
contained in this package.
The translation process is full script controlled. Therewith the user can define and change the translation
without study the complexly parsing and translation algorithm in Java, only adapt the maybe given scripts or writing
own scripts based on examples and the knowledge of the script syntax.
User Internal User input data --------> ZBNF parser --------> Java data -----> JZcmdExecuter ----> output data (textual) ^ image ^ usual textual ========== | | =============s ZBNF syntax JZcmdScript script ^ ========== | | JZcmd -------> JZcmd using generation ZBNF parser script ==========
Modifier and Type | Class and Description |
---|---|
static class |
Zbnf2Text.Args
This class holds the gotten arguments from command line.
|
static class |
Zbnf2Text.CmdLineText
The inner class CmdLineText helps to evaluate the command line arguments
and show help messages on command line.
|
static class |
Zbnf2Text.Out |
static interface |
Zbnf2Text.PreparerParsedData |
Zbnf2Xml.CmdLine, Zbnf2Xml.PrepareXmlNode
Modifier and Type | Field and Description |
---|---|
(package private) MainCmd_ifc |
console
Aggregation to the Console implementation class.
|
(package private) Zbnf2Text.PreparerParsedData |
setZbnfResult |
static java.lang.String |
sVersion
Version, history and license.
|
argsx, logmaincmd, parser
Constructor and Description |
---|
Zbnf2Text(Zbnf2Text.Args args,
MainCmd_ifc mainCmdLine) |
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] sArgs)
main started from java
|
boolean |
parseAndTranslate(Zbnf2Text.Args args,
java.lang.Object userData,
Zbnf2Text.PreparerParsedData preparerParsedData)
Executes the parsing and translation to the destination files
|
execute, parseAndWriteXml, smain, writeZbnf2Xml
public static final java.lang.String sVersion
main(String[])
#jbatch(String, org.vishia.cmd.JZtxtcmdExecuter.ExecuteLevel)
org.vishia.zmake.Zmake
generator, but that is special for make problems.
A generator which converts ZBNF-parsed data from an Java data context to output texts in several form, documenation, C-sources
was need.
final MainCmd_ifc console
Zbnf2Text.PreparerParsedData setZbnfResult
public Zbnf2Text(Zbnf2Text.Args args, MainCmd_ifc mainCmdLine)
public static void main(java.lang.String[] sArgs)
public boolean parseAndTranslate(Zbnf2Text.Args args, java.lang.Object userData, Zbnf2Text.PreparerParsedData preparerParsedData) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalAccessException, java.lang.InstantiationException, java.text.ParseException, XmlException
args
- Zbnf2Text command line calling arguments.userData
- If null then the xmlResultTree of ZbnfParser.getResultTree()
is used as data to produce the output texts.
If given then ZbnfJavaOutput
is used to set its content with the parsers result.
If this instance is instance of Runnable
then its run method will be execute after filling.preparerParsedData
- This is a callback which is called after generating the script variable
and before execution the script. The user can set additional script variables before execution
or can use script variables to get its content for any userData evaluation.java.io.IOException
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.lang.InstantiationException
java.text.ParseException
XmlException