/*7:*/
//line 87 "/usr/local/yacco2/externals/common_externs.w"

/*6:*/
//line 84 "/usr/local/yacco2/externals/common_externs.w"

#include "common_externs.h"
/*:6*/
//line 88 "/usr/local/yacco2/externals/common_externs.w"

/*8:*/
//line 93 "/usr/local/yacco2/externals/common_externs.w"



/*:8*//*10:*/
//line 116 "/usr/local/yacco2/externals/common_externs.w"

extern
void GET_CMD_LINE
(int argc,char*argv[],const char*Holding,yacco2::TOKEN_GAGGLE&Errors)
{
using namespace std;
using namespace NS_yacco2_err_symbols;
using namespace yacco2;
ofstream ofile;
ofile.open(Holding,ios_base::out|ios::trunc);
if(!ofile){
CAbs_lr1_sym*sym= new Err_bad_filename(Holding);
sym->set_external_file_id(1);
sym->set_line_no(1);
sym->set_pos_in_line(1);
Errors.push_back(*sym);
return;
}
if(argc==1){
char cmd_line[Max_buf_size];
cout<<"Please enter Command line to process: ";
cin.get(cmd_line,Max_buf_size,'\n');
ofile<<cmd_line;
ofile.close();
return;
}
for(int x= 1;x<argc;++x){
ofile<<argv[x]<<' ';
}
ofile.close();
return;
}

/*:10*//*11:*/
//line 167 "/usr/local/yacco2/externals/common_externs.w"

extern
void
DUMP_ERROR_QUEUE(yacco2::TOKEN_GAGGLE&Errors)
{
using namespace NS_yacco2_k_symbols;
using namespace yacco2;
Errors.push_back(*yacco2::PTR_LR1_eog__);
Errors.push_back(*yacco2::PTR_LR1_eog__);
using namespace NS_o2_err_hdlr;
Co2_err_hdlr fsm;
Parser pass_errors(fsm,&Errors,0);
pass_errors.parse();
yacco2::Parallel_threads_shutdown(pass_errors);

}

/*:11*//*12:*/
//line 185 "/usr/local/yacco2/externals/common_externs.w"

extern const char*DATE_AND_TIME(){
static std::string dt;
if(dt.empty()){
time_t theTime= time(0);
char*cTime= ctime(&theTime);
dt+= cTime;
int n= dt.find('\n');
dt[n]= ' ';
}
return dt.c_str();
}

/*:12*//*13:*/
//line 199 "/usr/local/yacco2/externals/common_externs.w"

