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

public class Tdom2format extends GenericCompiler
Application to translate a format description for elements of a tdom model into format generating code.
  • Field Details

  • Constructor Details

  • Method Details

    • getCurrentModel

      protected Format getCurrentModel()
      Description copied from class: GenericCompiler
      Currently only needed to compile escapeToJava() in the variant operating directly on the model element. Introduced 20170428.
      Specified by:
      getCurrentModel in class GenericCompiler
    • FORMATTER_fieldSelection

      protected Format FORMATTER_fieldSelection(Format f, String s)
    • compile

      public GeneratedClass compile(GeneratedPackage targetpackage, MetaClass basevisitor, String classname, eu.bandm.tools.formatfrontends.absy.Element_tdomRules rules)
    • ruleerror

      protected void ruleerror(Location<XMLDocumentIdentifier> l, String s)
    • visit

      public void visit(eu.bandm.tools.formatfrontends.absy.Element_tdomRule el)
      Overrides:
      visit in class eu.bandm.tools.formatfrontends.absy.Visitor
    • visit

      public void visit(eu.bandm.tools.formatfrontends.absy.Element_instanceTest el)
      Overrides:
      visit in class eu.bandm.tools.formatfrontends.absy.Visitor
    • visit

      public void visit(eu.bandm.tools.formatfrontends.absy.Element_clss el)
      Overrides:
      visit in class eu.bandm.tools.formatfrontends.absy.Visitor
    • visit

      public void visit(eu.bandm.tools.formatfrontends.absy.Element_clssUPCASE el)
      Overrides:
      visit in class eu.bandm.tools.formatfrontends.absy.Visitor
    • visit

      public void visit(eu.bandm.tools.formatfrontends.absy.Element_supr el)
      Overrides:
      visit in class eu.bandm.tools.formatfrontends.absy.Visitor
    • visit

      public void visit(eu.bandm.tools.formatfrontends.absy.Element_t_pcdata element)
      Overrides:
      visit in class eu.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
      All these references are declared to be to a "plural" subobject by appending a list or fold designator "[..]". --
      Overrides:
      visit in class eu.bandm.tools.formatfrontends.absy.Visitor
    • visit

      public void visit(eu.bandm.tools.formatfrontends.absy.Element_swtch el)
      Overrides:
      visit in class eu.bandm.tools.formatfrontends.absy.Visitor
    • visit

      public void visit(eu.bandm.tools.formatfrontends.absy.Element_cases el)
      Overrides:
      visit in class eu.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 class eu.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

      public static void main(String[] args)
      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.>"