-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
51 lines (38 loc) · 787 Bytes
/
Copy pathmain.js
File metadata and controls
51 lines (38 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
"use strict";
// @ts-check
const Parser = require("./Parser");
const TB = require("./TableauxMethod");
class Main
{
constructor()
{
}
static async run()
{
const strFileName = process.argv[2] || "input.txt";
const parser = new Parser(strFileName);
await parser.processFile();
parser.printAllFormulas();
const tb = new TB(parser.parsedFormulas);
tb.applyMethod();
tb.printResults();
}
}
process.on(
"unhandledRejection",
(reason, promise) => {
console.log("-> unhandledRejection");
console.log(`Promise: ${promise}, Reason: ${reason.stack}`);
process.exit(1);
}
);
process.on(
"uncaughtException",
(error) => {
console.log("uncaughtException");
console.error(error);
process.exit(1);
}
)
Main.run()
.catch(err => console.log(err));