#include "Parser.h"
#include "ParserIdDef.h"
#include "Scanner.h"
#include <iostream>
#include <sstream>
int main()
{
std::string line;
while (std::getline(std::cin, line))
{
if (line.empty())
break;
std::ostringstream err_out;
C_Parser parser{err_out};
C_Scanner scanner{screener};
if (const auto err_str = err_out.str(); !err_str.empty())
{
std::cerr <<err_str <<"Fail to parse!\n";
continue;
}
if (!parser.accepted())
{
std::cerr <<"Incomplete expression!\n";
continue;
}
std::cerr <<"= " <<ans <<" = 0x" <<std::hex <<ans <<" = 0" <<std::oct <<ans <<std::dec <<'\n';
}
std::cerr <<"Mission complete!\n";
}
auto & unlex(I_LexAttr &lex)
void scanFile(std::string_view filename, std::istream &in, I_Scanner< T_Char > &scanner, T_LexID endToken=TID_EOF, T_Encoding encoding=0)