-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.cpp
27 lines (22 loc) · 823 Bytes
/
main.cpp
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
#include "server.hpp"
int main(int argc, char** argv) {
pomagma::Log::Context log_context(argc, argv);
if (argc != 4) {
std::cout << "Usage: " << boost::filesystem::basename(argv[0])
<< " structure language address"
<< "\n"
<< "Environment Variables:\n"
<< " POMAGMA_LOG_FILE = " << pomagma::DEFAULT_LOG_FILE
<< "\n"
<< " POMAGMA_LOG_LEVEL = " << pomagma::DEFAULT_LOG_LEVEL
<< "\n";
POMAGMA_WARN("incorrect program args");
exit(1);
}
const char* structure_file = argv[1];
const char* language_file = argv[2];
const char* address = argv[3];
pomagma::Server server(structure_file, language_file);
server.serve(address);
return 0;
}