Class ReadAssemblerFile

java.lang.Object
com.jugubell.bproccli.files.ReadAssemblerFile

public class ReadAssemblerFile extends Object
Class for the assembler file reading.
Author:
Jugurtha Bellagh
  • Constructor Details

    • ReadAssemblerFile

      public ReadAssemblerFile(String filePath)
      Constructor for the ReadAssemblerFile class.
      Parameters:
      filePath - path of the file to read as String
  • Method Details

    • readFile

      public boolean readFile()
      Method for reading the file, the extension should be '.bpasm' Writes the file content into fileData Uses trimFile() to trim the file content.
      Returns:
      boolean true if read success
    • getFilePath

      public String getFilePath()
    • getTrimmedData

      public List<String> getTrimmedData()
    • setFilePath

      public void setFilePath(String filePath)
    • trimFile

      public void trimFile()
      Trims the file content and store the trimmed content and stores the trimmed data in trimmedData. It removes comments (starting with ';') It removes extra spaces. Uppercases everything.