diff --git a/apps/plasp-app/main.cpp b/apps/plasp-app/main.cpp index fdebffa..6576d4e 100644 --- a/apps/plasp-app/main.cpp +++ b/apps/plasp-app/main.cpp @@ -57,16 +57,12 @@ int main(int argc, char **argv) return EXIT_SUCCESS; } - if (!variablesMap.count("input")) - { - std::cerr << "Error: No input file specified" << std::endl << std::endl; - printHelp(); - return EXIT_FAILURE; - } - try { - const auto sasDescription = plasp::sas::Description::fromFile(variablesMap["input"].as()); + const auto sasDescription = variablesMap.count("input") + ? plasp::sas::Description::fromFile(variablesMap["input"].as()) + : plasp::sas::Description::fromStream(std::cin); + const auto sasTranslator = plasp::sas::TranslatorASP(sasDescription); sasTranslator.translate(std::cout); }