|
- #include "sequencer.h"
-
-
- int main(int argc, char* argv[]) try {
- snel::Sequencer s{};
- std::string line;
-
- if (argc > 1) { // batch mode
- std::ifstream file(argv[1]);
-
- while (std::getline (file, line, '\n')) {
- s.parse(line).execute();
- }
- }
- else { // interactive mode
- std::cout << "Snel. A quick and dirty shell implementation for auth.gr" << std::endl;
- do {
- std::cout << "Choutouridis_8997>";
- std::getline (std::cin, line, '\n');
- if (line == "quit")
- break;
- s.parse(line).execute();
- } while (1);
- }
- return 0;
-
- }
- catch (std::exception& e) {
- std::cerr << e.what() << '\n';
- exit(1);
- }
|