#include <QtCore>
 
// Add the headers generated by Flex and Bison.
#include "lex.h"
#include "parse.h"
 
void build_token_map();

int main(int argc, char *argv[])
{
    //QCoreApplication app(argc, argv);
 
    // Let test the parser with this input.
    QString str("aad "
                "add "
                "\"'3'\": [3.14, 10, [7, 8], \"\\\"quoted string\\\"\"],"
                "'4': size(640, 480),"
                "'date': dateTime(date(2013, 2, 27), time(12, 0)),"
                "'number count': {'1': 1, '2': 2, '3': 3}}");
 
    build_token_map();
    // Bison take the standard input (command line) as input.
    // yy_scan_string will switch the input to a string.
    //YY_BUFFER_STATE bufferState = yy_scan_string(str.toUtf8().constData());
 
    // Parse the string.
    yyparse();
 
    // and release the buffer.
    //yy_delete_buffer(bufferState);
 
    return 0;
    //return app.exec();
}
