Class UMod2format.Compiler

java.lang.Object
eu.bandm.tools.tdom.runtime.BaseVisitor
eu.bandm.tools.formatfrontends.absy.Visitor
eu.bandm.tools.formatfrontends.GenericCompiler
eu.bandm.tools.umod.UMod2format.Compiler
All Implemented Interfaces:
PCDataVisitor
Enclosing class:
UMod2format

protected class UMod2format.Compiler extends GenericCompiler
  • 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
    • error

      protected void error(Locatable<XMLDocumentIdentifier> loc, String text)
    • warning

      protected void warning(Locatable<XMLDocumentIdentifier> loc, String text)
    • initTransformerClass

      public void initTransformerClass(GeneratedClass gc)
      A specialization of GenericCompiler.initTransformerClass(), because a local field must be accessed.
      Overrides:
      initTransformerClass in class GenericCompiler
    • compileOnePattern

      public void compileOnePattern(UMod.ClassDef cd, GeneratedMethod gm0, String code, String initialModel)
      Derived method which parses the format code of one class definition into a tdom, then sets the current model and its type, and finally calls the base method. The variables containing the current model and its type are required by the umod-specific oode generation routines.
    • parseHint

      protected eu.bandm.tools.formatfrontends.absy.Document_pattern parseHint(String hint, MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg)
    • tdomonly

      protected void tdomonly(eu.bandm.tools.formatfrontends.absy.Element el, String token)
    • visit

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

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

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

      public void visit(eu.bandm.tools.formatfrontends.absy.Element_instanceTest el)
      <!ELEMENT instanceTest (ref, ref?) >
      Overrides:
      visit in class eu.bandm.tools.formatfrontends.absy.Visitor
    • makeclassstring

      public void makeclassstring(Locatable<XMLDocumentIdentifier> loc, boolean upcase)
    • visit

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

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

      protected UMod.ClassDef getclassdef(UMod.T_reference t)
    • visit

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

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

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

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

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

      public void visit(eu.bandm.tools.formatfrontends.absy.Element_ref element)
      Only sets "subtypefound" to the type of the field and "submodelfound" to the Format of the field getter function. Is called from a sub-visitor or from a "$switch" context. Therefore it does not generate any code on its own. If we are in a code context for a Listoid, then "curtype" is set to the type of the listoids elements.
      Overrides:
      visit in class eu.bandm.tools.formatfrontends.absy.Visitor
    • visit

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

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

      public void visit(eu.bandm.tools.formatfrontends.absy.Element_supr element)
      Creates a call to the format converting routine defined for the superclass.
      Attention currently: must assume that format of some superclass (if any) has already been translated.
      Overrides:
      visit in class eu.bandm.tools.formatfrontends.absy.Visitor
    • visit

      public void visit(eu.bandm.tools.formatfrontends.absy.Element_child element)
      Overrides:
      visit in class eu.bandm.tools.formatfrontends.absy.Visitor