-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
69 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
#include "semantics.h" | ||
|
||
#include <fstream> | ||
#include <locale> | ||
#include <boost/program_options.hpp> | ||
namespace args = boost::program_options; | ||
|
||
|
@@ -59,6 +60,14 @@ int main(int argc, char** argv) | |
{ | ||
try | ||
{ | ||
std::ios_base::sync_with_stdio(0); | ||
std::locale loc{}; | ||
std::locale::global(loc); | ||
//std::cout << "Locale: " << loc.name() << "." << std::endl; | ||
|
||
std::cout << "Matrix expression compiler version 0.2" | ||
<< " by Tobias Weber <[email protected]>, 2020." << std::endl; | ||
|
||
// llvm toolchain | ||
std::string tool_opt = "opt"; | ||
std::string tool_bc = "llvm-as"; | ||
|
@@ -85,8 +94,8 @@ int main(int argc, char** argv) | |
("out,o", args::value(&outprog), "compiled program output") | ||
("optimise,O", args::bool_switch(&optimise), "optimise program") | ||
("interpret,i", args::bool_switch(&interpret), "directly run program in interpreter") | ||
("symbols,s", args::bool_switch(&show_symbols), "print symbol table") | ||
("ast,a", args::bool_switch(&show_ast), "print syntax tree") | ||
("symbols,s", args::bool_switch(&show_symbols), "output symbol table") | ||
("ast,a", args::bool_switch(&show_ast), "output syntax tree") | ||
("program", args::value<decltype(vecProgs)>(&vecProgs), "input program to compile"); | ||
|
||
args::positional_options_description posarg_descr; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters