- gcode.close();
- } catch (Exception e) {
- e.printStackTrace();
- System.exit(-1);
- }
-
- if (state.debug) {
- System.out.println("Compilation of " + state.infile + " successful.");
- System.out.println("#SUCCESS#");
- }
- } else if (cli.target == CLI.INTER) {
- if (state.debug) {
- System.out.println("Semantic analysis for " + cli.infile + ".");
- }
-
- success = scan(state) || error(state, "Scanning failed, not attempting to parse.");
- success = parse(state) || error(state, "Parsing failed, not attempting semantic analysis.");
- success = semantics(state) || error(state, "Semantic analysis failed.");
-
- if (state.debug) {
- System.out.println("Semantic analysis of " + state.infile + " successful.");
- System.out.println("#SUCCESS#");
- }
- } else if (cli.target == CLI.PARSE) {
- if (state.debug) {
- System.out.println("Parsing " + cli.infile + ".");
- }
-
- success = scan(state) || error(state, "Scanning failed, not attempting to parse.");
- success = parse(state) || error(state, "Parsing failed.");
-
- if (state.debug) {
- System.out.println("Parsing of " + state.infile + " successful.");
- System.out.println("#SUCCESS#");
- }
- } else if (cli.target == CLI.SCAN) {
- if (state.debug) {
- System.out.println("Scanning " + cli.infile + ".");
- }
-
- success = scan(state) || error(state, "Scanning failed.");
-
- if (state.debug) {
- System.out.println("Scanning of " + state.infile + " successful.");
- System.out.println("#SUCCESS#");
- }
- }