extern
void
XLATE_SYMBOLS_FOR_cweave(const char*Sym_to_xlate,char*Xlated_sym){
Xlated_sym[0]= (char)0;
int lll= strlen(Sym_to_xlate);
int app_ptr= 0;
for(int x= 0;x<lll;++x,--app_ptr){
switch(Sym_to_xlate[x]){
case'{':{
int sz= sizeof("\\BRACEOPEN{}");
strncpy(&Xlated_sym[app_ptr],"\\BRACEOPEN{}",sz);
app_ptr+= sz;
continue;
}
case'}':{
int sz= sizeof("\\BRACECLOSE{}");
strncpy(&Xlated_sym[app_ptr],"\\BRACECLOSE{}",sz);
app_ptr+= sz;
continue;
}
case'<':{
int sz= sizeof("\\LTsign{}");
strncpy(&Xlated_sym[app_ptr],"\\LTsign{}",sz);
app_ptr+= sz;
continue;
}
case'>':{
int sz= sizeof("\\GTsign{}");
strncpy(&Xlated_sym[app_ptr],"\\GTsign{}",sz);
app_ptr+= sz;
continue;
}
case'@':{
int sz= sizeof("\\ATsign{}");
strncpy(&Xlated_sym[app_ptr],"\\ATsign{}",sz);
app_ptr+= sz;
continue;
}
case'|':{
if(x+2<lll){
if(Sym_to_xlate[x+2]!='|'){
int sz= sizeof("\\Verticalbar ");
strncpy(&Xlated_sym[app_ptr],"\\Verticalbar ",sz);
app_ptr+= sz;
continue;
}
}else{
int sz= sizeof("\\Verticalbar ");
strncpy(&Xlated_sym[app_ptr],"\\Verticalbar ",sz);
app_ptr+= sz;
continue;
}
switch(Sym_to_xlate[x+1]){
case'+':{
int sz= sizeof("\\ALLshift{}");
strncpy(&Xlated_sym[app_ptr],"\\ALLshift{}",sz);
app_ptr+= sz;
x+= 2;
continue;
}
case'.':{
int sz= sizeof("\\INVshift{}");
strncpy(&Xlated_sym[app_ptr],"\\INVshift{}",sz);
app_ptr+= sz;
x+= 2;
continue;
}
case'?':{
int sz= sizeof("\\QUEshift{}");
strncpy(&Xlated_sym[app_ptr],"\\QUEshift{}",sz);
app_ptr+= sz;
x+= 2;
continue;
}
case'|':{
int sz= sizeof("\\PARshift{}");
strncpy(&Xlated_sym[app_ptr],"\\PARshift{}",sz);
app_ptr+= sz;
x+= 2;
continue;
}
case'r':{
int sz= sizeof("\\REDshift{}");
strncpy(&Xlated_sym[app_ptr],"\\REDshift{}",sz);
app_ptr+= sz;
x+= 2;
continue;
}
case'p':{
int sz= sizeof("\\PROCshift{}");
strncpy(&Xlated_sym[app_ptr],"\\PROCshift{}",sz);
app_ptr+= sz;
x+= 2;
continue;
}
case't':{
int sz= sizeof("\\TRAshift{}");
strncpy(&Xlated_sym[app_ptr],"\\TRAshift{}",sz);
app_ptr+= sz;
x+= 2;
continue;
}
default:{
int sz= sizeof("\\Verticalbar{}");
strncpy(&Xlated_sym[app_ptr],"\\Verticalbar{}",sz);
app_ptr+= sz;
continue;
}
}
}
case'+':{
int sz= sizeof("+");
strncpy(&Xlated_sym[app_ptr],"+",sz);
app_ptr+= sz;
continue;
}
case'-':{
int sz= sizeof("-");
strncpy(&Xlated_sym[app_ptr],"-",sz);
app_ptr+= sz;
continue;
}
case'*':{
int sz= sizeof("\\ASTERICsign{}");
strncpy(&Xlated_sym[app_ptr],"\\ASTERICsign{}",sz);
app_ptr+= sz;
continue;
}
case'#':{
int sz= sizeof("\\NOsign ");
strncpy(&Xlated_sym[app_ptr],"\\NOsign ",sz);
app_ptr+= sz;
continue;
}
case'&':{
int sz= sizeof("\\AMPERsign{}");
strncpy(&Xlated_sym[app_ptr],"\\AMPERsign{}",sz);
app_ptr+= sz;
continue;
}
case'%':{
int sz= sizeof("\\PERCENTsign{}");
strncpy(&Xlated_sym[app_ptr],"\\PERCENTsign{}",sz);
app_ptr+= sz;
continue;
}
case'$':{
int sz= sizeof("\\DOLLARsign{}");
strncpy(&Xlated_sym[app_ptr],"\\DOLLARsign{}",sz);
app_ptr+= sz;
continue;
}
case'\\':{
if(lll==1){
int sz= sizeof("\\BKSLASHsign{}");
strncpy(&Xlated_sym[app_ptr],"\\BKSLASHsign{}",sz);
app_ptr+= sz;
continue;
}
switch(Sym_to_xlate[x+1]){
case'\\':{
if(lll==2){
int sz= sizeof("\\BKSLASHsign{}");
strncpy(&Xlated_sym[app_ptr],"\\BKSLASHsign{}",sz);
app_ptr+= sz;
++x;
continue;
}
int sz= sizeof("\\");
strcat(Xlated_sym,"\\");
app_ptr+= sz;
++x;
continue;
}
case'"':{
int sz= sizeof("\\DBLQUOTEsign{}");
strncpy(&Xlated_sym[app_ptr],"\\DBLQUOTEsign{}",sz);
app_ptr+= sz;
++x;
continue;
}
case'\'':{
int sz= sizeof("\\RTQUOTEsign{}");
strncpy(&Xlated_sym[app_ptr],"\\RTQUOTEsign{}",sz);
app_ptr+= sz;
++x;
continue;
}
case'n':{
int sz= sizeof("\n");
strncpy(&Xlated_sym[app_ptr],"\n",sz);
app_ptr+= sz;
++x;
continue;
}
case't':{
int sz= sizeof("\t");
strncpy(&Xlated_sym[app_ptr],"\t",sz);
app_ptr+= sz;
++x;
continue;
}
case'r':{
int sz= sizeof("\r");
strncpy(&Xlated_sym[app_ptr],"\r",sz);
app_ptr+= sz;
++x;
continue;
}
case'v':{
int sz= sizeof("\v");
strncpy(&Xlated_sym[app_ptr],"\v",sz);
app_ptr+= sz;
++x;
continue;
}
case'b':{
int sz= sizeof("\b");
strncpy(&Xlated_sym[app_ptr],"\b",sz);
app_ptr+= sz;
++x;
continue;
}
case'f':{
int sz= sizeof("\f");
strncpy(&Xlated_sym[app_ptr],"\f",sz);
app_ptr+= sz;
++x;
continue;
}
case'a':{
int sz= sizeof("\a");
strncpy(&Xlated_sym[app_ptr],"\a",sz);
app_ptr+= sz;
++x;
continue;
}
case'?':{
int sz= sizeof("\?");
strncpy(&Xlated_sym[app_ptr],"\?",sz);
app_ptr+= sz;
++x;
continue;
}
default:{
int sz= sizeof("\\");
strncpy(&Xlated_sym[app_ptr],"\\",sz);
app_ptr+= sz-1;
strncpy(&Xlated_sym[app_ptr],&Sym_to_xlate[x+1],1);
++app_ptr;
strncpy(&Xlated_sym[app_ptr],"",1);
++x;
++app_ptr;
continue;
}
}
}
case'^':{
int sz= sizeof("\\UPARROWsign{}");
strncpy(&Xlated_sym[app_ptr],"\\UPARROWsign{}",sz);
app_ptr+= sz;
continue;
}
case'~':{
int sz= sizeof("\\TILDE{}");
strncpy(&Xlated_sym[app_ptr],"\\TILDE{}",sz);
app_ptr+= sz;
continue;
}
case'_':{
int sz= sizeof("\\_");
strncpy(&Xlated_sym[app_ptr],"\\_",sz);
app_ptr+= sz;
continue;
}
default:{
strncpy(&Xlated_sym[app_ptr],&Sym_to_xlate[x],1);
++app_ptr;
strncpy(&Xlated_sym[app_ptr],"",1);
++app_ptr;
continue;
}
}
}
}

/*:13*/
//line 89 "/usr/local/yacco2/externals/common_externs.w"



/*:7*/