Interface MacroProcessorInterface

All Known Implementing Classes:
MacroProcessor

public interface MacroProcessorInterface
Interface for a Macro Processor that handles the processing of macros.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adds a line of unprocessed assembly to the processor.
    getLines(String[] args)
    Retrieves the processed lines of macro assembly code, substituting any macro arguments.
    void
    Sets the label for the current macro being processed.
  • Method Details

    • addLine

      void addLine(String line)
      Adds a line of unprocessed assembly to the processor.
      Parameters:
      line - the line of code to be added
    • setLabel

      void setLabel(String label)
      Sets the label for the current macro being processed.
      Parameters:
      label - the label to be set
    • getLines

      Queue<String> getLines(String[] args) throws InvalidAssemblyFileException
      Retrieves the processed lines of macro assembly code, substituting any macro arguments.
      Parameters:
      args - the arguments to be substituted in the macro
      Returns:
      a queue of processed lines of code
      Throws:
      InvalidAssemblyFileException - if the assembly file is invalid