MCPcopy Create free account
hub / github.com/I-Rinka/BIT-Compile-Principle / main

Method main

Lab8/src/bit/minisys/minicc/BITMiniCC.java:10–31  ·  view source on GitHub ↗

@param args @throws Exception

(String[] args)

Source from the content-addressed store, hash-verified

8 * @throws Exception
9 */
10 public static void main(String[] args) throws Exception
11 {
12 if (args.length < 1)
13 {
14 usage();
15 return;
16 }
17
18 String file = args[0];
19 // String file="parser_ultimate_test.c";
20 // String file="test\\parse_test\\0_example_test.c";
21 if (!file.endsWith(".c"))
22 {
23 System.out.println("Incorrect input file:" + file);
24 return;
25 }
26
27 MiniCCompiler cc = new MiniCCompiler();
28 System.out.println("Start to compile ...");
29 cc.run(file);
30 System.out.println("Compiling completed!");
31 }
32
33 public static void usage()
34 {

Callers 1

runMethod · 0.45

Calls 2

usageMethod · 0.95
runMethod · 0.95

Tested by

no test coverage detected