package app; import java.io.File; import org.eclipse.emf.ecore.resource.Resource; import resource.tools.xtools.EbnfResourceTool; public class Translator { public Translator(){ super(); } public static void main(String[] args) { if (args.length != 1) { System.out.println("Usage: Translator "); return; } Translator app = new Translator(); app.process(args[0],"bnf"); } public void process(String filename, String extension) { System.out.println("Processing: " + filename); if (!filename.endsWith(extension)) { System.out.println("Selected file is not supported!"); return; } switch (extension) { case "bnf": EbnfResourceTool tool = new EbnfResourceTool(); tool.processFile(new File(filename)); break; default: break; } } }