#include "Parser.h"
#include "Scanner.h"
#include <iostream>
int main()
{
std::string line;
while (std::getline(std::cin, line))
{
C_Parser parser;
C_Scanner scanner{parser};
try
{
}
catch (const std::exception &e)
{
std::cerr <<
HRTN(e) <<
": " <<e.what() <<
"\n"
"Fail to parse!\n";
continue;
}
if (parser.accepted())
break;
std::cerr <<"Incomplete expression!\n";
}
std::cerr <<"Mission complete!\n";
}
void scanFile(std::string_view filename, std::istream &in, I_Scanner< T_Char > &scanner, T_LexID endToken=TID_EOF, T_Encoding encoding=0)