Package eu.bandm.tools.formatfrontends
Class Tdom2format
java.lang.Object
eu.bandm.tools.tdom.runtime.BaseVisitor
eu.bandm.tools.formatfrontends.absy.Visitor
eu.bandm.tools.formatfrontends.GenericCompiler
eu.bandm.tools.formatfrontends.Tdom2format
- All Implemented Interfaces:
PCDataVisitor
Application to translate a
format description for elements of a tdom model into format generating code.
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected class
protected class
protected class
Nested classes/interfaces inherited from class eu.bandm.tools.formatfrontends.GenericCompiler
GenericCompiler.Subformat
-
Field Summary
Modifier and TypeFieldDescriptionprotected MetaPackage
(package private) String
protected Format
protected String
protected Format
protected final Format
static final int
protected final String
protected final String
protected final String
protected final String
protected final String
protected final Tdom2format.NameMangler
protected Tdom2format.TdomSubformat
protected Tdom2format.Switchselection
<!ELEMENT numberedref (ref, number?) >
static final ClassLoader
protected final int
protected final String
protected final String
protected final Map<String,
GeneratedMethod> final EnvironmentClass
final EnvironmentClass
protected EnvironmentClass
final EnvironmentClass
final EnvironmentClass
final EnvironmentClass
Fields inherited from class eu.bandm.tools.formatfrontends.GenericCompiler
callFunctionForRaisingException, checkedmode, constcache, exprCache, fresult, isdynamic, MODIF_CONST, NAME_CONST_FORMAT_EMPTY, NAME_METHOD_THROW_TAKE_ALTERNATIVE, NAME_VAR_DEFAULT_INDENT, NAME_VAR_FORMAT_RESULT, NAME_VAR_MODE, rec, REF_FORMAT_Format, REF_FORMAT_Formats, targetclass, WRAPPEDCLASS_CompoundConstructor, WRAPPEDCLASS_Format, WRAPPEDCLASS_Function, WRAPPEDCLASS_ListoidFormatter, WRAPPEDCLASS_Lists, WRAPPEDCLASS_MapEntry, WRAPPEDCLASS_MapoidFormatter, WRAPPEDCLASS_Object, WRAPPEDCLASS_TakeAlternativeException, WRAPPEDCLASS_TryerCatcher
Fields inherited from class eu.bandm.tools.tdom.runtime.BaseVisitor
validating
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncompile
(GeneratedPackage targetpackage, MetaClass basevisitor, String classname, eu.bandm.tools.formatfrontends.absy.Element_tdomRules rules) protected Format
protected Format
Currently only needed to compileescapeToJava()
in the variant operating directly on the model element.protected static eu.bandm.tools.formatfrontends.absy.Document_tdomRules
loadDocument
(Reader str, String filename, MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg) static void
needs :protected void
void
visit
(eu.bandm.tools.formatfrontends.absy.Element_cas el) MISSING FIXME check if numbers correspond to kind of selector (0/1 for elements!)void
visit
(eu.bandm.tools.formatfrontends.absy.Element_cases el) void
visit
(eu.bandm.tools.formatfrontends.absy.Element_child el) Compile code for a child reference.void
visit
(eu.bandm.tools.formatfrontends.absy.Element_clss el) void
visit
(eu.bandm.tools.formatfrontends.absy.Element_clssUPCASE el) void
visit
(eu.bandm.tools.formatfrontends.absy.Element_instanceTest el) void
visit
(eu.bandm.tools.formatfrontends.absy.Element_supr el) void
visit
(eu.bandm.tools.formatfrontends.absy.Element_swtch el) void
visit
(eu.bandm.tools.formatfrontends.absy.Element_t_pcdata element) void
visit
(eu.bandm.tools.formatfrontends.absy.Element_tdomRule el) Methods inherited from class eu.bandm.tools.formatfrontends.GenericCompiler
checkconst, compileCallToFormatText, compileModeSwitch, compileOnePattern, create_resultfield, error, expr, getMsgReceiver, initTransformerClass, process_compound, refer, setMsgReceiver, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, warning
Methods inherited from class eu.bandm.tools.formatfrontends.absy.Visitor
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
Methods inherited from class eu.bandm.tools.tdom.runtime.BaseVisitor
visit
-
Field Details
-
WRAPPEDCLASS_Arrays
-
WRAPPEDCLASS_String
-
WRAPPEDCLASS_List
-
WRAPPEDCLASS_ArrayList
-
WRAPPEDCLASS_Visitable
-
WRAPPEDCLASS_ListoidFormatter_Visitable
-
lineWidth
public static final int lineWidth -
targetClassLoader
-
FORMAT_fieldSelection
-
NAME_COMPILER_DEFAULT
- See Also:
-
VISIT_MODIF
protected final int VISIT_MODIF- See Also:
-
VISIT_NAME
- See Also:
-
VISIT_PARAMETER_NAME
- See Also:
-
NAME_METHOD_toFormat
- See Also:
-
NAME_METHOD_toFormat_throwing
- See Also:
-
NAME_METHOD_toFormat_array
- See Also:
-
wrappedclass_Element
-
absypackage
-
visitmethods
-
namemangler
-
currentModel
-
diag_rule
-
subformat
-
NAME_FUNCTION_ARGUMENT
- See Also:
-
FORMAT_FUNCTION_ARGUMENT
-
switchselection
<!ELEMENT numberedref (ref, number?) >
-
altnum
String altnum
-
-
Constructor Details
-
Tdom2format
-
-
Method Details
-
getCurrentModel
Description copied from class:GenericCompiler
Currently only needed to compileescapeToJava()
in the variant operating directly on the model element. Introduced 20170428.- Specified by:
getCurrentModel
in classGenericCompiler
-
FORMATTER_fieldSelection
-
compile
public GeneratedClass compile(GeneratedPackage targetpackage, MetaClass basevisitor, String classname, eu.bandm.tools.formatfrontends.absy.Element_tdomRules rules) -
ruleerror
-
visit
public void visit(eu.bandm.tools.formatfrontends.absy.Element_tdomRule el) - Overrides:
visit
in classeu.bandm.tools.formatfrontends.absy.Visitor
-
visit
public void visit(eu.bandm.tools.formatfrontends.absy.Element_instanceTest el) - Overrides:
visit
in classeu.bandm.tools.formatfrontends.absy.Visitor
-
visit
public void visit(eu.bandm.tools.formatfrontends.absy.Element_clss el) - Overrides:
visit
in classeu.bandm.tools.formatfrontends.absy.Visitor
-
visit
public void visit(eu.bandm.tools.formatfrontends.absy.Element_clssUPCASE el) - Overrides:
visit
in classeu.bandm.tools.formatfrontends.absy.Visitor
-
visit
public void visit(eu.bandm.tools.formatfrontends.absy.Element_supr el) - Overrides:
visit
in classeu.bandm.tools.formatfrontends.absy.Visitor
-
visit
public void visit(eu.bandm.tools.formatfrontends.absy.Element_t_pcdata element) - Overrides:
visit
in classeu.bandm.tools.formatfrontends.absy.Visitor
-
visit
public void visit(eu.bandm.tools.formatfrontends.absy.Element_child el) Compile code for a child reference. This can be- Tag (num defaults to one(1) )
- Tag+num
- Seq+num
- Choice+num
- Choice+num+Altindex
[..]
". --- Overrides:
visit
in classeu.bandm.tools.formatfrontends.absy.Visitor
-
visit
public void visit(eu.bandm.tools.formatfrontends.absy.Element_swtch el) - Overrides:
visit
in classeu.bandm.tools.formatfrontends.absy.Visitor
-
visit
public void visit(eu.bandm.tools.formatfrontends.absy.Element_cases el) - Overrides:
visit
in classeu.bandm.tools.formatfrontends.absy.Visitor
-
visit
public void visit(eu.bandm.tools.formatfrontends.absy.Element_cas el) MISSING FIXME check if numbers correspond to kind of selector (0/1 for elements!)- Overrides:
visit
in classeu.bandm.tools.formatfrontends.absy.Visitor
-
loadDocument
protected static eu.bandm.tools.formatfrontends.absy.Document_tdomRules loadDocument(Reader str, String filename, MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg) -
main
needs :0: root of source tree 1: package name 2: name of base visitor class 3: name of class to generate 4: indication of source type "dtd" or other string 5: source file uri --OR-- dtd uri with PIs "<?tdom2format nt=xxx. nt $C1 $A2 =yyy.>"
-