@@ -0,0 +1,2234 @@
+package compiler;%0A%0A%0A%0A/**%0A* Universidad Del Valle de Guatemala%0A* 04-ago-2015%0A* Pablo D%C3%ADaz 13203%0A*/%0A%0A%0A%0Aimport java.io.BufferedReader;%0Aimport java.io.BufferedWriter;%0Aimport java.io.File;%0Aimport java.io.FileReader;%0Aimport java.io.FileWriter;%0Aimport java.io.IOException;%0A%0A/**%0A *%0A * @author Pablo%0A */%0Apublic class FileCreator %7B%0A    %0A    public FileCreator()%7B%0A        %0A    %7D%0A    %0A    public void crearASM(String output)%7B%0A        try %7B%0A            %0A                %0A                //output += %22%5Cr%5Cn%22+%22%5Cr%5Cn%22+%22%5Cr%5Cn%22+leerArchivo();%0A                File file;%0A                File dummy = new File(%22%22);%0A                String path = dummy.getAbsolutePath();%0A                String nombreArchivo = %22CompileMe%22+%22.s%22;%0A               %0A                file = new File(nombreArchivo);%0A                // if FileCreator doesnt exists, then create it%0A               %0A                %0A               %0A                FileWriter fw = new FileWriter(path+%22/ASM/%22+nombreArchivo);%0A                BufferedWriter bw = new BufferedWriter(fw);%0A               %0A                bw.write(output+%22%5Cr%5Cn%22);%0A               %0A                bw.close();%0A%0A                System.out.println(%22Se ha creado el archivo %22 + nombreArchivo+%22 exitosamente%22);%0A%0A        %7D catch (IOException e) %7B%0A            e.printStackTrace();%0A        %7D%0A    %7D%0A     %0A%0A    private String leerArchivo()%7B%0A      %0A        int contador=0;%0A        int tama%C3%B1o=0;%0A        String input=%22 %22;%0A        BufferedReader br = null;%0A %0A        try %7B%0A%0A                String sCurrentLine;%0A                File file = new File(%22CompileMe.s%22);%0A                br = new BufferedReader(new FileReader(file.getAbsoluteFile()));%0A%0A               %0A               %0A               while ((sCurrentLine = br.readLine()) != null) %7B%0A                    %0A                    input+=sCurrentLine+%22%5Cr%5Cn%22;%0A                %0A                %7D%0A             %0A                %0A        input+=%22%5Cr%5Cn%22;%0A                %0A        return input;%0A        %7D catch (IOException e) %7B%0A               %0A        %7D finally %7B%0A                try %7B%0A                        if (br != null)br.close();%0A                %7D catch (IOException ex) %7B%0A                        ex.printStackTrace();%0A                %7D%0A        %7D%0A        return null;%0A        %0A    %7D%0A%0A%7D%0A

add file creator