2015-06-03 19:51:42 +09:00
|
|
|
import std.stdio;
|
2015-06-07 14:06:00 +09:00
|
|
|
import std.utf;
|
|
|
|
|
import std.conv;
|
|
|
|
|
import std.file;
|
2015-06-03 20:59:47 +09:00
|
|
|
import otya.smilebasic.parser;
|
2015-06-07 16:38:53 +09:00
|
|
|
import otya.smilebasic.error;
|
2015-07-06 23:09:15 +09:00
|
|
|
import otya.smilebasic.petitcomputer;
|
2016-09-02 22:04:28 +09:00
|
|
|
import std.getopt;
|
|
|
|
|
|
2015-06-03 19:51:42 +09:00
|
|
|
int main(string[] argv)
|
|
|
|
|
{
|
2016-09-02 22:04:28 +09:00
|
|
|
bool nodirectmode;
|
|
|
|
|
string inputfile;
|
|
|
|
|
auto helpInformation = getopt(argv, "no-direct-mode", &nodirectmode, "file", &inputfile);
|
2015-08-23 14:44:01 +09:00
|
|
|
//try
|
2015-07-07 22:21:01 +09:00
|
|
|
{
|
|
|
|
|
auto pc = new PetitComputer();
|
2016-09-02 22:04:28 +09:00
|
|
|
pc.run(nodirectmode, inputfile);
|
2015-07-07 22:21:01 +09:00
|
|
|
}
|
2015-08-23 14:44:01 +09:00
|
|
|
/*(Throwable t)
|
2015-07-07 22:21:01 +09:00
|
|
|
{
|
|
|
|
|
writeln(std.windows.charset.toMBSz(t.to!string).to!string);
|
|
|
|
|
readln();
|
2015-08-23 14:44:01 +09:00
|
|
|
}*/
|
2015-06-03 19:51:42 +09:00
|
|
|
return 0;
|
|
|
|
|
}
|