Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(String[] args) throws IOException {
- // Opens a file of the users choice, the code to be
- // translated, and stores it in the bufferedReader "code"
- BufferedReader code = sim.openFileReaderUsingChooser();
- // Finds the file ReplacerList.txt that should be stored
- // in this package and stores it in a bufferedReader "replacerdict"
- // This is the full set of words and phrases, and their conversions
- BufferedReader replacerDict = null;
- try {
- replacerDict = new BufferedReader(new FileReader("/Users/Jake/Documents/workspace/CodeTranslator/src/ReplacerList.txt"));
- } catch (IOException e) {
- System.out.print("File is missing. Make sure you have a ReplacerList.txt");
- }
- if (replacerDict != null) dict = readReplacerFile(replacerDict);
- else System.out.print("\nCould not run replacerDict with a null reader.");
- // printReplacerDict();
- code.mark(100000);
- translateCode(code, false);
- code.reset();
- translateCode(code, true);
- }
Advertisement
Add Comment
Please, Sign In to add comment