Class Translator


  • public class Translator
    extends java.lang.Object
    A translator from the input file in the domain specific language (processor specification) to two output files (instruction decoder and disassembler) in the Java language.
    • Constructor Summary

      Constructors 
      Constructor Description
      Translator​(java.util.Map<Setting,​java.lang.String> settings)
      Constructs the translator.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void translate()
      Reads the input file, transforms the tree and generates the code.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Translator

        public Translator​(java.util.Map<Setting,​java.lang.String> settings)
        Constructs the translator.
        Parameters:
        settings - the settings obtained e.g. from the command line
    • Method Detail

      • translate

        public void translate()
                       throws java.io.IOException,
                              net.emustudio.edigen.parser.ParseException,
                              SemanticException
        Reads the input file, transforms the tree and generates the code.
        Throws:
        java.io.IOException - when the file can not be read / written
        net.emustudio.edigen.parser.ParseException - when the input file can not be parsed
        SemanticException - when there is a semantic error in the input file