/*6:*/
#line 132 "./testdriver.w"

/*3:*/
#line 36 "./testdriver.w"

#include "globals.h"
#include "yacco2_stbl.h"
using namespace yacco2_stbl;
#include "test_components.h"
#include "o2_externs.h"

/*:3*//*4:*/
#line 44 "./testdriver.w"

int RECURSION_INDEX__(0);

YACCO2_define_trace_variables();
yacco2::TOKEN_GAGGLE P3_tokens;
yacco2::TOKEN_GAGGLE Error_queue;
yacco2::TOKEN_GAGGLE tc_recycle_bin;
T_sym_tbl_report_card report_card;
std::string tc_file_to_compile;
STBL_T_ITEMS_type STBL_T_ITEMS;

yacco2::CHAR T_SW('n');
yacco2::CHAR ERR_SW('n');
yacco2::CHAR PRT_SW('n');
STATES_type LR1_STATES;
LR1_STATES_type LR1_COMMON_STATES;
bool LR1_HEALTH(LR1_COMPATIBLE);
int NO_LR1_STATES(0);
STATES_SET_type VISITED_MERGE_STATES_IN_LA_CALC;
CYCLIC_USE_TBL_type CYCLIC_USE_TABLE;


/*:4*//*5:*/
#line 67 "./testdriver.w"

int main(int argc,char*argv[]){
cout<<"Testdriver start"<<endl;
yacco2::lrclog<<"Testdriver start"<<endl;

LOAD_YACCO2_KEYWORDS_INTO_STBL();

GET_CMD_LINE(argc,argv,Yacco2_holding_file,Error_queue);
if(Error_queue.empty()!=true){
DUMP_ERROR_QUEUE(Error_queue);
return-1;
}
YACCO2_PARSE_CMD_LINE
(T_SW,ERR_SW,PRT_SW,tc_file_to_compile,Error_queue);

if(Error_queue.empty()!=true){
DUMP_ERROR_QUEUE(Error_queue);
return-1;
}
tok_can<std::ifstream> cmd_line(tc_file_to_compile.c_str());
if(cmd_line.file_ok()==NO){
cout<<"Error occurred file does not exist: "<<tc_file_to_compile.c_str()<<endl;
return 1;
}


yacco2::YACCO2_AR__= 1;

using namespace NS_test_components;
Ctest_components tc_fsm;
Parser tc(tc_fsm,&cmd_line,&P3_tokens,0,&Error_queue,&tc_recycle_bin,0);
tc.parse();

yacco2::TOKEN_GAGGLE::iterator i= P3_tokens.begin();
yacco2::TOKEN_GAGGLE::iterator ie= P3_tokens.end();
cout<<"Dump of P3 tokons"<<endl;
for(int yyy= 1;i!=ie;++i){
CAbs_lr1_sym*sym= *i;
if(sym==yacco2::PTR_LR1_eog__)continue;
cout<<yyy<<":: "<<sym->id()
<<" file no: "<<sym->external_file_id()
<<" line no: "<<sym->line_no()
<<" pos: "<<sym->pos_in_line()
<<endl;
yacco2::lrclog<<yyy<<":: "<<sym->id()
<<" file no: "<<sym->external_file_id()
<<" line no: "<<sym->line_no()
<<" pos: "<<sym->pos_in_line()
<<endl;
++yyy;
}
if(Error_queue.empty()!=true){
DUMP_ERROR_QUEUE(Error_queue);
cout<<"Testdriver exit"<<endl;
yacco2::lrclog<<"Testdriver exit"<<endl;
return-1;
}

exit:
cout<<"Testdriver exit"<<endl;
yacco2::lrclog<<"Testdriver exit"<<endl;
return 0;
}
/*:5*/
#line 133 "./testdriver.w"
;

/*:6*/
