#include "number.h" #include "packedintarray.h" #include "lexer.h" #include "token.h" #include "parser.h" #include "options.h" #include #include #include #include using namespace Bu; #define mathTestP( sc, anum, op, bnum, answ ) \ Bu::println(">>%1<<").arg((Number(anum, sc) op Number(bnum, sc)).toString()) int main( int argc, char *argv[] ) { try { mathTestP( 5, "63.6", /, "504", "0.12619" ); mathTestP( 5, "63.61", /, "504", "0.12621" ); mathTestP( 7, "63.610123", /, "5041", "0.12621" ); mathTestP( 7, "63.610123", /, "50412", "0.12621" ); // return 0; Options opt( argc, argv ); println("CliC - 0.08"); println("Try \\exit, \\help, \\scale, and \\radix commands."); println(""); Lexer lex( sioRaw ); lex.setScale( opt.getScale() ); lex.setRadix( opt.getRadix() ); Parser parser( lex, sioRaw ); parser.parse(); } catch( std::exception &e ) { Bu::println("Error: %1").arg( e.what() ); } return 0; }