LARA

package toolc
 
object Main {
  def main(args: Array[String]) : Unit = {
 
    var parsedTree: Option[parser.Trees.Tree] = None
 
    if (args.length != 1 && args.length != 3) {
      Console.err.println("usage: toolc <File.tool> [-d outputdir]")
      System.exit(-1)
    }
 
    val compUnit = new Compiler(args(0))
    if(args.length == 1) {
      compUnit.compile("./")
    } else {
      if(!"-d".equals(args(1))) {
        Console.err.println("Unrecognized option: " + args(1))
        System.exit(-1)
      }
      compUnit.compile(args(2))
    }
  }
}