F diff --git a/backend/js/transpile_to_js.c b/backend/js/transpile_to_js.c new file mode 100644 --- /dev/null +++ b/backend/js/transpile_to_js.c+ #ifndef GCC_TRANSPILE_TO_JS_C+ #define GCC_TRANSPILE_TO_JS_C GCC_TRANSPILE_TO_JS_C+ #include <transpile_to_js.h>+++ void transpile_to_javascript(FILE* out,struct Program *program,struct Command_Arguments *command_arguments)+ {+ struct Queue_Node *it;++ if(command_arguments->insert_html)+ {+ fprintf(out,"<DOCTYPE! html> <html> <head> <title>asdf</title> <script>");+ }+ to_js_print_externs(out,program,command_arguments);++ for(it=program->translation_units->first;it!=NULL;it=it->prev)+ {+ fprintf(out,"{");+ to_js_print_statics(out,(struct AST_Translation_Unit*)it->data,command_arguments);+ fprintf(out,"\n");+ to_js_print_translation_unit_tree(out,(struct AST_Translation_Unit*)it->data,program);+ fprintf(out,"\n}\n");+ }++ if(command_arguments->insert_html)+ {+ fprintf(out,"</script> </head> <body> </body> </html>");+ }++ }++ void _to_js_print_externs(void *denoted,void *args)+ {+ #define ARGS(x) ((struct Command_Arguments*)x)+ #define DENOTED(x) ((struct Denoted*)x)+ #define DFUNC(x) ((struct Denoted_Function*)x)+ #define DOBJ(x) ((struct Denoted_Object*)x)+ if(DENOTED(denoted)->denotation==DT_Function)+ {+ if(DFUNC(denoted)->body==NULL)+ {+ fprintf(ARGS(args)->output_file,"/*UNDEFINED*/");+ }+ fprintf(ARGS(args)->output_file,"var ");+ print_token(ARGS(args)->output_file,DFUNC(denoted)->id);+ fprintf(ARGS(args)->output_file,";");+ fprintf(ARGS(args)->output_file,"\n");++ }else if(DENOTED(denoted)->denotation==DT_Object)+ {+ fprintf(ARGS(args)->output_file,"var ");+ print_token(ARGS(args)->output_file,DFUNC(denoted)->id);+ fprintf(ARGS(args)->output_file,";\n");+ }++ #undef DOBJ+ #undef DFUNC+ #undef ARGS+ #undef DENOTED+ }+ void _to_js_print_statics(void *denoted,void *args)+ {+ #define ARGS(x) ((struct Command_Arguments*)x)+ #define DENOTED(x) ((struct Denoted*)x)+ #define DFUNC(x) ((struct Denoted_Function*)x)+ #define DOBJ(x) ((struct Denoted_Object*)x)+ if(DENOTED(denoted)->denotation==DT_Function)+ {+ if(DFUNC(denoted)->body==NULL)+ {+ fprintf(ARGS(args)->output_file,"/*UNDEFINED*/");+ }+ fprintf(ARGS(args)->output_file,"let ");+ print_token(ARGS(args)->output_file,DFUNC(denoted)->id);+ fprintf(ARGS(args)->output_file,";");+ fprintf(ARGS(args)->output_file,"\n");++ }else if(DENOTED(denoted)->denotation==DT_Object)+ {+ fprintf(ARGS(args)->output_file,"let ");+ print_token(ARGS(args)->output_file,DFUNC(denoted)->id);+ fprintf(ARGS(args)->output_file,";");+ }++ #undef DOBJ+ #undef DFUNC+ #undef ARGS+ #undef DENOTED+ }+ void to_js_print_externs(FILE* out,struct Program *program,struct Command_Arguments *command_arguments)+ {+ fprintf(out,"\n/*EXTERNS START*/\n");+ Map_Map_Extended(+ &program->external_linkage->ids+ ,_to_js_print_externs+ ,command_arguments);+ fprintf(out,"\n/*EXTERNS END*/\n");+ }++ void to_js_print_statics(FILE* out,struct AST_Translation_Unit *translation_unit,struct Command_Arguments* command_arguments)+ {++ Map_Map_Extended(+ &((struct Normal_Scope*)translation_unit->file_scope)->ordinary+ ,_to_js_print_statics+ ,command_arguments);+ }+ void to_js_print_ast(FILE* out,struct AST *tree,struct Program *program)+ {+ if(tree==NULL)+ {+ return ;+ }+ switch(tree->type)+ {+ case OP_MEMBER_TROUGH_PTR:+ case OP_MEMBER:+ case OP_BITWISE_AND:+ case OP_BITWISE_XOR:+ case OP_BITWISE_NOT:+ case OP_LOGICAL_AND:+ case OP_LOGICAL_OR:+ case OP_XOR_ASSIGN:+ case OP_PIPE_ASSIGN:+ case OP_SHIFT_RIGHT_ASSIGN:+ case OP_ADD_ASSIGN:+ case OP_SUBTRACT_ASSIGN:+ case OP_MULTIPLY_ASSIGN:+ case OP_REMAINDER_ASSIGN:+ case OP_DIV_ASSIGN:+ case OP_SUBTRACTION:+ case OP_MUL:+ case OP_DIV:+ case OP_REMAINDER:+ case OP_EQUAL:+ case OP_LESS:+ case OP_LESS_EQ:+ case OP_SHIFT_LEFT:+ case OP_BITWISE_OR:+ case OP_AND_ASSIGN:+ case OP_ARR_SUBSCRIPT:+ case OP_SHIFT_LEFT_ASSIGN:+ case OP_ASSIGN:+ case OP_ADDITION:+ case OP_COMMA:+ case OP_SHIFT_RIGHT:+ case OP_GREATER_EQ:+ case OP_GREATER:+ case OP_NOT_EQUAL:+ to_js_print_binary_expression_tree(out,(struct AST_Binary_Expression*)tree,program);+ break;+ case OP_COND:+ to_js_print_conditional_expression_tree(out,(struct AST_Conditional_Expression*)tree,program);+ break;+ case OP_FUNCTION:+ to_js_print_function_expression_tree(out,(struct AST_Function_Expression*)tree,program);+ break;+ case OP_LOGICAL_NOT:+ case OP_UNARY_MINUS:+ case OP_SIZEOF:+ case OP_ADDR_OF:+ case OP_DEREFERENCE:+ case OP_POSTFIX_INC:+ case OP_PREFIX_INC:+ case OP_UNARY_PLUS:+ case OP_POSTFIX_DEC:+ case OP_PREFIX_DEC:+ case OP_CAST:+ to_js_print_unary_expression_tree(out,(struct AST_Unary_Expression*)tree,program);+ break;+ case OP_LVALUE:+ to_js_print_lvalue_expression_tree(out,(struct AST_Lvalue_Expression*)tree,program);+ break;+ case OP_NOP:+ fprintf(out,"NOP");+ break;++ case ST_SWITCH:+ to_js_print_switch_statement_tree(out,(struct AST_Switch_Statement*)tree,program);+ break;+ case ST_IF:+ to_js_print_if_statement_tree(out,(struct AST_If_Statement*)tree,program);+ break;+ case ST_WHILE:+ to_js_print_while_statement_tree(out,(struct AST_While_Statement*)tree,program);+ break;+ case ST_DO_WHILE:+ to_js_print_do_while_statement_tree(out,(struct AST_Do_While_Statement*)tree,program);+ break;+ case ST_GOTO:+ to_js_print_goto_statement_tree(out,(struct AST_Goto_Statement*)tree,program);+ break;+ case ST_DEFAULT:+ case ST_LABEL:+ case ST_CASE:+ to_js_print_labeled_statement_tree(out,(struct AST_Labeled_Statement*)tree,program);+ break;+ case ST_CONTINUE:+ fprintf(out,"continue");+ break;+ case ST_BREAK:+ fprintf(out,"break");+ break;+ case ST_RETURN:+ to_js_print_return_statement_tree(out,(struct AST_Return_Statement*)tree,program);+ break;+ case ST_FOR:+ to_js_print_for_statement_tree(out,(struct AST_For_Statement*)tree,program);+ break;+ case ST_COMPOUND:+ to_js_print_compound_statement_tree(out,(struct AST_Compound_Statement*)tree,program);+ break;+ case ST_OBJECT_DECLARATION:+ to_js_print_object_declaration_tree(out,((struct AST_Object_Declaration*)tree),program);+ if(((struct AST_Object_Declaration*)tree)->object->initializer!=NULL)+ {+ fprintf(out,"=");+ to_js_print_ast(out,((struct AST_Object_Declaration*)tree)->object->initializer,program);+ }+ break;+ case ST_FUNCTION_DECLARATION:+ to_js_print_function_declaration_tree(out,((struct AST_Function_Declaration*)tree),program);+ break;+ case ST_FUNCTION_DEFINITION:+ to_js_print_function_definition(out,((struct AST_Function_Definition*)tree),program);+ break;+ case TRANSLATION_UNIT:+ to_js_print_translation_unit_tree(out,(struct AST_Translation_Unit*)tree,program);+ break;+ case ERROR:+ default:+ /*TODO error*/+ return;+ }+ }+ void to_js_print_translation_unit_tree(FILE* out,struct AST_Translation_Unit *translation_unit,struct Program *program)+ {+ struct Queue_Node *it;+ struct AST* hold;+ for(it=translation_unit->components.first;it!=NULL;it=it->prev)+ {+ hold=(struct AST*)(it->data);+ to_js_print_ast(out,hold,program);++ fprintf(out,";\n");+ }+ }+ void to_js_print_binary_expression_tree(FILE* out,struct AST_Binary_Expression *bin,struct Program *program)+ {+ if(bin->type==OP_ARR_SUBSCRIPT)+ {+ to_js_print_ast(out,bin->left,program);+ fprintf(out,"[");+ to_js_print_ast(out,bin->right,program);+ fprintf(out,"]");+ }else+ {+ fprintf(out,"(");+ to_js_print_ast(out,bin->left,program);+ print_ast_enum(out,bin->type);+ to_js_print_ast(out,bin->right,program);+ fprintf(out,")");+ }+ }++ void to_js_print_conditional_expression_tree(FILE* out,struct AST_Conditional_Expression *cond,struct Program *program)+ {+ fprintf(out,"(");+ to_js_print_ast(out,cond->left,program);+ fprintf(out,"?");+ to_js_print_ast(out,cond->center,program);+ fprintf(out,":");+ to_js_print_ast(out,cond->right,program);+ fprintf(out,")");+ }+ void to_js_print_function_expression_tree(FILE* out,struct AST_Function_Expression *function_call,struct Program *program)+ {+ struct Queue_Node *it;+ to_js_print_ast(out,function_call->id,program);+ fprintf(out,"(");+ if(function_call->arguments.size>0)+ {+ fprintf(out,"\n");+ for(it=function_call->arguments.first;it!=function_call->arguments.last;it=it->prev)+ {+ to_js_print_ast(out,(struct AST*)(it->data),program);+ fprintf(out,",\n");+ }+ if(it!=NULL)+ {+ to_js_print_ast(out,(struct AST*)(it->data),program);+ }++ }+ fprintf(out,")");+ }+ void to_js_print_lvalue_expression_tree(FILE* out,struct AST_Lvalue_Expression *lval,struct Program *program)+ {+ print_denoted(out,lval->lvalue);+ }+ void to_js_print_unary_expression_tree(FILE* out,struct AST_Unary_Expression *unary,struct Program *program)+ {+ print_ast_enum(out,unary->type);+ to_js_print_ast(out,unary->operand,program);+ }+ void to_js_print_labeled_statement_tree(FILE* out,struct AST_Labeled_Statement *label,struct Program *program)+ {+ if(label->type!=ST_LABEL)+ print_ast_enum(out,label->type);+ if(label->label!=NULL)+ {+ fprintf(out,"case");+ print_token(out,label->label);+ }+ fprintf(out,":\n");+ to_js_print_ast(out,label->statement,program);+ }+ void to_js_print_compound_statement_tree(FILE* out,struct AST_Compound_Statement *compound,struct Program *program)+ {+ struct Queue_Node *it;+ fprintf(out,"{");+ for(it=compound->components.first;it!=NULL;it=it->prev)+ {+ fprintf(out,"\n");+ to_js_print_ast(out,(struct AST*)it->data,program);+ fprintf(out,";");+ }+ fprintf(out,"\n}");+ }+ void to_js_print_for_statement_tree(FILE* out,struct AST_For_Statement *for_statement,struct Program *program)+ {+ fprintf(out,"for(\n");+ if(for_statement->initialisation!=NULL)+ to_js_print_ast(out,for_statement->initialisation,program);+ fprintf(out,";\n");+ if(for_statement->condition!=NULL)+ to_js_print_ast(out,for_statement->condition,program);+ fprintf(out,";\n");+ if(for_statement->update!=NULL)+ to_js_print_ast(out,for_statement->update,program);+ fprintf(out,")\n");+ print_ast(out,for_statement->body_statement);+ }+ void to_js_print_while_statement_tree(FILE* out,struct AST_While_Statement *while_statement,struct Program *program)+ {+ fprintf(out,"while(");+ to_js_print_ast(out,while_statement->condition,program);+ fprintf(out,")\n");+ to_js_print_ast(out,while_statement->body_statement,program);+ }+ void to_js_print_do_while_statement_tree(FILE* out,struct AST_Do_While_Statement *do_while_statement,struct Program *program)+ {+ fprintf(out,"do\n");+ to_js_print_ast(out,do_while_statement->body_statement,program);+ fprintf(out,"while(");+ to_js_print_ast(out,do_while_statement->condition,program);+ fprintf(out,")\n");+ }+ void to_js_print_if_statement_tree(FILE* out,struct AST_If_Statement *if_statement,struct Program *program)+ {+ fprintf(out,"if(");+ to_js_print_ast(out,if_statement->condition,program);+ fprintf(out,")\n");+ to_js_print_ast(out,if_statement->body_statement,program);++ if(if_statement->else_statement!=NULL)+ {+ fprintf(out,"\nelse");+ to_js_print_ast(out,if_statement->else_statement,program);+ }+ }+ void to_js_print_goto_statement_tree(FILE* out,struct AST_Goto_Statement *goto_statement,struct Program *program)+ {+ /*TODO something here, be it error or not*/+ }+ void to_js_print_switch_statement_tree(FILE* out,struct AST_Switch_Statement *switch_statement,struct Program *program)+ {+ fprintf(out,"switch(");+ to_js_print_ast(out,switch_statement->condition,program);+ fprintf(out,")\n");+ to_js_print_ast(out,switch_statement->body_statement,program);+ }+ void to_js_print_return_statement_tree(FILE* out,struct AST_Return_Statement *return_statement,struct Program *program)+ {+ fprintf(out,"return ");+ to_js_print_ast(out,return_statement->return_expression,program);+ }+ void to_js_print_object_declaration_tree(FILE* out,struct AST_Object_Declaration *object_declaration,struct Program *program)+ {+ if(object_declaration->object->object->storage_class!=SCS_EXTERN)+ {+ fprintf(out,"let ");+ print_token(out,object_declaration->object->id);+ }++ }+ void to_js_print_function_definition(FILE* out,struct AST_Function_Definition *function_definition,struct Program *program)+ {+ size_t i;+ struct Type_Function *cache_type;++ cache_type=(struct Type_Function*)function_definition->function->type;++ if((struct Type_Function*)function_definition->function->linkage==LINKAGE_EXTERNAL)+ {+ // fprintf(out,"var ");+ print_token(out,function_definition->function->id);+ fprintf(out,"= function");+ }else+ {+ fprintf(out,"function ");+ print_token(out,function_definition->function->id);+ }++ /*print parameters*/+ fprintf(out,"(");+ if(cache_type->number_of_arguments!=0)+ {+ print_token(out,cache_type->arguments[0]->id);+ for(i=1;i<cache_type->number_of_arguments;++i)+ {+ fprintf(out,",");+ print_token(out,cache_type->arguments[i]->id);+ }+ }++ fprintf(out,")");++ /*print body*/+ to_js_print_compound_statement_tree(out,function_definition->function->body,program);+++ }+ void to_js_print_function_declaration_tree(FILE* out,struct AST_Function_Declaration *function_declaration,struct Program *program)+ {+ /*TODO probably leave it empty*/+ }++++ #endifF diff --git a/backend/js/transpile_to_js.h b/backend/js/transpile_to_js.h new file mode 100644 --- /dev/null +++ b/backend/js/transpile_to_js.h+ #ifndef GCC_TRANSPILE_TO_JS_H+ #define GCC_TRANSPILE_TO_JS_H GCC_TRANSPILE_TO_JS_H+ #include <program.h>+ #include <gcc_arguments.h>+ #include <stdio.h>+ #include <print.h>+++ void transpile_to_javascript(FILE* out,struct Program *program,struct Command_Arguments *command_arguments);++ void _to_js_print_externs(void *denoted,void *args);+ void to_js_print_externs(FILE* out,struct Program *program,struct Command_Arguments *command_arguments);++ void _to_js_print_statics(void *denoted,void *args);+ void to_js_print_statics(FILE* out,struct AST_Translation_Unit *translation_unit,struct Command_Arguments* command_arguments);++ void to_js_print_ast(FILE* out,struct AST *tree,struct Program *program);+ void to_js_print_translation_unit_tree(FILE* out,struct AST_Translation_Unit *translation_unit,struct Program *program);+ void to_js_print_binary_expression_tree(FILE* out,struct AST_Binary_Expression *bin,struct Program *program);+ void to_js_print_conditional_expression_tree(FILE* out,struct AST_Conditional_Expression *cond,struct Program *program);+ void to_js_print_function_expression_tree(FILE* out,struct AST_Function_Expression *function_call,struct Program *program);+ void to_js_print_lvalue_expression_tree(FILE* out,struct AST_Lvalue_Expression *lval,struct Program *program);+ void to_js_print_unary_expression_tree(FILE* out,struct AST_Unary_Expression *unary,struct Program *program);+ void to_js_print_labeled_statement_tree(FILE* out,struct AST_Labeled_Statement *label,struct Program *program);+ void to_js_print_compound_statement_tree(FILE* out,struct AST_Compound_Statement *compound,struct Program *program);+ void to_js_print_for_statement_tree(FILE* out,struct AST_For_Statement *for_statement,struct Program *program);+ void to_js_print_while_statement_tree(FILE* out,struct AST_While_Statement *while_statement,struct Program *program);+ void to_js_print_do_while_statement_tree(FILE* out,struct AST_Do_While_Statement *do_while_statement,struct Program *program);+ void to_js_print_if_statement_tree(FILE* out,struct AST_If_Statement *if_statement,struct Program *program);+ void to_js_print_goto_statement_tree(FILE* out,struct AST_Goto_Statement *goto_statement,struct Program *program);+ void to_js_print_switch_statement_tree(FILE* out,struct AST_Switch_Statement *switch_statement,struct Program *program);+ void to_js_print_return_statement_tree(FILE* out,struct AST_Return_Statement *return_statement,struct Program *program);+ void to_js_print_object_declaration_tree(FILE* out,struct AST_Object_Declaration *object_declaration,struct Program *program);+ void to_js_print_function_definition(FILE* out,struct AST_Function_Definition *function_definition,struct Program *program);+ void to_js_print_function_declaration_tree(FILE* out,struct AST_Function_Declaration *function_declaration,struct Program *program);+ void to_js_print_denoted(FILE* out,struct Denoted* denoted,struct Program *program);++++ #endifF diff --git a/backend/print/print.c b/backend/print/print.c new file mode 100644 --- /dev/null +++ b/backend/print/print.c+ #ifndef GCC_PRINT+ #define GCC_PRINT GCC_PRINT+ #include "print.h"+++++ int indent=0;++ void print_token(FILE *out,struct token *token)+ {+ size_t i;+ // fprintf(out,"[");+ if(token==NULL)return;+ for(i=0;i<token->data_size;++i)+ {+ fprintf(out,"%c",token->data[i]);+ }+ // fprintf(out,"]");+ }++ char print_tokens_of_program(FILE *out,char **base_source_names)+ {++ struct Source_File *base_file;+ struct Translation_Data *hold_translation_data;+ char *this_directory[]={"./",NULL};+ char ret;++ assert(base_source_names!=NULL);++ if(*base_source_names==NULL)+ {+ return 0;+ }+ ret=0;++ hold_translation_data=get_translation_data(NULL,get_linkage(),get_linkage());+ do+ {+ base_file=get_source_file(*base_source_names,this_directory);++ if(base_file==NULL)+ {+ /*TODO error*/+ continue;+ }else+ {+ lex(base_file,hold_translation_data);+ if(hold_translation_data->errors->size>0)+ {+ ret=1;+ /*if we are here then the is_quiet flag has not been set*/+ print_errors(out,hold_translation_data->errors);+ delete_source_file(base_file);+ break;+ }+ fprintf(out,"\nTOKENS OF %s {\n",base_file->src_name->filename);+ print_tokens(out,hold_translation_data->tokens);+ fprintf(out,"\n} END OF TOKENS\n");+++ }+ }while(*(++base_source_names));++ /*TODO fix memory leak*/+ free(hold_translation_data);+++ return ret;+ }+ void print_tokens(FILE *out,struct Queue *tokens)+ {+ struct Queue_Node *it;+ for( it=tokens->first; it!=NULL; it=it->prev)+ {+ fprintf(out,"[");+ print_keyword_enum(out,((struct token*)(it->data))->type);+ print_token(out,(struct token*)(it->data));+ fprintf(out,"] ");+ }+ }++ void print_ast_enum(FILE *out,enum AST_Type op)+ {+ switch(op)+ {+ case OP_COMMA:+ fprintf(out,",");break;+ case OP_ADDITION:+ fprintf(out,"+");break;+ case OP_SUBTRACTION:+ fprintf(out,"-");break;+ case OP_MUL:+ fprintf(out,"*");break;+ case OP_DIV:+ fprintf(out,"/");break;+ case OP_REMAINDER:+ fprintf(out,"%");break;+ case OP_COND:+ fprintf(out,"CONDITIONAL");break;+ case OP_FUNCTION:+ fprintf(out,"FUNCTION_CALL");break;+ case OP_ASSIGN:+ fprintf(out,"=");break;+ case OP_ADD_ASSIGN:+ fprintf(out,"+=");break;+ case OP_SUBTRACT_ASSIGN:+ fprintf(out,"-=");break;+ case OP_MULTIPLY_ASSIGN:+ fprintf(out,"*=");break;+ case OP_REMAINDER_ASSIGN:+ fprintf(out,"%=");break;+ case OP_DIV_ASSIGN:+ fprintf(out,"/=");break;+ case OP_SHIFT_LEFT_ASSIGN:+ fprintf(out,">>=");break;+ case OP_SHIFT_RIGHT_ASSIGN:+ fprintf(out,"<<=");break;+ case OP_AND_ASSIGN:+ fprintf(out,"&=");break;+ case OP_XOR_ASSIGN:+ fprintf(out,"^=");break;+ case OP_PIPE_ASSIGN:+ fprintf(out,"|=");break;+ case OP_NOP:+ fprintf(out,"NOP");break;+ case OP_LOGICAL_OR:+ fprintf(out,"||");break;+ case OP_LOGICAL_AND:+ fprintf(out,"&&");break;+ case OP_LOGICAL_NOT:+ fprintf(out,"!");break;+ case OP_BITWISE_OR:+ fprintf(out,"|");break;+ case OP_BITWISE_AND:+ fprintf(out,"&");break;+ case OP_BITWISE_XOR:+ fprintf(out,"^");break;+ case OP_BITWISE_NOT:+ fprintf(out,"~");break;+ case OP_ADDR_OF:+ fprintf(out,"&");break;+ case OP_DEREFERENCE:+ fprintf(out,"*");break;+ case OP_MEMBER_TROUGH_PTR:+ fprintf(out,"->");break;+ case OP_MEMBER:+ fprintf(out,".");break;+ case OP_ARR_SUBSCRIPT:+ fprintf(out,"ARR_SUBSCRIPT");break;+ case OP_POSTFIX_INC:+ fprintf(out,"++");break;+ case OP_POSTFIX_DEC:+ fprintf(out,"--");break;+ case OP_PREFIX_INC:+ fprintf(out,"++");break;+ case OP_PREFIX_DEC:+ fprintf(out,"--");break;+ case OP_UNARY_PLUS:+ fprintf(out,"+");break;+ case OP_UNARY_MINUS:+ fprintf(out,"-");break;+ case OP_CAST:+ fprintf(out,"CAST");break;+ case OP_SIZEOF:+ fprintf(out,"sizeof");break;+ case OP_SHIFT_LEFT:+ fprintf(out,"<<");break;+ case OP_SHIFT_RIGHT:+ fprintf(out,">>");break;+ case OP_LESS_EQ:+ fprintf(out,"<=");break;+ case OP_GREATER_EQ:+ fprintf(out,">=");break;+ case OP_LESS:+ fprintf(out,"<");break;+ case OP_GREATER:+ fprintf(out,">");break;+ case OP_EQUAL:+ fprintf(out,"==");break;+ case OP_NOT_EQUAL:+ fprintf(out,"!=");break;+ case OP_LVALUE:+ fprintf(out,"LVALUE");break;+ case OP_CONSTANT:+ fprintf(out,"CONSTANT");break;+ case OP_STRING_LITERAL:+ fprintf(out,"STRING_LITERAL");break;+ case ST_COMPOUND:+ fprintf(out,"COMPOUND");break;+ case ST_EXPRESSION:+ fprintf(out,"EXPRESSION");break;+ case ST_SWITCH:+ fprintf(out,"switch");break;+ case ST_IF:+ fprintf(out,"if");break;+ case ST_WHILE:+ fprintf(out,"while");break;+ case ST_DO_WHILE:+ fprintf(out,"do_while");break;+ case ST_GOTO:+ fprintf(out,"goto");break;+ case ST_LABEL:+ fprintf(out,"LABEL");break;+ case ST_CASE:+ fprintf(out,"case");break;+ case ST_DEFAULT:+ fprintf(out,"default");break;+ case ST_CONTINUE:+ fprintf(out,"continue");break;+ case ST_BREAK:+ fprintf(out,"break");break;+ case ST_RETURN:+ fprintf(out,"return");break;+ case ST_FOR:+ fprintf(out,"for");break;++ /*TODO obj dec obj def func decl*/+ case ST_FUNCTION_DEFINITION:+ fprintf(out,"FUNCTION_DEFINITION");break;+ case TRANSLATION_UNIT:+ fprintf(out,"TRANSLATION_UNIT");break;+ case ERROR:+ fprintf(out,"ERROR");break;+ default:+ fprintf(out,"NOT_POSSIBLE");break;+ }+ }++ void print_error_tree(FILE *out,struct AST_Error *error)+ {+ fprintf(out,"ERROR");+ if(error->error!=NULL)+ {+ print_ast(out,error->error);+ }+ }+ void print_binary_expression_tree(FILE *out,struct AST_Binary_Expression *bin)+ {+ if(bin->type==OP_ARR_SUBSCRIPT)+ {+ print_ast(out,bin->left);+ fprintf(out,"[");+ print_ast(out,bin->right);+ fprintf(out,"]");+ }else+ {+ fprintf(out,"(");+ print_ast(out,bin->left);+ print_ast_enum(out,bin->type);+ print_ast(out,bin->right);+ fprintf(out,")");+ }+ }+ void print_conditional_expression_tree(FILE *out,struct AST_Conditional_Expression *cond)+ {+ fprintf(out,"(");+ print_ast(out,cond->left);+ fprintf(out,"?");+ print_ast(out,cond->center);+ fprintf(out,":");+ print_ast(out,cond->right);+ fprintf(out,")");+ }+ void print_function_expression_tree(FILE *out,struct AST_Function_Expression *function_call)+ {+ struct Queue_Node *it;+ print_ast(out,function_call->id);+ fprintf(out,"(");+ if(function_call->arguments.size>0)+ {+ fprintf(out,"\n");+ for(it=function_call->arguments.first;it!=function_call->arguments.last;it=it->prev)+ {+ print_ast(out,(struct AST*)(it->data));+ fprintf(out,",\n");+ }+ if(it!=NULL)+ {+ print_ast(out,(struct AST*)(it->data));+ }++ }+ fprintf(out,")");+ }+ void print_unary_expression_tree(FILE *out,struct AST_Unary_Expression *unary_expression)+ {+ print_ast_enum(out,unary_expression->type);+ if(unary_expression->type==OP_CAST)+ {+ fprintf(out,"(");+ print_type(out,unary_expression->value_type,1);+ fprintf(out,")");+ }+ print_ast(out,unary_expression->operand);+ }+ void print_lvalue_expression_tree(FILE *out,struct AST_Lvalue_Expression *lval)+ {+ fprintf(out,"LVALUE ");+ print_denoted(out,lval->lvalue);+ }+ void print_labeled_statement_tree(FILE *out,struct AST_Labeled_Statement *lab)+ {+ if(lab->type!=ST_LABEL)+ print_ast_enum(out,lab->type);+ if(lab->label!=NULL)+ print_token(out,lab->label);+ fprintf(out,":\n");+ print_ast(out,lab->statement);+ }+ void print_compound_statement_tree(FILE *out,struct AST_Compound_Statement *comp)+ {+ struct Queue_Node *it;+ fprintf(out,"{\n");+ for(it=comp->components.first;it!=NULL;it=it->prev)+ {+ print_ast(out,(struct AST*)(it->data));+ fprintf(out,";\n");+ }+ fprintf(out,"}\n");+ }+ void print_if_statement_tree(FILE *out,struct AST_If_Statement *ifs)+ {+ fprintf(out,"if(");+ print_ast(out,ifs->condition);+ fprintf(out,")\n");+ print_ast(out,ifs->body_statement);++ if(ifs->else_statement!=NULL)+ {+ fprintf(out,"\nelse");+ print_ast(out,ifs->else_statement);+ }++ }+ void print_switch_statement_tree(FILE *out,struct AST_Switch_Statement *swi)+ {+ fprintf(out,"switch(");+ print_ast(out,swi->condition);+ fprintf(out,")\n");+ print_ast(out,swi->body_statement);+ }+ void print_while_statement_tree(FILE *out,struct AST_While_Statement *whi)+ {+ fprintf(out,"while(");+ print_ast(out,whi->condition);+ fprintf(out,")\n");+ print_ast(out,whi->body_statement);+ }+ void print_do_while_statement_tree(FILE *out,struct AST_Do_While_Statement *whi)+ {+ fprintf(out,"do\n");+ print_ast(out,whi->body_statement);+ fprintf(out,"while(");+ print_ast(out,whi->condition);+ fprintf(out,")\n");+ }+ void print_for_statement_tree(FILE *out,struct AST_For_Statement *fo)+ {+ fprintf(out,"for(\n");+ print_ast(out,fo->initialisation);+ fprintf(out,";\n");+ print_ast(out,fo->condition);+ fprintf(out,";\n");+ print_ast(out,fo->update);+ fprintf(out,")\n");+ print_ast(out,fo->body_statement);+ }+ void print_return_statement_tree(FILE *out,struct AST_Return_Statement *return_expression)+ {+ fprintf(out,"return ");+ print_ast(out,return_expression->return_expression);+ }+ void print_goto_statement_tree(FILE *out,struct AST_Goto_Statement *got)+ {+ fprintf(out,"goto ");+ print_token(out,got->label);+ }++ void print_type(FILE *out,struct Type *type,char should_print_struct_union)+ {+ print_type_qualifier(out,type);+ switch(type->specifier)+ {+ case TS_VOID:+ fprintf(out,"void");return;+ case TS_CHAR:+ fprintf(out,"char");return;+ case TS_INT:+ fprintf(out,"int");return;+ case TS_FLOAT:+ fprintf(out,"float");return;+ case TS_DOUBLE:+ fprintf(out,"double");return;+ case TS_UNION:+ case TS_STRUCT:+ if(should_print_struct_union)+ {+ print_struct_union(out,((struct Type_Struct_Union*)type)->struct_union);+ }else+ {+ fprintf(out,(type->specifier==TS_STRUCT?"struct":"union"));+ }+ return;+ case TS_ENUM:+ print_enumeration(out,((struct Type_Enum*)type)->enumeration);+ return;+ case TS_POINTER:+ fprintf(out,"pointer to ");+ print_type(out,((struct Type_Pointer*)type)->points_to,0);+ return;+ case TS_ARRAY:+ fprintf(out,"array [%zu] of ",((struct Type_Array*)type)->number_of_elements);+ print_type(out,((struct Type_Array*)type)->is_array_of,should_print_struct_union);+ return;+ case TS_FUNC:+ fprintf(out,"function taking arguments (");+ print_function_args(out,(struct Type_Function*)type);+ fprintf(out,") returning ");+ print_type(out,((struct Type_Function*)type)->return_type,should_print_struct_union);+ return;+ case TS_BITFIELD:+ fprintf(out,"%zu bits of ",((struct Type_Bit_Field*)type)->number_of_bits);+ print_type(out,((struct Type_Bit_Field*)type)->base,should_print_struct_union);+ return;+ case TS_NONE:+ fprintf(out,"NONE");return;+ case TS_ERROR:+ fprintf(out,"ERROR!");return;++ }+ assert(!"reached end of switch");+ }+ void print_denoted(FILE *out,struct Denoted *denoted)+ {++ switch(denoted->denotation)+ {+ case DT_Macro:+ fprintf(out,"macro ");return;+ case DT_Macro_Parameter:+ fprintf(out,"macro parameter ");return;+ case DT_Label:+ fprintf(out,"label ");return;+ case DT_Object:+ switch(((struct Denoted_Object*)denoted)->linkage)+ {+ case LINKAGE_INTERNAL:+ fprintf(out,"internally linked ");+ break;+ case LINKAGE_EXTERNAL:+ fprintf(out,"externally linked ");+ break;+ case LINKAGE_NONE:+ break;+ default:+ assert(0);+ }+ fprintf(out,"denoted object ");+ print_token(out,((struct Denoted_Object*)denoted)->id);+ switch(((struct Denoted_Object*)denoted)->object->storage_class)+ {+ case SCS_NONE:+ fprintf(out," with automatic storage duration");+ break;+ case SCS_STATIC:+ fprintf(out," static storage duration");+ break;+ assert(0);+ }+ fprintf(out," is a ");+ print_type(out,((struct Denoted_Object*)denoted)->object->type,1);++ return;+ case DT_Typedef:+ fprintf(out,"typedef ");+ print_token(out,((struct Denoted_Typedef*)denoted)->id);+ fprintf(out," to ");+ print_type(out,((struct Denoted_Typedef*)denoted)->type,0);+ return;+ case DT_Function:+ print_token(out,((struct Denoted_Function*)denoted)->id);+ fprintf(out," is ");+ switch(((struct Denoted_Function*)denoted)->linkage)+ {+ case LINKAGE_EXTERNAL:+ fprintf(out," an externally linked ");+ break;+ case LINKAGE_INTERNAL:+ fprintf(out," an internally linked ");+ break;+ default:+ assert(0);+ }+ print_type(out,((struct Denoted_Function*)denoted)->type,1);+ return;+ case DT_Enum:+ print_token(out,((struct Denoted_Enum*)denoted)->id);+ fprintf(out," is ");+ print_enumeration(out,((struct Denoted_Enum*)denoted)->enumeration);+ return;+ case DT_Enum_Constant:+ fprintf(out,"%i ",((struct Denoted_Enum_Const*)denoted)->value);+ return;+ case DT_Struct_Union_Tag:+ print_token(out,((struct Denoted_Struct_Union*)denoted)->id);+ fprintf(out," is ");+ print_struct_union(out,((struct Denoted_Struct_Union*)denoted)->struct_union);+ case DT_Error:+ fprintf(out,"denotation error");return;+ case DT_Prototype:+ fprintf(out,"denotation prototyep");return;+ default:+ assert(0);++ }+ }+ void print_list_of_denoted(FILE *out,struct Queue *denoted)+ {+ struct Queue_Node *it;+ for(it=denoted->first;it!=NULL;it=it->prev)+ {+ print_denoted(out,(struct Denoted*)it->data);+ if(it->prev!=NULL)+ fprintf(out,",");+ }+ }+ void print_enumeration(FILE *out,struct Enum *enumeration)+ {+ fprintf(out,"enum ");+ print_list_of_denoted(out,enumeration->consts);+ }+ void print_struct_union(FILE *out,struct Struct_Union *struct_union)+ {+ switch(struct_union->specifier)+ {+ case TS_UNION:+ fprintf(out,"union ");+ break;+ case TS_STRUCT:+ fprintf(out,"struct ");+ break;+ default:+ assert(1==0);+ }+ fprintf(out,"{");+ print_list_of_denoted(out,struct_union->members);+ fprintf(out,"}");++ }+ void print_translation_unit_tree(FILE *out,struct AST_Translation_Unit *unit)+ {+ struct Queue_Node *it;+ struct AST* hold;+ for(it=unit->components.first;it!=NULL;it=it->prev)+ {+ hold=(struct AST*)(it->data);+ print_ast(out,hold);+ if(hold->type!=ST_FUNCTION_DEFINITION)+ {+ fprintf(out,";\n");+ }+ }+ }+ void print_ast(FILE *out,struct AST* tree)+ {+ if(tree==NULL)+ {+ fprintf(out,"NULL");+ return ;+ }+ switch(tree->type)+ {+ case OP_MEMBER_TROUGH_PTR:+ case OP_MEMBER:+ case OP_BITWISE_AND:+ case OP_BITWISE_XOR:+ case OP_BITWISE_NOT:+ case OP_LOGICAL_AND:+ case OP_LOGICAL_OR:+ case OP_XOR_ASSIGN:+ case OP_PIPE_ASSIGN:+ case OP_SHIFT_RIGHT_ASSIGN:+ case OP_ADD_ASSIGN:+ case OP_SUBTRACT_ASSIGN:+ case OP_MULTIPLY_ASSIGN:+ case OP_REMAINDER_ASSIGN:+ case OP_DIV_ASSIGN:+ case OP_SUBTRACTION:+ case OP_MUL:+ case OP_DIV:+ case OP_REMAINDER:+ case OP_EQUAL:+ case OP_LESS:+ case OP_LESS_EQ:+ case OP_SHIFT_LEFT:+ case OP_BITWISE_OR:+ case OP_AND_ASSIGN:+ case OP_ARR_SUBSCRIPT:+ case OP_SHIFT_LEFT_ASSIGN:+ case OP_ASSIGN:+ case OP_ADDITION:+ case OP_COMMA:+ case OP_SHIFT_RIGHT:+ case OP_GREATER_EQ:+ case OP_GREATER:+ case OP_NOT_EQUAL:+ print_binary_expression_tree(out,(struct AST_Binary_Expression*)tree);+ break;+ case OP_COND:+ print_conditional_expression_tree(out,(struct AST_Conditional_Expression*)tree);+ break;+ case OP_FUNCTION:+ print_function_expression_tree(out,(struct AST_Function_Expression*)tree);+ break;+ case OP_LOGICAL_NOT:+ case OP_UNARY_MINUS:+ case OP_SIZEOF:+ case OP_ADDR_OF:+ case OP_DEREFERENCE:+ case OP_POSTFIX_INC:+ case OP_PREFIX_INC:+ case OP_UNARY_PLUS:+ case OP_POSTFIX_DEC:+ case OP_PREFIX_DEC:+ case OP_CAST:+ print_unary_expression_tree(out,(struct AST_Unary_Expression*)tree);+ break;+ case OP_LVALUE:+ print_lvalue_expression_tree(out,(struct AST_Lvalue_Expression*)tree);+ break;+ case OP_STRING_LITERAL:+ print_string_literal(out,(struct AST_String_Literal*)tree);+ break;+ case OP_CONSTANT:+ print_constant_tree(out,(struct AST_Constant*)tree);+ break;+ case OP_NOP:+ fprintf(out,"NOP");+ break;+ case ST_SWITCH:+ print_switch_statement_tree(out,(struct AST_Switch_Statement*)tree);+ break;+ case ST_IF:+ print_if_statement_tree(out,(struct AST_If_Statement*)tree);+ break;+ case ST_WHILE:+ print_while_statement_tree(out,(struct AST_While_Statement*)tree);+ break;+ case ST_DO_WHILE:+ print_do_while_statement_tree(out,(struct AST_Do_While_Statement*)tree);+ break;+ case ST_GOTO:+ print_goto_statement_tree(out,(struct AST_Goto_Statement*)tree);+ break;+ case ST_DEFAULT:+ case ST_LABEL:+ case ST_CASE:+ print_labeled_statement_tree(out,(struct AST_Labeled_Statement*)tree);+ break;+ case ST_CONTINUE:+ fprintf(out,"continue");+ break;+ case ST_BREAK:+ fprintf(out,"break");+ break;+ case ST_RETURN:+ print_return_statement_tree(out,(struct AST_Return_Statement*)tree);+ break;+ case ST_FOR:+ print_for_statement_tree(out,(struct AST_For_Statement*)tree);+ break;+ case ST_COMPOUND:+ print_compound_statement_tree(out,(struct AST_Compound_Statement*)tree);+ break;+ case ST_OBJECT_DECLARATION:+ print_denoted(out,(struct Denoted*)((struct AST_Object_Declaration*)tree)->object);+ fprintf(out,"=");+ print_ast(out,((struct AST_Object_Declaration*)tree)->object->initializer);+ break;+ case ST_TYPE_DEFINITION:+ print_denoted(out,(struct Denoted*)((struct AST_Type_Definition*)tree)->definition);+ break;+ case ST_FUNCTION_DECLARATION:+ print_denoted(out,(struct Denoted*)((struct AST_Function_Declaration*)tree)->function);+ break;+ case ST_FUNCTION_DEFINITION:+ print_function_definition(out,((struct AST_Function_Declaration*)tree)->function);+ break;+ case TRANSLATION_UNIT:+ print_translation_unit_tree(out,(struct AST_Translation_Unit*)tree);+ break;+ case ERROR:+ print_error_tree(out,(struct AST_Error*)tree);+ break;+ default:+ fprintf(out,"NOT_POSSIBLE");break;+ }++ }++ void print_function_definition(FILE *out,struct Denoted_Function *function)+ {+ print_token(out,function->id);+ fprintf(out," is");+ switch(function->linkage)+ {+ case LINKAGE_EXTERNAL:+ fprintf(out," an externally linked ");+ break;+ case LINKAGE_INTERNAL:+ fprintf(out," an internally linked ");+ break;+ default:+ assert(0);+ }+ print_type(out,function->type,1);+ print_ast(out,(struct AST*)function->body);+ }+ void print_program_ast(FILE *out,struct Program *program)+ {+ size_t i;+ struct Queue_Node *it;+ for(it=program->translation_units->first;it!=NULL;it=it->prev)+ {+ fprintf(out,"TRANSLATION_UNIT {\n");+ print_ast(out,(struct AST*)it->data);+ fprintf(out,"\n} TRANSLATION_UNIT_END\n");+ }+ }+ void print_keyword_enum(FILE *out,enum KEYWORDS kw)+ {+ switch(kw)+ {+ case KW_AUTO:+ fprintf(out,"KW_AUTO");break;+ case KW_DO:+ fprintf(out,"KW_DO");break;+ case KW_DOUBLE:+ fprintf(out,"KW_DOUBLE");break;+ case KW_INT:+ fprintf(out,"KW_INT");break;+ case KW_STRUCT:+ fprintf(out,"KW_STRUCT");break;+ case KW_BREAK:+ fprintf(out,"KW_BREAK");break;+ case KW_ELSE:+ fprintf(out,"KW_ELSE");break;+ case KW_LONG:+ fprintf(out,"KW_LONG");break;+ case KW_SWITCH:+ fprintf(out,"KW_SWITCH");break;+ case KW_CASE:+ fprintf(out,"KW_CASE");break;+ case KW_ENUM:+ fprintf(out,"KW_ENUM");break;+ case KW_REGISTER:+ fprintf(out,"KW_REGISTER");break;+ case KW_TYPEDEF:+ fprintf(out,"KW_TYPEDEF");break;+ case KW_CHAR:+ fprintf(out,"KW_CHAR");break;+ case KW_EXTERN:+ fprintf(out,"KW_EXTERN");break;+ case KW_RETURN:+ fprintf(out,"KW_RETURN");break;+ case KW_UNION:+ fprintf(out,"KW_UNION");break;+ case KW_CONST:+ fprintf(out,"KW_CONST");break;+ case KW_FLOAT:+ fprintf(out,"KW_FLOAT");break;+ case KW_SHORT:+ fprintf(out,"KW_SHORT");break;+ case KW_UNSIGNED:+ fprintf(out,"KW_UNSIGNED");break;+ case KW_CONTINUE:+ fprintf(out,"KW_CONTINUE");break;+ case KW_FOR:+ fprintf(out,"KW_FOR");break;+ case KW_SIGNED:+ fprintf(out,"KW_SIGNED");break;+ case KW_VOID:+ fprintf(out,"KW_VOID");break;+ case KW_DEFAULT:+ fprintf(out,"KW_DEFAULT");break;+ case KW_GOTO:+ fprintf(out,"KW_GOTO");break;+ case KW_SIZEOF:+ fprintf(out,"KW_SIZEOF");break;+ case KW_VOLATILE:+ fprintf(out,"KW_VOLATILE");break;+ case KW_IF:+ fprintf(out,"KW_IF");break;+ case KW_STATIC:+ fprintf(out,"KW_STATIC");break;+ case KW_WHILE:+ fprintf(out,"KW_WHILE");break;+ case KW_DEFINED:+ fprintf(out,"KW_DEFINED");break;+ case KW_EXCLAMATION:+ fprintf(out,"KW_EXCLAMATION");break;+ case KW_BACK_SLASH:+ fprintf(out,"KW_BACK_SLASH");break;+ case KW_PERCENT:+ fprintf(out,"KW_PERCENT");break;+ case KW_AND:+ fprintf(out,"KW_AND");break;+ case KW_AND_AND:+ fprintf(out,"KW_AND_AND");break;+ case KW_OPEN_NORMAL:+ fprintf(out,"KW_OPEN_NORMAL");break;+ case KW_CLOSE_NORMAL:+ fprintf(out,"KW_CLOSE_NORMAL");break;+ case KW_STAR:+ fprintf(out,"KW_STAR");break;+ case KW_PLUS:+ fprintf(out,"KW_PLUS");break;+ case KW_COMMA:+ fprintf(out,"KW_COMMA");break;+ case KW_MINUS:+ fprintf(out,"KW_MINUS");break;+ case KW_ARROW:+ fprintf(out,"KW_ARROW");break;+ case KW_COLUMN:+ fprintf(out,"KW_COLUMN");break;+ case KW_SEMI_COLUMN:+ fprintf(out,"KW_SEMI_COLUMN");break;+ case KW_LESS:+ fprintf(out,"KW_LESS");break;+ case KW_EQ:+ fprintf(out,"KW_EQ");break;+ case KW_EQEQ:+ fprintf(out,"KW_EQEQ");break;+ case KW_MORE:+ fprintf(out,"KW_MORE");break;+ case KW_QUESTION:+ fprintf(out,"KW_QUESTION");break;+ case KW_OPEN_SQUARE:+ fprintf(out,"KW_OPEN_SQUARE");break;+ case KW_CLOSE_SQUARE:+ fprintf(out,"KW_CLOSE_SQUARE");break;+ case KW_HAT:+ fprintf(out,"KW_HAT");break;+ case KW_FLOOR:+ fprintf(out,"KW_FLOOR");break;+ case KW_OPEN_CURLY:+ fprintf(out,"KW_OPEN_CURLY");break;+ case KW_CLOSE_CURLY:+ fprintf(out,"KW_CLOSE_CURLY");break;+ case KW_PIPE:+ fprintf(out,"KW_PIPE");break;+ case KW_PIPE_PIPE:+ fprintf(out,"KW_PIPE_PIPE");break;+ case KW_TILDE:+ fprintf(out,"KW_TILDE");break;+ case KW_PLUSPLUS:+ fprintf(out,"KW_PLUSPLUS");break;+ case KW_MINUSMINUS:+ fprintf(out,"KW_MINUSMINUS");break;+ case KW_SHIFT_RIGHT:+ fprintf(out,"KW_SHIFT_RIGHT");break;+ case KW_SHIFT_LEFT:+ fprintf(out,"KW_SHIFT_LEFT");break;+ case KW_LESS_EQ:+ fprintf(out,"KW_LESS_EQ");break;+ case KW_MORE_EQ:+ fprintf(out,"KW_MORE_EQ");break;+ case KW_NOT_EQ:+ fprintf(out,"KW_NOT_EQ");break;+ case KW_PLUS_EQ:+ fprintf(out,"KW_PLUS_EQ");break;+ case KW_MINUS_EQ:+ fprintf(out,"KW_MINUS_EQ");break;+ case KW_STAR_EQ:+ fprintf(out,"KW_STAR_EQ");break;+ case KW_PERCENT_EQ:+ fprintf(out,"KW_PERCENT_EQ");break;+ case KW_SHIFT_LEFT_EQ:+ fprintf(out,"KW_SHIFT_LEFT_EQ");break;+ case KW_SHIFT_RIGHT_EQ:+ fprintf(out,"KW_SHIFT_RIGHT_EQ");break;+ case KW_AND_EQ:+ fprintf(out,"KW_AND_EQ");break;+ case KW_HAT_EQ:+ fprintf(out,"KW_HAT_EQ");break;+ case KW_PIPE_EQ:+ fprintf(out,"KW_PIPE_EQ");break;+ case KW_DOT:+ fprintf(out,"KW_DOT");break;+ case KW_DIV_EQ:+ fprintf(out,"KW_DIV_EQ");break;+ case KW_FORWARD_SLASH:+ fprintf(out,"KW_FORWARD_SLASH");break;+ case KW_NOTYPE:+ fprintf(out,"KW_NOTYPE");break;+ case KW_HEXADECIMAL_CONSTANT:+ fprintf(out,"KW_HEXADECIMAL_CONSTANT");break;+ case KW_DECIMAL_CONSTANT:+ fprintf(out,"KW_DECIMAL_CONSTANT");break;+ case KW_OCTAL_CONSTANT:+ fprintf(out,"KW_OCTAL_CONSTANT");break;+ case KW_UNSIGNED_DECIMAL_CONSTANT:+ fprintf(out,"KW_UNSIGNED_DECIMAL_CONSTANT");break;+ case KW_UNSIGNED_OCTAL_CONSTANT:+ fprintf(out,"KW_UNSIGNED_OCTAL_CONSTANT");break;+ case KW_UNSIGNED_HEXADECIMAL_CONSTANT:+ fprintf(out,"KW_UNSIGNED_HEXADECIMAL_CONSTANT");break;+ case KW_UNSIGNED_LONG_HEXADECIMAL_CONSTANT:+ fprintf(out,"KW_UNSIGNED_LONG_HEXADECIMAL_CONSTANT");break;+ case KW_UNSIGNED_LONG_OCTAL_CONSTANT:+ fprintf(out,"KW_UNSIGNED_LONG_OCTAL_CONSTANT");break;+ case KW_UNSIGNED_LONG_DECIMAL_CONSTANT:+ fprintf(out,"KW_UNSIGNED_LONG_DECIMAL_CONSTANT");break;+ case KW_UNSIGNED_LONG_LONG_DECIMAL_CONSTANT:+ fprintf(out,"KW_UNSIGNED_LONG_LONG_DECIMAL_CONSTANT");break;+ case KW_UNSIGNED_LONG_LONG_HEXADECIMAL_CONSTANT:+ fprintf(out,"KW_UNSIGNED_LONG_LONG_HEXADECIMAL_CONSTANT");break;+ case KW_UNSIGNED_LONG_LONG_OCTAL_CONSTANT:+ fprintf(out,"KW_UNSIGNED_LONG_LONG_OCTAL_CONSTANT");break;+ case KW_LONG_HEXADECIMAL_CONSTANT:+ fprintf(out,"KW_LONG_HEXADECIMAL_CONSTANT");break;+ case KW_LONG_OCTAL_CONSTANT:+ fprintf(out,"KW_LONG_OCTAL_CONSTANT");break;+ case KW_LONG_DECIMAL_CONSTANT:+ fprintf(out,"KW_LONG_DECIMAL_CONSTANT");break;+ case KW_LONG_LONG_HEXADECIMAL_CONSTANT:+ fprintf(out,"KW_LONG_LONG_HEXADECIMAL_CONSTANT");break;+ case KW_LONG_LONG_OCTAL_CONSTANT:+ fprintf(out,"KW_LONG_LONG_OCTAL_CONSTANT");break;+ case KW_LONG_LONG_DECIMAL_CONSTANT:+ fprintf(out,"KW_LONG_LONG_DECIMAL_CONSTANT");break;+ case KW_DOUBLE_DECIMAL_CONSTANT:+ fprintf(out,"KW_DOUBLE_DECIMAL_CONSTANT");break;+ case KW_LONG_DOUBLE_DECIMAL_CONSTANT:+ fprintf(out,"KW_LONG_DOUBLE_DECIMAL_CONSTANT");break;+ case KW_FLOAT_DECIMAL_CONSTANT:+ fprintf(out,"KW_FLOAT_DECIMAL_CONSTANT");break;+ case KW_DOUBLE_HEXADECIMAL_CONSTANT:+ fprintf(out,"KW_DOUBLE_HEXADECIMAL_CONSTANT");break;+ case KW_LONG_DOUBLE_HEXADECIMAL_CONSTANT:+ fprintf(out,"KW_LONG_DOUBLE_HEXADECIMAL_CONSTANT");break;+ case KW_FLOAT_HEXADECIMAL_CONSTANT:+ fprintf(out,"KW_FLOAT_HEXADECIMAL_CONSTANT");break;+ case KW_COMMENT:+ fprintf(out,"KW_COMMENT");break;+ case KW_ID:+ fprintf(out,"KW_ID");break;+ case KW_CHAR_CONSTANT:+ fprintf(out,"KW_CHAR_CONSTANT");break;+ case KW_WIDE_CHAR_CONSTANT:+ fprintf(out,"KW_WIDE_CHAR_CONSTANT");break;+ case KW_STRING:+ fprintf(out,"KW_STRING");break;+ case KW_WIDE_STRING:+ fprintf(out,"KW_WIDE_STRING");break;+ case PKW_IF:+ fprintf(out,"PKW_IF");break;+ case PKW_IFDEF:+ fprintf(out,"PKW_IFDEF");break;+ case PKW_IFNDEF:+ fprintf(out,"PKW_IFNDEF");break;+ case PKW_ELIF:+ fprintf(out,"PKW_ELIF");break;+ case PKW_ELSE:+ fprintf(out,"PKW_ELSE");break;+ case PKW_ENDIF:+ fprintf(out,"PKW_ENDIF");break;+ case PKW_INCLUDE:+ fprintf(out,"PKW_INCLUDE");break;+ case PKW_DEFINE:+ fprintf(out,"PKW_DEFINE");break;+ case PKW_UNDEF:+ fprintf(out,"PKW_UNDEF");break;+ case PKW_LINE:+ fprintf(out,"PKW_LINE");break;+ case PKW_ERROR:+ fprintf(out,"PKW_ERROR");break;+ case PKW_PRAGMA:+ fprintf(out,"PKW_PRAGMA");break;+ case PKW_COMMENT:+ fprintf(out,"PKW_COMMENT");break;+ case PKW_NOTYPE:+ fprintf(out,"PKW_NOTYPE");break;+ case KW_HASHTAG:+ fprintf(out,"KW_HASHTAG");break;+ case KW_HASHTAG_HASHTAG:+ fprintf(out,"KW_HASHTAG_HASHTAG");break;+ default:+ fprintf(out,"KW_ERROR");+ }+ }+ void print_errors(FILE *out,struct Queue *errors)+ {+ struct Queue_Node *it;+ for(it=errors->first;it!=NULL;it=it->prev)+ {+ print_translation_error(out,(struct Translation_Error*)it->data);+ }+ }+ void print_function_args(FILE *out,struct Type_Function *func)+ {+ size_t i;+ if(func->number_of_arguments==0)+ return;++ print_denoted(out,(struct Denoted*)func->arguments[0]);+ for(i=1;i<func->number_of_arguments;++i)+ {+ fprintf(out,", ");+ print_denoted(out,(struct Denoted*)func->arguments[i]);+ }+ }+ void print_type_qualifier(FILE *out,struct Type *type)+ {++ switch(type->specifier)+ {+ case TS_VOID:+ case TS_CHAR:+ case TS_INT:+ case TS_FLOAT:+ case TS_DOUBLE:+ fprintf(out,"%s %s",+ (AS_BASIC_TYPE_PTR(type)->is_const?"constant ":""),+ (AS_BASIC_TYPE_PTR(type)->is_volatile ?"volatile ":"")+ );+ break;+ case TS_STRUCT:+ case TS_UNION:+ fprintf(out,"%s %s",+ (AS_STRUCT_UNION_PTR(type)->is_const?"constant ":""),+ (AS_STRUCT_UNION_PTR(type)->is_volatile ?"volatile ":"")+ );+ break;+ case TS_ENUM:+ fprintf(out,"%s %s",+ (AS_STRUCT_UNION_PTR(type)->is_const?"constant ":""),+ (AS_STRUCT_UNION_PTR(type)->is_volatile ?"volatile ":"")+ );+ break;+ case TS_POINTER:+ fprintf(out,"%s %s",+ (AS_TYPE_PTR_PTR(type)->is_const?"constant ":""),+ (AS_TYPE_PTR_PTR(type)->is_volatile ?"volatile ":"")+ );+ break;+ case TS_ARRAY:+ case TS_FUNC:+ case TS_BITFIELD:+ break;+ case TS_NONE:+ case TS_ERROR:+ default:+ fprintf(out,"error");+ }+ }+++ void print_constant_tree(FILE *out,struct AST_Constant *constant)+ {+ fprintf(out,"CONSTANT of type ");+ print_type(out,constant->value_type,1);+ }+ void print_string_literal(FILE *out,struct AST_String_Literal *string)+ {+ fprintf(out,"STRING LITERAL of type");+ print_token(out,string->string);+ }++ #undef TOK+ #undef INDENT++ #endifF diff --git a/backend/print/print.h b/backend/print/print.h new file mode 100644 --- /dev/null +++ b/backend/print/print.h+ #ifndef GCC_PRINT_H+ #define GCC_PRINT_H GCC_PRINT_H++ #include<stdio.h>+ #include<assert.h>+ #include <all.h>+++ #define INDENT for(int j=0;j<indent;++j) fprintf(out," ");+ #define TOK(s) ((struct token*)(s))+ #define ASTPTR(s) ((struct AST*)(s))++ extern int indent;++ void print_token(FILE *out,struct token *token);+ void print_tokens(FILE *out,struct Queue *tokens);+ char print_tokens_of_program(FILE *out,char **base_names);+ void print_ast_enum(FILE *out,enum AST_Type op);+ void print_error_tree(FILE *out,struct AST_Error *error);+ void print_binary_expression_tree(FILE *out,struct AST_Binary_Expression *bin);+ void print_conditional_expression_tree(FILE *out,struct AST_Conditional_Expression *cond);+ void print_function_expression_tree(FILE *out,struct AST_Function_Expression *function_call);+ void print_unary_expression_tree(FILE *out,struct AST_Unary_Expression *unary_expression);+ void print_constant_tree(FILE *out,struct AST_Constant *constant);+ void print_string_literal(FILE *out,struct AST_String_Literal *string);+ void print_lvalue_expression_tree(FILE *out,struct AST_Lvalue_Expression *lval);+ void print_labeled_statement_tree(FILE *out,struct AST_Labeled_Statement *lab);+ void print_compound_statement_tree(FILE *out,struct AST_Compound_Statement *comp);+ void print_if_statement_tree(FILE *out,struct AST_If_Statement *ifs);+ void print_switch_statement_tree(FILE *out,struct AST_Switch_Statement *swi);+ void print_while_statement_tree(FILE *out,struct AST_While_Statement *whi);+ void print_do_while_statement_tree(FILE *out,struct AST_Do_While_Statement *whi);+ void print_for_statement_tree(FILE *out,struct AST_For_Statement *fo);+ void print_return_statement_tree(FILE *out,struct AST_Return_Statement *return_expression);+ void print_goto_statement_tree(FILE *out,struct AST_Goto_Statement *got);+ void print_type(FILE *out,struct Type *type,char print_struct_union);+ void print_denoted(FILE *out,struct Denoted *denoted);+ void print_list_of_denoted(FILE *out,struct Queue *denoted);+ void print_enumeration(FILE *out,struct Enum *enumeration);+ void print_struct_union(FILE *out,struct Struct_Union *struct_union);+ void print_translation_unit_tree(FILE *out,struct AST_Translation_Unit *unit);+ void print_ast(FILE *out,struct AST* tree);+ void print_program_tokens(FILE *out,struct Program *program);+ void print_program_ast(FILE *out,struct Program *program);+ void print_keyword_enum(FILE *out,enum KEYWORDS kw);+ void print_function_definition(FILE *out,struct Denoted_Function *function);+ void print_errors(FILE *out,struct Queue *errors);+ void print_function_args(FILE *out,struct Type_Function *func);+ void print_type_qualifier(FILE *out,struct Type *type);+++ #endifF diff --git a/code_generation/js/transpile_to_js.c b/code_generation/js/transpile_to_js.c deleted file mode 100644 --- a/code_generation/js/transpile_to_js.c +++ /dev/null- #ifndef GCC_TRANSPILE_TO_JS_C- #define GCC_TRANSPILE_TO_JS_C GCC_TRANSPILE_TO_JS_C- #include <transpile_to_js.h>--- void transpile_to_javascript(FILE* out,struct Program *program,struct Command_Arguments *command_arguments)- {- struct Queue_Node *it;-- if(command_arguments->insert_html)- {- fprintf(out,"<DOCTYPE! html> <html> <head> <title>asdf</title> <script>");- }- to_js_print_externs(out,program,command_arguments);-- for(it=program->translation_units->first;it!=NULL;it=it->prev)- {- fprintf(out,"{");- to_js_print_statics(out,(struct AST_Translation_Unit*)it->data,command_arguments);- fprintf(out,"\n");- to_js_print_translation_unit_tree(out,(struct AST_Translation_Unit*)it->data,program);- fprintf(out,"\n}\n");- }-- if(command_arguments->insert_html)- {- fprintf(out,"</script> </head> <body> </body> </html>");- }-- }-- void _to_js_print_externs(void *denoted,void *args)- {- #define ARGS(x) ((struct Command_Arguments*)x)- #define DENOTED(x) ((struct Denoted*)x)- #define DFUNC(x) ((struct Denoted_Function*)x)- #define DOBJ(x) ((struct Denoted_Object*)x)- if(DENOTED(denoted)->denotation==DT_Function)- {- if(DFUNC(denoted)->body==NULL)- {- fprintf(ARGS(args)->output_file,"/*UNDEFINED*/");- }- fprintf(ARGS(args)->output_file,"var ");- print_token(ARGS(args)->output_file,DFUNC(denoted)->id);- fprintf(ARGS(args)->output_file,";");- fprintf(ARGS(args)->output_file,"\n");-- }else if(DENOTED(denoted)->denotation==DT_Object)- {- fprintf(ARGS(args)->output_file,"var ");- print_token(ARGS(args)->output_file,DFUNC(denoted)->id);- fprintf(ARGS(args)->output_file,";\n");- }-- #undef DOBJ- #undef DFUNC- #undef ARGS- #undef DENOTED- }- void _to_js_print_statics(void *denoted,void *args)- {- #define ARGS(x) ((struct Command_Arguments*)x)- #define DENOTED(x) ((struct Denoted*)x)- #define DFUNC(x) ((struct Denoted_Function*)x)- #define DOBJ(x) ((struct Denoted_Object*)x)- if(DENOTED(denoted)->denotation==DT_Function)- {- if(DFUNC(denoted)->body==NULL)- {- fprintf(ARGS(args)->output_file,"/*UNDEFINED*/");- }- fprintf(ARGS(args)->output_file,"let ");- print_token(ARGS(args)->output_file,DFUNC(denoted)->id);- fprintf(ARGS(args)->output_file,";");- fprintf(ARGS(args)->output_file,"\n");-- }else if(DENOTED(denoted)->denotation==DT_Object)- {- fprintf(ARGS(args)->output_file,"let ");- print_token(ARGS(args)->output_file,DFUNC(denoted)->id);- fprintf(ARGS(args)->output_file,";");- }-- #undef DOBJ- #undef DFUNC- #undef ARGS- #undef DENOTED- }- void to_js_print_externs(FILE* out,struct Program *program,struct Command_Arguments *command_arguments)- {- fprintf(out,"\n/*EXTERNS START*/\n");- Map_Map_Extended(- &program->external_linkage->ids- ,_to_js_print_externs- ,command_arguments);- fprintf(out,"\n/*EXTERNS END*/\n");- }-- void to_js_print_statics(FILE* out,struct AST_Translation_Unit *translation_unit,struct Command_Arguments* command_arguments)- {-- Map_Map_Extended(- &((struct Normal_Scope*)translation_unit->file_scope)->ordinary- ,_to_js_print_statics- ,command_arguments);- }- void to_js_print_ast(FILE* out,struct AST *tree,struct Program *program)- {- if(tree==NULL)- {- return ;- }- switch(tree->type)- {- case OP_MEMBER_TROUGH_PTR:- case OP_MEMBER:- case OP_BITWISE_AND:- case OP_BITWISE_XOR:- case OP_BITWISE_NOT:- case OP_LOGICAL_AND:- case OP_LOGICAL_OR:- case OP_XOR_ASSIGN:- case OP_PIPE_ASSIGN:- case OP_SHIFT_RIGHT_ASSIGN:- case OP_ADD_ASSIGN:- case OP_SUBTRACT_ASSIGN:- case OP_MULTIPLY_ASSIGN:- case OP_REMAINDER_ASSIGN:- case OP_DIV_ASSIGN:- case OP_SUBTRACTION:- case OP_MUL:- case OP_DIV:- case OP_REMAINDER:- case OP_EQUAL:- case OP_LESS:- case OP_LESS_EQ:- case OP_SHIFT_LEFT:- case OP_BITWISE_OR:- case OP_AND_ASSIGN:- case OP_ARR_SUBSCRIPT:- case OP_SHIFT_LEFT_ASSIGN:- case OP_ASSIGN:- case OP_ADDITION:- case OP_COMMA:- case OP_SHIFT_RIGHT:- case OP_GREATER_EQ:- case OP_GREATER:- case OP_NOT_EQUAL:- to_js_print_binary_expression_tree(out,(struct AST_Binary_Expression*)tree,program);- break;- case OP_COND:- to_js_print_conditional_expression_tree(out,(struct AST_Conditional_Expression*)tree,program);- break;- case OP_FUNCTION:- to_js_print_function_expression_tree(out,(struct AST_Function_Expression*)tree,program);- break;- case OP_LOGICAL_NOT:- case OP_UNARY_MINUS:- case OP_SIZEOF:- case OP_ADDR_OF:- case OP_DEREFERENCE:- case OP_POSTFIX_INC:- case OP_PREFIX_INC:- case OP_UNARY_PLUS:- case OP_POSTFIX_DEC:- case OP_PREFIX_DEC:- case OP_CAST:- to_js_print_unary_expression_tree(out,(struct AST_Unary_Expression*)tree,program);- break;- case OP_LVALUE:- to_js_print_lvalue_expression_tree(out,(struct AST_Lvalue_Expression*)tree,program);- break;- case OP_NOP:- fprintf(out,"NOP");- break;-- case ST_SWITCH:- to_js_print_switch_statement_tree(out,(struct AST_Switch_Statement*)tree,program);- break;- case ST_IF:- to_js_print_if_statement_tree(out,(struct AST_If_Statement*)tree,program);- break;- case ST_WHILE:- to_js_print_while_statement_tree(out,(struct AST_While_Statement*)tree,program);- break;- case ST_DO_WHILE:- to_js_print_do_while_statement_tree(out,(struct AST_Do_While_Statement*)tree,program);- break;- case ST_GOTO:- to_js_print_goto_statement_tree(out,(struct AST_Goto_Statement*)tree,program);- break;- case ST_DEFAULT:- case ST_LABEL:- case ST_CASE:- to_js_print_labeled_statement_tree(out,(struct AST_Labeled_Statement*)tree,program);- break;- case ST_CONTINUE:- fprintf(out,"continue");- break;- case ST_BREAK:- fprintf(out,"break");- break;- case ST_RETURN:- to_js_print_return_statement_tree(out,(struct AST_Return_Statement*)tree,program);- break;- case ST_FOR:- to_js_print_for_statement_tree(out,(struct AST_For_Statement*)tree,program);- break;- case ST_COMPOUND:- to_js_print_compound_statement_tree(out,(struct AST_Compound_Statement*)tree,program);- break;- case ST_OBJECT_DECLARATION:- to_js_print_object_declaration_tree(out,((struct AST_Object_Declaration*)tree),program);- if(((struct AST_Object_Declaration*)tree)->object->initializer!=NULL)- {- fprintf(out,"=");- to_js_print_ast(out,((struct AST_Object_Declaration*)tree)->object->initializer,program);- }- break;- case ST_FUNCTION_DECLARATION:- to_js_print_function_declaration_tree(out,((struct AST_Function_Declaration*)tree),program);- break;- case ST_FUNCTION_DEFINITION:- to_js_print_function_definition(out,((struct AST_Function_Definition*)tree),program);- break;- case TRANSLATION_UNIT:- to_js_print_translation_unit_tree(out,(struct AST_Translation_Unit*)tree,program);- break;- case ERROR:- default:- /*TODO error*/- return;- }- }- void to_js_print_translation_unit_tree(FILE* out,struct AST_Translation_Unit *translation_unit,struct Program *program)- {- struct Queue_Node *it;- struct AST* hold;- for(it=translation_unit->components.first;it!=NULL;it=it->prev)- {- hold=(struct AST*)(it->data);- to_js_print_ast(out,hold,program);-- fprintf(out,";\n");- }- }- void to_js_print_binary_expression_tree(FILE* out,struct AST_Binary_Expression *bin,struct Program *program)- {- if(bin->type==OP_ARR_SUBSCRIPT)- {- to_js_print_ast(out,bin->left,program);- fprintf(out,"[");- to_js_print_ast(out,bin->right,program);- fprintf(out,"]");- }else- {- fprintf(out,"(");- to_js_print_ast(out,bin->left,program);- print_ast_enum(out,bin->type);- to_js_print_ast(out,bin->right,program);- fprintf(out,")");- }- }-- void to_js_print_conditional_expression_tree(FILE* out,struct AST_Conditional_Expression *cond,struct Program *program)- {- fprintf(out,"(");- to_js_print_ast(out,cond->left,program);- fprintf(out,"?");- to_js_print_ast(out,cond->center,program);- fprintf(out,":");- to_js_print_ast(out,cond->right,program);- fprintf(out,")");- }- void to_js_print_function_expression_tree(FILE* out,struct AST_Function_Expression *function_call,struct Program *program)- {- struct Queue_Node *it;- to_js_print_ast(out,function_call->id,program);- fprintf(out,"(");- if(function_call->arguments.size>0)- {- fprintf(out,"\n");- for(it=function_call->arguments.first;it!=function_call->arguments.last;it=it->prev)- {- to_js_print_ast(out,(struct AST*)(it->data),program);- fprintf(out,",\n");- }- if(it!=NULL)- {- to_js_print_ast(out,(struct AST*)(it->data),program);- }-- }- fprintf(out,")");- }- void to_js_print_lvalue_expression_tree(FILE* out,struct AST_Lvalue_Expression *lval,struct Program *program)- {- print_denoted(out,lval->lvalue);- }- void to_js_print_unary_expression_tree(FILE* out,struct AST_Unary_Expression *unary,struct Program *program)- {- print_ast_enum(out,unary->type);- to_js_print_ast(out,unary->operand,program);- }- void to_js_print_labeled_statement_tree(FILE* out,struct AST_Labeled_Statement *label,struct Program *program)- {- if(label->type!=ST_LABEL)- print_ast_enum(out,label->type);- if(label->label!=NULL)- {- fprintf(out,"case");- print_token(out,label->label);- }- fprintf(out,":\n");- to_js_print_ast(out,label->statement,program);- }- void to_js_print_compound_statement_tree(FILE* out,struct AST_Compound_Statement *compound,struct Program *program)- {- struct Queue_Node *it;- fprintf(out,"{");- for(it=compound->components.first;it!=NULL;it=it->prev)- {- fprintf(out,"\n");- to_js_print_ast(out,(struct AST*)it->data,program);- fprintf(out,";");- }- fprintf(out,"\n}");- }- void to_js_print_for_statement_tree(FILE* out,struct AST_For_Statement *for_statement,struct Program *program)- {- fprintf(out,"for(\n");- if(for_statement->initialisation!=NULL)- to_js_print_ast(out,for_statement->initialisation,program);- fprintf(out,";\n");- if(for_statement->condition!=NULL)- to_js_print_ast(out,for_statement->condition,program);- fprintf(out,";\n");- if(for_statement->update!=NULL)- to_js_print_ast(out,for_statement->update,program);- fprintf(out,")\n");- print_ast(out,for_statement->body_statement);- }- void to_js_print_while_statement_tree(FILE* out,struct AST_While_Statement *while_statement,struct Program *program)- {- fprintf(out,"while(");- to_js_print_ast(out,while_statement->condition,program);- fprintf(out,")\n");- to_js_print_ast(out,while_statement->body_statement,program);- }- void to_js_print_do_while_statement_tree(FILE* out,struct AST_Do_While_Statement *do_while_statement,struct Program *program)- {- fprintf(out,"do\n");- to_js_print_ast(out,do_while_statement->body_statement,program);- fprintf(out,"while(");- to_js_print_ast(out,do_while_statement->condition,program);- fprintf(out,")\n");- }- void to_js_print_if_statement_tree(FILE* out,struct AST_If_Statement *if_statement,struct Program *program)- {- fprintf(out,"if(");- to_js_print_ast(out,if_statement->condition,program);- fprintf(out,")\n");- to_js_print_ast(out,if_statement->body_statement,program);-- if(if_statement->else_statement!=NULL)- {- fprintf(out,"\nelse");- to_js_print_ast(out,if_statement->else_statement,program);- }- }- void to_js_print_goto_statement_tree(FILE* out,struct AST_Goto_Statement *goto_statement,struct Program *program)- {- /*TODO something here, be it error or not*/- }- void to_js_print_switch_statement_tree(FILE* out,struct AST_Switch_Statement *switch_statement,struct Program *program)- {- fprintf(out,"switch(");- to_js_print_ast(out,switch_statement->condition,program);- fprintf(out,")\n");- to_js_print_ast(out,switch_statement->body_statement,program);- }- void to_js_print_return_statement_tree(FILE* out,struct AST_Return_Statement *return_statement,struct Program *program)- {- fprintf(out,"return ");- to_js_print_ast(out,return_statement->return_expression,program);- }- void to_js_print_object_declaration_tree(FILE* out,struct AST_Object_Declaration *object_declaration,struct Program *program)- {- if(object_declaration->object->object->storage_class!=SCS_EXTERN)- {- fprintf(out,"let ");- print_token(out,object_declaration->object->id);- }-- }- void to_js_print_function_definition(FILE* out,struct AST_Function_Definition *function_definition,struct Program *program)- {- size_t i;- struct Type_Function *cache_type;-- cache_type=(struct Type_Function*)function_definition->function->type;-- if((struct Type_Function*)function_definition->function->linkage==LINKAGE_EXTERNAL)- {- // fprintf(out,"var ");- print_token(out,function_definition->function->id);- fprintf(out,"= function");- }else- {- fprintf(out,"function ");- print_token(out,function_definition->function->id);- }-- /*print parameters*/- fprintf(out,"(");- if(cache_type->number_of_arguments!=0)- {- print_token(out,cache_type->arguments[0]->id);- for(i=1;i<cache_type->number_of_arguments;++i)- {- fprintf(out,",");- print_token(out,cache_type->arguments[i]->id);- }- }-- fprintf(out,")");-- /*print body*/- to_js_print_compound_statement_tree(out,function_definition->function->body,program);--- }- void to_js_print_function_declaration_tree(FILE* out,struct AST_Function_Declaration *function_declaration,struct Program *program)- {- /*TODO probably leave it empty*/- }---- #endifF diff --git a/code_generation/js/transpile_to_js.h b/code_generation/js/transpile_to_js.h deleted file mode 100644 --- a/code_generation/js/transpile_to_js.h +++ /dev/null- #ifndef GCC_TRANSPILE_TO_JS_H- #define GCC_TRANSPILE_TO_JS_H GCC_TRANSPILE_TO_JS_H- #include <program.h>- #include <gcc_arguments.h>- #include <stdio.h>- #include <print.h>--- void transpile_to_javascript(FILE* out,struct Program *program,struct Command_Arguments *command_arguments);-- void _to_js_print_externs(void *denoted,void *args);- void to_js_print_externs(FILE* out,struct Program *program,struct Command_Arguments *command_arguments);-- void _to_js_print_statics(void *denoted,void *args);- void to_js_print_statics(FILE* out,struct AST_Translation_Unit *translation_unit,struct Command_Arguments* command_arguments);-- void to_js_print_ast(FILE* out,struct AST *tree,struct Program *program);- void to_js_print_translation_unit_tree(FILE* out,struct AST_Translation_Unit *translation_unit,struct Program *program);- void to_js_print_binary_expression_tree(FILE* out,struct AST_Binary_Expression *bin,struct Program *program);- void to_js_print_conditional_expression_tree(FILE* out,struct AST_Conditional_Expression *cond,struct Program *program);- void to_js_print_function_expression_tree(FILE* out,struct AST_Function_Expression *function_call,struct Program *program);- void to_js_print_lvalue_expression_tree(FILE* out,struct AST_Lvalue_Expression *lval,struct Program *program);- void to_js_print_unary_expression_tree(FILE* out,struct AST_Unary_Expression *unary,struct Program *program);- void to_js_print_labeled_statement_tree(FILE* out,struct AST_Labeled_Statement *label,struct Program *program);- void to_js_print_compound_statement_tree(FILE* out,struct AST_Compound_Statement *compound,struct Program *program);- void to_js_print_for_statement_tree(FILE* out,struct AST_For_Statement *for_statement,struct Program *program);- void to_js_print_while_statement_tree(FILE* out,struct AST_While_Statement *while_statement,struct Program *program);- void to_js_print_do_while_statement_tree(FILE* out,struct AST_Do_While_Statement *do_while_statement,struct Program *program);- void to_js_print_if_statement_tree(FILE* out,struct AST_If_Statement *if_statement,struct Program *program);- void to_js_print_goto_statement_tree(FILE* out,struct AST_Goto_Statement *goto_statement,struct Program *program);- void to_js_print_switch_statement_tree(FILE* out,struct AST_Switch_Statement *switch_statement,struct Program *program);- void to_js_print_return_statement_tree(FILE* out,struct AST_Return_Statement *return_statement,struct Program *program);- void to_js_print_object_declaration_tree(FILE* out,struct AST_Object_Declaration *object_declaration,struct Program *program);- void to_js_print_function_definition(FILE* out,struct AST_Function_Definition *function_definition,struct Program *program);- void to_js_print_function_declaration_tree(FILE* out,struct AST_Function_Declaration *function_declaration,struct Program *program);- void to_js_print_denoted(FILE* out,struct Denoted* denoted,struct Program *program);---- #endifF diff --git a/frontend/ast.c b/frontend/ast.c new file mode 100644 --- /dev/null +++ b/frontend/ast.c+ #ifndef GCC_AST_C+ #define GCC_AST_C GCC_AST_C+ #include <ast.h>++ struct AST_Error* get_error_tree(struct AST *error)+ {+ struct AST_Error *ret;+ ret=malloc(sizeof(struct AST_Error));+ ret->type=ERROR;+ ret->error=error;+ return ret;+ }+ struct AST_Declaration_Error* get_declaration_error_tree(struct Denoted *error)+ {++ struct AST_Declaration_Error *ret;+ ret=malloc(sizeof(struct AST_Declaration_Error));+ ret->type=ERROR_DECLARATION;+ ret->error=error;+ return ret;+ }++ struct AST_Binary_Expression* get_binary_expression_tree(struct AST *left,struct AST *right,enum AST_Type type)+ {+ struct AST_Binary_Expression *ret;+ ret=malloc(sizeof(struct AST_Binary_Expression));+ ret->type=type;+ ret->left=left;+ ret->right=right;++ return ret;+ }+ struct AST_Conditional_Expression* get_conditional_expression_tree(struct AST *left,struct AST *center,struct AST *right)+ {+ struct AST_Conditional_Expression *ret;+ ret=malloc(sizeof(struct AST_Conditional_Expression));+ ret->type=OP_COND;+ ret->left=left;+ ret->center=center;+ ret->right=right;+ return ret;+ }++ struct AST_Function_Expression* get_function_expression_tree(struct AST* id,struct Scope *scope)+ {+ struct AST_Function_Expression *ret;+ ret=malloc(sizeof(struct AST_Function_Expression));+ ret->type=OP_FUNCTION;+ ret->id=id;+ Queue_Init(&ret->arguments);+ return ret;+ }+ struct AST_Unary_Expression* get_unary_expression_tree(struct AST *operand,enum AST_Type type)+ {++ struct AST_Unary_Expression *ret;+ ret=malloc(sizeof(struct AST_Unary_Expression));+ ret->operand=operand;+ ret->type=type;++ return ret;+ }+ struct AST_Constant* get_constant_tree(struct token *constant)+ {+ struct AST_Constant *ret;+ ret=malloc(sizeof(struct AST_Constant));+ ret->type=OP_CONSTANT;+ ret->value=NULL;+ ret->value_type=NULL;+ /*TODO*/++ free(constant);+ return ret;++ }+ struct AST_String_Literal* get_string_literal_tree(struct token *string)+ {+ struct AST_String_Literal *ret;+ ret=malloc(sizeof(struct AST_Constant));+ ret->type=OP_STRING_LITERAL;+ ret->string=string;++ return ret;+ }+ struct AST_Lvalue_Expression* get_lvalue_expression_tree(struct token *id,struct Scope* scope)+ {+ struct AST_Lvalue_Expression *ret;+ ret=malloc(sizeof(struct AST_Lvalue_Expression));+ ret->type=OP_LVALUE;+ ret->lvalue=NULL;+ return ret;+ }++++++ struct AST_Labeled_Statement* get_labeled_statement_tree(struct token *label,struct AST* statement,enum AST_Type type)+ {+ struct AST_Labeled_Statement *ret;+ ret=malloc(sizeof(struct AST_Labeled_Statement));+ ret->type=type;+ ret->label=label;+ ret->statement=statement;++ return ret;+ }+ struct AST_Compound_Statement* get_compound_statement_tree(struct Scope *parent_scope)+ {+ struct AST_Compound_Statement *ret;+ ret=malloc(sizeof(struct AST_Compound_Statement));+ ret->type=ST_COMPOUND;+ Queue_Init(&ret->components);+ ret->scope=get_normal_scope(parent_scope,BLOCK_SCOPE);+ return ret;+ }+ struct AST_If_Statement* get_if_statement_tree()+ {+ struct AST_If_Statement *ret;+ ret=malloc(sizeof(struct AST_If_Statement));+ ret->type=ST_IF;++ return ret;+ }+ struct AST_Switch_Statement* get_switch_statement_tree()+ {+ struct AST_Switch_Statement *ret;+ ret=malloc(sizeof(struct AST_Switch_Statement));+ ret->type=ST_SWITCH;+ return ret;+ }+ struct AST_While_Statement* get_while_statement_tree()+ {+ struct AST_While_Statement *ret;+ ret=malloc(sizeof(struct AST_While_Statement));+ ret->type=ST_WHILE;+ return ret;+ }+ struct AST_Do_While_Statement* get_do_while_statement_tree()+ {+ struct AST_Do_While_Statement *ret;+ ret=malloc(sizeof(struct AST_Do_While_Statement));+ ret->type=ST_DO_WHILE;+ return ret;+ }++ struct AST_For_Statement* get_for_statement_tree()+ {+ struct AST_For_Statement *ret;+ ret=malloc(sizeof(struct AST_For_Statement));+ ret->type=ST_FOR;+ return ret;+ }+ struct AST_Return_Statement* get_return_statement_tree(struct AST* return_expression)+ {+ struct AST_Return_Statement *ret;+ ret=malloc(sizeof(struct AST_If_Statement));+ ret->type=ST_RETURN;+ ret->return_expression=return_expression;+ return ret;+ }++ struct AST_Goto_Statement* get_goto_statement_tree(struct token *label,struct Scope *scope)+ {+ struct AST_Goto_Statement *ret;+ ret=malloc(sizeof(struct AST_Goto_Statement));+ ret->type=ST_GOTO;+ ret->label=label;+ return ret;+ }+++ struct AST* get_nop_tree()+ {+ struct AST* ret;+ ret=malloc(sizeof(struct AST*));+ ret->type=OP_NOP;+ return ret;+ }++++ struct AST_Type_Definition* get_type_definition_tree(struct Denoted_Typedef *definition)+ {+ struct AST_Type_Definition *ret;+ ret=malloc(sizeof(struct AST_Type_Definition));+ ret->type=ST_TYPE_DEFINITION;+ ret->definition=definition;++ return ret;++ }+ struct AST_Object_Declaration* get_object_declaration_tree(struct Denoted_Object *object)+ {+ struct AST_Object_Declaration *ret;+ ret=malloc(sizeof(struct AST_Object_Declaration));+ ret->type=ST_OBJECT_DECLARATION;+ ret->object=object;+ return ret;+ }++ struct AST_Function_Definition* get_function_definition_tree(struct Scope *scope,struct Denoted_Function *function)+ {+ struct AST_Function_Definition *ret;+ ret=malloc(sizeof(struct AST_Function_Definition));+ ret->type=ST_FUNCTION_DEFINITION;+ ret->function=function;+ return ret;+ }++ struct AST_Function_Declaration* get_function_declaration_tree(struct Scope *scope,struct Denoted_Function *function)+ {+ struct AST_Function_Declaration *ret;+ ret=malloc(sizeof(struct AST_Function_Declaration));+ ret->type=ST_FUNCTION_DECLARATION;+ ret->function=function;+ return ret;+ }+ struct AST_Translation_Unit* get_translation_unit_tree()+ {+ struct AST_Translation_Unit *ret;+ ret=malloc(sizeof(struct AST_Translation_Unit));++ ret->internal_linkage=get_linkage();+ ret->file_scope=get_normal_scope(NULL,FILE_SCOPE);++++ Queue_Init(&ret->components);+ Queue_Init(&ret->static_objects);+ ret->type=TRANSLATION_UNIT;++ return ret;+ }+++ void delete_ast(struct AST* ast)+ {+ switch(ast->type)+ {+ case OP_COMMA:+ case OP_ADDITION:+ case OP_SUBTRACTION:+ case OP_MUL:+ case OP_DIV:+ case OP_REMAINDER:+ case OP_ASSIGN:+ case OP_ADD_ASSIGN:+ case OP_SUBTRACT_ASSIGN:+ case OP_MULTIPLY_ASSIGN:+ case OP_REMAINDER_ASSIGN:+ case OP_DIV_ASSIGN:+ case OP_SHIFT_LEFT_ASSIGN:+ case OP_AND_ASSIGN:+ case OP_SHIFT_RIGHT_ASSIGN:+ case OP_XOR_ASSIGN:+ case OP_PIPE_ASSIGN:+ case OP_LOGICAL_AND:+ case OP_LOGICAL_OR:+ case OP_BITWISE_OR:+ case OP_BITWISE_AND:+ case OP_BITWISE_XOR:+ case OP_MEMBER_TROUGH_PTR:+ case OP_MEMBER:+ case OP_ARR_SUBSCRIPT:+ case OP_SHIFT_LEFT:+ case OP_LESS_EQ:+ case OP_NOT_EQUAL:+ case OP_EQUAL:+ case OP_GREATER:+ case OP_LESS:+ case OP_GREATER_EQ:+ case OP_SHIFT_RIGHT:+ delete_ast_binary_expression((struct AST_Binary_Expression*)ast);+ break;+ case OP_COND:+ delete_ast_conditional_expression((struct AST_Conditional_Expression*)ast);+ break;+ case OP_FUNCTION:+ delete_ast_function_expression((struct AST_Function_Expression*)ast);+ break;+ case OP_NOP:+ /*it is just a ast node*/+ free(ast);+ break;+ case OP_LOGICAL_NOT:+ case OP_BITWISE_NOT:+ case OP_ADDR_OF:+ case OP_DEREFERENCE:+ case OP_POSTFIX_INC:+ case OP_POSTFIX_DEC:+ case OP_PREFIX_INC:+ case OP_PREFIX_DEC:+ case OP_UNARY_PLUS:+ case OP_UNARY_MINUS:+ case OP_CAST:+ case OP_SIZEOF:+ delete_ast_unary_expression((struct AST_Unary_Expression*)ast);+ break;+ case OP_LVALUE:+ delete_ast_lvalue_expression((struct AST_Lvalue_Expression*)ast);+ break;+ case OP_CONSTANT:+ delete_ast_constant((struct AST_Constant*)ast);+ break;+ case OP_STRING_LITERAL:+ delete_ast_string_literal((struct AST_String_Literal*)ast);+ break;+ case ST_COMPOUND:+ delete_ast_compound_statement((struct AST_Compound_Statement*)ast);+ break;+ case ST_SWITCH:+ delete_ast_switch_statement((struct AST_Switch_Statement*)ast);+ break;+ case ST_IF:+ delete_ast_if_statemtent((struct AST_If_Statement*)ast);+ break;+ case ST_WHILE:+ delete_ast_while_statemtent((struct AST_While_Statement*)ast);+ break;+ case ST_DO_WHILE:+ delete_ast_do_while_statement((struct AST_Do_While_Statement*)ast);+ break;+ case ST_GOTO:+ delete_ast_goto_statemtent((struct AST_Goto_Statement*)ast);+ break;+ case ST_LABEL:+ case ST_CASE:+ delete_ast_labeled_statement((struct AST_Labeled_Statement*)ast);+ break;+ case ST_DEFAULT:+ case ST_CONTINUE:+ case ST_BREAK:+ /*I think it doesnt come with anything*/+ free(ast);+ break;+ case ST_RETURN:+ delete_ast_return_statement((struct AST_Return_Statement*)ast);+ break;+ case ST_FOR:+ delete_ast_for_statement((struct AST_For_Statement*)ast);+ break;+ case ST_OBJECT_DECLARATION:+ delete_ast_object_declaration((struct AST_Object_Declaration*)ast);+ break;+ case ST_TYPE_DEFINITION:+ delete_ast_type_definition((struct AST_Type_Definition*)ast);+ break;+ case ST_FUNCTION_DEFINITION:+ delete_ast_function_definition((struct AST_Function_Definition*)ast);+ break;+ case ST_FUNCTION_DECLARATION:+ delete_ast_function_declaration((struct AST_Function_Declaration*)ast);+ break;+ case TRANSLATION_UNIT:+ delete_ast_translation_unit((struct AST_Translation_Unit*)ast);+ break;+ case ERROR:+ delete_ast_error((struct AST_Error*)ast);+ break;+ case ERROR_DECLARATION:+ delete_ast_declaration_error((struct AST_Declaration_Error*)ast);+ break;+ default:+ assert(0);+ }+ }+ void delete_ast_error(struct AST_Error *error)+ {+ if(error->error!=NULL)+ delete_ast(error->error);+ free(error);+ }+ void delete_ast_declaration_error(struct AST_Declaration_Error *error)+ {+ if(error->error!=NULL)+ delete_denoted_error((struct Denoted_Error*)error->error);+ free(error);+ }+ void delete_ast_binary_expression(struct AST_Binary_Expression *binary_expression)+ {+ if(binary_expression->left!=NULL)+ delete_ast(binary_expression->left);+ if(binary_expression->right!=NULL)+ delete_ast(binary_expression->right);++ free(binary_expression);+ }+ void delete_ast_conditional_expression(struct AST_Conditional_Expression *cond_expression)+ {++ if(cond_expression->left!=NULL)+ delete_ast(cond_expression->left);+ if(cond_expression->center!=NULL)+ delete_ast(cond_expression->center);+ if(cond_expression->right!=NULL)+ delete_ast(cond_expression->right);++ free(cond_expression);+ }+ void delete_ast_function_expression(struct AST_Function_Expression *function_expression)+ {+ struct Queue_Node *it;+ if(function_expression->id!=NULL)+ delete_ast(function_expression->id);+ while(function_expression->arguments.size>0)+ delete_ast(Queue_Pop(&function_expression->arguments));++ free(function_expression);++ }+ void delete_ast_lvalue_expression(struct AST_Lvalue_Expression *lval_expression)+ {+ free(lval_expression);+ }+ void delete_ast_unary_expression(struct AST_Unary_Expression *unary_expression)+ {+ if(unary_expression->operand!=NULL)+ delete_ast(unary_expression->operand);+ free(unary_expression);+ }+ void delete_ast_labeled_statement(struct AST_Labeled_Statement *labeled_statement)+ {+ if(labeled_statement->label!=NULL)+ free(labeled_statement->label);+ if(labeled_statement->statement!=NULL)+ delete_ast(labeled_statement->statement);+ free(labeled_statement);+ }+ void delete_ast_compound_statement(struct AST_Compound_Statement *compound_statement)+ {+ if(compound_statement->scope!=NULL)+ delete_scope(compound_statement->scope);+ while(compound_statement->components.size>0)+ delete_ast((struct AST*)Queue_Pop(&compound_statement->components));+ free(compound_statement);+ }+ void delete_ast_for_statement(struct AST_For_Statement *for_statement)+ {+ if(for_statement->condition!=NULL)+ delete_ast(for_statement->condition);+ if(for_statement->initialisation!=NULL)+ delete_ast(for_statement->initialisation);+ if(for_statement->update!=NULL)+ delete_ast(for_statement->update);+ if(for_statement->body_statement!=NULL)+ delete_ast(for_statement->body_statement);+ free(for_statement);+ }+ void delete_ast_while_statemtent(struct AST_While_Statement *while_statement)+ {+ if(while_statement->condition!=NULL)+ delete_ast(while_statement->condition);+ if(while_statement->body_statement!=NULL)+ delete_ast(while_statement->body_statement);+ free(while_statement);+ }+ void delete_ast_do_while_statement(struct AST_Do_While_Statement *do_while_statement)+ {+ if(do_while_statement->condition!=NULL)+ delete_ast(do_while_statement->condition);+ if(do_while_statement->body_statement!=NULL)+ delete_ast(do_while_statement->body_statement);+ free(do_while_statement);+ }+ void delete_ast_if_statemtent(struct AST_If_Statement *if_statement)+ {+ if(if_statement->condition!=NULL)+ delete_ast(if_statement->condition);+ if(if_statement->body_statement!=NULL)+ delete_ast(if_statement->body_statement);+ if(if_statement->else_statement!=NULL)+ delete_ast(if_statement->else_statement);+ free(if_statement);+ }+ void delete_ast_goto_statemtent(struct AST_Goto_Statement *goto_statement)+ {+ if(goto_statement->label!=NULL)+ free(goto_statement->label);+ free(goto_statement);+ }+ void delete_ast_switch_statement(struct AST_Switch_Statement *switch_statement)+ {+ if(switch_statement->condition!=NULL)+ delete_ast(switch_statement->condition);+ if(switch_statement->body_statement!=NULL)+ delete_ast(switch_statement->body_statement);+ free(switch_statement);+ }+ void delete_ast_return_statement(struct AST_Return_Statement *return_statement)+ {+ if(return_statement->return_expression!=NULL)+ delete_ast(return_statement->return_expression);+ free(return_statement);+ }+ void delete_ast_type_definition(struct AST_Type_Definition *type_definition)+ {+ /*deleting denoted objects in scopes*/+ free(type_definition);+ }+ void delete_ast_object_declaration(struct AST_Object_Declaration *object_declaration)+ {+ free(object_declaration);++ }+ void delete_ast_function_definition(struct AST_Function_Definition *function_definition)+ {+ free(function_definition);+ }+ void delete_ast_function_declaration(struct AST_Function_Declaration *function_declaration)+ {+ free(function_declaration);+ }+ void delete_ast_translation_unit(struct AST_Translation_Unit *translation_unit)+ {+ while(translation_unit->components.size>0)+ delete_ast((struct AST*)Queue_Pop(&translation_unit->components));+ if(translation_unit->file_scope!=NULL)+ delete_scope(translation_unit->file_scope);+ delete_linkage(translation_unit->internal_linkage);+ free(translation_unit);+ }+ void delete_ast_constant(struct AST_Constant *constant)+ {+ if(constant->value!=NULL)+ free(constant->value);+ free(constant);+ }+ void delete_ast_string_literal(struct AST_String_Literal *string)+ {+ free(string->string);+ free(string);+ }++++++ #endifF diff --git a/frontend/ast.h b/frontend/ast.h new file mode 100644 --- /dev/null +++ b/frontend/ast.h+ #ifndef GCC_AST_H+ #define GCC_AST_H GCC_AST_H+ #include <ast.hh>+ #include <scope.h>+ #include <parse_declaration.h>+ #include <denoted.h>+ #include <linkage.h>++++ enum AST_Type;+++ struct AST+ {+ enum AST_Type type;+ };+ struct AST_Error+ {+ enum AST_Type type;+ struct AST *error;+ };+ struct AST_Declaration_Error+ {+ enum AST_Type type;+ struct Denoted *error;+ };+ struct AST_Binary_Expression+ {+ enum AST_Type type;++ struct Type *value_type;+ struct AST *left;+ struct AST *right;++ };+ struct AST_Conditional_Expression+ {+ enum AST_Type type;++ struct Type *value_type;++ struct AST *left;+ struct AST *center;+ struct AST *right;++ };+ struct AST_Function_Expression+ {+ enum AST_Type type;+ struct Type *value_type;++ struct AST *id;+ /*queue of astrees*/+ struct Queue arguments;+ };++ struct AST_Constant+ {+ enum AST_Type type;++ struct Type *value_type;+ void *value;+ };+ /*TODO correct this*/+ struct AST_String_Literal+ {+ enum AST_Type type;+ struct token *string;+ };+ struct AST_Lvalue_Expression+ {+ enum AST_Type type;+ struct Denoted *lvalue;+ };+ struct AST_Unary_Expression+ {+ enum AST_Type type;+ struct Type *value_type;+ struct AST *operand;+ };++ struct AST_Labeled_Statement+ {+ enum AST_Type type;+ struct token *label;+ struct AST *statement;+ };+ struct AST_Compound_Statement+ {+ enum AST_Type type;++ struct Scope *scope;+ struct Queue components;+ };++ struct AST_For_Statement+ {+ enum AST_Type type;+ struct AST *condition;+ struct AST *initialisation;+ struct AST *update;+ struct AST *body_statement;+ };+ struct AST_While_Statement+ {+ enum AST_Type type;+ struct AST *condition;+ struct AST *body_statement;+ };+ struct AST_Do_While_Statement+ {+ enum AST_Type type;+ struct AST *body_statement;+ struct AST *condition;+ };+ struct AST_If_Statement+ {+ enum AST_Type type;+ struct AST* condition;+ struct AST* body_statement;+ struct AST* else_statement;++ };+ struct AST_Goto_Statement+ {+ enum AST_Type type;+ struct token *label;+ };+ struct AST_Switch_Statement+ {+ enum AST_Type type;+ struct AST* condition;+ struct AST* body_statement;+ };+ struct AST_Return_Statement+ {+ enum AST_Type type;+ struct AST* return_expression;++ };+++ struct AST_Type_Definition+ {+ enum AST_Type type;+ struct Denoted_Typedef *definition;+ };+ struct AST_Object_Declaration+ {+ enum AST_Type type;+ struct Denoted_Object *object;+ };+ struct AST_Function_Definition+ {+ enum AST_Type type;+ struct Denoted_Function *function;+ };+ struct AST_Function_Declaration+ {+ enum AST_Type type;+ struct Denoted_Function *function;+ };+ struct AST_Translation_Unit+ {+ enum AST_Type type;+ struct Queue components;++ struct Scope *file_scope;+ struct Linkage *internal_linkage;+ struct Queue static_objects;+ };+++++ struct AST_Error* get_error_tree(struct AST *error);+ struct AST_Declaration_Error* get_declaration_error_tree(struct Denoted *error);+ struct AST_Binary_Expression* get_binary_expression_tree(struct AST *left,struct AST *right,enum AST_Type type);+ struct AST_Conditional_Expression* get_conditional_expression_tree(struct AST *left,struct AST *center,struct AST *right);+ struct AST_Function_Expression* get_function_expression_tree(struct AST* id,struct Scope *scope);+ struct AST_Unary_Expression* get_unary_expression_tree(struct AST *operand,enum AST_Type type);+ struct AST_Constant* get_constant_tree(struct token *constant);+ struct AST_String_Literal* get_string_literal_tree(struct token *string);+ struct AST_Lvalue_Expression* get_lvalue_expression_tree(struct token *id,struct Scope* scope);+ struct AST_Labeled_Statement* get_labeled_statement_tree(struct token *label,struct AST* statement,enum AST_Type type);+ struct AST_Compound_Statement* get_compound_statement_tree(struct Scope *parent_scope);+ struct AST_If_Statement* get_if_statement_tree();+ struct AST_Switch_Statement* get_switch_statement_tree();+ struct AST_While_Statement* get_while_statement_tree();+ struct AST_Do_While_Statement* get_do_while_statement_tree();+ struct AST_For_Statement* get_for_statement_tree();+ struct AST_Return_Statement* get_return_statement_tree(struct AST* return_expression);+ struct AST_Goto_Statement* get_goto_statement_tree(struct token *label,struct Scope *scope);+ struct AST* get_nop_tree();+ struct AST_Type_Definition* get_type_definition_tree(struct Denoted_Typedef *definition);+ struct AST_Object_Declaration* get_object_declaration_tree(struct Denoted_Object *object);+ struct AST_Function_Declaration* get_function_declaration_tree(struct Scope *scope,struct Denoted_Function *function);+ struct AST_Function_Definition* get_function_definition_tree(struct Scope *scope,struct Denoted_Function *function);+ struct AST_Translation_Unit* get_translation_unit_tree();++++ void delete_ast(struct AST* ast);+ void delete_ast_error(struct AST_Error *error);+ void delete_ast_declaration_error(struct AST_Declaration_Error *error);+ void delete_ast_binary_expression(struct AST_Binary_Expression *binary_expression);+ void delete_ast_conditional_expression(struct AST_Conditional_Expression *cond_expression);+ void delete_ast_function_expression(struct AST_Function_Expression *function_expression);+ void delete_ast_constant(struct AST_Constant *constant);+ void delete_ast_string_literal(struct AST_String_Literal *string);+ void delete_ast_lvalue_expression(struct AST_Lvalue_Expression *lval_expression);+ void delete_ast_unary_expression(struct AST_Unary_Expression *unary_expression);+ void delete_ast_labeled_statement(struct AST_Labeled_Statement *labeled_statement);+ void delete_ast_compound_statement(struct AST_Compound_Statement *compound_statement);+ void delete_ast_for_statement(struct AST_For_Statement *for_statement);+ void delete_ast_while_statemtent(struct AST_While_Statement *while_statement);+ void delete_ast_do_while_statement(struct AST_Do_While_Statement *do_while_statement);+ void delete_ast_if_statemtent(struct AST_If_Statement *if_statement);+ void delete_ast_goto_statemtent(struct AST_Goto_Statement *goto_statement);+ void delete_ast_switch_statement(struct AST_Switch_Statement *switch_statement);+ void delete_ast_return_statement(struct AST_Return_Statement *return_statement);+ void delete_ast_type_definition(struct AST_Type_Definition *type_definition);+ void delete_ast_object_declaration(struct AST_Object_Declaration *object_declaration);+ void delete_ast_function_definition(struct AST_Function_Definition *function_definition);+ void delete_ast_function_declaration(struct AST_Function_Declaration *function_declaration);+ void delete_ast_translation_unit(struct AST_Translation_Unit *translation_unit);+++++++++++ #endifF diff --git a/frontend/ast.hh b/frontend/ast.hh new file mode 100644 --- /dev/null +++ b/frontend/ast.hh+ #ifndef GCC_AST_HH+ #define GCC_AST_HH GCC_AST_HH++ #define BIN_EXPR_PTR(x) ((struct AST_Binary_Expression*)(x))+ #define UN_EXPR_PTR(x) ((struct AST_Unary_Expression*)(x))+ #define LVAL_EXPR_PTR(x) ((struct AST_Lvalue_Expression*)(x))+ #define DECLR_PTR(x) ((struct AST_Declaration*)(x))+ #define IF_ST_PTR(s) ((struct AST_If_Statement*)(x))++ enum AST_Type{+ OP_COMMA+ ,OP_ADDITION,OP_SUBTRACTION,OP_MUL,OP_DIV,OP_REMAINDER+ ,OP_COND,OP_FUNCTION+ ,OP_ASSIGN,OP_ADD_ASSIGN,OP_SUBTRACT_ASSIGN,OP_MULTIPLY_ASSIGN,OP_REMAINDER_ASSIGN,OP_DIV_ASSIGN+ ,OP_SHIFT_LEFT_ASSIGN,OP_SHIFT_RIGHT_ASSIGN+ ,OP_AND_ASSIGN,OP_XOR_ASSIGN,OP_PIPE_ASSIGN+ ,OP_NOP+ ,OP_LOGICAL_OR,OP_LOGICAL_AND,OP_LOGICAL_NOT+ ,OP_BITWISE_OR,OP_BITWISE_AND,OP_BITWISE_XOR,OP_BITWISE_NOT+ ,OP_ADDR_OF,OP_DEREFERENCE,OP_MEMBER_TROUGH_PTR,OP_MEMBER,OP_ARR_SUBSCRIPT+ ,OP_POSTFIX_INC,OP_POSTFIX_DEC+ ,OP_PREFIX_INC,OP_PREFIX_DEC+ ,OP_UNARY_PLUS,OP_UNARY_MINUS+ ,OP_CAST,OP_SIZEOF+ ,OP_SHIFT_LEFT,OP_SHIFT_RIGHT+ ,OP_LESS_EQ,OP_GREATER_EQ+ ,OP_LESS,OP_GREATER+ ,OP_EQUAL,OP_NOT_EQUAL+ ,OP_LVALUE,OP_CONSTANT,OP_STRING_LITERAL+ ,ST_COMPOUND,ST_EXPRESSION,ST_SWITCH,ST_IF,ST_WHILE,ST_DO_WHILE,ST_GOTO,ST_LABEL,ST_CASE,ST_DEFAULT+ ,ST_CONTINUE,ST_BREAK,ST_RETURN,ST_FOR+ ,ST_OBJECT_DECLARATION,ST_TYPE_DEFINITION,ST_FUNCTION_DEFINITION+ ,ST_FUNCTION_DECLARATION+ ,TRANSLATION_UNIT+ ,ERROR,ERROR_DECLARATION+ };+ struct AST;+ struct AST_Error;+ struct AST_Declaration_Error;+ struct AST_Binary_Expression;+ struct AST_Conditional_Expression;+ struct AST_Function_Expression;+ struct AST_Constant;+ struct AST_String_Literal;+ struct AST_Lvalue_Expression;+ struct AST_Unary_Expression;+ struct AST_Labeled_Statement;+ struct AST_Compound_Statement;+ struct AST_For_Statement;+ struct AST_While_Statement;+ struct AST_Do_While_Statement;+ struct AST_If_Statement;+ struct AST_Goto_Statement;+ struct AST_Switch_Statement;+ struct AST_Return_Statement;+ struct AST_Type_Definition;+ struct AST_Object_Declaration;+ struct AST_Function_Definition;+ struct AST_Function_Declaration;+ struct AST_Translation_Unit;++ #endifF diff --git a/frontend/semantics/ast.c b/frontend/semantics/ast.c deleted file mode 100644 --- a/frontend/semantics/ast.c +++ /dev/null- #ifndef GCC_AST_C- #define GCC_AST_C GCC_AST_C- #include <ast.h>-- struct AST_Error* get_error_tree(struct AST *error)- {- struct AST_Error *ret;- ret=malloc(sizeof(struct AST_Error));- ret->type=ERROR;- ret->error=error;- return ret;- }- struct AST_Declaration_Error* get_declaration_error_tree(struct Denoted *error)- {-- struct AST_Declaration_Error *ret;- ret=malloc(sizeof(struct AST_Declaration_Error));- ret->type=ERROR_DECLARATION;- ret->error=error;- return ret;- }-- struct AST_Binary_Expression* get_binary_expression_tree(struct AST *left,struct AST *right,enum AST_Type type)- {- struct AST_Binary_Expression *ret;- ret=malloc(sizeof(struct AST_Binary_Expression));- ret->type=type;- ret->left=left;- ret->right=right;-- return ret;- }- struct AST_Conditional_Expression* get_conditional_expression_tree(struct AST *left,struct AST *center,struct AST *right)- {- struct AST_Conditional_Expression *ret;- ret=malloc(sizeof(struct AST_Conditional_Expression));- ret->type=OP_COND;- ret->left=left;- ret->center=center;- ret->right=right;- return ret;- }-- struct AST_Function_Expression* get_function_expression_tree(struct AST* id,struct Scope *scope)- {- struct AST_Function_Expression *ret;- ret=malloc(sizeof(struct AST_Function_Expression));- ret->type=OP_FUNCTION;- ret->id=id;- Queue_Init(&ret->arguments);- return ret;- }- struct AST_Unary_Expression* get_unary_expression_tree(struct AST *operand,enum AST_Type type)- {-- struct AST_Unary_Expression *ret;- ret=malloc(sizeof(struct AST_Unary_Expression));- ret->operand=operand;- ret->type=type;-- return ret;- }- struct AST_Constant* get_constant_tree(struct token *constant)- {- struct AST_Constant *ret;- ret=malloc(sizeof(struct AST_Constant));- ret->type=OP_CONSTANT;- ret->value=NULL;- ret->value_type=NULL;- /*TODO*/-- free(constant);- return ret;-- }- struct AST_String_Literal* get_string_literal_tree(struct token *string)- {- struct AST_String_Literal *ret;- ret=malloc(sizeof(struct AST_Constant));- ret->type=OP_STRING_LITERAL;- ret->string=string;-- return ret;- }- struct AST_Lvalue_Expression* get_lvalue_expression_tree(struct token *id,struct Scope* scope)- {- struct AST_Lvalue_Expression *ret;- ret=malloc(sizeof(struct AST_Lvalue_Expression));- ret->type=OP_LVALUE;- ret->lvalue=NULL;- return ret;- }------ struct AST_Labeled_Statement* get_labeled_statement_tree(struct token *label,struct AST* statement,enum AST_Type type)- {- struct AST_Labeled_Statement *ret;- ret=malloc(sizeof(struct AST_Labeled_Statement));- ret->type=type;- ret->label=label;- ret->statement=statement;-- return ret;- }- struct AST_Compound_Statement* get_compound_statement_tree(struct Scope *parent_scope)- {- struct AST_Compound_Statement *ret;- ret=malloc(sizeof(struct AST_Compound_Statement));- ret->type=ST_COMPOUND;- Queue_Init(&ret->components);- ret->scope=get_normal_scope(parent_scope,BLOCK_SCOPE);- return ret;- }- struct AST_If_Statement* get_if_statement_tree()- {- struct AST_If_Statement *ret;- ret=malloc(sizeof(struct AST_If_Statement));- ret->type=ST_IF;-- return ret;- }- struct AST_Switch_Statement* get_switch_statement_tree()- {- struct AST_Switch_Statement *ret;- ret=malloc(sizeof(struct AST_Switch_Statement));- ret->type=ST_SWITCH;- return ret;- }- struct AST_While_Statement* get_while_statement_tree()- {- struct AST_While_Statement *ret;- ret=malloc(sizeof(struct AST_While_Statement));- ret->type=ST_WHILE;- return ret;- }- struct AST_Do_While_Statement* get_do_while_statement_tree()- {- struct AST_Do_While_Statement *ret;- ret=malloc(sizeof(struct AST_Do_While_Statement));- ret->type=ST_DO_WHILE;- return ret;- }-- struct AST_For_Statement* get_for_statement_tree()- {- struct AST_For_Statement *ret;- ret=malloc(sizeof(struct AST_For_Statement));- ret->type=ST_FOR;- return ret;- }- struct AST_Return_Statement* get_return_statement_tree(struct AST* return_expression)- {- struct AST_Return_Statement *ret;- ret=malloc(sizeof(struct AST_If_Statement));- ret->type=ST_RETURN;- ret->return_expression=return_expression;- return ret;- }-- struct AST_Goto_Statement* get_goto_statement_tree(struct token *label,struct Scope *scope)- {- struct AST_Goto_Statement *ret;- ret=malloc(sizeof(struct AST_Goto_Statement));- ret->type=ST_GOTO;- ret->label=label;- return ret;- }--- struct AST* get_nop_tree()- {- struct AST* ret;- ret=malloc(sizeof(struct AST*));- ret->type=OP_NOP;- return ret;- }---- struct AST_Type_Definition* get_type_definition_tree(struct Denoted_Typedef *definition)- {- struct AST_Type_Definition *ret;- ret=malloc(sizeof(struct AST_Type_Definition));- ret->type=ST_TYPE_DEFINITION;- ret->definition=definition;-- return ret;-- }- struct AST_Object_Declaration* get_object_declaration_tree(struct Denoted_Object *object)- {- struct AST_Object_Declaration *ret;- ret=malloc(sizeof(struct AST_Object_Declaration));- ret->type=ST_OBJECT_DECLARATION;- ret->object=object;- return ret;- }-- struct AST_Function_Definition* get_function_definition_tree(struct Scope *scope,struct Denoted_Function *function)- {- struct AST_Function_Definition *ret;- ret=malloc(sizeof(struct AST_Function_Definition));- ret->type=ST_FUNCTION_DEFINITION;- ret->function=function;- return ret;- }-- struct AST_Function_Declaration* get_function_declaration_tree(struct Scope *scope,struct Denoted_Function *function)- {- struct AST_Function_Declaration *ret;- ret=malloc(sizeof(struct AST_Function_Declaration));- ret->type=ST_FUNCTION_DECLARATION;- ret->function=function;- return ret;- }- struct AST_Translation_Unit* get_translation_unit_tree()- {- struct AST_Translation_Unit *ret;- ret=malloc(sizeof(struct AST_Translation_Unit));-- ret->internal_linkage=get_linkage();- ret->file_scope=get_normal_scope(NULL,FILE_SCOPE);---- Queue_Init(&ret->components);- Queue_Init(&ret->static_objects);- ret->type=TRANSLATION_UNIT;-- return ret;- }--- void delete_ast(struct AST* ast)- {- switch(ast->type)- {- case OP_COMMA:- case OP_ADDITION:- case OP_SUBTRACTION:- case OP_MUL:- case OP_DIV:- case OP_REMAINDER:- case OP_ASSIGN:- case OP_ADD_ASSIGN:- case OP_SUBTRACT_ASSIGN:- case OP_MULTIPLY_ASSIGN:- case OP_REMAINDER_ASSIGN:- case OP_DIV_ASSIGN:- case OP_SHIFT_LEFT_ASSIGN:- case OP_AND_ASSIGN:- case OP_SHIFT_RIGHT_ASSIGN:- case OP_XOR_ASSIGN:- case OP_PIPE_ASSIGN:- case OP_LOGICAL_AND:- case OP_LOGICAL_OR:- case OP_BITWISE_OR:- case OP_BITWISE_AND:- case OP_BITWISE_XOR:- case OP_MEMBER_TROUGH_PTR:- case OP_MEMBER:- case OP_ARR_SUBSCRIPT:- case OP_SHIFT_LEFT:- case OP_LESS_EQ:- case OP_NOT_EQUAL:- case OP_EQUAL:- case OP_GREATER:- case OP_LESS:- case OP_GREATER_EQ:- case OP_SHIFT_RIGHT:- delete_ast_binary_expression((struct AST_Binary_Expression*)ast);- break;- case OP_COND:- delete_ast_conditional_expression((struct AST_Conditional_Expression*)ast);- break;- case OP_FUNCTION:- delete_ast_function_expression((struct AST_Function_Expression*)ast);- break;- case OP_NOP:- /*it is just a ast node*/- free(ast);- break;- case OP_LOGICAL_NOT:- case OP_BITWISE_NOT:- case OP_ADDR_OF:- case OP_DEREFERENCE:- case OP_POSTFIX_INC:- case OP_POSTFIX_DEC:- case OP_PREFIX_INC:- case OP_PREFIX_DEC:- case OP_UNARY_PLUS:- case OP_UNARY_MINUS:- case OP_CAST:- case OP_SIZEOF:- delete_ast_unary_expression((struct AST_Unary_Expression*)ast);- break;- case OP_LVALUE:- delete_ast_lvalue_expression((struct AST_Lvalue_Expression*)ast);- break;- case OP_CONSTANT:- delete_ast_constant((struct AST_Constant*)ast);- break;- case OP_STRING_LITERAL:- delete_ast_string_literal((struct AST_String_Literal*)ast);- break;- case ST_COMPOUND:- delete_ast_compound_statement((struct AST_Compound_Statement*)ast);- break;- case ST_SWITCH:- delete_ast_switch_statement((struct AST_Switch_Statement*)ast);- break;- case ST_IF:- delete_ast_if_statemtent((struct AST_If_Statement*)ast);- break;- case ST_WHILE:- delete_ast_while_statemtent((struct AST_While_Statement*)ast);- break;- case ST_DO_WHILE:- delete_ast_do_while_statement((struct AST_Do_While_Statement*)ast);- break;- case ST_GOTO:- delete_ast_goto_statemtent((struct AST_Goto_Statement*)ast);- break;- case ST_LABEL:- case ST_CASE:- delete_ast_labeled_statement((struct AST_Labeled_Statement*)ast);- break;- case ST_DEFAULT:- case ST_CONTINUE:- case ST_BREAK:- /*I think it doesnt come with anything*/- free(ast);- break;- case ST_RETURN:- delete_ast_return_statement((struct AST_Return_Statement*)ast);- break;- case ST_FOR:- delete_ast_for_statement((struct AST_For_Statement*)ast);- break;- case ST_OBJECT_DECLARATION:- delete_ast_object_declaration((struct AST_Object_Declaration*)ast);- break;- case ST_TYPE_DEFINITION:- delete_ast_type_definition((struct AST_Type_Definition*)ast);- break;- case ST_FUNCTION_DEFINITION:- delete_ast_function_definition((struct AST_Function_Definition*)ast);- break;- case ST_FUNCTION_DECLARATION:- delete_ast_function_declaration((struct AST_Function_Declaration*)ast);- break;- case TRANSLATION_UNIT:- delete_ast_translation_unit((struct AST_Translation_Unit*)ast);- break;- case ERROR:- delete_ast_error((struct AST_Error*)ast);- break;- case ERROR_DECLARATION:- delete_ast_declaration_error((struct AST_Declaration_Error*)ast);- break;- default:- assert(0);- }- }- void delete_ast_error(struct AST_Error *error)- {- if(error->error!=NULL)- delete_ast(error->error);- free(error);- }- void delete_ast_declaration_error(struct AST_Declaration_Error *error)- {- if(error->error!=NULL)- delete_denoted_error((struct Denoted_Error*)error->error);- free(error);- }- void delete_ast_binary_expression(struct AST_Binary_Expression *binary_expression)- {- if(binary_expression->left!=NULL)- delete_ast(binary_expression->left);- if(binary_expression->right!=NULL)- delete_ast(binary_expression->right);-- free(binary_expression);- }- void delete_ast_conditional_expression(struct AST_Conditional_Expression *cond_expression)- {-- if(cond_expression->left!=NULL)- delete_ast(cond_expression->left);- if(cond_expression->center!=NULL)- delete_ast(cond_expression->center);- if(cond_expression->right!=NULL)- delete_ast(cond_expression->right);-- free(cond_expression);- }- void delete_ast_function_expression(struct AST_Function_Expression *function_expression)- {- struct Queue_Node *it;- if(function_expression->id!=NULL)- delete_ast(function_expression->id);- while(function_expression->arguments.size>0)- delete_ast(Queue_Pop(&function_expression->arguments));-- free(function_expression);-- }- void delete_ast_lvalue_expression(struct AST_Lvalue_Expression *lval_expression)- {- free(lval_expression);- }- void delete_ast_unary_expression(struct AST_Unary_Expression *unary_expression)- {- if(unary_expression->operand!=NULL)- delete_ast(unary_expression->operand);- free(unary_expression);- }- void delete_ast_labeled_statement(struct AST_Labeled_Statement *labeled_statement)- {- if(labeled_statement->label!=NULL)- free(labeled_statement->label);- if(labeled_statement->statement!=NULL)- delete_ast(labeled_statement->statement);- free(labeled_statement);- }- void delete_ast_compound_statement(struct AST_Compound_Statement *compound_statement)- {- if(compound_statement->scope!=NULL)- delete_scope(compound_statement->scope);- while(compound_statement->components.size>0)- delete_ast((struct AST*)Queue_Pop(&compound_statement->components));- free(compound_statement);- }- void delete_ast_for_statement(struct AST_For_Statement *for_statement)- {- if(for_statement->condition!=NULL)- delete_ast(for_statement->condition);- if(for_statement->initialisation!=NULL)- delete_ast(for_statement->initialisation);- if(for_statement->update!=NULL)- delete_ast(for_statement->update);- if(for_statement->body_statement!=NULL)- delete_ast(for_statement->body_statement);- free(for_statement);- }- void delete_ast_while_statemtent(struct AST_While_Statement *while_statement)- {- if(while_statement->condition!=NULL)- delete_ast(while_statement->condition);- if(while_statement->body_statement!=NULL)- delete_ast(while_statement->body_statement);- free(while_statement);- }- void delete_ast_do_while_statement(struct AST_Do_While_Statement *do_while_statement)- {- if(do_while_statement->condition!=NULL)- delete_ast(do_while_statement->condition);- if(do_while_statement->body_statement!=NULL)- delete_ast(do_while_statement->body_statement);- free(do_while_statement);- }- void delete_ast_if_statemtent(struct AST_If_Statement *if_statement)- {- if(if_statement->condition!=NULL)- delete_ast(if_statement->condition);- if(if_statement->body_statement!=NULL)- delete_ast(if_statement->body_statement);- if(if_statement->else_statement!=NULL)- delete_ast(if_statement->else_statement);- free(if_statement);- }- void delete_ast_goto_statemtent(struct AST_Goto_Statement *goto_statement)- {- if(goto_statement->label!=NULL)- free(goto_statement->label);- free(goto_statement);- }- void delete_ast_switch_statement(struct AST_Switch_Statement *switch_statement)- {- if(switch_statement->condition!=NULL)- delete_ast(switch_statement->condition);- if(switch_statement->body_statement!=NULL)- delete_ast(switch_statement->body_statement);- free(switch_statement);- }- void delete_ast_return_statement(struct AST_Return_Statement *return_statement)- {- if(return_statement->return_expression!=NULL)- delete_ast(return_statement->return_expression);- free(return_statement);- }- void delete_ast_type_definition(struct AST_Type_Definition *type_definition)- {- /*deleting denoted objects in scopes*/- free(type_definition);- }- void delete_ast_object_declaration(struct AST_Object_Declaration *object_declaration)- {- free(object_declaration);-- }- void delete_ast_function_definition(struct AST_Function_Definition *function_definition)- {- free(function_definition);- }- void delete_ast_function_declaration(struct AST_Function_Declaration *function_declaration)- {- free(function_declaration);- }- void delete_ast_translation_unit(struct AST_Translation_Unit *translation_unit)- {- while(translation_unit->components.size>0)- delete_ast((struct AST*)Queue_Pop(&translation_unit->components));- if(translation_unit->file_scope!=NULL)- delete_scope(translation_unit->file_scope);- delete_linkage(translation_unit->internal_linkage);- free(translation_unit);- }- void delete_ast_constant(struct AST_Constant *constant)- {- if(constant->value!=NULL)- free(constant->value);- free(constant);- }- void delete_ast_string_literal(struct AST_String_Literal *string)- {- free(string->string);- free(string);- }------ #endifF diff --git a/frontend/semantics/ast.h b/frontend/semantics/ast.h deleted file mode 100644 --- a/frontend/semantics/ast.h +++ /dev/null- #ifndef GCC_AST_H- #define GCC_AST_H GCC_AST_H- #include <ast.hh>- #include <scope.h>- #include <parse_declaration.h>- #include <denoted.h>- #include <linkage.h>---- enum AST_Type;--- struct AST- {- enum AST_Type type;- };- struct AST_Error- {- enum AST_Type type;- struct AST *error;- };- struct AST_Declaration_Error- {- enum AST_Type type;- struct Denoted *error;- };- struct AST_Binary_Expression- {- enum AST_Type type;-- struct Type *value_type;- struct AST *left;- struct AST *right;-- };- struct AST_Conditional_Expression- {- enum AST_Type type;-- struct Type *value_type;-- struct AST *left;- struct AST *center;- struct AST *right;-- };- struct AST_Function_Expression- {- enum AST_Type type;- struct Type *value_type;-- struct AST *id;- /*queue of astrees*/- struct Queue arguments;- };-- struct AST_Constant- {- enum AST_Type type;-- struct Type *value_type;- void *value;- };- /*TODO correct this*/- struct AST_String_Literal- {- enum AST_Type type;- struct token *string;- };- struct AST_Lvalue_Expression- {- enum AST_Type type;- struct Denoted *lvalue;- };- struct AST_Unary_Expression- {- enum AST_Type type;- struct Type *value_type;- struct AST *operand;- };-- struct AST_Labeled_Statement- {- enum AST_Type type;- struct token *label;- struct AST *statement;- };- struct AST_Compound_Statement- {- enum AST_Type type;-- struct Scope *scope;- struct Queue components;- };-- struct AST_For_Statement- {- enum AST_Type type;- struct AST *condition;- struct AST *initialisation;- struct AST *update;- struct AST *body_statement;- };- struct AST_While_Statement- {- enum AST_Type type;- struct AST *condition;- struct AST *body_statement;- };- struct AST_Do_While_Statement- {- enum AST_Type type;- struct AST *body_statement;- struct AST *condition;- };- struct AST_If_Statement- {- enum AST_Type type;- struct AST* condition;- struct AST* body_statement;- struct AST* else_statement;-- };- struct AST_Goto_Statement- {- enum AST_Type type;- struct token *label;- };- struct AST_Switch_Statement- {- enum AST_Type type;- struct AST* condition;- struct AST* body_statement;- };- struct AST_Return_Statement- {- enum AST_Type type;- struct AST* return_expression;-- };--- struct AST_Type_Definition- {- enum AST_Type type;- struct Denoted_Typedef *definition;- };- struct AST_Object_Declaration- {- enum AST_Type type;- struct Denoted_Object *object;- };- struct AST_Function_Definition- {- enum AST_Type type;- struct Denoted_Function *function;- };- struct AST_Function_Declaration- {- enum AST_Type type;- struct Denoted_Function *function;- };- struct AST_Translation_Unit- {- enum AST_Type type;- struct Queue components;-- struct Scope *file_scope;- struct Linkage *internal_linkage;- struct Queue static_objects;- };----- struct AST_Error* get_error_tree(struct AST *error);- struct AST_Declaration_Error* get_declaration_error_tree(struct Denoted *error);- struct AST_Binary_Expression* get_binary_expression_tree(struct AST *left,struct AST *right,enum AST_Type type);- struct AST_Conditional_Expression* get_conditional_expression_tree(struct AST *left,struct AST *center,struct AST *right);- struct AST_Function_Expression* get_function_expression_tree(struct AST* id,struct Scope *scope);- struct AST_Unary_Expression* get_unary_expression_tree(struct AST *operand,enum AST_Type type);- struct AST_Constant* get_constant_tree(struct token *constant);- struct AST_String_Literal* get_string_literal_tree(struct token *string);- struct AST_Lvalue_Expression* get_lvalue_expression_tree(struct token *id,struct Scope* scope);- struct AST_Labeled_Statement* get_labeled_statement_tree(struct token *label,struct AST* statement,enum AST_Type type);- struct AST_Compound_Statement* get_compound_statement_tree(struct Scope *parent_scope);- struct AST_If_Statement* get_if_statement_tree();- struct AST_Switch_Statement* get_switch_statement_tree();- struct AST_While_Statement* get_while_statement_tree();- struct AST_Do_While_Statement* get_do_while_statement_tree();- struct AST_For_Statement* get_for_statement_tree();- struct AST_Return_Statement* get_return_statement_tree(struct AST* return_expression);- struct AST_Goto_Statement* get_goto_statement_tree(struct token *label,struct Scope *scope);- struct AST* get_nop_tree();- struct AST_Type_Definition* get_type_definition_tree(struct Denoted_Typedef *definition);- struct AST_Object_Declaration* get_object_declaration_tree(struct Denoted_Object *object);- struct AST_Function_Declaration* get_function_declaration_tree(struct Scope *scope,struct Denoted_Function *function);- struct AST_Function_Definition* get_function_definition_tree(struct Scope *scope,struct Denoted_Function *function);- struct AST_Translation_Unit* get_translation_unit_tree();---- void delete_ast(struct AST* ast);- void delete_ast_error(struct AST_Error *error);- void delete_ast_declaration_error(struct AST_Declaration_Error *error);- void delete_ast_binary_expression(struct AST_Binary_Expression *binary_expression);- void delete_ast_conditional_expression(struct AST_Conditional_Expression *cond_expression);- void delete_ast_function_expression(struct AST_Function_Expression *function_expression);- void delete_ast_constant(struct AST_Constant *constant);- void delete_ast_string_literal(struct AST_String_Literal *string);- void delete_ast_lvalue_expression(struct AST_Lvalue_Expression *lval_expression);- void delete_ast_unary_expression(struct AST_Unary_Expression *unary_expression);- void delete_ast_labeled_statement(struct AST_Labeled_Statement *labeled_statement);- void delete_ast_compound_statement(struct AST_Compound_Statement *compound_statement);- void delete_ast_for_statement(struct AST_For_Statement *for_statement);- void delete_ast_while_statemtent(struct AST_While_Statement *while_statement);- void delete_ast_do_while_statement(struct AST_Do_While_Statement *do_while_statement);- void delete_ast_if_statemtent(struct AST_If_Statement *if_statement);- void delete_ast_goto_statemtent(struct AST_Goto_Statement *goto_statement);- void delete_ast_switch_statement(struct AST_Switch_Statement *switch_statement);- void delete_ast_return_statement(struct AST_Return_Statement *return_statement);- void delete_ast_type_definition(struct AST_Type_Definition *type_definition);- void delete_ast_object_declaration(struct AST_Object_Declaration *object_declaration);- void delete_ast_function_definition(struct AST_Function_Definition *function_definition);- void delete_ast_function_declaration(struct AST_Function_Declaration *function_declaration);- void delete_ast_translation_unit(struct AST_Translation_Unit *translation_unit);----------- #endifF diff --git a/frontend/semantics/ast.hh b/frontend/semantics/ast.hh deleted file mode 100644 --- a/frontend/semantics/ast.hh +++ /dev/null- #ifndef GCC_AST_HH- #define GCC_AST_HH GCC_AST_HH-- #define BIN_EXPR_PTR(x) ((struct AST_Binary_Expression*)(x))- #define UN_EXPR_PTR(x) ((struct AST_Unary_Expression*)(x))- #define LVAL_EXPR_PTR(x) ((struct AST_Lvalue_Expression*)(x))- #define DECLR_PTR(x) ((struct AST_Declaration*)(x))- #define IF_ST_PTR(s) ((struct AST_If_Statement*)(x))-- enum AST_Type{- OP_COMMA- ,OP_ADDITION,OP_SUBTRACTION,OP_MUL,OP_DIV,OP_REMAINDER- ,OP_COND,OP_FUNCTION- ,OP_ASSIGN,OP_ADD_ASSIGN,OP_SUBTRACT_ASSIGN,OP_MULTIPLY_ASSIGN,OP_REMAINDER_ASSIGN,OP_DIV_ASSIGN- ,OP_SHIFT_LEFT_ASSIGN,OP_SHIFT_RIGHT_ASSIGN- ,OP_AND_ASSIGN,OP_XOR_ASSIGN,OP_PIPE_ASSIGN- ,OP_NOP- ,OP_LOGICAL_OR,OP_LOGICAL_AND,OP_LOGICAL_NOT- ,OP_BITWISE_OR,OP_BITWISE_AND,OP_BITWISE_XOR,OP_BITWISE_NOT- ,OP_ADDR_OF,OP_DEREFERENCE,OP_MEMBER_TROUGH_PTR,OP_MEMBER,OP_ARR_SUBSCRIPT- ,OP_POSTFIX_INC,OP_POSTFIX_DEC- ,OP_PREFIX_INC,OP_PREFIX_DEC- ,OP_UNARY_PLUS,OP_UNARY_MINUS- ,OP_CAST,OP_SIZEOF- ,OP_SHIFT_LEFT,OP_SHIFT_RIGHT- ,OP_LESS_EQ,OP_GREATER_EQ- ,OP_LESS,OP_GREATER- ,OP_EQUAL,OP_NOT_EQUAL- ,OP_LVALUE,OP_CONSTANT,OP_STRING_LITERAL- ,ST_COMPOUND,ST_EXPRESSION,ST_SWITCH,ST_IF,ST_WHILE,ST_DO_WHILE,ST_GOTO,ST_LABEL,ST_CASE,ST_DEFAULT- ,ST_CONTINUE,ST_BREAK,ST_RETURN,ST_FOR- ,ST_OBJECT_DECLARATION,ST_TYPE_DEFINITION,ST_FUNCTION_DEFINITION- ,ST_FUNCTION_DECLARATION- ,TRANSLATION_UNIT- ,ERROR,ERROR_DECLARATION- };- struct AST;- struct AST_Error;- struct AST_Declaration_Error;- struct AST_Binary_Expression;- struct AST_Conditional_Expression;- struct AST_Function_Expression;- struct AST_Constant;- struct AST_String_Literal;- struct AST_Lvalue_Expression;- struct AST_Unary_Expression;- struct AST_Labeled_Statement;- struct AST_Compound_Statement;- struct AST_For_Statement;- struct AST_While_Statement;- struct AST_Do_While_Statement;- struct AST_If_Statement;- struct AST_Goto_Statement;- struct AST_Switch_Statement;- struct AST_Return_Statement;- struct AST_Type_Definition;- struct AST_Object_Declaration;- struct AST_Function_Definition;- struct AST_Function_Declaration;- struct AST_Translation_Unit;-- #endifF diff --git a/frontend/semantics/program.c b/frontend/semantics/program.c deleted file mode 100644 --- a/frontend/semantics/program.c +++ /dev/null- #ifndef GCC_PROGRAM_C- #define GCC_PROGRAM_C GCC_PROGRAM_C- #/*Don't mind me*/include/*When I grow up I want to be a new line*/ <program.h>--- struct Program* get_program()- {- struct Program *ret;- ret=malloc(sizeof(struct Program));- ret->translation_units=malloc(sizeof(struct Queue));- ret->source_files=malloc(sizeof(struct Queue));- ret->errors=malloc(sizeof(struct Queue));- ret->types=malloc(sizeof(struct Map));- ret->external_linkage=malloc(sizeof(struct Linkage));-- Queue_Init(ret->translation_units);- Queue_Init(ret->source_files);- Queue_Init(ret->errors);---- Map_Init(ret->types);-- return ret;- }- struct Source_File* extract_source_file(FILE *in,struct Source_Name *name)- {- long file_size;- struct Source_File *src;--- if(fseek(in,0,SEEK_END)==-1)- return NULL;- if((file_size=ftell(in))==-1)- return NULL;- if(fseek(in,0,SEEK_SET)==-1)- return NULL;-- src=malloc(sizeof(struct Source_File));-- src->src_name=name;-- src->src=malloc(file_size+1);- src->src_size=file_size;-- src->where_in_src=0;-- src->which_column=0;- src->which_row=0;- src->is_in_the_begining_of_line=1;-- src->src[file_size]='\0';-- fread(src->src,1,file_size,in);- fclose(in);- return src;- }- struct Translation_Data* get_translation_data(struct Map *types,struct Linkage *internal_linkage,struct Linkage *external_linkage)- {- struct Translation_Data *ret;- ret=malloc(sizeof(struct Translation_Data));- ret->tokens=malloc(sizeof(struct Queue));- ret->errors=malloc(sizeof(struct Queue));- ret->source_files=malloc(sizeof(struct Queue));- Queue_Init(ret->tokens);- Queue_Init(ret->errors);- Queue_Init(ret->source_files);-- ret->macros=malloc(sizeof(struct Map));- Map_Init(ret->macros);-- ret->types=types;-- ret->number_of_errors_when_last_checked=0;-- ret->external_linkage=external_linkage;- ret->internal_linkage=internal_linkage;-- return ret;- }- struct Source_Name* get_source_name(char *filename,char *base)- {- struct Source_Name *ret;- ret=malloc(sizeof(struct Source_Name));- ret->base=gstrcpy(base);- ret->filename=gstrcpy(filename);- normalise_source_name(ret);- return ret;- }- /*where_to_search ends in a NULL pointer*/- struct Source_File* get_source_file(char *filename,char **where_to_search)- {- FILE *in;- char *temp_name;- char is_directory=0;- struct Source_Name *name;- struct Source_File *file;-- assert(where_to_search!=NULL);- assert(*where_to_search!=NULL);- do- {- temp_name=gstr_append(*where_to_search,filename);- in=fopen(temp_name,"r");- free(temp_name);- if(in==NULL)- continue;-- name=get_source_name(filename,*where_to_search);- file=extract_source_file(in,name);- if(file!=NULL)- {- return file;- }else- {- delete_source_name(name);- }- }while(*(++where_to_search));- return NULL;- }-- /*this might cause compatability issues TODO*/- void normalise_source_name(struct Source_Name *name)- {- size_t offset;- size_t i;- size_t last_slash;- char *hold_base;-- for(last_slash=offset=0;name->filename[offset];++offset)- {- if(name->filename[offset]=='/')- {- last_slash=offset;- }- }-- if(last_slash==0)- return;-- if(name->base==NULL)- {- offset=0;- name->base=malloc(last_slash+1);- name->base[last_slash]='\0';- name->base[last_slash-1]='/';-- }else- {- offset=gstrlen((char*)name->base);- hold_base=malloc(offset+last_slash+2);- strmv(hold_base,(char*)name->base);-- hold_base[last_slash+offset]='/';- hold_base[last_slash+offset+1]='\0';- free((void*)name->base);-- name->base=hold_base;- }-- for(i=0;i<last_slash;++i)- name->base[offset+i]=name->filename[i];--- ++i;- /*prune the filename*/- offset=gstrlen(name->filename+i);- hold_base=malloc(offset+1);- strmv(hold_base,name->filename+i);- free(name->filename);- name->filename=hold_base;--- }-- struct Program* parse_program(char **base_source_names)- {- struct Source_File *base_file;- struct Program *program;- struct Translation_Data *hold_translation_data;- char *this_directory[]={"./",NULL};-- assert(base_source_names!=NULL);-- if(*base_source_names==NULL)- {- return NULL;- }-- program=get_program();- hold_translation_data=get_translation_data(program->types,get_linkage(),program->external_linkage);- do- {- base_file=get_source_file(*base_source_names,this_directory);- if(base_file==NULL)- {- /*TODO error*/- free(base_file);- continue;- }else- {- Queue_Push(hold_translation_data->source_files,base_file);- lex(base_file,hold_translation_data);- if(!has_new_errors(hold_translation_data))- {- Queue_Push(program->translation_units,parse_translation_unit(hold_translation_data));- }else- {- flush_tokens(hold_translation_data->tokens);- }- assimilate_translation_data(program,hold_translation_data);- }- }while(*(++base_source_names));-- delete_translation_data(hold_translation_data);- return program;- }-- void lex_program(struct Translation_Data *hold,struct Source_File *file)- {- Queue_Push(hold->source_files,file);- lex(file,hold);- }--- char has_new_errors(struct Translation_Data *translation_data)- {- if(translation_data->errors->size != translation_data->number_of_errors_when_last_checked)- {- translation_data->number_of_errors_when_last_checked=translation_data->errors->size;- return 1;- }else- {- return 0;- }- }-- void delete_program(struct Program *program)- {- while(program->translation_units->size>0)- delete_ast(Queue_Pop(program->translation_units));- free(program->translation_units);---- while(program->source_files->size>0)- delete_source_file(Queue_Pop(program->source_files));- free(program->source_files);--- while(program->errors->size>0)- delete_translation_error(Queue_Pop(program->errors));- free(program->errors);--- delete_linkage(program->external_linkage);-- /*BEWARE*/- Map_Map(program->types,delete_type);- Map_Destroy(program->types);- free(program->types);-- free(program);-- }- void delete_translation_data(struct Translation_Data *translation_data)- {- assert(translation_data->tokens->size==0 &&- translation_data->errors->size==0 &&- translation_data->source_files->size==0);- free(translation_data->tokens);- free(translation_data->errors);- free(translation_data->source_files);-- Map_Map(translation_data->macros,delete_macro);- Map_Destroy(translation_data->macros);- free(translation_data->macros);-- free(translation_data);-- }- void assimilate_translation_data(struct Program *program,struct Translation_Data *translation_data)- {- Queue_Append(program->errors,translation_data->errors);- Queue_Append(program->source_files,translation_data->source_files);-- flush_tokens(translation_data->tokens);-- Queue_Init(translation_data->errors);- Queue_Init(translation_data->source_files);-- translation_data->number_of_errors_when_last_checked=0;--- }- char has_no_tokens(struct Translation_Data *translation_data)- {- return (translation_data->tokens->size)==0;- }- #endifF diff --git a/frontend/semantics/program.h b/frontend/semantics/program.h deleted file mode 100644 --- a/frontend/semantics/program.h +++ /dev/null- #ifndef GCC_PROGRAM_H- #define GCC_PROGRAM_H GCC_PROGRAM_H--- #include <program.hh>- #include <queue.h>- #include <scope.h>- #include <lexer.h>- #include <gcc_string.h>- #include <gcc_arguments.h>- #include <parse_translation_unit.h>--- struct Program- {- struct Queue *translation_units;- struct Queue *source_files;- struct Queue *errors;-- /*- we the type node structures from- all the translation units are stored here- */- struct Map *types;-- struct Linkage *external_linkage;- };- struct Translation_Data- {- struct Queue *tokens;--- struct Queue *errors;- size_t number_of_errors_when_last_checked;--- struct Queue *source_files;-- struct Map *macros;-- /*passed from program struct*/- struct Map *types;- struct Linkage *external_linkage;- struct Linkage *internal_linkage;- /*end of passed from program struct*/- };-- struct Program* get_program();- struct Source_Name* get_source_name(char *filename,char *base);-- struct Source_File* extract_source_file(FILE *in,struct Source_Name *name);- struct Source_File* get_source_file(char *filename,char **where_to_search);- void normalise_source_name(struct Source_Name *name);-- struct Translation_Data* get_translation_data(struct Map *types,struct Linkage *internal_linkage,struct Linkage *external_linkage);--- struct Program* parse_program(char **base_source_names);- void lex_program(struct Translation_Data *hold,struct Source_File *file);- void entype_program(struct Program *program);--- char has_new_errors(struct Translation_Data *translation_data);- char has_no_tokens(struct Translation_Data *translation_data);-- void delete_program(struct Program *program);- void delete_translation_data(struct Translation_Data *translation_data);- void destroy_translation_data(struct Translation_Data *translation_data);- void assimilate_translation_data(struct Program *program,struct Translation_Data *translation_data);-- #endifF diff --git a/frontend/semantics/program.hh b/frontend/semantics/program.hh deleted file mode 100644 --- a/frontend/semantics/program.hh +++ /dev/null- #ifndef GCC_PROGRAM_HH- #define GCC_PROGRAM_HH GCC_PROGRAM_HH-- struct Program;- struct Translation_Data;--- #endifF diff --git a/main.c b/main.c deleted file mode 100644 --- a/main.c +++ /dev/null- #include<stdio.h>- #include<stdlib.h>-- #include <all.h>----- int id(int a)- {- return a;- }- int (*test(int (*a)(int)))(int)- {- return a;- }-- int main(int argc,char **argv)- {- /*- int (*k)(int a,char** b)=main;- FILE *in;- char *src;- struct Queue tokens;- struct AST* test_expression;- struct AST* test_declaration;- struct AST* test_translation_unit;- struct Type* test_typename;- struct Scope *global_scope;- const const const volatile typedef const int const volatile * const index;- int typedef kek;-- //printf("%i",test(id)(1));-- in=fopen(argv[1],"r");- if(in==NULL)- {- return -1;- }- src=get_src(in);-- tokens=lex(src);- // print_tokens(stdout,&tokens);- // printf("\n---------------------------\n");-- global_scope=get_scope(NULL);- test_translation_unit=parse_translation_unit(&tokens,global_scope);- print_ast(stdout,(struct AST*)test_translation_unit);- // test_typename=parse_type_name(&tokens);- // test_expression=parse_statement(&tokens);- // print_expression(test_expression,stdout,0);-- */- struct Command_Arguments *command_arguments;- struct Program *program;-- command_arguments=parse_command_arguments(argv);- if(command_arguments->error_message!=NULL)- {- fprintf(stderr,command_arguments->error_message);- return 1;- }- if(command_arguments->print_tokens && !command_arguments->is_quiet)- {- return print_tokens_of_program(stdout,command_arguments->source_names);- }else- {- program=parse_program(command_arguments->source_names);- if(program==NULL)- return 0;- if(program->errors->size>0)- {- if(!command_arguments->is_quiet)- {- print_errors(stdout,program->errors);- }- delete_command_arguments(command_arguments);- delete_program(program);- return 1;- }else if(command_arguments->print_ast && !command_arguments->is_quiet)- {- print_program_ast(stdout,program);- }else if(command_arguments->transpile_to_js)- {- transpile_to_javascript(command_arguments->output_file,program,command_arguments);- }- }--- /*- program=get_program();- lex_program(argv[1],program);- print_program_tokens(stdout,program);- parse_program(program);- print_program_ast(stdout,program);- */---- delete_command_arguments(command_arguments);- delete_program(program);- return 0;- }---- /*-- int const index=111+222;- kek test;- if(1)- {- while(2)- {- (kek)-1+2;- }- 1?a,b:1?2:3*1;- }else- {- do- {- {- --a;- }- }while(a>b?1:0);- for(;;);- switch(a)- {- case b:- return 0;- break;- default:- return 1;- return a=b=c=a->b->c->d;- }- goto error;- }- */F diff --git a/misc/all.h b/misc/all.h deleted file mode 100644 --- a/misc/all.h +++ /dev/null- #ifndef GCC_ALL- #define GCC_ALL GCC_ALL--- #include <gcc_arguments.h>-- #include <ast.h>- #include <denoted.h>- #include <lexer.h>- #include <location.h>- #include <parse_declaration.h>- #include <parse_expression.h>- #include <parse_statement.h>- #include <parse_translation_unit.h>- #include <preprocessing.h>- #include <program.h>- #include <scope.h>- #include <semantics.h>- #include <type.h>- #include <transpile_to_js.h>-- #include <queue.h>- #include <map.h>- #include <stack.h>-- #include <print.h>--- #endifF diff --git a/misc/base_data_structures/gcc_string.c b/misc/base_data_structures/gcc_string.c new file mode 100644 --- /dev/null +++ b/misc/base_data_structures/gcc_string.c+ #ifndef GSTRING_C+ #define GSTRING_C GSTRING_C+ #include <gcc_string.h>+++ size_t gstrlen(char *str)+ {+ size_t i;+ for(i=0;str[i]!='\0';++i);+ return i;+ }++ char* gstr_append(char *lead,char *follower)+ {+ char *ret,*hold;+ hold=ret=malloc(gstrlen(lead) + gstrlen(follower)+1);+ while(*(hold++)=*(lead++));+ hold--;+ while(*(hold++)=*(follower++));+ return ret;+ }++ void strmv(char *target,char *source)+ {+ while(*(target++)=*(source++));+ }+ char* gstrcpy(char *str)+ {+ char *temp=malloc(gstrlen(str)+1);+ for(size_t i=0;(temp[i]=str[i])!='\0';++i);+ return temp;+ }+ char gstr_cmp(const char *a,const char *b)+ {+ while(*a==*b && *a)+ ++a,++b;+ if(*a==*b)+ return 1;+ else+ return 0;+ }+ char gstrn_cmp(const char *a,const char *b,size_t size)+ {+ size_t i;+ for(i=0;i<size;++i)+ if(a[i]!=b[i])+ return 0;+ return 1;+ }+ #endifF diff --git a/misc/base_data_structures/gcc_string.h b/misc/base_data_structures/gcc_string.h new file mode 100644 --- /dev/null +++ b/misc/base_data_structures/gcc_string.h+ #ifndef GSTRING_H+ #define GSTRING_H GSTRING_H+ #include <stdlib.h>+++ size_t gstrlen(char *str);+ char* gstr_append(char *lead,char *follower);+ char* gstrcpy(char *str);+ char gstr_cmp(const char *a,const char *b);+ char gstrn_cmp(const char *a,const char *b,size_t size);+ void strmv(char *target,char *source);++++ #endifF diff --git a/misc/base_data_structures/map.c b/misc/base_data_structures/map.c new file mode 100644 --- /dev/null +++ b/misc/base_data_structures/map.c+ #ifndef GMAP_C+ #define GMAP_C GMAP_C+ #include "map.h"++++ /*+ * ID and residue and all of delta is assigned to NULL+ * */+ void Map_Init(Map *tree)+ {+ tree->is_final=0;+ for(int i=0;i<256;++i)tree->delta[i] = NULL;+ tree->ID = NULL;+ }++ void Map_Scour(Map *tree,void *str,size_t size,size_t *where,Map **final_node)+ {+ for(+ *where=0,*final_node=tree;+ *where<size && final_node[0]->delta[((unsigned char*)str)[ where[0] ]]!=NULL;+ ++where[0]+ )+ {+ (*final_node) = (*final_node)->delta[((unsigned char*)str)[*where]];+ }+ }++++ /*+ * tree must not be null+ * */+ void Map_Push(Map *tree,void *str,size_t size,void *id)+ {+ size_t temp;+ Map_Scour(tree,str,size,&temp,&tree);++ if(temp == size)+ {+ assert(tree->ID==NULL);+ tree->ID=id;+ tree->is_final=1;+ return;+ }+ for(temp;temp<size;++temp)+ {+ tree=tree->delta[((unsigned char*)str)[temp]]=calloc(1,sizeof(Map));+ /*+ Map_Init(+ tree=tree->delta[((unsigned char*)str)[temp]]=malloc(sizeof(Map))+ );+ */+ }++ tree->ID=id;+ tree->is_final=1;++ }+++ /*+ * scours the tree and returns the id of the node that recognises the str+ * returns NULL if the string is not recognised+ * */+ void* Map_Check(Map *tree, void *str,size_t size)+ {+ size_t temp;+ Map_Scour(tree,str,size,&temp,&tree);++ if(temp<size)+ {+ return NULL;+ }else+ {+ return tree->ID; //this has been set to be the last reached node+ }+ }++ void Map_Remove(Map *tree, void *str,size_t size)+ {+ Stack stk;+ Stack_Init(&stk);+ size_t where;+ char what_to_null=((char*)str)[0];++ Stack_Push(&stk,tree);++ for(where=0;where<size-1 && tree->delta[((unsigned char*)str)[where]]!=NULL;++where)+ {+ tree = tree->delta[((unsigned char*)str)[where]];+ if(tree->is_final==1)+ {+ while(stk.size>0)Stack_Pop(&stk);+ what_to_null=((char*)str)[where+1];+ }+ Stack_Push(&stk,tree);+ }+ if(tree->delta[((unsigned char*)str)[where]] == NULL)return;+ free(tree->delta[((unsigned char*)str)[where]]);+ while(stk.size>1)free(Stack_Pop(&stk));+ tree=(Map*)Stack_Pop(&stk);+ tree->delta[(unsigned char)what_to_null]=NULL;++ }+ /*This function especially requires that the map has no loops*/+ void Map_Map(Map *tree,void (*map)(void*))+ {+ if(tree->is_final==1)map(tree->ID);+ for(int i=0;i<256;++i)+ {+ if(tree->delta[i]!=NULL)+ {+ Map_Map(tree->delta[i],map);+ }+ }+ }++ /*first argument of map is the node id , the second is pass_data*/+ void Map_Map_Extended(Map *tree,void (*map)(void*,void*),void* pass_data)+ {+ if(tree->is_final==1)map(tree->ID,pass_data);+ for(int i=0;i<256;++i)+ {+ if(tree->delta[i]!=NULL)+ {+ Map_Map_Extended(tree->delta[i],map,pass_data);+ }+ }+ }+++ /*this does not destroy(free) any memory pointed to by a node in the Map. This does not free() the root (Map *tree) */+ /*This function especially does not require that the map has no loop ( for example after grepification )*/+ void Map_Destroy(Map *tree)+ {+ Stack path;+ Stack nodes;+ Map *current_node;+ unsigned int i;+++ Stack_Init(&path);+ Stack_Init(&nodes);++ Stack_Push(&path,tree);+ Stack_Push(&nodes,tree);++ /*+ using DFS we fill up the nodes stack with all the used+ (accessible) nodes.+ */+ while(path.size>0)+ {+ current_node=Stack_Pop(&path);+ current_node->ID=&(current_node->ID);/*mark the node*/+ for(i=0;i<256;++i)+ {+ if(current_node->delta[i]!=NULL && current_node->delta[i]->ID != &(current_node->delta[i]->ID) )+ {+ Stack_Push(&path,current_node->delta[i]);+++ /*we mark the unmarked child of the current_node*/+ current_node->delta[i]->ID=&(current_node->delta[i]->ID);+ /*every node in nodes continues to be marked*/+ Stack_Push(&nodes,current_node->delta[i]);+ }+ }++ }+ /*+ There should not be any duplicates in here+ */+ while(nodes.size>1)+ {+ current_node=Stack_Pop(&nodes);+ /*Again the things that ID points to is not freed ( this structure is used to map the structure of data )+ deletion of it is up to you.+ */+ free(current_node);+ }+ /*this is where the root is at- we don't delete it , but we must free the last stack node*/+ Stack_Pop(&nodes);+++ }++ /*requres that cpy has no loops*/+ Map* Map_Copy(Map *cpy)+ {+ short i;+ Map *ret;++ if(cpy==NULL)+ {+ return NULL;+ }++ ret=malloc(sizeof(Map));+ ret->is_final=cpy->is_final;+ ret->ID=cpy->ID;++ for(i=0;i<256;++i)+ {+ ret->delta[i]=Map_Copy(cpy->delta[i]);+ }+ return ret;+ }++ struct Map* Map_Check_And_Get(Map *tree, void *str,size_t size)+ {+ size_t temp;+ Map_Scour(tree,str,size,&temp,&tree);++ if(temp<size)+ {+ return NULL;+ }else+ {+ return tree;+ }+ }++ struct Map* Map_Push_And_Get(struct Map* tree,void *str,size_t size,void *id)+ {+ size_t temp;+ Map_Scour(tree,str,size,&temp,&tree);++ if(temp == size)+ {+ if(tree->ID!=NULL)tree->ID=id;+ tree->is_final=1;+ return tree;+ }++ for(temp;temp<size;++temp)+ {+ Map_Init(+ tree=+ tree->delta[((unsigned char*)str)[temp]]=+ malloc(sizeof(Map))+ );+ }++ tree->ID=id;+ tree->is_final=1;+ return tree;+ }++ void* Map_Check_And_Push(struct Map *tree,void *str,size_t size,void *id)+ {+ size_t temp;+ Map_Scour(tree,str,size,&temp,&tree);++ if(temp == size)+ {+ if(!tree->is_final)+ {+ tree->ID=id;+ tree->is_final=1;+ }+ return tree->ID;+ }+ for(temp;temp<size;++temp)+ {+ tree=tree->delta[((unsigned char*)str)[temp]]=calloc(1,sizeof(Map));+ /*+ Map_Init(+ tree=tree->delta[((unsigned char*)str)[temp]]=malloc(sizeof(Map))+ );+ */+ }++ tree->ID=id;+ tree->is_final=1;+ return NULL;+ }+ /*requires that the map has no loops. does not free the root node*/+ /*TODO*/+ void Map_Delete_Map(struct Map *tree)+ {++ }+ #endif //#ifndef GMAPF diff --git a/misc/base_data_structures/map.h b/misc/base_data_structures/map.h new file mode 100644 --- /dev/null +++ b/misc/base_data_structures/map.h+ #ifndef GMAP_H+ #define GMAP_H GMAP_H+ #include <stdlib.h>+ #include <stdio.h>+ #include <stack.h>+ #include <queue.h>+ //#include"../Queue/unique_queue.c"++ typedef struct Map Map;++++ /*+ * A looples automata with things attached to the nodes+ * */+ struct Map+ {+ char is_final;+ Map *delta[256];+ /*ID cannot point to itself ( this is used in the deletion of the map ) */+ void *ID;+ };++ void Map_Init(Map *tree);+ void Map_Scour(Map *tree,void *str,size_t size,size_t *where,Map **final_node);+ void Map_Push(Map *tree,void *str,size_t size,void *id);+ void* Map_Check(Map *tree, void *str,size_t size);+ struct Map* Map_Check_And_Get(Map *tree, void *str,size_t size);+ void Map_Remove(Map *tree, void *str,size_t size);+ void Map_Map(Map *tree,void (*map)(void*));+ void Map_Map_Extended(Map *tree,void (*map)(void*,void*),void* pass_data);++ void Map_Destroy(Map *tree);+ void Map_Delete_Map(struct Map *tree);+ struct Condensed_Map* Map_Condense(Map* tree);++ struct Map* Map_Push_And_Get(struct Map* tree,void *str,size_t size,void *id);+ /*returns NULL if id is not taken , returns pointer to taken id otherwise*/+ void* Map_Check_And_Push(struct Map *tree,void *str,size_t size,void *id);++ #endifF diff --git a/misc/base_data_structures/queue.c b/misc/base_data_structures/queue.c new file mode 100644 --- /dev/null +++ b/misc/base_data_structures/queue.c+ #ifndef GQUEUE_C+ #define GQUEUE_C GQUEUE_C+ #include "queue.h"++ void Queue_Init(Queue *q)+ {+ q->first=q->last=NULL;+ q->size=0;+ }+ void Queue_Push(Queue *q,void *data)+ {+ if(q==NULL)return;+ if(q->first==NULL)+ {+ q->first=q->last=malloc(sizeof(struct Queue_Node));++ q->first->data=data;+ q->last->prev=NULL;++ ++q->size;+ return;+ }else+ {+ struct Queue_Node *temp=malloc(sizeof(struct Queue_Node));+ q->last->prev=temp;+ temp->data=data;+ temp->prev=NULL;++ q->last=temp;+ ++q->size;+ }++ }+ /*max queueiness*/+ void Queue_Push_Front(struct Queue *q,void *data)+ {+ if(q==NULL)return;+ if(q->first==NULL)+ {+ q->first=q->last=malloc(sizeof(struct Queue_Node));++ q->first->data=data;+ q->last->prev=NULL;++ ++q->size;+ }else+ {+ struct Queue_Node *temp=malloc(sizeof(struct Queue_Node));+ temp->prev=q->first;+ temp->data=data;++ q->first=temp;+ ++q->size;+ }++ }+ void* Queue_Pop(Queue *q)+ {+ if(q==NULL)return NULL;+ if(q->size==0)return NULL;++ void *return_value=q->first->data;++ if(q->size==1)+ {+ free(q->last);+ q->first=q->last=NULL;+ q->size=0;+ }else+ {+ struct Queue_Node *temp_first=q->first;+ q->first=q->first->prev;+ free(temp_first);+ --q->size;+ }+ return return_value;+ }+ void Queue_Append(struct Queue *lead,struct Queue *follower)+ {+ assert(lead!=NULL);+ assert(follower!=NULL);+ if(lead->last==NULL)+ {+ lead->last=follower->last;+ lead->first=follower->first;+ lead->size=follower->size;+ }else+ {+ lead->last->prev=follower->first;+ lead->last=follower->last;+ lead->size+=follower->size;+ }+ }++ void Queue_Destroy(Queue *q)+ {++ struct Queue_Node *temp_first;+ while(q->first!=NULL)+ {+ temp_first=q->first;+ q->first=q->first->prev;+ free(temp_first->data);+ free(temp_first);+ }++ }+ /*+ Fits a new Queue on top of q. It uses its elements as its own+ Do not destroy+ last element ->prev is may not be null+ */+ struct Queue Queue_Fit(struct Queue *q,size_t offset)+ {+ assert(q->size>offset && offset>0);++ struct Queue ret;+ size_t i;++ ret.size=q->size-offset;+ ret.first=q->first;+ ret.last=q->last;++ for(i=0;i<offset;++i)+ {+ ret.first=ret.first->prev;+ }+ return ret;++ }+ #endif //#ifndef GQUEUE_CF diff --git a/misc/base_data_structures/queue.h b/misc/base_data_structures/queue.h new file mode 100644 --- /dev/null +++ b/misc/base_data_structures/queue.h+ #ifndef GQUEUE_H+ #define GQUEUE_H GQUEUE_H+ #include<stdlib.h>//malloc free+ #include<assert.h>++ typedef struct Queue Queue;++ struct Queue+ {+ struct Queue_Node+ {+ void *data;+ struct Queue_Node *prev;+ }*first,*last;++ size_t size;++ };+ void Queue_Init(Queue *q);+ void Queue_Push(Queue *q,void *data);+ void Queue_Push_Front(struct Queue *q,void *data);+ void* Queue_Pop(Queue *q);+ void Queue_Append(struct Queue *lead,struct Queue *follower);+ void Queue_Destroy(Queue *q);++ #endifF diff --git a/misc/base_data_structures/stack.c b/misc/base_data_structures/stack.c new file mode 100644 --- /dev/null +++ b/misc/base_data_structures/stack.c+ #ifndef GSTACK_C+ #define GSTACK_C GSTACK_C+ #include "stack.h"++++ void Stack_Init(Stack *stack)+ {+ stack->size=0;+ stack->first=NULL;+ }+ void Stack_Push(Stack *stack,void* data)+ {+ struct Stack_Node *temp_node=malloc(sizeof(struct Stack_Node));+ temp_node->data=data;+ temp_node->next=stack->first;+ stack->first=temp_node;+ ++stack->size;+ }+ void* Stack_Pop(Stack *stack)+ {+ void* return_value=NULL;+ if(stack->first!=NULL)+ {+ struct Stack_Node *temp_first=stack->first;+ return_value=stack->first->data;++ --stack->size;+ stack->first=stack->first->next;+ free(temp_first);+ }++ return return_value;+ }++ #endif//#ifndef GSTACK_C+F diff --git a/misc/base_data_structures/stack.h b/misc/base_data_structures/stack.h new file mode 100644 --- /dev/null +++ b/misc/base_data_structures/stack.h+ #ifndef GSTACK_H+ #define GSTACK_H GSTACK_H+ #include<stdlib.h>+ typedef struct Stack Stack;++ struct Stack_Node+ {+ struct Stack_Node *next;+ void *data;+ };+ struct Stack+ {+ struct Stack_Node *first;+ size_t size;+ };++ void Stack_Init(Stack *stack);+ void Stack_Push(Stack *stack,void* data);+ void* Stack_Pop(Stack *stack);+++ #endifF diff --git a/misc/gcc_arguments.c b/misc/gcc_arguments.c deleted file mode 100644 --- a/misc/gcc_arguments.c +++ /dev/null- #ifndef GCC_ARGUMENTS_C- #define GCC_ARGUMENTS_C GCC_ARGUMENTS_C- #include<gcc_arguments.h>---- struct Command_Arguments* parse_command_arguments(char **argv)- {- struct Command_Arguments *ret;- struct Queue *source_names;-- ret=malloc(sizeof(struct Command_Arguments));- ret->print_ast=ret->print_tokens=ret->transpile_to_js=ret->is_quiet=0;- ret->output_file=ret->javascript_extern_file=NULL;-- source_names=malloc(sizeof(struct Queue));- Queue_Init(source_names);-- ret->error_message=NULL;-- /*we skip the first element(the program name)*/- for(++argv;*argv;++argv)- {- if(gstr_cmp(*argv,"--print-tokens"))- {- ret->print_tokens=1;- }else if(gstr_cmp(*argv,"--print-ast"))- {- ret->print_ast=1;- }else if(gstr_cmp(*argv,"--quiet") || gstr_cmp(*argv,"-q"))- {- ret->is_quiet=1;- if(ret->print_ast || ret->print_tokens)- {- ret->error_message="print and quiet conflict. Aborting";- break;- }- }else if(gstr_cmp(*argv,"--transpile_to_js") || gstr_cmp(*argv,"-js"))- {- ret->transpile_to_js=1;- }else if(gstr_cmp(*argv,"-o"))- {- ++argv;- if(*argv==NULL)- {- ret->error_message="expected a filename after -o. Aborting";- break;- }else- {- ret->output_file=fopen(*argv,"w");- if(ret->output_file==NULL)- {- ret->error_message="Couldn't open file for output. Aborting";- break;- }- }- }else if(gstr_cmp(*argv,"--make-extern-file"))- {- ret->javascript_extern_file=fopen(*argv,"w");- if(ret->javascript_extern_file==NULL)- {- ret->error_message="Couldn't open file for extern dump. Aborting";- break;- }- }else if(gstr_cmp(*argv,"--add-html"))- {- ret->insert_html=1;- }else- {- Queue_Push(source_names,*argv);- }- }-- ret->source_names=malloc((source_names->size+1)*sizeof(char*) );- ret->source_names[source_names->size]=NULL;- while(source_names->size)- {- ret->source_names[source_names->size-1]=(char*)source_names->first->data;- Queue_Pop(source_names);- }- free(source_names);- if(ret->transpile_to_js && ret->output_file==NULL)- {- ret->output_file=fopen("a.js","w");- if(ret==NULL)- ret->error_message="Couldn't open file for output. Aborting";- }- return ret;- }--- void delete_command_arguments(struct Command_Arguments *args)- {- if(args->output_file!=NULL)- fclose(args->output_file);- if(args->javascript_extern_file!=NULL)- fclose(args->javascript_extern_file);-- free(args->source_names);- free(args);- }-- #endifF diff --git a/misc/gcc_arguments.h b/misc/gcc_arguments.h deleted file mode 100644 --- a/misc/gcc_arguments.h +++ /dev/null- #ifndef GCC_ARGUMENTS_H- #define GCC_ARGUMENTS_H GCC_ARGUMENTS_H- #include <gcc_arguments.hh>- #include <queue.h>- #include <gcc_string.h>- #include <stdio.h>--- struct Command_Arguments- {- char **source_names;- char print_tokens:1;- char print_ast:1;- char is_quiet:1;- char transpile_to_js:1;- char insert_html:1;--- FILE* output_file;- FILE* javascript_extern_file;--- char *error_message;- };-- struct Command_Arguments* parse_command_arguments(char **argv);- void delete_command_arguments(struct Command_Arguments *args);-- #endifF diff --git a/misc/gcc_arguments.hh b/misc/gcc_arguments.hh deleted file mode 100644 --- a/misc/gcc_arguments.hh +++ /dev/null- #ifndef GCC_ARGUMENTS_HH- #define GCC_ARGUMENTS_HH GCC_ARGUMENTS_HH--- struct Command_Arguments;--- #endifF diff --git a/misc/gcc_error.c b/misc/gcc_error.c deleted file mode 100644 --- a/misc/gcc_error.c +++ /dev/null- #ifndef GCC_ERROR_C- #define GCC_ERROR_C GCC_ERROR_C- #include <gcc_error.h>---- struct Translation_Error* get_translation_error(const char *error_message,size_t line,size_t column,const char *filename)- {- struct Translation_Error *ret;- ret=malloc(sizeof(struct Translation_Error));- ret->error_message=error_message;- ret->column=column;- ret->line=line;- ret->filename=filename;- }-- struct Translation_Error* get_translation_error_by_token(const char *error_message,struct token *error_token)- {- if(error_token==NULL)- {- return get_translation_error(error_message,0,0,"");- }else- {- return get_translation_error(error_message,error_token->line+1,error_token->column+1,error_token->filename);- }- }-- void push_translation_error(const char *error_message,struct Translation_Data *translation_data)- {- if(translation_data->tokens->size==0)- {- get_translation_error(error_message,0,0,"");- }else- {- Queue_Push(translation_data->errors,get_translation_error_by_token(error_message,(struct token*)translation_data->tokens->first->data));- }- }-- void push_lexing_error(const char *error_message,struct Source_File *src,struct Translation_Data *translation_data)- {- Queue_Push(translation_data->errors,get_translation_error(error_message,src->which_row+1,src->which_column+1,src->src_name->filename));- }- void print_translation_error(FILE *out,struct Translation_Error *error)- {- fprintf(out,"Error ");- if(error->filename!=NULL)- {- fprintf(out,"(line %i column %i) ",error->line,error->column);- fprintf(out,"in %s ",error->filename);- }- fprintf(out,": %s\n",error->error_message);- }--- void delete_translation_error(struct Translation_Error *translation_error)- {- free(translation_error);- }- #endifF diff --git a/misc/gcc_error.h b/misc/gcc_error.h deleted file mode 100644 --- a/misc/gcc_error.h +++ /dev/null- #ifndef GCC_ERROR_H- #define GCC_ERROR_H GCC_ERROR_H- #include <gcc_error.hh>- #include <lexer.h>- #include <stdio.h>---- struct Translation_Error- {- const char *error_message;- size_t line,column;- const char *filename;-- };---- struct Translation_Error* get_translation_error(const char *error_message,size_t line,size_t column,const char *filename);- struct Translation_Error* get_translation_error_by_token(const char *error_message,struct token *error_token);- void push_translation_error(const char *error_message,struct Translation_Data *translation_data);- void push_lexing_error(const char *error_message,struct Source_File *src,struct Translation_Data *translation_data);- void print_translation_error(FILE *out,struct Translation_Error *error);-- void delete_translation_error(struct Translation_Error *translation_error);- #endifF diff --git a/misc/gcc_error.hh b/misc/gcc_error.hh deleted file mode 100644 --- a/misc/gcc_error.hh +++ /dev/null- #ifndef GCC_ERROR_H- #define GCC_ERROR_H GCC_ERROR_H--- struct Translation_Error;--- #endifF diff --git a/misc/gcc_string.c b/misc/gcc_string.c deleted file mode 100644 --- a/misc/gcc_string.c +++ /dev/null- #ifndef GSTRING_C- #define GSTRING_C GSTRING_C- #include <gcc_string.h>--- size_t gstrlen(char *str)- {- size_t i;- for(i=0;str[i]!='\0';++i);- return i;- }-- char* gstr_append(char *lead,char *follower)- {- char *ret,*hold;- hold=ret=malloc(gstrlen(lead) + gstrlen(follower)+1);- while(*(hold++)=*(lead++));- hold--;- while(*(hold++)=*(follower++));- return ret;- }-- void strmv(char *target,char *source)- {- while(*(target++)=*(source++));- }- char* gstrcpy(char *str)- {- char *temp=malloc(gstrlen(str)+1);- for(size_t i=0;(temp[i]=str[i])!='\0';++i);- return temp;- }- char gstr_cmp(const char *a,const char *b)- {- while(*a==*b && *a)- ++a,++b;- if(*a==*b)- return 1;- else- return 0;- }- char gstrn_cmp(const char *a,const char *b,size_t size)- {- size_t i;- for(i=0;i<size;++i)- if(a[i]!=b[i])- return 0;- return 1;- }- #endifF diff --git a/misc/gcc_string.h b/misc/gcc_string.h deleted file mode 100644 --- a/misc/gcc_string.h +++ /dev/null- #ifndef GSTRING_H- #define GSTRING_H GSTRING_H- #include <stdlib.h>--- size_t gstrlen(char *str);- char* gstr_append(char *lead,char *follower);- char* gstrcpy(char *str);- char gstr_cmp(const char *a,const char *b);- char gstrn_cmp(const char *a,const char *b,size_t size);- void strmv(char *target,char *source);---- #endifF diff --git a/misc/map.c b/misc/map.c deleted file mode 100644 --- a/misc/map.c +++ /dev/null- #ifndef GMAP_C- #define GMAP_C GMAP_C- #include "map.h"---- /*- * ID and residue and all of delta is assigned to NULL- * */- void Map_Init(Map *tree)- {- tree->is_final=0;- for(int i=0;i<256;++i)tree->delta[i] = NULL;- tree->ID = NULL;- }-- void Map_Scour(Map *tree,void *str,size_t size,size_t *where,Map **final_node)- {- for(- *where=0,*final_node=tree;- *where<size && final_node[0]->delta[((unsigned char*)str)[ where[0] ]]!=NULL;- ++where[0]- )- {- (*final_node) = (*final_node)->delta[((unsigned char*)str)[*where]];- }- }---- /*- * tree must not be null- * */- void Map_Push(Map *tree,void *str,size_t size,void *id)- {- size_t temp;- Map_Scour(tree,str,size,&temp,&tree);-- if(temp == size)- {- assert(tree->ID==NULL);- tree->ID=id;- tree->is_final=1;- return;- }- for(temp;temp<size;++temp)- {- tree=tree->delta[((unsigned char*)str)[temp]]=calloc(1,sizeof(Map));- /*- Map_Init(- tree=tree->delta[((unsigned char*)str)[temp]]=malloc(sizeof(Map))- );- */- }-- tree->ID=id;- tree->is_final=1;-- }--- /*- * scours the tree and returns the id of the node that recognises the str- * returns NULL if the string is not recognised- * */- void* Map_Check(Map *tree, void *str,size_t size)- {- size_t temp;- Map_Scour(tree,str,size,&temp,&tree);-- if(temp<size)- {- return NULL;- }else- {- return tree->ID; //this has been set to be the last reached node- }- }-- void Map_Remove(Map *tree, void *str,size_t size)- {- Stack stk;- Stack_Init(&stk);- size_t where;- char what_to_null=((char*)str)[0];-- Stack_Push(&stk,tree);-- for(where=0;where<size-1 && tree->delta[((unsigned char*)str)[where]]!=NULL;++where)- {- tree = tree->delta[((unsigned char*)str)[where]];- if(tree->is_final==1)- {- while(stk.size>0)Stack_Pop(&stk);- what_to_null=((char*)str)[where+1];- }- Stack_Push(&stk,tree);- }- if(tree->delta[((unsigned char*)str)[where]] == NULL)return;- free(tree->delta[((unsigned char*)str)[where]]);- while(stk.size>1)free(Stack_Pop(&stk));- tree=(Map*)Stack_Pop(&stk);- tree->delta[(unsigned char)what_to_null]=NULL;-- }- /*This function especially requires that the map has no loops*/- void Map_Map(Map *tree,void (*map)(void*))- {- if(tree->is_final==1)map(tree->ID);- for(int i=0;i<256;++i)- {- if(tree->delta[i]!=NULL)- {- Map_Map(tree->delta[i],map);- }- }- }-- /*first argument of map is the node id , the second is pass_data*/- void Map_Map_Extended(Map *tree,void (*map)(void*,void*),void* pass_data)- {- if(tree->is_final==1)map(tree->ID,pass_data);- for(int i=0;i<256;++i)- {- if(tree->delta[i]!=NULL)- {- Map_Map_Extended(tree->delta[i],map,pass_data);- }- }- }--- /*this does not destroy(free) any memory pointed to by a node in the Map. This does not free() the root (Map *tree) */- /*This function especially does not require that the map has no loop ( for example after grepification )*/- void Map_Destroy(Map *tree)- {- Stack path;- Stack nodes;- Map *current_node;- unsigned int i;--- Stack_Init(&path);- Stack_Init(&nodes);-- Stack_Push(&path,tree);- Stack_Push(&nodes,tree);-- /*- using DFS we fill up the nodes stack with all the used- (accessible) nodes.- */- while(path.size>0)- {- current_node=Stack_Pop(&path);- current_node->ID=&(current_node->ID);/*mark the node*/- for(i=0;i<256;++i)- {- if(current_node->delta[i]!=NULL && current_node->delta[i]->ID != &(current_node->delta[i]->ID) )- {- Stack_Push(&path,current_node->delta[i]);--- /*we mark the unmarked child of the current_node*/- current_node->delta[i]->ID=&(current_node->delta[i]->ID);- /*every node in nodes continues to be marked*/- Stack_Push(&nodes,current_node->delta[i]);- }- }-- }- /*- There should not be any duplicates in here- */- while(nodes.size>1)- {- current_node=Stack_Pop(&nodes);- /*Again the things that ID points to is not freed ( this structure is used to map the structure of data )- deletion of it is up to you.- */- free(current_node);- }- /*this is where the root is at- we don't delete it , but we must free the last stack node*/- Stack_Pop(&nodes);--- }-- /*requres that cpy has no loops*/- Map* Map_Copy(Map *cpy)- {- short i;- Map *ret;-- if(cpy==NULL)- {- return NULL;- }-- ret=malloc(sizeof(Map));- ret->is_final=cpy->is_final;- ret->ID=cpy->ID;-- for(i=0;i<256;++i)- {- ret->delta[i]=Map_Copy(cpy->delta[i]);- }- return ret;- }-- struct Map* Map_Check_And_Get(Map *tree, void *str,size_t size)- {- size_t temp;- Map_Scour(tree,str,size,&temp,&tree);-- if(temp<size)- {- return NULL;- }else- {- return tree;- }- }-- struct Map* Map_Push_And_Get(struct Map* tree,void *str,size_t size,void *id)- {- size_t temp;- Map_Scour(tree,str,size,&temp,&tree);-- if(temp == size)- {- if(tree->ID!=NULL)tree->ID=id;- tree->is_final=1;- return tree;- }-- for(temp;temp<size;++temp)- {- Map_Init(- tree=- tree->delta[((unsigned char*)str)[temp]]=- malloc(sizeof(Map))- );- }-- tree->ID=id;- tree->is_final=1;- return tree;- }-- void* Map_Check_And_Push(struct Map *tree,void *str,size_t size,void *id)- {- size_t temp;- Map_Scour(tree,str,size,&temp,&tree);-- if(temp == size)- {- if(!tree->is_final)- {- tree->ID=id;- tree->is_final=1;- }- return tree->ID;- }- for(temp;temp<size;++temp)- {- tree=tree->delta[((unsigned char*)str)[temp]]=calloc(1,sizeof(Map));- /*- Map_Init(- tree=tree->delta[((unsigned char*)str)[temp]]=malloc(sizeof(Map))- );- */- }-- tree->ID=id;- tree->is_final=1;- return NULL;- }- /*requires that the map has no loops. does not free the root node*/- /*TODO*/- void Map_Delete_Map(struct Map *tree)- {-- }- #endif //#ifndef GMAPF diff --git a/misc/map.h b/misc/map.h deleted file mode 100644 --- a/misc/map.h +++ /dev/null- #ifndef GMAP_H- #define GMAP_H GMAP_H- #include <stdlib.h>- #include <stdio.h>- #include <stack.h>- #include <queue.h>- //#include"../Queue/unique_queue.c"-- typedef struct Map Map;---- /*- * A looples automata with things attached to the nodes- * */- struct Map- {- char is_final;- Map *delta[256];- /*ID cannot point to itself ( this is used in the deletion of the map ) */- void *ID;- };-- void Map_Init(Map *tree);- void Map_Scour(Map *tree,void *str,size_t size,size_t *where,Map **final_node);- void Map_Push(Map *tree,void *str,size_t size,void *id);- void* Map_Check(Map *tree, void *str,size_t size);- struct Map* Map_Check_And_Get(Map *tree, void *str,size_t size);- void Map_Remove(Map *tree, void *str,size_t size);- void Map_Map(Map *tree,void (*map)(void*));- void Map_Map_Extended(Map *tree,void (*map)(void*,void*),void* pass_data);-- void Map_Destroy(Map *tree);- void Map_Delete_Map(struct Map *tree);- struct Condensed_Map* Map_Condense(Map* tree);-- struct Map* Map_Push_And_Get(struct Map* tree,void *str,size_t size,void *id);- /*returns NULL if id is not taken , returns pointer to taken id otherwise*/- void* Map_Check_And_Push(struct Map *tree,void *str,size_t size,void *id);-- #endifF diff --git a/misc/print.c b/misc/print.c deleted file mode 100644 --- a/misc/print.c +++ /dev/null- #ifndef GCC_PRINT- #define GCC_PRINT GCC_PRINT- #include "print.h"----- int indent=0;-- void print_token(FILE *out,struct token *token)- {- size_t i;- // fprintf(out,"[");- if(token==NULL)return;- for(i=0;i<token->data_size;++i)- {- fprintf(out,"%c",token->data[i]);- }- // fprintf(out,"]");- }-- char print_tokens_of_program(FILE *out,char **base_source_names)- {-- struct Source_File *base_file;- struct Translation_Data *hold_translation_data;- char *this_directory[]={"./",NULL};- char ret;-- assert(base_source_names!=NULL);-- if(*base_source_names==NULL)- {- return 0;- }- ret=0;-- hold_translation_data=get_translation_data(NULL,get_linkage(),get_linkage());- do- {- base_file=get_source_file(*base_source_names,this_directory);-- if(base_file==NULL)- {- /*TODO error*/- continue;- }else- {- lex(base_file,hold_translation_data);- if(hold_translation_data->errors->size>0)- {- ret=1;- /*if we are here then the is_quiet flag has not been set*/- print_errors(out,hold_translation_data->errors);- delete_source_file(base_file);- break;- }- fprintf(out,"\nTOKENS OF %s {\n",base_file->src_name->filename);- print_tokens(out,hold_translation_data->tokens);- fprintf(out,"\n} END OF TOKENS\n");--- }- }while(*(++base_source_names));-- /*TODO fix memory leak*/- free(hold_translation_data);--- return ret;- }- void print_tokens(FILE *out,struct Queue *tokens)- {- struct Queue_Node *it;- for( it=tokens->first; it!=NULL; it=it->prev)- {- fprintf(out,"[");- print_keyword_enum(out,((struct token*)(it->data))->type);- print_token(out,(struct token*)(it->data));- fprintf(out,"] ");- }- }-- void print_ast_enum(FILE *out,enum AST_Type op)- {- switch(op)- {- case OP_COMMA:- fprintf(out,",");break;- case OP_ADDITION:- fprintf(out,"+");break;- case OP_SUBTRACTION:- fprintf(out,"-");break;- case OP_MUL:- fprintf(out,"*");break;- case OP_DIV:- fprintf(out,"/");break;- case OP_REMAINDER:- fprintf(out,"%");break;- case OP_COND:- fprintf(out,"CONDITIONAL");break;- case OP_FUNCTION:- fprintf(out,"FUNCTION_CALL");break;- case OP_ASSIGN:- fprintf(out,"=");break;- case OP_ADD_ASSIGN:- fprintf(out,"+=");break;- case OP_SUBTRACT_ASSIGN:- fprintf(out,"-=");break;- case OP_MULTIPLY_ASSIGN:- fprintf(out,"*=");break;- case OP_REMAINDER_ASSIGN:- fprintf(out,"%=");break;- case OP_DIV_ASSIGN:- fprintf(out,"/=");break;- case OP_SHIFT_LEFT_ASSIGN:- fprintf(out,">>=");break;- case OP_SHIFT_RIGHT_ASSIGN:- fprintf(out,"<<=");break;- case OP_AND_ASSIGN:- fprintf(out,"&=");break;- case OP_XOR_ASSIGN:- fprintf(out,"^=");break;- case OP_PIPE_ASSIGN:- fprintf(out,"|=");break;- case OP_NOP:- fprintf(out,"NOP");break;- case OP_LOGICAL_OR:- fprintf(out,"||");break;- case OP_LOGICAL_AND:- fprintf(out,"&&");break;- case OP_LOGICAL_NOT:- fprintf(out,"!");break;- case OP_BITWISE_OR:- fprintf(out,"|");break;- case OP_BITWISE_AND:- fprintf(out,"&");break;- case OP_BITWISE_XOR:- fprintf(out,"^");break;- case OP_BITWISE_NOT:- fprintf(out,"~");break;- case OP_ADDR_OF:- fprintf(out,"&");break;- case OP_DEREFERENCE:- fprintf(out,"*");break;- case OP_MEMBER_TROUGH_PTR:- fprintf(out,"->");break;- case OP_MEMBER:- fprintf(out,".");break;- case OP_ARR_SUBSCRIPT:- fprintf(out,"ARR_SUBSCRIPT");break;- case OP_POSTFIX_INC:- fprintf(out,"++");break;- case OP_POSTFIX_DEC:- fprintf(out,"--");break;- case OP_PREFIX_INC:- fprintf(out,"++");break;- case OP_PREFIX_DEC:- fprintf(out,"--");break;- case OP_UNARY_PLUS:- fprintf(out,"+");break;- case OP_UNARY_MINUS:- fprintf(out,"-");break;- case OP_CAST:- fprintf(out,"CAST");break;- case OP_SIZEOF:- fprintf(out,"sizeof");break;- case OP_SHIFT_LEFT:- fprintf(out,"<<");break;- case OP_SHIFT_RIGHT:- fprintf(out,">>");break;- case OP_LESS_EQ:- fprintf(out,"<=");break;- case OP_GREATER_EQ:- fprintf(out,">=");break;- case OP_LESS:- fprintf(out,"<");break;- case OP_GREATER:- fprintf(out,">");break;- case OP_EQUAL:- fprintf(out,"==");break;- case OP_NOT_EQUAL:- fprintf(out,"!=");break;- case OP_LVALUE:- fprintf(out,"LVALUE");break;- case OP_CONSTANT:- fprintf(out,"CONSTANT");break;- case OP_STRING_LITERAL:- fprintf(out,"STRING_LITERAL");break;- case ST_COMPOUND:- fprintf(out,"COMPOUND");break;- case ST_EXPRESSION:- fprintf(out,"EXPRESSION");break;- case ST_SWITCH:- fprintf(out,"switch");break;- case ST_IF:- fprintf(out,"if");break;- case ST_WHILE:- fprintf(out,"while");break;- case ST_DO_WHILE:- fprintf(out,"do_while");break;- case ST_GOTO:- fprintf(out,"goto");break;- case ST_LABEL:- fprintf(out,"LABEL");break;- case ST_CASE:- fprintf(out,"case");break;- case ST_DEFAULT:- fprintf(out,"default");break;- case ST_CONTINUE:- fprintf(out,"continue");break;- case ST_BREAK:- fprintf(out,"break");break;- case ST_RETURN:- fprintf(out,"return");break;- case ST_FOR:- fprintf(out,"for");break;-- /*TODO obj dec obj def func decl*/- case ST_FUNCTION_DEFINITION:- fprintf(out,"FUNCTION_DEFINITION");break;- case TRANSLATION_UNIT:- fprintf(out,"TRANSLATION_UNIT");break;- case ERROR:- fprintf(out,"ERROR");break;- default:- fprintf(out,"NOT_POSSIBLE");break;- }- }-- void print_error_tree(FILE *out,struct AST_Error *error)- {- fprintf(out,"ERROR");- if(error->error!=NULL)- {- print_ast(out,error->error);- }- }- void print_binary_expression_tree(FILE *out,struct AST_Binary_Expression *bin)- {- if(bin->type==OP_ARR_SUBSCRIPT)- {- print_ast(out,bin->left);- fprintf(out,"[");- print_ast(out,bin->right);- fprintf(out,"]");- }else- {- fprintf(out,"(");- print_ast(out,bin->left);- print_ast_enum(out,bin->type);- print_ast(out,bin->right);- fprintf(out,")");- }- }- void print_conditional_expression_tree(FILE *out,struct AST_Conditional_Expression *cond)- {- fprintf(out,"(");- print_ast(out,cond->left);- fprintf(out,"?");- print_ast(out,cond->center);- fprintf(out,":");- print_ast(out,cond->right);- fprintf(out,")");- }- void print_function_expression_tree(FILE *out,struct AST_Function_Expression *function_call)- {- struct Queue_Node *it;- print_ast(out,function_call->id);- fprintf(out,"(");- if(function_call->arguments.size>0)- {- fprintf(out,"\n");- for(it=function_call->arguments.first;it!=function_call->arguments.last;it=it->prev)- {- print_ast(out,(struct AST*)(it->data));- fprintf(out,",\n");- }- if(it!=NULL)- {- print_ast(out,(struct AST*)(it->data));- }-- }- fprintf(out,")");- }- void print_unary_expression_tree(FILE *out,struct AST_Unary_Expression *unary_expression)- {- print_ast_enum(out,unary_expression->type);- if(unary_expression->type==OP_CAST)- {- fprintf(out,"(");- print_type(out,unary_expression->value_type,1);- fprintf(out,")");- }- print_ast(out,unary_expression->operand);- }- void print_lvalue_expression_tree(FILE *out,struct AST_Lvalue_Expression *lval)- {- fprintf(out,"LVALUE ");- print_denoted(out,lval->lvalue);- }- void print_labeled_statement_tree(FILE *out,struct AST_Labeled_Statement *lab)- {- if(lab->type!=ST_LABEL)- print_ast_enum(out,lab->type);- if(lab->label!=NULL)- print_token(out,lab->label);- fprintf(out,":\n");- print_ast(out,lab->statement);- }- void print_compound_statement_tree(FILE *out,struct AST_Compound_Statement *comp)- {- struct Queue_Node *it;- fprintf(out,"{\n");- for(it=comp->components.first;it!=NULL;it=it->prev)- {- print_ast(out,(struct AST*)(it->data));- fprintf(out,";\n");- }- fprintf(out,"}\n");- }- void print_if_statement_tree(FILE *out,struct AST_If_Statement *ifs)- {- fprintf(out,"if(");- print_ast(out,ifs->condition);- fprintf(out,")\n");- print_ast(out,ifs->body_statement);-- if(ifs->else_statement!=NULL)- {- fprintf(out,"\nelse");- print_ast(out,ifs->else_statement);- }-- }- void print_switch_statement_tree(FILE *out,struct AST_Switch_Statement *swi)- {- fprintf(out,"switch(");- print_ast(out,swi->condition);- fprintf(out,")\n");- print_ast(out,swi->body_statement);- }- void print_while_statement_tree(FILE *out,struct AST_While_Statement *whi)- {- fprintf(out,"while(");- print_ast(out,whi->condition);- fprintf(out,")\n");- print_ast(out,whi->body_statement);- }- void print_do_while_statement_tree(FILE *out,struct AST_Do_While_Statement *whi)- {- fprintf(out,"do\n");- print_ast(out,whi->body_statement);- fprintf(out,"while(");- print_ast(out,whi->condition);- fprintf(out,")\n");- }- void print_for_statement_tree(FILE *out,struct AST_For_Statement *fo)- {- fprintf(out,"for(\n");- print_ast(out,fo->initialisation);- fprintf(out,";\n");- print_ast(out,fo->condition);- fprintf(out,";\n");- print_ast(out,fo->update);- fprintf(out,")\n");- print_ast(out,fo->body_statement);- }- void print_return_statement_tree(FILE *out,struct AST_Return_Statement *return_expression)- {- fprintf(out,"return ");- print_ast(out,return_expression->return_expression);- }- void print_goto_statement_tree(FILE *out,struct AST_Goto_Statement *got)- {- fprintf(out,"goto ");- print_token(out,got->label);- }-- void print_type(FILE *out,struct Type *type,char should_print_struct_union)- {- print_type_qualifier(out,type);- switch(type->specifier)- {- case TS_VOID:- fprintf(out,"void");return;- case TS_CHAR:- fprintf(out,"char");return;- case TS_INT:- fprintf(out,"int");return;- case TS_FLOAT:- fprintf(out,"float");return;- case TS_DOUBLE:- fprintf(out,"double");return;- case TS_UNION:- case TS_STRUCT:- if(should_print_struct_union)- {- print_struct_union(out,((struct Type_Struct_Union*)type)->struct_union);- }else- {- fprintf(out,(type->specifier==TS_STRUCT?"struct":"union"));- }- return;- case TS_ENUM:- print_enumeration(out,((struct Type_Enum*)type)->enumeration);- return;- case TS_POINTER:- fprintf(out,"pointer to ");- print_type(out,((struct Type_Pointer*)type)->points_to,0);- return;- case TS_ARRAY:- fprintf(out,"array [%zu] of ",((struct Type_Array*)type)->number_of_elements);- print_type(out,((struct Type_Array*)type)->is_array_of,should_print_struct_union);- return;- case TS_FUNC:- fprintf(out,"function taking arguments (");- print_function_args(out,(struct Type_Function*)type);- fprintf(out,") returning ");- print_type(out,((struct Type_Function*)type)->return_type,should_print_struct_union);- return;- case TS_BITFIELD:- fprintf(out,"%zu bits of ",((struct Type_Bit_Field*)type)->number_of_bits);- print_type(out,((struct Type_Bit_Field*)type)->base,should_print_struct_union);- return;- case TS_NONE:- fprintf(out,"NONE");return;- case TS_ERROR:- fprintf(out,"ERROR!");return;-- }- assert(!"reached end of switch");- }- void print_denoted(FILE *out,struct Denoted *denoted)- {-- switch(denoted->denotation)- {- case DT_Macro:- fprintf(out,"macro ");return;- case DT_Macro_Parameter:- fprintf(out,"macro parameter ");return;- case DT_Label:- fprintf(out,"label ");return;- case DT_Object:- switch(((struct Denoted_Object*)denoted)->linkage)- {- case LINKAGE_INTERNAL:- fprintf(out,"internally linked ");- break;- case LINKAGE_EXTERNAL:- fprintf(out,"externally linked ");- break;- case LINKAGE_NONE:- break;- default:- assert(0);- }- fprintf(out,"denoted object ");- print_token(out,((struct Denoted_Object*)denoted)->id);- switch(((struct Denoted_Object*)denoted)->object->storage_class)- {- case SCS_NONE:- fprintf(out," with automatic storage duration");- break;- case SCS_STATIC:- fprintf(out," static storage duration");- break;- assert(0);- }- fprintf(out," is a ");- print_type(out,((struct Denoted_Object*)denoted)->object->type,1);-- return;- case DT_Typedef:- fprintf(out,"typedef ");- print_token(out,((struct Denoted_Typedef*)denoted)->id);- fprintf(out," to ");- print_type(out,((struct Denoted_Typedef*)denoted)->type,0);- return;- case DT_Function:- print_token(out,((struct Denoted_Function*)denoted)->id);- fprintf(out," is ");- switch(((struct Denoted_Function*)denoted)->linkage)- {- case LINKAGE_EXTERNAL:- fprintf(out," an externally linked ");- break;- case LINKAGE_INTERNAL:- fprintf(out," an internally linked ");- break;- default:- assert(0);- }- print_type(out,((struct Denoted_Function*)denoted)->type,1);- return;- case DT_Enum:- print_token(out,((struct Denoted_Enum*)denoted)->id);- fprintf(out," is ");- print_enumeration(out,((struct Denoted_Enum*)denoted)->enumeration);- return;- case DT_Enum_Constant:- fprintf(out,"%i ",((struct Denoted_Enum_Const*)denoted)->value);- return;- case DT_Struct_Union_Tag:- print_token(out,((struct Denoted_Struct_Union*)denoted)->id);- fprintf(out," is ");- print_struct_union(out,((struct Denoted_Struct_Union*)denoted)->struct_union);- case DT_Error:- fprintf(out,"denotation error");return;- case DT_Prototype:- fprintf(out,"denotation prototyep");return;- default:- assert(0);-- }- }- void print_list_of_denoted(FILE *out,struct Queue *denoted)- {- struct Queue_Node *it;- for(it=denoted->first;it!=NULL;it=it->prev)- {- print_denoted(out,(struct Denoted*)it->data);- if(it->prev!=NULL)- fprintf(out,",");- }- }- void print_enumeration(FILE *out,struct Enum *enumeration)- {- fprintf(out,"enum ");- print_list_of_denoted(out,enumeration->consts);- }- void print_struct_union(FILE *out,struct Struct_Union *struct_union)- {- switch(struct_union->specifier)- {- case TS_UNION:- fprintf(out,"union ");- break;- case TS_STRUCT:- fprintf(out,"struct ");- break;- default:- assert(1==0);- }- fprintf(out,"{");- print_list_of_denoted(out,struct_union->members);- fprintf(out,"}");-- }- void print_translation_unit_tree(FILE *out,struct AST_Translation_Unit *unit)- {- struct Queue_Node *it;- struct AST* hold;- for(it=unit->components.first;it!=NULL;it=it->prev)- {- hold=(struct AST*)(it->data);- print_ast(out,hold);- if(hold->type!=ST_FUNCTION_DEFINITION)- {- fprintf(out,";\n");- }- }- }- void print_ast(FILE *out,struct AST* tree)- {- if(tree==NULL)- {- fprintf(out,"NULL");- return ;- }- switch(tree->type)- {- case OP_MEMBER_TROUGH_PTR:- case OP_MEMBER:- case OP_BITWISE_AND:- case OP_BITWISE_XOR:- case OP_BITWISE_NOT:- case OP_LOGICAL_AND:- case OP_LOGICAL_OR:- case OP_XOR_ASSIGN:- case OP_PIPE_ASSIGN:- case OP_SHIFT_RIGHT_ASSIGN:- case OP_ADD_ASSIGN:- case OP_SUBTRACT_ASSIGN:- case OP_MULTIPLY_ASSIGN:- case OP_REMAINDER_ASSIGN:- case OP_DIV_ASSIGN:- case OP_SUBTRACTION:- case OP_MUL:- case OP_DIV:- case OP_REMAINDER:- case OP_EQUAL:- case OP_LESS:- case OP_LESS_EQ:- case OP_SHIFT_LEFT:- case OP_BITWISE_OR:- case OP_AND_ASSIGN:- case OP_ARR_SUBSCRIPT:- case OP_SHIFT_LEFT_ASSIGN:- case OP_ASSIGN:- case OP_ADDITION:- case OP_COMMA:- case OP_SHIFT_RIGHT:- case OP_GREATER_EQ:- case OP_GREATER:- case OP_NOT_EQUAL:- print_binary_expression_tree(out,(struct AST_Binary_Expression*)tree);- break;- case OP_COND:- print_conditional_expression_tree(out,(struct AST_Conditional_Expression*)tree);- break;- case OP_FUNCTION:- print_function_expression_tree(out,(struct AST_Function_Expression*)tree);- break;- case OP_LOGICAL_NOT:- case OP_UNARY_MINUS:- case OP_SIZEOF:- case OP_ADDR_OF:- case OP_DEREFERENCE:- case OP_POSTFIX_INC:- case OP_PREFIX_INC:- case OP_UNARY_PLUS:- case OP_POSTFIX_DEC:- case OP_PREFIX_DEC:- case OP_CAST:- print_unary_expression_tree(out,(struct AST_Unary_Expression*)tree);- break;- case OP_LVALUE:- print_lvalue_expression_tree(out,(struct AST_Lvalue_Expression*)tree);- break;- case OP_STRING_LITERAL:- print_string_literal(out,(struct AST_String_Literal*)tree);- break;- case OP_CONSTANT:- print_constant_tree(out,(struct AST_Constant*)tree);- break;- case OP_NOP:- fprintf(out,"NOP");- break;- case ST_SWITCH:- print_switch_statement_tree(out,(struct AST_Switch_Statement*)tree);- break;- case ST_IF:- print_if_statement_tree(out,(struct AST_If_Statement*)tree);- break;- case ST_WHILE:- print_while_statement_tree(out,(struct AST_While_Statement*)tree);- break;- case ST_DO_WHILE:- print_do_while_statement_tree(out,(struct AST_Do_While_Statement*)tree);- break;- case ST_GOTO:- print_goto_statement_tree(out,(struct AST_Goto_Statement*)tree);- break;- case ST_DEFAULT:- case ST_LABEL:- case ST_CASE:- print_labeled_statement_tree(out,(struct AST_Labeled_Statement*)tree);- break;- case ST_CONTINUE:- fprintf(out,"continue");- break;- case ST_BREAK:- fprintf(out,"break");- break;- case ST_RETURN:- print_return_statement_tree(out,(struct AST_Return_Statement*)tree);- break;- case ST_FOR:- print_for_statement_tree(out,(struct AST_For_Statement*)tree);- break;- case ST_COMPOUND:- print_compound_statement_tree(out,(struct AST_Compound_Statement*)tree);- break;- case ST_OBJECT_DECLARATION:- print_denoted(out,(struct Denoted*)((struct AST_Object_Declaration*)tree)->object);- fprintf(out,"=");- print_ast(out,((struct AST_Object_Declaration*)tree)->object->initializer);- break;- case ST_TYPE_DEFINITION:- print_denoted(out,(struct Denoted*)((struct AST_Type_Definition*)tree)->definition);- break;- case ST_FUNCTION_DECLARATION:- print_denoted(out,(struct Denoted*)((struct AST_Function_Declaration*)tree)->function);- break;- case ST_FUNCTION_DEFINITION:- print_function_definition(out,((struct AST_Function_Declaration*)tree)->function);- break;- case TRANSLATION_UNIT:- print_translation_unit_tree(out,(struct AST_Translation_Unit*)tree);- break;- case ERROR:- print_error_tree(out,(struct AST_Error*)tree);- break;- default:- fprintf(out,"NOT_POSSIBLE");break;- }-- }-- void print_function_definition(FILE *out,struct Denoted_Function *function)- {- print_token(out,function->id);- fprintf(out," is");- switch(function->linkage)- {- case LINKAGE_EXTERNAL:- fprintf(out," an externally linked ");- break;- case LINKAGE_INTERNAL:- fprintf(out," an internally linked ");- break;- default:- assert(0);- }- print_type(out,function->type,1);- print_ast(out,(struct AST*)function->body);- }- void print_program_ast(FILE *out,struct Program *program)- {- size_t i;- struct Queue_Node *it;- for(it=program->translation_units->first;it!=NULL;it=it->prev)- {- fprintf(out,"TRANSLATION_UNIT {\n");- print_ast(out,(struct AST*)it->data);- fprintf(out,"\n} TRANSLATION_UNIT_END\n");- }- }- void print_keyword_enum(FILE *out,enum KEYWORDS kw)- {- switch(kw)- {- case KW_AUTO:- fprintf(out,"KW_AUTO");break;- case KW_DO:- fprintf(out,"KW_DO");break;- case KW_DOUBLE:- fprintf(out,"KW_DOUBLE");break;- case KW_INT:- fprintf(out,"KW_INT");break;- case KW_STRUCT:- fprintf(out,"KW_STRUCT");break;- case KW_BREAK:- fprintf(out,"KW_BREAK");break;- case KW_ELSE:- fprintf(out,"KW_ELSE");break;- case KW_LONG:- fprintf(out,"KW_LONG");break;- case KW_SWITCH:- fprintf(out,"KW_SWITCH");break;- case KW_CASE:- fprintf(out,"KW_CASE");break;- case KW_ENUM:- fprintf(out,"KW_ENUM");break;- case KW_REGISTER:- fprintf(out,"KW_REGISTER");break;- case KW_TYPEDEF:- fprintf(out,"KW_TYPEDEF");break;- case KW_CHAR:- fprintf(out,"KW_CHAR");break;- case KW_EXTERN:- fprintf(out,"KW_EXTERN");break;- case KW_RETURN:- fprintf(out,"KW_RETURN");break;- case KW_UNION:- fprintf(out,"KW_UNION");break;- case KW_CONST:- fprintf(out,"KW_CONST");break;- case KW_FLOAT:- fprintf(out,"KW_FLOAT");break;- case KW_SHORT:- fprintf(out,"KW_SHORT");break;- case KW_UNSIGNED:- fprintf(out,"KW_UNSIGNED");break;- case KW_CONTINUE:- fprintf(out,"KW_CONTINUE");break;- case KW_FOR:- fprintf(out,"KW_FOR");break;- case KW_SIGNED:- fprintf(out,"KW_SIGNED");break;- case KW_VOID:- fprintf(out,"KW_VOID");break;- case KW_DEFAULT:- fprintf(out,"KW_DEFAULT");break;- case KW_GOTO:- fprintf(out,"KW_GOTO");break;- case KW_SIZEOF:- fprintf(out,"KW_SIZEOF");break;- case KW_VOLATILE:- fprintf(out,"KW_VOLATILE");break;- case KW_IF:- fprintf(out,"KW_IF");break;- case KW_STATIC:- fprintf(out,"KW_STATIC");break;- case KW_WHILE:- fprintf(out,"KW_WHILE");break;- case KW_DEFINED:- fprintf(out,"KW_DEFINED");break;- case KW_EXCLAMATION:- fprintf(out,"KW_EXCLAMATION");break;- case KW_BACK_SLASH:- fprintf(out,"KW_BACK_SLASH");break;- case KW_PERCENT:- fprintf(out,"KW_PERCENT");break;- case KW_AND:- fprintf(out,"KW_AND");break;- case KW_AND_AND:- fprintf(out,"KW_AND_AND");break;- case KW_OPEN_NORMAL:- fprintf(out,"KW_OPEN_NORMAL");break;- case KW_CLOSE_NORMAL:- fprintf(out,"KW_CLOSE_NORMAL");break;- case KW_STAR:- fprintf(out,"KW_STAR");break;- case KW_PLUS:- fprintf(out,"KW_PLUS");break;- case KW_COMMA:- fprintf(out,"KW_COMMA");break;- case KW_MINUS:- fprintf(out,"KW_MINUS");break;- case KW_ARROW:- fprintf(out,"KW_ARROW");break;- case KW_COLUMN:- fprintf(out,"KW_COLUMN");break;- case KW_SEMI_COLUMN:- fprintf(out,"KW_SEMI_COLUMN");break;- case KW_LESS:- fprintf(out,"KW_LESS");break;- case KW_EQ:- fprintf(out,"KW_EQ");break;- case KW_EQEQ:- fprintf(out,"KW_EQEQ");break;- case KW_MORE:- fprintf(out,"KW_MORE");break;- case KW_QUESTION:- fprintf(out,"KW_QUESTION");break;- case KW_OPEN_SQUARE:- fprintf(out,"KW_OPEN_SQUARE");break;- case KW_CLOSE_SQUARE:- fprintf(out,"KW_CLOSE_SQUARE");break;- case KW_HAT:- fprintf(out,"KW_HAT");break;- case KW_FLOOR:- fprintf(out,"KW_FLOOR");break;- case KW_OPEN_CURLY:- fprintf(out,"KW_OPEN_CURLY");break;- case KW_CLOSE_CURLY:- fprintf(out,"KW_CLOSE_CURLY");break;- case KW_PIPE:- fprintf(out,"KW_PIPE");break;- case KW_PIPE_PIPE:- fprintf(out,"KW_PIPE_PIPE");break;- case KW_TILDE:- fprintf(out,"KW_TILDE");break;- case KW_PLUSPLUS:- fprintf(out,"KW_PLUSPLUS");break;- case KW_MINUSMINUS:- fprintf(out,"KW_MINUSMINUS");break;- case KW_SHIFT_RIGHT:- fprintf(out,"KW_SHIFT_RIGHT");break;- case KW_SHIFT_LEFT:- fprintf(out,"KW_SHIFT_LEFT");break;- case KW_LESS_EQ:- fprintf(out,"KW_LESS_EQ");break;- case KW_MORE_EQ:- fprintf(out,"KW_MORE_EQ");break;- case KW_NOT_EQ:- fprintf(out,"KW_NOT_EQ");break;- case KW_PLUS_EQ:- fprintf(out,"KW_PLUS_EQ");break;- case KW_MINUS_EQ:- fprintf(out,"KW_MINUS_EQ");break;- case KW_STAR_EQ:- fprintf(out,"KW_STAR_EQ");break;- case KW_PERCENT_EQ:- fprintf(out,"KW_PERCENT_EQ");break;- case KW_SHIFT_LEFT_EQ:- fprintf(out,"KW_SHIFT_LEFT_EQ");break;- case KW_SHIFT_RIGHT_EQ:- fprintf(out,"KW_SHIFT_RIGHT_EQ");break;- case KW_AND_EQ:- fprintf(out,"KW_AND_EQ");break;- case KW_HAT_EQ:- fprintf(out,"KW_HAT_EQ");break;- case KW_PIPE_EQ:- fprintf(out,"KW_PIPE_EQ");break;- case KW_DOT:- fprintf(out,"KW_DOT");break;- case KW_DIV_EQ:- fprintf(out,"KW_DIV_EQ");break;- case KW_FORWARD_SLASH:- fprintf(out,"KW_FORWARD_SLASH");break;- case KW_NOTYPE:- fprintf(out,"KW_NOTYPE");break;- case KW_HEXADECIMAL_CONSTANT:- fprintf(out,"KW_HEXADECIMAL_CONSTANT");break;- case KW_DECIMAL_CONSTANT:- fprintf(out,"KW_DECIMAL_CONSTANT");break;- case KW_OCTAL_CONSTANT:- fprintf(out,"KW_OCTAL_CONSTANT");break;- case KW_UNSIGNED_DECIMAL_CONSTANT:- fprintf(out,"KW_UNSIGNED_DECIMAL_CONSTANT");break;- case KW_UNSIGNED_OCTAL_CONSTANT:- fprintf(out,"KW_UNSIGNED_OCTAL_CONSTANT");break;- case KW_UNSIGNED_HEXADECIMAL_CONSTANT:- fprintf(out,"KW_UNSIGNED_HEXADECIMAL_CONSTANT");break;- case KW_UNSIGNED_LONG_HEXADECIMAL_CONSTANT:- fprintf(out,"KW_UNSIGNED_LONG_HEXADECIMAL_CONSTANT");break;- case KW_UNSIGNED_LONG_OCTAL_CONSTANT:- fprintf(out,"KW_UNSIGNED_LONG_OCTAL_CONSTANT");break;- case KW_UNSIGNED_LONG_DECIMAL_CONSTANT:- fprintf(out,"KW_UNSIGNED_LONG_DECIMAL_CONSTANT");break;- case KW_UNSIGNED_LONG_LONG_DECIMAL_CONSTANT:- fprintf(out,"KW_UNSIGNED_LONG_LONG_DECIMAL_CONSTANT");break;- case KW_UNSIGNED_LONG_LONG_HEXADECIMAL_CONSTANT:- fprintf(out,"KW_UNSIGNED_LONG_LONG_HEXADECIMAL_CONSTANT");break;- case KW_UNSIGNED_LONG_LONG_OCTAL_CONSTANT:- fprintf(out,"KW_UNSIGNED_LONG_LONG_OCTAL_CONSTANT");break;- case KW_LONG_HEXADECIMAL_CONSTANT:- fprintf(out,"KW_LONG_HEXADECIMAL_CONSTANT");break;- case KW_LONG_OCTAL_CONSTANT:- fprintf(out,"KW_LONG_OCTAL_CONSTANT");break;- case KW_LONG_DECIMAL_CONSTANT:- fprintf(out,"KW_LONG_DECIMAL_CONSTANT");break;- case KW_LONG_LONG_HEXADECIMAL_CONSTANT:- fprintf(out,"KW_LONG_LONG_HEXADECIMAL_CONSTANT");break;- case KW_LONG_LONG_OCTAL_CONSTANT:- fprintf(out,"KW_LONG_LONG_OCTAL_CONSTANT");break;- case KW_LONG_LONG_DECIMAL_CONSTANT:- fprintf(out,"KW_LONG_LONG_DECIMAL_CONSTANT");break;- case KW_DOUBLE_DECIMAL_CONSTANT:- fprintf(out,"KW_DOUBLE_DECIMAL_CONSTANT");break;- case KW_LONG_DOUBLE_DECIMAL_CONSTANT:- fprintf(out,"KW_LONG_DOUBLE_DECIMAL_CONSTANT");break;- case KW_FLOAT_DECIMAL_CONSTANT:- fprintf(out,"KW_FLOAT_DECIMAL_CONSTANT");break;- case KW_DOUBLE_HEXADECIMAL_CONSTANT:- fprintf(out,"KW_DOUBLE_HEXADECIMAL_CONSTANT");break;- case KW_LONG_DOUBLE_HEXADECIMAL_CONSTANT:- fprintf(out,"KW_LONG_DOUBLE_HEXADECIMAL_CONSTANT");break;- case KW_FLOAT_HEXADECIMAL_CONSTANT:- fprintf(out,"KW_FLOAT_HEXADECIMAL_CONSTANT");break;- case KW_COMMENT:- fprintf(out,"KW_COMMENT");break;- case KW_ID:- fprintf(out,"KW_ID");break;- case KW_CHAR_CONSTANT:- fprintf(out,"KW_CHAR_CONSTANT");break;- case KW_WIDE_CHAR_CONSTANT:- fprintf(out,"KW_WIDE_CHAR_CONSTANT");break;- case KW_STRING:- fprintf(out,"KW_STRING");break;- case KW_WIDE_STRING:- fprintf(out,"KW_WIDE_STRING");break;- case PKW_IF:- fprintf(out,"PKW_IF");break;- case PKW_IFDEF:- fprintf(out,"PKW_IFDEF");break;- case PKW_IFNDEF:- fprintf(out,"PKW_IFNDEF");break;- case PKW_ELIF:- fprintf(out,"PKW_ELIF");break;- case PKW_ELSE:- fprintf(out,"PKW_ELSE");break;- case PKW_ENDIF:- fprintf(out,"PKW_ENDIF");break;- case PKW_INCLUDE:- fprintf(out,"PKW_INCLUDE");break;- case PKW_DEFINE:- fprintf(out,"PKW_DEFINE");break;- case PKW_UNDEF:- fprintf(out,"PKW_UNDEF");break;- case PKW_LINE:- fprintf(out,"PKW_LINE");break;- case PKW_ERROR:- fprintf(out,"PKW_ERROR");break;- case PKW_PRAGMA:- fprintf(out,"PKW_PRAGMA");break;- case PKW_COMMENT:- fprintf(out,"PKW_COMMENT");break;- case PKW_NOTYPE:- fprintf(out,"PKW_NOTYPE");break;- case KW_HASHTAG:- fprintf(out,"KW_HASHTAG");break;- case KW_HASHTAG_HASHTAG:- fprintf(out,"KW_HASHTAG_HASHTAG");break;- default:- fprintf(out,"KW_ERROR");- }- }- void print_errors(FILE *out,struct Queue *errors)- {- struct Queue_Node *it;- for(it=errors->first;it!=NULL;it=it->prev)- {- print_translation_error(out,(struct Translation_Error*)it->data);- }- }- void print_function_args(FILE *out,struct Type_Function *func)- {- size_t i;- if(func->number_of_arguments==0)- return;-- print_denoted(out,(struct Denoted*)func->arguments[0]);- for(i=1;i<func->number_of_arguments;++i)- {- fprintf(out,", ");- print_denoted(out,(struct Denoted*)func->arguments[i]);- }- }- void print_type_qualifier(FILE *out,struct Type *type)- {-- switch(type->specifier)- {- case TS_VOID:- case TS_CHAR:- case TS_INT:- case TS_FLOAT:- case TS_DOUBLE:- fprintf(out,"%s %s",- (AS_BASIC_TYPE_PTR(type)->is_const?"constant ":""),- (AS_BASIC_TYPE_PTR(type)->is_volatile ?"volatile ":"")- );- break;- case TS_STRUCT:- case TS_UNION:- fprintf(out,"%s %s",- (AS_STRUCT_UNION_PTR(type)->is_const?"constant ":""),- (AS_STRUCT_UNION_PTR(type)->is_volatile ?"volatile ":"")- );- break;- case TS_ENUM:- fprintf(out,"%s %s",- (AS_STRUCT_UNION_PTR(type)->is_const?"constant ":""),- (AS_STRUCT_UNION_PTR(type)->is_volatile ?"volatile ":"")- );- break;- case TS_POINTER:- fprintf(out,"%s %s",- (AS_TYPE_PTR_PTR(type)->is_const?"constant ":""),- (AS_TYPE_PTR_PTR(type)->is_volatile ?"volatile ":"")- );- break;- case TS_ARRAY:- case TS_FUNC:- case TS_BITFIELD:- break;- case TS_NONE:- case TS_ERROR:- default:- fprintf(out,"error");- }- }--- void print_constant_tree(FILE *out,struct AST_Constant *constant)- {- fprintf(out,"CONSTANT of type ");- print_type(out,constant->value_type,1);- }- void print_string_literal(FILE *out,struct AST_String_Literal *string)- {- fprintf(out,"STRING LITERAL of type");- print_token(out,string->string);- }-- #undef TOK- #undef INDENT-- #endifF diff --git a/misc/print.h b/misc/print.h deleted file mode 100644 --- a/misc/print.h +++ /dev/null- #ifndef GCC_PRINT_H- #define GCC_PRINT_H GCC_PRINT_H-- #include<stdio.h>- #include<assert.h>- #include <all.h>--- #define INDENT for(int j=0;j<indent;++j) fprintf(out," ");- #define TOK(s) ((struct token*)(s))- #define ASTPTR(s) ((struct AST*)(s))-- extern int indent;-- void print_token(FILE *out,struct token *token);- void print_tokens(FILE *out,struct Queue *tokens);- char print_tokens_of_program(FILE *out,char **base_names);- void print_ast_enum(FILE *out,enum AST_Type op);- void print_error_tree(FILE *out,struct AST_Error *error);- void print_binary_expression_tree(FILE *out,struct AST_Binary_Expression *bin);- void print_conditional_expression_tree(FILE *out,struct AST_Conditional_Expression *cond);- void print_function_expression_tree(FILE *out,struct AST_Function_Expression *function_call);- void print_unary_expression_tree(FILE *out,struct AST_Unary_Expression *unary_expression);- void print_constant_tree(FILE *out,struct AST_Constant *constant);- void print_string_literal(FILE *out,struct AST_String_Literal *string);- void print_lvalue_expression_tree(FILE *out,struct AST_Lvalue_Expression *lval);- void print_labeled_statement_tree(FILE *out,struct AST_Labeled_Statement *lab);- void print_compound_statement_tree(FILE *out,struct AST_Compound_Statement *comp);- void print_if_statement_tree(FILE *out,struct AST_If_Statement *ifs);- void print_switch_statement_tree(FILE *out,struct AST_Switch_Statement *swi);- void print_while_statement_tree(FILE *out,struct AST_While_Statement *whi);- void print_do_while_statement_tree(FILE *out,struct AST_Do_While_Statement *whi);- void print_for_statement_tree(FILE *out,struct AST_For_Statement *fo);- void print_return_statement_tree(FILE *out,struct AST_Return_Statement *return_expression);- void print_goto_statement_tree(FILE *out,struct AST_Goto_Statement *got);- void print_type(FILE *out,struct Type *type,char print_struct_union);- void print_denoted(FILE *out,struct Denoted *denoted);- void print_list_of_denoted(FILE *out,struct Queue *denoted);- void print_enumeration(FILE *out,struct Enum *enumeration);- void print_struct_union(FILE *out,struct Struct_Union *struct_union);- void print_translation_unit_tree(FILE *out,struct AST_Translation_Unit *unit);- void print_ast(FILE *out,struct AST* tree);- void print_program_tokens(FILE *out,struct Program *program);- void print_program_ast(FILE *out,struct Program *program);- void print_keyword_enum(FILE *out,enum KEYWORDS kw);- void print_function_definition(FILE *out,struct Denoted_Function *function);- void print_errors(FILE *out,struct Queue *errors);- void print_function_args(FILE *out,struct Type_Function *func);- void print_type_qualifier(FILE *out,struct Type *type);--- #endifF diff --git a/misc/queue.c b/misc/queue.c deleted file mode 100644 --- a/misc/queue.c +++ /dev/null- #ifndef GQUEUE_C- #define GQUEUE_C GQUEUE_C- #include "queue.h"-- void Queue_Init(Queue *q)- {- q->first=q->last=NULL;- q->size=0;- }- void Queue_Push(Queue *q,void *data)- {- if(q==NULL)return;- if(q->first==NULL)- {- q->first=q->last=malloc(sizeof(struct Queue_Node));-- q->first->data=data;- q->last->prev=NULL;-- ++q->size;- return;- }else- {- struct Queue_Node *temp=malloc(sizeof(struct Queue_Node));- q->last->prev=temp;- temp->data=data;- temp->prev=NULL;-- q->last=temp;- ++q->size;- }-- }- /*max queueiness*/- void Queue_Push_Front(struct Queue *q,void *data)- {- if(q==NULL)return;- if(q->first==NULL)- {- q->first=q->last=malloc(sizeof(struct Queue_Node));-- q->first->data=data;- q->last->prev=NULL;-- ++q->size;- }else- {- struct Queue_Node *temp=malloc(sizeof(struct Queue_Node));- temp->prev=q->first;- temp->data=data;-- q->first=temp;- ++q->size;- }-- }- void* Queue_Pop(Queue *q)- {- if(q==NULL)return NULL;- if(q->size==0)return NULL;-- void *return_value=q->first->data;-- if(q->size==1)- {- free(q->last);- q->first=q->last=NULL;- q->size=0;- }else- {- struct Queue_Node *temp_first=q->first;- q->first=q->first->prev;- free(temp_first);- --q->size;- }- return return_value;- }- void Queue_Append(struct Queue *lead,struct Queue *follower)- {- assert(lead!=NULL);- assert(follower!=NULL);- if(lead->last==NULL)- {- lead->last=follower->last;- lead->first=follower->first;- lead->size=follower->size;- }else- {- lead->last->prev=follower->first;- lead->last=follower->last;- lead->size+=follower->size;- }- }-- void Queue_Destroy(Queue *q)- {-- struct Queue_Node *temp_first;- while(q->first!=NULL)- {- temp_first=q->first;- q->first=q->first->prev;- free(temp_first->data);- free(temp_first);- }-- }- /*- Fits a new Queue on top of q. It uses its elements as its own- Do not destroy- last element ->prev is may not be null- */- struct Queue Queue_Fit(struct Queue *q,size_t offset)- {- assert(q->size>offset && offset>0);-- struct Queue ret;- size_t i;-- ret.size=q->size-offset;- ret.first=q->first;- ret.last=q->last;-- for(i=0;i<offset;++i)- {- ret.first=ret.first->prev;- }- return ret;-- }- #endif //#ifndef GQUEUE_CF diff --git a/misc/queue.h b/misc/queue.h deleted file mode 100644 --- a/misc/queue.h +++ /dev/null- #ifndef GQUEUE_H- #define GQUEUE_H GQUEUE_H- #include<stdlib.h>//malloc free- #include<assert.h>-- typedef struct Queue Queue;-- struct Queue- {- struct Queue_Node- {- void *data;- struct Queue_Node *prev;- }*first,*last;-- size_t size;-- };- void Queue_Init(Queue *q);- void Queue_Push(Queue *q,void *data);- void Queue_Push_Front(struct Queue *q,void *data);- void* Queue_Pop(Queue *q);- void Queue_Append(struct Queue *lead,struct Queue *follower);- void Queue_Destroy(Queue *q);-- #endifF diff --git a/misc/stack.c b/misc/stack.c deleted file mode 100644 --- a/misc/stack.c +++ /dev/null- #ifndef GSTACK_C- #define GSTACK_C GSTACK_C- #include "stack.h"---- void Stack_Init(Stack *stack)- {- stack->size=0;- stack->first=NULL;- }- void Stack_Push(Stack *stack,void* data)- {- struct Stack_Node *temp_node=malloc(sizeof(struct Stack_Node));- temp_node->data=data;- temp_node->next=stack->first;- stack->first=temp_node;- ++stack->size;- }- void* Stack_Pop(Stack *stack)- {- void* return_value=NULL;- if(stack->first!=NULL)- {- struct Stack_Node *temp_first=stack->first;- return_value=stack->first->data;-- --stack->size;- stack->first=stack->first->next;- free(temp_first);- }-- return return_value;- }-- #endif//#ifndef GSTACK_C-F diff --git a/misc/stack.h b/misc/stack.h deleted file mode 100644 --- a/misc/stack.h +++ /dev/null- #ifndef GSTACK_H- #define GSTACK_H GSTACK_H- #include<stdlib.h>- typedef struct Stack Stack;-- struct Stack_Node- {- struct Stack_Node *next;- void *data;- };- struct Stack- {- struct Stack_Node *first;- size_t size;- };-- void Stack_Init(Stack *stack);- void Stack_Push(Stack *stack,void* data);- void* Stack_Pop(Stack *stack);--- #endifF diff --git a/misc/tests/test.c b/misc/tests/test.c new file mode 100644 --- /dev/null +++ b/misc/tests/test.c+ int main()+ {+ int var1;+ int var2;+ int var3;+ int var4;+ int var5;+ int var6;+ int var7;+ int var8;+ int var9;+ int var10;+ int var11;+ int var12;+ int var13;+ int var14;+ int var15;+ int var16;+ int var17;+ int var18;+ int var19;+ int var20;+ int var21;+ int var22;+ int var23;+ int var24;+ int var25;+ int var26;+ int var27;+ int var28;+ int var29;+ int var30;+ int var31;+ int var32;+ int var33;+ int var34;+ int var35;+ int var36;+ int var37;+ int var38;+ int var39;+ int var40;+ int var41;+ int var42;+ int var43;+ int var44;+ int var45;+ int var46;+ int var47;+ int var48;+ int var49;+ int var50;+ int var51;+ int var52;+ int var53;+ int var54;+ int var55;+ int var56;+ int var57;+ int var58;+ int var59;+ int var60;+ int var61;+ int var62;+ int var63;+ int var64;+ int var65;+ int var66;+ int var67;+ int var68;+ int var69;+ int var70;+ int var71;+ int var72;+ int var73;+ int var74;+ int var75;+ int var76;+ int var77;+ int var78;+ int var79;+ int var80;+ int var81;+ int var82;+ int var83;+ int var84;+ int var85;+ int var86;+ int var87;+ int var88;+ int var89;+ int var90;+ int var91;+ int var92;+ int var93;+ int var94;+ int var95;+ int var96;+ int var97;+ int var98;+ int var99;+ int var100;+ int var101;+ int var102;+ int var103;+ int var104;+ int var105;+ int var106;+ int var107;+ int var108;+ int var109;+ int var110;+ int var111;+ int var112;+ int var113;+ int var114;+ int var115;+ int var116;+ int var117;+ int var118;+ int var119;+ int var120;+ int var121;+ int var122;+ int var123;+ int var124;+ int var125;+ int var126;+ int var127;+ int var128;+ int var129;+ int var130;+ int var131;+ int var132;+ int var133;+ int var134;+ int var135;+ int var136;+ int var137;+ int var138;+ int var139;+ int var140;+ int var141;+ int var142;+ int var143;+ int var144;+ int var145;+ int var146;+ int var147;+ int var148;+ int var149;+ int var150;+ int var151;+ int var152;+ int var153;+ int var154;+ int var155;+ int var156;+ int var157;+ int var158;+ int var159;+ int var160;+ int var161;+ int var162;+ int var163;+ int var164;+ int var165;+ int var166;+ int var167;+ int var168;+ int var169;+ int var170;+ int var171;+ int var172;+ int var173;+ int var174;+ int var175;+ int var176;+ int var177;+ int var178;+ int var179;+ int var180;+ int var181;+ int var182;+ int var183;+ int var184;+ int var185;+ int var186;+ int var187;+ int var188;+ int var189;+ int var190;+ int var191;+ int var192;+ int var193;+ int var194;+ int var195;+ int var196;+ int var197;+ int var198;+ int var199;+ int var200;+ int var201;+ int var202;+ int var203;+ int var204;+ int var205;+ int var206;+ int var207;+ int var208;+ int var209;+ int var210;+ int var211;+ int var212;+ int var213;+ int var214;+ int var215;+ int var216;+ int var217;+ int var218;+ int var219;+ int var220;+ int var221;+ int var222;+ int var223;+ int var224;+ int var225;+ int var226;+ int var227;+ int var228;+ int var229;+ int var230;+ int var231;+ int var232;+ int var233;+ int var234;+ int var235;+ int var236;+ int var237;+ int var238;+ int var239;+ int var240;+ int var241;+ int var242;+ int var243;+ int var244;+ int var245;+ int var246;+ int var247;+ int var248;+ int var249;+ int var250;+ int var251;+ int var252;+ int var253;+ int var254;+ int var255;+ int var256;+ int var257;+ int var258;+ int var259;+ int var260;+ int var261;+ int var262;+ int var263;+ int var264;+ int var265;+ int var266;+ int var267;+ int var268;+ int var269;+ int var270;+ int var271;+ int var272;+ int var273;+ int var274;+ int var275;+ int var276;+ int var277;+ int var278;+ int var279;+ int var280;+ int var281;+ int var282;+ int var283;+ int var284;+ int var285;+ int var286;+ int var287;+ int var288;+ int var289;+ int var290;+ int var291;+ int var292;+ int var293;+ int var294;+ int var295;+ int var296;+ int var297;+ int var298;+ int var299;+ int var300;+ int var301;+ int var302;+ int var303;+ int var304;+ int var305;+ int var306;+ int var307;+ int var308;+ int var309;+ int var310;+ int var311;+ int var312;+ int var313;+ int var314;+ int var315;+ int var316;+ int var317;+ int var318;+ int var319;+ int var320;+ int var321;+ int var322;+ int var323;+ int var324;+ int var325;+ int var326;+ int var327;+ int var328;+ int var329;+ int var330;+ int var331;+ int var332;+ int var333;+ int var334;+ int var335;+ int var336;+ int var337;+ int var338;+ int var339;+ int var340;+ int var341;+ int var342;+ int var343;+ int var344;+ int var345;+ int var346;+ int var347;+ int var348;+ int var349;+ int var350;+ int var351;+ int var352;+ int var353;+ int var354;+ int var355;+ int var356;+ int var357;+ int var358;+ int var359;+ int var360;+ int var361;+ int var362;+ int var363;+ int var364;+ int var365;+ int var366;+ int var367;+ int var368;+ int var369;+ int var370;+ int var371;+ int var372;+ int var373;+ int var374;+ int var375;+ int var376;+ int var377;+ int var378;+ int var379;+ int var380;+ int var381;+ int var382;+ int var383;+ int var384;+ int var385;+ int var386;+ int var387;+ int var388;+ int var389;+ int var390;+ int var391;+ int var392;+ int var393;+ int var394;+ int var395;+ int var396;+ int var397;+ int var398;+ int var399;+ int var400;+ int var401;+ int var402;+ int var403;+ int var404;+ int var405;+ int var406;+ int var407;+ int var408;+ int var409;+ int var410;+ int var411;+ int var412;+ int var413;+ int var414;+ int var415;+ int var416;+ int var417;+ int var418;+ int var419;+ int var420;+ int var421;+ int var422;+ int var423;+ int var424;+ int var425;+ int var426;+ int var427;+ int var428;+ int var429;+ int var430;+ int var431;+ int var432;+ int var433;+ int var434;+ int var435;+ int var436;+ int var437;+ int var438;+ int var439;+ int var440;+ int var441;+ int var442;+ int var443;+ int var444;+ int var445;+ int var446;+ int var447;+ int var448;+ int var449;+ int var450;+ int var451;+ int var452;+ int var453;+ int var454;+ int var455;+ int var456;+ int var457;+ int var458;+ int var459;+ int var460;+ int var461;+ int var462;+ int var463;+ int var464;+ int var465;+ int var466;+ int var467;+ int var468;+ int var469;+ int var470;+ int var471;+ int var472;+ int var473;+ int var474;+ int var475;+ int var476;+ int var477;+ int var478;+ int var479;+ int var480;+ int var481;+ int var482;+ int var483;+ int var484;+ int var485;+ int var486;+ int var487;+ int var488;+ int var489;+ int var490;+ int var491;+ int var492;+ int var493;+ int var494;+ int var495;+ int var496;+ int var497;+ int var498;+ int var499;+ int var500;+ int var501;+ int var502;+ int var503;+ int var504;+ int var505;+ int var506;+ int var507;+ int var508;+ int var509;+ int var510;+ int var511;+ int var512;+ int var513;+ int var514;+ int var515;+ int var516;+ int var517;+ int var518;+ int var519;+ int var520;+ int var521;+ int var522;+ int var523;+ int var524;+ int var525;+ int var526;+ int var527;+ int var528;+ int var529;+ int var530;+ int var531;+ int var532;+ int var533;+ int var534;+ int var535;+ int var536;+ int var537;+ int var538;+ int var539;+ int var540;+ int var541;+ int var542;+ int var543;+ int var544;+ int var545;+ int var546;+ int var547;+ int var548;+ int var549;+ int var550;+ int var551;+ int var552;+ int var553;+ int var554;+ int var555;+ int var556;+ int var557;+ int var558;+ int var559;+ int var560;+ int var561;+ int var562;+ int var563;+ int var564;+ int var565;+ int var566;+ int var567;+ int var568;+ int var569;+ int var570;+ int var571;+ int var572;+ int var573;+ int var574;+ int var575;+ int var576;+ int var577;+ int var578;+ int var579;+ int var580;+ int var581;+ int var582;+ int var583;+ int var584;+ int var585;+ int var586;+ int var587;+ int var588;+ int var589;+ int var590;+ int var591;+ int var592;+ int var593;+ int var594;+ int var595;+ int var596;+ int var597;+ int var598;+ int var599;+ int var600;+ int var601;+ int var602;+ int var603;+ int var604;+ int var605;+ int var606;+ int var607;+ int var608;+ int var609;+ int var610;+ int var611;+ int var612;+ int var613;+ int var614;+ int var615;+ int var616;+ int var617;+ int var618;+ int var619;+ int var620;+ int var621;+ int var622;+ int var623;+ int var624;+ int var625;+ int var626;+ int var627;+ int var628;+ int var629;+ int var630;+ int var631;+ int var632;+ int var633;+ int var634;+ int var635;+ int var636;+ int var637;+ int var638;+ int var639;+ int var640;+ int var641;+ int var642;+ int var643;+ int var644;+ int var645;+ int var646;+ int var647;+ int var648;+ int var649;+ int var650;+ int var651;+ int var652;+ int var653;+ int var654;+ int var655;+ int var656;+ int var657;+ int var658;+ int var659;+ int var660;+ int var661;+ int var662;+ int var663;+ int var664;+ int var665;+ int var666;+ int var667;+ int var668;+ int var669;+ int var670;+ int var671;+ int var672;+ int var673;+ int var674;+ int var675;+ int var676;+ int var677;+ int var678;+ int var679;+ int var680;+ int var681;+ int var682;+ int var683;+ int var684;+ int var685;+ int var686;+ int var687;+ int var688;+ int var689;+ int var690;+ int var691;+ int var692;+ int var693;+ int var694;+ int var695;+ int var696;+ int var697;+ int var698;+ int var699;+ int var700;+ int var701;+ int var702;+ int var703;+ int var704;+ int var705;+ int var706;+ int var707;+ int var708;+ int var709;+ int var710;+ int var711;+ int var712;+ int var713;+ int var714;+ int var715;+ int var716;+ int var717;+ int var718;+ int var719;+ int var720;+ int var721;+ int var722;+ int var723;+ int var724;+ int var725;+ int var726;+ int var727;+ int var728;+ int var729;+ int var730;+ int var731;+ int var732;+ int var733;+ int var734;+ int var735;+ int var736;+ int var737;+ int var738;+ int var739;+ int var740;+ int var741;+ int var742;+ int var743;+ int var744;+ int var745;+ int var746;+ int var747;+ int var748;+ int var749;+ int var750;+ int var751;+ int var752;+ int var753;+ int var754;+ int var755;+ int var756;+ int var757;+ int var758;+ int var759;+ int var760;+ int var761;+ int var762;+ int var763;+ int var764;+ int var765;+ int var766;+ int var767;+ int var768;+ int var769;+ int var770;+ int var771;+ int var772;+ int var773;+ int var774;+ int var775;+ int var776;+ int var777;+ int var778;+ int var779;+ int var780;+ int var781;+ int var782;+ int var783;+ int var784;+ int var785;+ int var786;+ int var787;+ int var788;+ int var789;+ int var790;+ int var791;+ int var792;+ int var793;+ int var794;+ int var795;+ int var796;+ int var797;+ int var798;+ int var799;+ int var800;+ int var801;+ int var802;+ int var803;+ int var804;+ int var805;+ int var806;+ int var807;+ int var808;+ int var809;+ int var810;+ int var811;+ int var812;+ int var813;+ int var814;+ int var815;+ int var816;+ int var817;+ int var818;+ int var819;+ int var820;+ int var821;+ int var822;+ int var823;+ int var824;+ int var825;+ int var826;+ int var827;+ int var828;+ int var829;+ int var830;+ int var831;+ int var832;+ int var833;+ int var834;+ int var835;+ int var836;+ int var837;+ int var838;+ int var839;+ int var840;+ int var841;+ int var842;+ int var843;+ int var844;+ int var845;+ int var846;+ int var847;+ int var848;+ int var849;+ int var850;+ int var851;+ int var852;+ int var853;+ int var854;+ int var855;+ int var856;+ int var857;+ int var858;+ int var859;+ int var860;+ int var861;+ int var862;+ int var863;+ int var864;+ int var865;+ int var866;+ int var867;+ int var868;+ int var869;+ int var870;+ int var871;+ int var872;+ int var873;+ int var874;+ int var875;+ int var876;+ int var877;+ int var878;+ int var879;+ int var880;+ int var881;+ int var882;+ int var883;+ int var884;+ int var885;+ int var886;+ int var887;+ int var888;+ int var889;+ int var890;+ int var891;+ int var892;+ int var893;+ int var894;+ int var895;+ int var896;+ int var897;+ int var898;+ int var899;+ int var900;+ int var901;+ int var902;+ int var903;+ int var904;+ int var905;+ int var906;+ int var907;+ int var908;+ int var909;+ int var910;+ int var911;+ int var912;+ int var913;+ int var914;+ int var915;+ int var916;+ int var917;+ int var918;+ int var919;+ int var920;+ int var921;+ int var922;+ int var923;+ int var924;+ int var925;+ int var926;+ int var927;+ int var928;+ int var929;+ int var930;+ int var931;+ int var932;+ int var933;+ int var934;+ int var935;+ int var936;+ int var937;+ int var938;+ int var939;+ int var940;+ int var941;+ int var942;+ int var943;+ int var944;+ int var945;+ int var946;+ int var947;+ int var948;+ int var949;+ int var950;+ int var951;+ int var952;+ int var953;+ int var954;+ int var955;+ int var956;+ int var957;+ int var958;+ int var959;+ int var960;+ int var961;+ int var962;+ int var963;+ int var964;+ int var965;+ int var966;+ int var967;+ int var968;+ int var969;+ int var970;+ int var971;+ int var972;+ int var973;+ int var974;+ int var975;+ int var976;+ int var977;+ int var978;+ int var979;+ int var980;+ int var981;+ int var982;+ int var983;+ int var984;+ int var985;+ int var986;+ int var987;+ int var988;+ int var989;+ int var990;+ int var991;+ int var992;+ int var993;+ int var994;+ int var995;+ int var996;+ int var997;+ int var998;+ int var999;+ int var1000;+ int var1001;+ int var1002;+ int var1003;+ int var1004;+ int var1005;+ int var1006;+ int var1007;+ int var1008;+ int var1009;+ int var1010;+ int var1011;+ int var1012;+ int var1013;+ int var1014;+ int var1015;+ int var1016;+ int var1017;+ int var1018;+ int var1019;+ int var1020;+ int var1021;+ int var1022;+ int var1023;+ int var1024;+ int var1025;+ int var1026;+ int var1027;+ int var1028;+ int var1029;+ int var1030;+ int var1031;+ int var1032;+ int var1033;+ int var1034;+ int var1035;+ int var1036;+ int var1037;+ int var1038;+ int var1039;+ int var1040;+ int var1041;+ int var1042;+ int var1043;+ int var1044;+ int var1045;+ int var1046;+ int var1047;+ int var1048;+ int var1049;+ int var1050;+ int var1051;+ int var1052;+ int var1053;+ int var1054;+ int var1055;+ int var1056;+ int var1057;+ int var1058;+ int var1059;+ int var1060;+ int var1061;+ int var1062;+ int var1063;+ int var1064;+ int var1065;+ int var1066;+ int var1067;+ int var1068;+ int var1069;+ int var1070;+ int var1071;+ int var1072;+ int var1073;+ int var1074;+ int var1075;+ int var1076;+ int var1077;+ int var1078;+ int var1079;+ int var1080;+ int var1081;+ int var1082;+ int var1083;+ int var1084;+ int var1085;+ int var1086;+ int var1087;+ int var1088;+ int var1089;+ int var1090;+ int var1091;+ int var1092;+ int var1093;+ int var1094;+ int var1095;+ int var1096;+ int var1097;+ int var1098;+ int var1099;+ int var1100;+ int var1101;+ int var1102;+ int var1103;+ int var1104;+ int var1105;+ int var1106;+ int var1107;+ int var1108;+ int var1109;+ int var1110;+ int var1111;+ int var1112;+ int var1113;+ int var1114;+ int var1115;+ int var1116;+ int var1117;+ int var1118;+ int var1119;+ int var1120;+ int var1121;+ int var1122;+ int var1123;+ int var1124;+ int var1125;+ int var1126;+ int var1127;+ int var1128;+ int var1129;+ int var1130;+ int var1131;+ int var1132;+ int var1133;+ int var1134;+ int var1135;+ int var1136;+ int var1137;+ int var1138;+ int var1139;+ int var1140;+ int var1141;+ int var1142;+ int var1143;+ int var1144;+ int var1145;+ int var1146;+ int var1147;+ int var1148;+ int var1149;+ int var1150;+ int var1151;+ int var1152;+ int var1153;+ int var1154;+ int var1155;+ int var1156;+ int var1157;+ int var1158;+ int var1159;+ int var1160;+ int var1161;+ int var1162;+ int var1163;+ int var1164;+ int var1165;+ int var1166;+ int var1167;+ int var1168;+ int var1169;+ int var1170;+ int var1171;+ int var1172;+ int var1173;+ int var1174;+ int var1175;+ int var1176;+ int var1177;+ int var1178;+ int var1179;+ int var1180;+ int var1181;+ int var1182;+ int var1183;+ int var1184;+ int var1185;+ int var1186;+ int var1187;+ int var1188;+ int var1189;+ int var1190;+ int var1191;+ int var1192;+ int var1193;+ int var1194;+ int var1195;+ int var1196;+ int var1197;+ int var1198;+ int var1199;+ int var1200;+ int var1201;+ int var1202;+ int var1203;+ int var1204;+ int var1205;+ int var1206;+ int var1207;+ int var1208;+ int var1209;+ int var1210;+ int var1211;+ int var1212;+ int var1213;+ int var1214;+ int var1215;+ int var1216;+ int var1217;+ int var1218;+ int var1219;+ int var1220;+ int var1221;+ int var1222;+ int var1223;+ int var1224;+ int var1225;+ int var1226;+ int var1227;+ int var1228;+ int var1229;+ int var1230;+ int var1231;+ int var1232;+ int var1233;+ int var1234;+ int var1235;+ int var1236;+ int var1237;+ int var1238;+ int var1239;+ int var1240;+ int var1241;+ int var1242;+ int var1243;+ int var1244;+ int var1245;+ int var1246;+ int var1247;+ int var1248;+ int var1249;+ int var1250;+ int var1251;+ int var1252;+ int var1253;+ int var1254;+ int var1255;+ int var1256;+ int var1257;+ int var1258;+ int var1259;+ int var1260;+ int var1261;+ int var1262;+ int var1263;+ int var1264;+ int var1265;+ int var1266;+ int var1267;+ int var1268;+ int var1269;+ int var1270;+ int var1271;+ int var1272;+ int var1273;+ int var1274;+ int var1275;+ int var1276;+ int var1277;+ int var1278;+ int var1279;+ int var1280;+ int var1281;+ int var1282;+ int var1283;+ int var1284;+ int var1285;+ int var1286;+ int var1287;+ int var1288;+ int var1289;+ int var1290;+ int var1291;+ int var1292;+ int var1293;+ int var1294;+ int var1295;+ int var1296;+ int var1297;+ int var1298;+ int var1299;+ int var1300;+ int var1301;+ int var1302;+ int var1303;+ int var1304;+ int var1305;+ int var1306;+ int var1307;+ int var1308;+ int var1309;+ int var1310;+ int var1311;+ int var1312;+ int var1313;+ int var1314;+ int var1315;+ int var1316;+ int var1317;+ int var1318;+ int var1319;+ int var1320;+ int var1321;+ int var1322;+ int var1323;+ int var1324;+ int var1325;+ int var1326;+ int var1327;+ int var1328;+ int var1329;+ int var1330;+ int var1331;+ int var1332;+ int var1333;+ int var1334;+ int var1335;+ int var1336;+ int var1337;+ int var1338;+ int var1339;+ int var1340;+ int var1341;+ int var1342;+ int var1343;+ int var1344;+ int var1345;+ int var1346;+ int var1347;+ int var1348;+ int var1349;+ int var1350;+ int var1351;+ int var1352;+ int var1353;+ int var1354;+ int var1355;+ int var1356;+ int var1357;+ int var1358;+ int var1359;+ int var1360;+ int var1361;+ int var1362;+ int var1363;+ int var1364;+ int var1365;+ int var1366;+ int var1367;+ int var1368;+ int var1369;+ int var1370;+ int var1371;+ int var1372;+ int var1373;+ int var1374;+ int var1375;+ int var1376;+ int var1377;+ int var1378;+ int var1379;+ int var1380;+ int var1381;+ int var1382;+ int var1383;+ int var1384;+ int var1385;+ int var1386;+ int var1387;+ int var1388;+ int var1389;+ int var1390;+ int var1391;+ int var1392;+ int var1393;+ int var1394;+ int var1395;+ int var1396;+ int var1397;+ int var1398;+ int var1399;+ int var1400;+ int var1401;+ int var1402;+ int var1403;+ int var1404;+ int var1405;+ int var1406;+ int var1407;+ int var1408;+ int var1409;+ int var1410;+ int var1411;+ int var1412;+ int var1413;+ int var1414;+ int var1415;+ int var1416;+ int var1417;+ int var1418;+ int var1419;+ int var1420;+ int var1421;+ int var1422;+ int var1423;+ int var1424;+ int var1425;+ int var1426;+ int var1427;+ int var1428;+ int var1429;+ int var1430;+ int var1431;+ int var1432;+ int var1433;+ int var1434;+ int var1435;+ int var1436;+ int var1437;+ int var1438;+ int var1439;+ int var1440;+ int var1441;+ int var1442;+ int var1443;+ int var1444;+ int var1445;+ int var1446;+ int var1447;+ int var1448;+ int var1449;+ int var1450;+ int var1451;+ int var1452;+ int var1453;+ int var1454;+ int var1455;+ int var1456;+ int var1457;+ int var1458;+ int var1459;+ int var1460;+ int var1461;+ int var1462;+ int var1463;+ int var1464;+ int var1465;+ int var1466;+ int var1467;+ int var1468;+ int var1469;+ int var1470;+ int var1471;+ int var1472;+ int var1473;+ int var1474;+ int var1475;+ int var1476;+ int var1477;+ int var1478;+ int var1479;+ int var1480;+ int var1481;+ int var1482;+ int var1483;+ int var1484;+ int var1485;+ int var1486;+ int var1487;+ int var1488;+ int var1489;+ int var1490;+ int var1491;+ int var1492;+ int var1493;+ int var1494;+ int var1495;+ int var1496;+ int var1497;+ int var1498;+ int var1499;+ int var1500;+ int var1501;+ int var1502;+ int var1503;+ int var1504;+ int var1505;+ int var1506;+ int var1507;+ int var1508;+ int var1509;+ int var1510;+ int var1511;+ int var1512;+ int var1513;+ int var1514;+ int var1515;+ int var1516;+ int var1517;+ int var1518;+ int var1519;+ int var1520;+ int var1521;+ int var1522;+ int var1523;+ int var1524;+ int var1525;+ int var1526;+ int var1527;+ int var1528;+ int var1529;+ int var1530;+ int var1531;+ int var1532;+ int var1533;+ int var1534;+ int var1535;+ int var1536;+ int var1537;+ int var1538;+ int var1539;+ int var1540;+ int var1541;+ int var1542;+ int var1543;+ int var1544;+ int var1545;+ int var1546;+ int var1547;+ int var1548;+ int var1549;+ int var1550;+ int var1551;+ int var1552;+ int var1553;+ int var1554;+ int var1555;+ int var1556;+ int var1557;+ int var1558;+ int var1559;+ int var1560;+ int var1561;+ int var1562;+ int var1563;+ int var1564;+ int var1565;+ int var1566;+ int var1567;+ int var1568;+ int var1569;+ int var1570;+ int var1571;+ int var1572;+ int var1573;+ int var1574;+ int var1575;+ int var1576;+ int var1577;+ int var1578;+ int var1579;+ int var1580;+ int var1581;+ int var1582;+ int var1583;+ int var1584;+ int var1585;+ int var1586;+ int var1587;+ int var1588;+ int var1589;+ int var1590;+ int var1591;+ int var1592;+ int var1593;+ int var1594;+ int var1595;+ int var1596;+ int var1597;+ int var1598;+ int var1599;+ int var1600;+ int var1601;+ int var1602;+ int var1603;+ int var1604;+ int var1605;+ int var1606;+ int var1607;+ int var1608;+ int var1609;+ int var1610;+ int var1611;+ int var1612;+ int var1613;+ int var1614;+ int var1615;+ int var1616;+ int var1617;+ int var1618;+ int var1619;+ int var1620;+ int var1621;+ int var1622;+ int var1623;+ int var1624;+ int var1625;+ int var1626;+ int var1627;+ int var1628;+ int var1629;+ int var1630;+ int var1631;+ int var1632;+ int var1633;+ int var1634;+ int var1635;+ int var1636;+ int var1637;+ int var1638;+ int var1639;+ int var1640;+ int var1641;+ int var1642;+ int var1643;+ int var1644;+ int var1645;+ int var1646;+ int var1647;+ int var1648;+ int var1649;+ int var1650;+ int var1651;+ int var1652;+ int var1653;+ int var1654;+ int var1655;+ int var1656;+ int var1657;+ int var1658;+ int var1659;+ int var1660;+ int var1661;+ int var1662;+ int var1663;+ int var1664;+ int var1665;+ int var1666;+ int var1667;+ int var1668;+ int var1669;+ int var1670;+ int var1671;+ int var1672;+ int var1673;+ int var1674;+ int var1675;+ int var1676;+ int var1677;+ int var1678;+ int var1679;+ int var1680;+ int var1681;+ int var1682;+ int var1683;+ int var1684;+ int var1685;+ int var1686;+ int var1687;+ int var1688;+ int var1689;+ int var1690;+ int var1691;+ int var1692;+ int var1693;+ int var1694;+ int var1695;+ int var1696;+ int var1697;+ int var1698;+ int var1699;+ int var1700;+ int var1701;+ int var1702;+ int var1703;+ int var1704;+ int var1705;+ int var1706;+ int var1707;+ int var1708;+ int var1709;+ int var1710;+ int var1711;+ int var1712;+ int var1713;+ int var1714;+ int var1715;+ int var1716;+ int var1717;+ int var1718;+ int var1719;+ int var1720;+ int var1721;+ int var1722;+ int var1723;+ int var1724;+ int var1725;+ int var1726;+ int var1727;+ int var1728;+ int var1729;+ int var1730;+ int var1731;+ int var1732;+ int var1733;+ int var1734;+ int var1735;+ int var1736;+ int var1737;+ int var1738;+ int var1739;+ int var1740;+ int var1741;+ int var1742;+ int var1743;+ int var1744;+ int var1745;+ int var1746;+ int var1747;+ int var1748;+ int var1749;+ int var1750;+ int var1751;+ int var1752;+ int var1753;+ int var1754;+ int var1755;+ int var1756;+ int var1757;+ int var1758;+ int var1759;+ int var1760;+ int var1761;+ int var1762;+ int var1763;+ int var1764;+ int var1765;+ int var1766;+ int var1767;+ int var1768;+ int var1769;+ int var1770;+ int var1771;+ int var1772;+ int var1773;+ int var1774;+ int var1775;+ int var1776;+ int var1777;+ int var1778;+ int var1779;+ int var1780;+ int var1781;+ int var1782;+ int var1783;+ int var1784;+ int var1785;+ int var1786;+ int var1787;+ int var1788;+ int var1789;+ int var1790;+ int var1791;+ int var1792;+ int var1793;+ int var1794;+ int var1795;+ int var1796;+ int var1797;+ int var1798;+ int var1799;+ int var1800;+ int var1801;+ int var1802;+ int var1803;+ int var1804;+ int var1805;+ int var1806;+ int var1807;+ int var1808;+ int var1809;+ int var1810;+ int var1811;+ int var1812;+ int var1813;+ int var1814;+ int var1815;+ int var1816;+ int var1817;+ int var1818;+ int var1819;+ int var1820;+ int var1821;+ int var1822;+ int var1823;+ int var1824;+ int var1825;+ int var1826;+ int var1827;+ int var1828;+ int var1829;+ int var1830;+ int var1831;+ int var1832;+ int var1833;+ int var1834;+ int var1835;+ int var1836;+ int var1837;+ int var1838;+ int var1839;+ int var1840;+ int var1841;+ int var1842;+ int var1843;+ int var1844;+ int var1845;+ int var1846;+ int var1847;+ int var1848;+ int var1849;+ int var1850;+ int var1851;+ int var1852;+ int var1853;+ int var1854;+ int var1855;+ int var1856;+ int var1857;+ int var1858;+ int var1859;+ int var1860;+ int var1861;+ int var1862;+ int var1863;+ int var1864;+ int var1865;+ int var1866;+ int var1867;+ int var1868;+ int var1869;+ int var1870;+ int var1871;+ int var1872;+ int var1873;+ int var1874;+ int var1875;+ int var1876;+ int var1877;+ int var1878;+ int var1879;+ int var1880;+ int var1881;+ int var1882;+ int var1883;+ int var1884;+ int var1885;+ int var1886;+ int var1887;+ int var1888;+ int var1889;+ int var1890;+ int var1891;+ int var1892;+ int var1893;+ int var1894;+ int var1895;+ int var1896;+ int var1897;+ int var1898;+ int var1899;+ int var1900;+ int var1901;+ int var1902;+ int var1903;+ int var1904;+ int var1905;+ int var1906;+ int var1907;+ int var1908;+ int var1909;+ int var1910;+ int var1911;+ int var1912;+ int var1913;+ int var1914;+ int var1915;+ int var1916;+ int var1917;+ int var1918;+ int var1919;+ int var1920;+ int var1921;+ int var1922;+ int var1923;+ int var1924;+ int var1925;+ int var1926;+ int var1927;+ int var1928;+ int var1929;+ int var1930;+ int var1931;+ int var1932;+ int var1933;+ int var1934;+ int var1935;+ int var1936;+ int var1937;+ int var1938;+ int var1939;+ int var1940;+ int var1941;+ int var1942;+ int var1943;+ int var1944;+ int var1945;+ int var1946;+ int var1947;+ int var1948;+ int var1949;+ int var1950;+ int var1951;+ int var1952;+ int var1953;+ int var1954;+ int var1955;+ int var1956;+ int var1957;+ int var1958;+ int var1959;+ int var1960;+ int var1961;+ int var1962;+ int var1963;+ int var1964;+ int var1965;+ int var1966;+ int var1967;+ int var1968;+ int var1969;+ int var1970;+ int var1971;+ int var1972;+ int var1973;+ int var1974;+ int var1975;+ int var1976;+ int var1977;+ int var1978;+ int var1979;+ int var1980;+ int var1981;+ int var1982;+ int var1983;+ int var1984;+ int var1985;+ int var1986;+ int var1987;+ int var1988;+ int var1989;+ int var1990;+ int var1991;+ int var1992;+ int var1993;+ int var1994;+ int var1995;+ int var1996;+ int var1997;+ int var1998;+ int var1999;+ int var2000;+ int var2001;+ int var2002;+ int var2003;+ int var2004;+ int var2005;+ int var2006;+ int var2007;+ int var2008;+ int var2009;+ int var2010;+ int var2011;+ int var2012;+ int var2013;+ int var2014;+ int var2015;+ int var2016;+ int var2017;+ int var2018;+ int var2019;+ int var2020;+ int var2021;+ int var2022;+ int var2023;+ int var2024;+ int var2025;+ int var2026;+ int var2027;+ int var2028;+ int var2029;+ int var2030;+ int var2031;+ int var2032;+ int var2033;+ int var2034;+ int var2035;+ int var2036;+ int var2037;+ int var2038;+ int var2039;+ int var2040;+ int var2041;+ int var2042;+ int var2043;+ int var2044;+ int var2045;+ int var2046;+ int var2047;+ int var2048;+ int var2049;+ int var2050;+ int var2051;+ int var2052;+ int var2053;+ int var2054;+ int var2055;+ int var2056;+ int var2057;+ int var2058;+ int var2059;+ int var2060;+ int var2061;+ int var2062;+ int var2063;+ int var2064;+ int var2065;+ int var2066;+ int var2067;+ int var2068;+ int var2069;+ int var2070;+ int var2071;+ int var2072;+ int var2073;+ int var2074;+ int var2075;+ int var2076;+ int var2077;+ int var2078;+ int var2079;+ int var2080;+ int var2081;+ int var2082;+ int var2083;+ int var2084;+ int var2085;+ int var2086;+ int var2087;+ int var2088;+ int var2089;+ int var2090;+ int var2091;+ int var2092;+ int var2093;+ int var2094;+ int var2095;+ int var2096;+ int var2097;+ int var2098;+ int var2099;+ int var2100;+ int var2101;+ int var2102;+ int var2103;+ int var2104;+ int var2105;+ int var2106;+ int var2107;+ int var2108;+ int var2109;+ int var2110;+ int var2111;+ int var2112;+ int var2113;+ int var2114;+ int var2115;+ int var2116;+ int var2117;+ int var2118;+ int var2119;+ int var2120;+ int var2121;+ int var2122;+ int var2123;+ int var2124;+ int var2125;+ int var2126;+ int var2127;+ int var2128;+ int var2129;+ int var2130;+ int var2131;+ int var2132;+ int var2133;+ int var2134;+ int var2135;+ int var2136;+ int var2137;+ int var2138;+ int var2139;+ int var2140;+ int var2141;+ int var2142;+ int var2143;+ int var2144;+ int var2145;+ int var2146;+ int var2147;+ int var2148;+ int var2149;+ int var2150;+ int var2151;+ int var2152;+ int var2153;+ int var2154;+ int var2155;+ int var2156;+ int var2157;+ int var2158;+ int var2159;+ int var2160;+ int var2161;+ int var2162;+ int var2163;+ int var2164;+ int var2165;+ int var2166;+ int var2167;+ int var2168;+ int var2169;+ int var2170;+ int var2171;+ int var2172;+ int var2173;+ int var2174;+ int var2175;+ int var2176;+ int var2177;+ int var2178;+ int var2179;+ int var2180;+ int var2181;+ int var2182;+ int var2183;+ int var2184;+ int var2185;+ int var2186;+ int var2187;+ int var2188;+ int var2189;+ int var2190;+ int var2191;+ int var2192;+ int var2193;+ int var2194;+ int var2195;+ int var2196;+ int var2197;+ int var2198;+ int var2199;+ int var2200;+ int var2201;+ int var2202;+ int var2203;+ int var2204;+ int var2205;+ int var2206;+ int var2207;+ int var2208;+ int var2209;+ int var2210;+ int var2211;+ int var2212;+ int var2213;+ int var2214;+ int var2215;+ int var2216;+ int var2217;+ int var2218;+ int var2219;+ int var2220;+ int var2221;+ int var2222;+ int var2223;+ int var2224;+ int var2225;+ int var2226;+ int var2227;+ int var2228;+ int var2229;+ int var2230;+ int var2231;+ int var2232;+ int var2233;+ int var2234;+ int var2235;+ int var2236;+ int var2237;+ int var2238;+ int var2239;+ int var2240;+ int var2241;+ int var2242;+ int var2243;+ int var2244;+ int var2245;+ int var2246;+ int var2247;+ int var2248;+ int var2249;+ int var2250;+ int var2251;+ int var2252;+ int var2253;+ int var2254;+ int var2255;+ int var2256;+ int var2257;+ int var2258;+ int var2259;+ int var2260;+ int var2261;+ int var2262;+ int var2263;+ int var2264;+ int var2265;+ int var2266;+ int var2267;+ int var2268;+ int var2269;+ int var2270;+ int var2271;+ int var2272;+ int var2273;+ int var2274;+ int var2275;+ int var2276;+ int var2277;+ int var2278;+ int var2279;+ int var2280;+ int var2281;+ int var2282;+ int var2283;+ int var2284;+ int var2285;+ int var2286;+ int var2287;+ int var2288;+ int var2289;+ int var2290;+ int var2291;+ int var2292;+ int var2293;+ int var2294;+ int var2295;+ int var2296;+ int var2297;+ int var2298;+ int var2299;+ int var2300;+ int var2301;+ int var2302;+ int var2303;+ int var2304;+ int var2305;+ int var2306;+ int var2307;+ int var2308;+ int var2309;+ int var2310;+ int var2311;+ int var2312;+ int var2313;+ int var2314;+ int var2315;+ int var2316;+ int var2317;+ int var2318;+ int var2319;+ int var2320;+ int var2321;+ int var2322;+ int var2323;+ int var2324;+ int var2325;+ int var2326;+ int var2327;+ int var2328;+ int var2329;+ int var2330;+ int var2331;+ int var2332;+ int var2333;+ int var2334;+ int var2335;+ int var2336;+ int var2337;+ int var2338;+ int var2339;+ int var2340;+ int var2341;+ int var2342;+ int var2343;+ int var2344;+ int var2345;+ int var2346;+ int var2347;+ int var2348;+ int var2349;+ int var2350;+ int var2351;+ int var2352;+ int var2353;+ int var2354;+ int var2355;+ int var2356;+ int var2357;+ int var2358;+ int var2359;+ int var2360;+ int var2361;+ int var2362;+ int var2363;+ int var2364;+ int var2365;+ int var2366;+ int var2367;+ int var2368;+ int var2369;+ int var2370;+ int var2371;+ int var2372;+ int var2373;+ int var2374;+ int var2375;+ int var2376;+ int var2377;+ int var2378;+ int var2379;+ int var2380;+ int var2381;+ int var2382;+ int var2383;+ int var2384;+ int var2385;+ int var2386;+ int var2387;+ int var2388;+ int var2389;+ int var2390;+ int var2391;+ int var2392;+ int var2393;+ int var2394;+ int var2395;+ int var2396;+ int var2397;+ int var2398;+ int var2399;+ int var2400;+ int var2401;+ int var2402;+ int var2403;+ int var2404;+ int var2405;+ int var2406;+ int var2407;+ int var2408;+ int var2409;+ int var2410;+ int var2411;+ int var2412;+ int var2413;+ int var2414;+ int var2415;+ int var2416;+ int var2417;+ int var2418;+ int var2419;+ int var2420;+ int var2421;+ int var2422;+ int var2423;+ int var2424;+ int var2425;+ int var2426;+ int var2427;+ int var2428;+ int var2429;+ int var2430;+ int var2431;+ int var2432;+ int var2433;+ int var2434;+ int var2435;+ int var2436;+ int var2437;+ int var2438;+ int var2439;+ int var2440;+ int var2441;+ int var2442;+ int var2443;+ int var2444;+ int var2445;+ int var2446;+ int var2447;+ int var2448;+ int var2449;+ int var2450;+ int var2451;+ int var2452;+ int var2453;+ int var2454;+ int var2455;+ int var2456;+ int var2457;+ int var2458;+ int var2459;+ int var2460;+ int var2461;+ int var2462;+ int var2463;+ int var2464;+ int var2465;+ int var2466;+ int var2467;+ int var2468;+ int var2469;+ int var2470;+ int var2471;+ int var2472;+ int var2473;+ int var2474;+ int var2475;+ int var2476;+ int var2477;+ int var2478;+ int var2479;+ int var2480;+ int var2481;+ int var2482;+ int var2483;+ int var2484;+ int var2485;+ int var2486;+ int var2487;+ int var2488;+ int var2489;+ int var2490;+ int var2491;+ int var2492;+ int var2493;+ int var2494;+ int var2495;+ int var2496;+ int var2497;+ int var2498;+ int var2499;+ int var2500;+ int var2501;+ int var2502;+ int var2503;+ int var2504;+ int var2505;+ int var2506;+ int var2507;+ int var2508;+ int var2509;+ int var2510;+ int var2511;+ int var2512;+ int var2513;+ int var2514;+ int var2515;+ int var2516;+ int var2517;+ int var2518;+ int var2519;+ int var2520;+ int var2521;+ int var2522;+ int var2523;+ int var2524;+ int var2525;+ int var2526;+ int var2527;+ int var2528;+ int var2529;+ int var2530;+ int var2531;+ int var2532;+ int var2533;+ int var2534;+ int var2535;+ int var2536;+ int var2537;+ int var2538;+ int var2539;+ int var2540;+ int var2541;+ int var2542;+ int var2543;+ int var2544;+ int var2545;+ int var2546;+ int var2547;+ int var2548;+ int var2549;+ int var2550;+ int var2551;+ int var2552;+ int var2553;+ int var2554;+ int var2555;+ int var2556;+ int var2557;+ int var2558;+ int var2559;+ int var2560;+ int var2561;+ int var2562;+ int var2563;+ int var2564;+ int var2565;+ int var2566;+ int var2567;+ int var2568;+ int var2569;+ int var2570;+ int var2571;+ int var2572;+ int var2573;+ int var2574;+ int var2575;+ int var2576;+ int var2577;+ int var2578;+ int var2579;+ int var2580;+ int var2581;+ int var2582;+ int var2583;+ int var2584;+ int var2585;+ int var2586;+ int var2587;+ int var2588;+ int var2589;+ int var2590;+ int var2591;+ int var2592;+ int var2593;+ int var2594;+ int var2595;+ int var2596;+ int var2597;+ int var2598;+ int var2599;+ int var2600;+ int var2601;+ int var2602;+ int var2603;+ int var2604;+ int var2605;+ int var2606;+ int var2607;+ int var2608;+ int var2609;+ int var2610;+ int var2611;+ int var2612;+ int var2613;+ int var2614;+ int var2615;+ int var2616;+ int var2617;+ int var2618;+ int var2619;+ int var2620;+ int var2621;+ int var2622;+ int var2623;+ int var2624;+ int var2625;+ int var2626;+ int var2627;+ int var2628;+ int var2629;+ int var2630;+ int var2631;+ int var2632;+ int var2633;+ int var2634;+ int var2635;+ int var2636;+ int var2637;+ int var2638;+ int var2639;+ int var2640;+ int var2641;+ int var2642;+ int var2643;+ int var2644;+ int var2645;+ int var2646;+ int var2647;+ int var2648;+ int var2649;+ int var2650;+ int var2651;+ int var2652;+ int var2653;+ int var2654;+ int var2655;+ int var2656;+ int var2657;+ int var2658;+ int var2659;+ int var2660;+ int var2661;+ int var2662;+ int var2663;+ int var2664;+ int var2665;+ int var2666;+ int var2667;+ int var2668;+ int var2669;+ int var2670;+ int var2671;+ int var2672;+ int var2673;+ int var2674;+ int var2675;+ int var2676;+ int var2677;+ int var2678;+ int var2679;+ int var2680;+ int var2681;+ int var2682;+ int var2683;+ int var2684;+ int var2685;+ int var2686;+ int var2687;+ int var2688;+ int var2689;+ int var2690;+ int var2691;+ int var2692;+ int var2693;+ int var2694;+ int var2695;+ int var2696;+ int var2697;+ int var2698;+ int var2699;+ int var2700;+ int var2701;+ int var2702;+ int var2703;+ int var2704;+ int var2705;+ int var2706;+ int var2707;+ int var2708;+ int var2709;+ int var2710;+ int var2711;+ int var2712;+ int var2713;+ int var2714;+ int var2715;+ int var2716;+ int var2717;+ int var2718;+ int var2719;+ int var2720;+ int var2721;+ int var2722;+ int var2723;+ int var2724;+ int var2725;+ int var2726;+ int var2727;+ int var2728;+ int var2729;+ int var2730;+ int var2731;+ int var2732;+ int var2733;+ int var2734;+ int var2735;+ int var2736;+ int var2737;+ int var2738;+ int var2739;+ int var2740;+ int var2741;+ int var2742;+ int var2743;+ int var2744;+ int var2745;+ int var2746;+ int var2747;+ int var2748;+ int var2749;+ int var2750;+ int var2751;+ int var2752;+ int var2753;+ int var2754;+ int var2755;+ int var2756;+ int var2757;+ int var2758;+ int var2759;+ int var2760;+ int var2761;+ int var2762;+ int var2763;+ int var2764;+ int var2765;+ int var2766;+ int var2767;+ int var2768;+ int var2769;+ int var2770;+ int var2771;+ int var2772;+ int var2773;+ int var2774;+ int var2775;+ int var2776;+ int var2777;+ int var2778;+ int var2779;+ int var2780;+ int var2781;+ int var2782;+ int var2783;+ int var2784;+ int var2785;+ int var2786;+ int var2787;+ int var2788;+ int var2789;+ int var2790;+ int var2791;+ int var2792;+ int var2793;+ int var2794;+ int var2795;+ int var2796;+ int var2797;+ int var2798;+ int var2799;+ int var2800;+ int var2801;+ int var2802;+ int var2803;+ int var2804;+ int var2805;+ int var2806;+ int var2807;+ int var2808;+ int var2809;+ int var2810;+ int var2811;+ int var2812;+ int var2813;+ int var2814;+ int var2815;+ int var2816;+ int var2817;+ int var2818;+ int var2819;+ int var2820;+ int var2821;+ int var2822;+ int var2823;+ int var2824;+ int var2825;+ int var2826;+ int var2827;+ int var2828;+ int var2829;+ int var2830;+ int var2831;+ int var2832;+ int var2833;+ int var2834;+ int var2835;+ int var2836;+ int var2837;+ int var2838;+ int var2839;+ int var2840;+ int var2841;+ int var2842;+ int var2843;+ int var2844;+ int var2845;+ int var2846;+ int var2847;+ int var2848;+ int var2849;+ int var2850;+ int var2851;+ int var2852;+ int var2853;+ int var2854;+ int var2855;+ int var2856;+ int var2857;+ int var2858;+ int var2859;+ int var2860;+ int var2861;+ int var2862;+ int var2863;+ int var2864;+ int var2865;+ int var2866;+ int var2867;+ int var2868;+ int var2869;+ int var2870;+ int var2871;+ int var2872;+ int var2873;+ int var2874;+ int var2875;+ int var2876;+ int var2877;+ int var2878;+ int var2879;+ int var2880;+ int var2881;+ int var2882;+ int var2883;+ int var2884;+ int var2885;+ int var2886;+ int var2887;+ int var2888;+ int var2889;+ int var2890;+ int var2891;+ int var2892;+ int var2893;+ int var2894;+ int var2895;+ int var2896;+ int var2897;+ int var2898;+ int var2899;+ int var2900;+ int var2901;+ int var2902;+ int var2903;+ int var2904;+ int var2905;+ int var2906;+ int var2907;+ int var2908;+ int var2909;+ int var2910;+ int var2911;+ int var2912;+ int var2913;+ int var2914;+ int var2915;+ int var2916;+ int var2917;+ int var2918;+ int var2919;+ int var2920;+ int var2921;+ int var2922;+ int var2923;+ int var2924;+ int var2925;+ int var2926;+ int var2927;+ int var2928;+ int var2929;+ int var2930;+ int var2931;+ int var2932;+ int var2933;+ int var2934;+ int var2935;+ int var2936;+ int var2937;+ int var2938;+ int var2939;+ int var2940;+ int var2941;+ int var2942;+ int var2943;+ int var2944;+ int var2945;+ int var2946;+ int var2947;+ int var2948;+ int var2949;+ int var2950;+ int var2951;+ int var2952;+ int var2953;+ int var2954;+ int var2955;+ int var2956;+ int var2957;+ int var2958;+ int var2959;+ int var2960;+ int var2961;+ int var2962;+ int var2963;+ int var2964;+ int var2965;+ int var2966;+ int var2967;+ int var2968;+ int var2969;+ int var2970;+ int var2971;+ int var2972;+ int var2973;+ int var2974;+ int var2975;+ int var2976;+ int var2977;+ int var2978;+ int var2979;+ int var2980;+ int var2981;+ int var2982;+ int var2983;+ int var2984;+ int var2985;+ int var2986;+ int var2987;+ int var2988;+ int var2989;+ int var2990;+ int var2991;+ int var2992;+ int var2993;+ int var2994;+ int var2995;+ int var2996;+ int var2997;+ int var2998;+ int var2999;+ int var3000;+ int var3001;+ int var3002;+ int var3003;+ int var3004;+ int var3005;+ int var3006;+ int var3007;+ int var3008;+ int var3009;+ int var3010;+ int var3011;+ int var3012;+ int var3013;+ int var3014;+ int var3015;+ int var3016;+ int var3017;+ int var3018;+ int var3019;+ int var3020;+ int var3021;+ int var3022;+ int var3023;+ int var3024;+ int var3025;+ int var3026;+ int var3027;+ int var3028;+ int var3029;+ int var3030;+ int var3031;+ int var3032;+ int var3033;+ int var3034;+ int var3035;+ int var3036;+ int var3037;+ int var3038;+ int var3039;+ int var3040;+ int var3041;+ int var3042;+ int var3043;+ int var3044;+ int var3045;+ int var3046;+ int var3047;+ int var3048;+ int var3049;+ int var3050;+ int var3051;+ int var3052;+ int var3053;+ int var3054;+ int var3055;+ int var3056;+ int var3057;+ int var3058;+ int var3059;+ int var3060;+ int var3061;+ int var3062;+ int var3063;+ int var3064;+ int var3065;+ int var3066;+ int var3067;+ int var3068;+ int var3069;+ int var3070;+ int var3071;+ int var3072;+ int var3073;+ int var3074;+ int var3075;+ int var3076;+ int var3077;+ int var3078;+ int var3079;+ int var3080;+ int var3081;+ int var3082;+ int var3083;+ int var3084;+ int var3085;+ int var3086;+ int var3087;+ int var3088;+ int var3089;+ int var3090;+ int var3091;+ int var3092;+ int var3093;+ int var3094;+ int var3095;+ int var3096;+ int var3097;+ int var3098;+ int var3099;+ int var3100;+ int var3101;+ int var3102;+ int var3103;+ int var3104;+ int var3105;+ int var3106;+ int var3107;+ int var3108;+ int var3109;+ int var3110;+ int var3111;+ int var3112;+ int var3113;+ int var3114;+ int var3115;+ int var3116;+ int var3117;+ int var3118;+ int var3119;+ int var3120;+ int var3121;+ int var3122;+ int var3123;+ int var3124;+ int var3125;+ int var3126;+ int var3127;+ int var3128;+ int var3129;+ int var3130;+ int var3131;+ int var3132;+ int var3133;+ int var3134;+ int var3135;+ int var3136;+ int var3137;+ int var3138;+ int var3139;+ int var3140;+ int var3141;+ int var3142;+ int var3143;+ int var3144;+ int var3145;+ int var3146;+ int var3147;+ int var3148;+ int var3149;+ int var3150;+ int var3151;+ int var3152;+ int var3153;+ int var3154;+ int var3155;+ int var3156;+ int var3157;+ int var3158;+ int var3159;+ int var3160;+ int var3161;+ int var3162;+ int var3163;+ int var3164;+ int var3165;+ int var3166;+ int var3167;+ int var3168;+ int var3169;+ int var3170;+ int var3171;+ int var3172;+ int var3173;+ int var3174;+ int var3175;+ int var3176;+ int var3177;+ int var3178;+ int var3179;+ int var3180;+ int var3181;+ int var3182;+ int var3183;+ int var3184;+ int var3185;+ int var3186;+ int var3187;+ int var3188;+ int var3189;+ int var3190;+ int var3191;+ int var3192;+ int var3193;+ int var3194;+ int var3195;+ int var3196;+ int var3197;+ int var3198;+ int var3199;+ int var3200;+ int var3201;+ int var3202;+ int var3203;+ int var3204;+ int var3205;+ int var3206;+ int var3207;+ int var3208;+ int var3209;+ int var3210;+ int var3211;+ int var3212;+ int var3213;+ int var3214;+ int var3215;+ int var3216;+ int var3217;+ int var3218;+ int var3219;+ int var3220;+ int var3221;+ int var3222;+ int var3223;+ int var3224;+ int var3225;+ int var3226;+ int var3227;+ int var3228;+ int var3229;+ int var3230;+ int var3231;+ int var3232;+ int var3233;+ int var3234;+ int var3235;+ int var3236;+ int var3237;+ int var3238;+ int var3239;+ int var3240;+ int var3241;+ int var3242;+ int var3243;+ int var3244;+ int var3245;+ int var3246;+ int var3247;+ int var3248;+ int var3249;+ int var3250;+ int var3251;+ int var3252;+ int var3253;+ int var3254;+ int var3255;+ int var3256;+ int var3257;+ int var3258;+ int var3259;+ int var3260;+ int var3261;+ int var3262;+ int var3263;+ int var3264;+ int var3265;+ int var3266;+ int var3267;+ int var3268;+ int var3269;+ int var3270;+ int var3271;+ int var3272;+ int var3273;+ int var3274;+ int var3275;+ int var3276;+ int var3277;+ int var3278;+ int var3279;+ int var3280;+ int var3281;+ int var3282;+ int var3283;+ int var3284;+ int var3285;+ int var3286;+ int var3287;+ int var3288;+ int var3289;+ int var3290;+ int var3291;+ int var3292;+ int var3293;+ int var3294;+ int var3295;+ int var3296;+ int var3297;+ int var3298;+ int var3299;+ int var3300;+ int var3301;+ int var3302;+ int var3303;+ int var3304;+ int var3305;+ int var3306;+ int var3307;+ int var3308;+ int var3309;+ int var3310;+ int var3311;+ int var3312;+ int var3313;+ int var3314;+ int var3315;+ int var3316;+ int var3317;+ int var3318;+ int var3319;+ int var3320;+ int var3321;+ int var3322;+ int var3323;+ int var3324;+ int var3325;+ int var3326;+ int var3327;+ int var3328;+ int var3329;+ int var3330;+ int var3331;+ int var3332;+ int var3333;+ int var3334;+ int var3335;+ int var3336;+ int var3337;+ int var3338;+ int var3339;+ int var3340;+ int var3341;+ int var3342;+ int var3343;+ int var3344;+ int var3345;+ int var3346;+ int var3347;+ int var3348;+ int var3349;+ int var3350;+ int var3351;+ int var3352;+ int var3353;+ int var3354;+ int var3355;+ int var3356;+ int var3357;+ int var3358;+ int var3359;+ int var3360;+ int var3361;+ int var3362;+ int var3363;+ int var3364;+ int var3365;+ int var3366;+ int var3367;+ int var3368;+ int var3369;+ int var3370;+ int var3371;+ int var3372;+ int var3373;+ int var3374;+ int var3375;+ int var3376;+ int var3377;+ int var3378;+ int var3379;+ int var3380;+ int var3381;+ int var3382;+ int var3383;+ int var3384;+ int var3385;+ int var3386;+ int var3387;+ int var3388;+ int var3389;+ int var3390;+ int var3391;+ int var3392;+ int var3393;+ int var3394;+ int var3395;+ int var3396;+ int var3397;+ int var3398;+ int var3399;+ int var3400;+ int var3401;+ int var3402;+ int var3403;+ int var3404;+ int var3405;+ int var3406;+ int var3407;+ int var3408;+ int var3409;+ int var3410;+ int var3411;+ int var3412;+ int var3413;+ int var3414;+ int var3415;+ int var3416;+ int var3417;+ int var3418;+ int var3419;+ int var3420;+ int var3421;+ int var3422;+ int var3423;+ int var3424;+ int var3425;+ int var3426;+ int var3427;+ int var3428;+ int var3429;+ int var3430;+ int var3431;+ int var3432;+ int var3433;+ int var3434;+ int var3435;+ int var3436;+ int var3437;+ int var3438;+ int var3439;+ int var3440;+ int var3441;+ int var3442;+ int var3443;+ int var3444;+ int var3445;+ int var3446;+ int var3447;+ int var3448;+ int var3449;+ int var3450;+ int var3451;+ int var3452;+ int var3453;+ int var3454;+ int var3455;+ int var3456;+ int var3457;+ int var3458;+ int var3459;+ int var3460;+ int var3461;+ int var3462;+ int var3463;+ int var3464;+ int var3465;+ int var3466;+ int var3467;+ int var3468;+ int var3469;+ int var3470;+ int var3471;+ int var3472;+ int var3473;+ int var3474;+ int var3475;+ int var3476;+ int var3477;+ int var3478;+ int var3479;+ int var3480;+ int var3481;+ int var3482;+ int var3483;+ int var3484;+ int var3485;+ int var3486;+ int var3487;+ int var3488;+ int var3489;+ int var3490;+ int var3491;+ int var3492;+ int var3493;+ int var3494;+ int var3495;+ int var3496;+ int var3497;+ int var3498;+ int var3499;+ int var3500;+ int var3501;+ int var3502;+ int var3503;+ int var3504;+ int var3505;+ int var3506;+ int var3507;+ int var3508;+ int var3509;+ int var3510;+ int var3511;+ int var3512;+ int var3513;+ int var3514;+ int var3515;+ int var3516;+ int var3517;+ int var3518;+ int var3519;+ int var3520;+ int var3521;+ int var3522;+ int var3523;+ int var3524;+ int var3525;+ int var3526;+ int var3527;+ int var3528;+ int var3529;+ int var3530;+ int var3531;+ int var3532;+ int var3533;+ int var3534;+ int var3535;+ int var3536;+ int var3537;+ int var3538;+ int var3539;+ int var3540;+ int var3541;+ int var3542;+ int var3543;+ int var3544;+ int var3545;+ int var3546;+ int var3547;+ int var3548;+ int var3549;+ int var3550;+ int var3551;+ int var3552;+ int var3553;+ int var3554;+ int var3555;+ int var3556;+ int var3557;+ int var3558;+ int var3559;+ int var3560;+ int var3561;+ int var3562;+ int var3563;+ int var3564;+ int var3565;+ int var3566;+ int var3567;+ int var3568;+ int var3569;+ int var3570;+ int var3571;+ int var3572;+ int var3573;+ int var3574;+ int var3575;+ int var3576;+ int var3577;+ int var3578;+ int var3579;+ int var3580;+ int var3581;+ int var3582;+ int var3583;+ int var3584;+ int var3585;+ int var3586;+ int var3587;+ int var3588;+ int var3589;+ int var3590;+ int var3591;+ int var3592;+ int var3593;+ int var3594;+ int var3595;+ int var3596;+ int var3597;+ int var3598;+ int var3599;+ int var3600;+ int var3601;+ int var3602;+ int var3603;+ int var3604;+ int var3605;+ int var3606;+ int var3607;+ int var3608;+ int var3609;+ int var3610;+ int var3611;+ int var3612;+ int var3613;+ int var3614;+ int var3615;+ int var3616;+ int var3617;+ int var3618;+ int var3619;+ int var3620;+ int var3621;+ int var3622;+ int var3623;+ int var3624;+ int var3625;+ int var3626;+ int var3627;+ int var3628;+ int var3629;+ int var3630;+ int var3631;+ int var3632;+ int var3633;+ int var3634;+ int var3635;+ int var3636;+ int var3637;+ int var3638;+ int var3639;+ int var3640;+ int var3641;+ int var3642;+ int var3643;+ int var3644;+ int var3645;+ int var3646;+ int var3647;+ int var3648;+ int var3649;+ int var3650;+ int var3651;+ int var3652;+ int var3653;+ int var3654;+ int var3655;+ int var3656;+ int var3657;+ int var3658;+ int var3659;+ int var3660;+ int var3661;+ int var3662;+ int var3663;+ int var3664;+ int var3665;+ int var3666;+ int var3667;+ int var3668;+ int var3669;+ int var3670;+ int var3671;+ int var3672;+ int var3673;+ int var3674;+ int var3675;+ int var3676;+ int var3677;+ int var3678;+ int var3679;+ int var3680;+ int var3681;+ int var3682;+ int var3683;+ int var3684;+ int var3685;+ int var3686;+ int var3687;+ int var3688;+ int var3689;+ int var3690;+ int var3691;+ int var3692;+ int var3693;+ int var3694;+ int var3695;+ int var3696;+ int var3697;+ int var3698;+ int var3699;+ int var3700;+ int var3701;+ int var3702;+ int var3703;+ int var3704;+ int var3705;+ int var3706;+ int var3707;+ int var3708;+ int var3709;+ int var3710;+ int var3711;+ int var3712;+ int var3713;+ int var3714;+ int var3715;+ int var3716;+ int var3717;+ int var3718;+ int var3719;+ int var3720;+ int var3721;+ int var3722;+ int var3723;+ int var3724;+ int var3725;+ int var3726;+ int var3727;+ int var3728;+ int var3729;+ int var3730;+ int var3731;+ int var3732;+ int var3733;+ int var3734;+ int var3735;+ int var3736;+ int var3737;+ int var3738;+ int var3739;+ int var3740;+ int var3741;+ int var3742;+ int var3743;+ int var3744;+ int var3745;+ int var3746;+ int var3747;+ int var3748;+ int var3749;+ int var3750;+ int var3751;+ int var3752;+ int var3753;+ int var3754;+ int var3755;+ int var3756;+ int var3757;+ int var3758;+ int var3759;+ int var3760;+ int var3761;+ int var3762;+ int var3763;+ int var3764;+ int var3765;+ int var3766;+ int var3767;+ int var3768;+ int var3769;+ int var3770;+ int var3771;+ int var3772;+ int var3773;+ int var3774;+ int var3775;+ int var3776;+ int var3777;+ int var3778;+ int var3779;+ int var3780;+ int var3781;+ int var3782;+ int var3783;+ int var3784;+ int var3785;+ int var3786;+ int var3787;+ int var3788;+ int var3789;+ int var3790;+ int var3791;+ int var3792;+ int var3793;+ int var3794;+ int var3795;+ int var3796;+ int var3797;+ int var3798;+ int var3799;+ int var3800;+ int var3801;+ int var3802;+ int var3803;+ int var3804;+ int var3805;+ int var3806;+ int var3807;+ int var3808;+ int var3809;+ int var3810;+ int var3811;+ int var3812;+ int var3813;+ int var3814;+ int var3815;+ int var3816;+ int var3817;+ int var3818;+ int var3819;+ int var3820;+ int var3821;+ int var3822;+ int var3823;+ int var3824;+ int var3825;+ int var3826;+ int var3827;+ int var3828;+ int var3829;+ int var3830;+ int var3831;+ int var3832;+ int var3833;+ int var3834;+ int var3835;+ int var3836;+ int var3837;+ int var3838;+ int var3839;+ int var3840;+ int var3841;+ int var3842;+ int var3843;+ int var3844;+ int var3845;+ int var3846;+ int var3847;+ int var3848;+ int var3849;+ int var3850;+ int var3851;+ int var3852;+ int var3853;+ int var3854;+ int var3855;+ int var3856;+ int var3857;+ int var3858;+ int var3859;+ int var3860;+ int var3861;+ int var3862;+ int var3863;+ int var3864;+ int var3865;+ int var3866;+ int var3867;+ int var3868;+ int var3869;+ int var3870;+ int var3871;+ int var3872;+ int var3873;+ int var3874;+ int var3875;+ int var3876;+ int var3877;+ int var3878;+ int var3879;+ int var3880;+ int var3881;+ int var3882;+ int var3883;+ int var3884;+ int var3885;+ int var3886;+ int var3887;+ int var3888;+ int var3889;+ int var3890;+ int var3891;+ int var3892;+ int var3893;+ int var3894;+ int var3895;+ int var3896;+ int var3897;+ int var3898;+ int var3899;+ int var3900;+ int var3901;+ int var3902;+ int var3903;+ int var3904;+ int var3905;+ int var3906;+ int var3907;+ int var3908;+ int var3909;+ int var3910;+ int var3911;+ int var3912;+ int var3913;+ int var3914;+ int var3915;+ int var3916;+ int var3917;+ int var3918;+ int var3919;+ int var3920;+ int var3921;+ int var3922;+ int var3923;+ int var3924;+ int var3925;+ int var3926;+ int var3927;+ int var3928;+ int var3929;+ int var3930;+ int var3931;+ int var3932;+ int var3933;+ int var3934;+ int var3935;+ int var3936;+ int var3937;+ int var3938;+ int var3939;+ int var3940;+ int var3941;+ int var3942;+ int var3943;+ int var3944;+ int var3945;+ int var3946;+ int var3947;+ int var3948;+ int var3949;+ int var3950;+ int var3951;+ int var3952;+ int var3953;+ int var3954;+ int var3955;+ int var3956;+ int var3957;+ int var3958;+ int var3959;+ int var3960;+ int var3961;+ int var3962;+ int var3963;+ int var3964;+ int var3965;+ int var3966;+ int var3967;+ int var3968;+ int var3969;+ int var3970;+ int var3971;+ int var3972;+ int var3973;+ int var3974;+ int var3975;+ int var3976;+ int var3977;+ int var3978;+ int var3979;+ int var3980;+ int var3981;+ int var3982;+ int var3983;+ int var3984;+ int var3985;+ int var3986;+ int var3987;+ int var3988;+ int var3989;+ int var3990;+ int var3991;+ int var3992;+ int var3993;+ int var3994;+ int var3995;+ int var3996;+ int var3997;+ int var3998;+ int var3999;+ int var4000;+ int var4001;+ int var4002;+ int var4003;+ int var4004;+ int var4005;+ int var4006;+ int var4007;+ int var4008;+ int var4009;+ int var4010;+ int var4011;+ int var4012;+ int var4013;+ int var4014;+ int var4015;+ int var4016;+ int var4017;+ int var4018;+ int var4019;+ int var4020;+ int var4021;+ int var4022;+ int var4023;+ int var4024;+ int var4025;+ int var4026;+ int var4027;+ int var4028;+ int var4029;+ int var4030;+ int var4031;+ int var4032;+ int var4033;+ int var4034;+ int var4035;+ int var4036;+ int var4037;+ int var4038;+ int var4039;+ int var4040;+ int var4041;+ int var4042;+ int var4043;+ int var4044;+ int var4045;+ int var4046;+ int var4047;+ int var4048;+ int var4049;+ int var4050;+ int var4051;+ int var4052;+ int var4053;+ int var4054;+ int var4055;+ int var4056;+ int var4057;+ int var4058;+ int var4059;+ int var4060;+ int var4061;+ int var4062;+ int var4063;+ int var4064;+ int var4065;+ int var4066;+ int var4067;+ int var4068;+ int var4069;+ int var4070;+ int var4071;+ int var4072;+ int var4073;+ int var4074;+ int var4075;+ int var4076;+ int var4077;+ int var4078;+ int var4079;+ int var4080;+ int var4081;+ int var4082;+ int var4083;+ int var4084;+ int var4085;+ int var4086;+ int var4087;+ int var4088;+ int var4089;+ int var4090;+ int var4091;+ int var4092;+ int var4093;+ int var4094;+ int var4095;+ int var4096;+ int var4097;+ int var4098;+ int var4099;+ int var4100;+ int var4101;+ int var4102;+ int var4103;+ int var4104;+ int var4105;+ int var4106;+ int var4107;+ int var4108;+ int var4109;+ int var4110;+ int var4111;+ int var4112;+ int var4113;+ int var4114;+ int var4115;+ int var4116;+ int var4117;+ int var4118;+ int var4119;+ int var4120;+ int var4121;+ int var4122;+ int var4123;+ int var4124;+ int var4125;+ int var4126;+ int var4127;+ int var4128;+ int var4129;+ int var4130;+ int var4131;+ int var4132;+ int var4133;+ int var4134;+ int var4135;+ int var4136;+ int var4137;+ int var4138;+ int var4139;+ int var4140;+ int var4141;+ int var4142;+ int var4143;+ int var4144;+ int var4145;+ int var4146;+ int var4147;+ int var4148;+ int var4149;+ int var4150;+ int var4151;+ int var4152;+ int var4153;+ int var4154;+ int var4155;+ int var4156;+ int var4157;+ int var4158;+ int var4159;+ int var4160;+ int var4161;+ int var4162;+ int var4163;+ int var4164;+ int var4165;+ int var4166;+ int var4167;+ int var4168;+ int var4169;+ int var4170;+ int var4171;+ int var4172;+ int var4173;+ int var4174;+ int var4175;+ int var4176;+ int var4177;+ int var4178;+ int var4179;+ int var4180;+ int var4181;+ int var4182;+ int var4183;+ int var4184;+ int var4185;+ int var4186;+ int var4187;+ int var4188;+ int var4189;+ int var4190;+ int var4191;+ int var4192;+ int var4193;+ int var4194;+ int var4195;+ int var4196;+ int var4197;+ int var4198;+ int var4199;+ int var4200;+ int var4201;+ int var4202;+ int var4203;+ int var4204;+ int var4205;+ int var4206;+ int var4207;+ int var4208;+ int var4209;+ int var4210;+ int var4211;+ int var4212;+ int var4213;+ int var4214;+ int var4215;+ int var4216;+ int var4217;+ int var4218;+ int var4219;+ int var4220;+ int var4221;+ int var4222;+ int var4223;+ int var4224;+ int var4225;+ int var4226;+ int var4227;+ int var4228;+ int var4229;+ int var4230;+ int var4231;+ int var4232;+ int var4233;+ int var4234;+ int var4235;+ int var4236;+ int var4237;+ int var4238;+ int var4239;+ int var4240;+ int var4241;+ int var4242;+ int var4243;+ int var4244;+ int var4245;+ int var4246;+ int var4247;+ int var4248;+ int var4249;+ int var4250;+ int var4251;+ int var4252;+ int var4253;+ int var4254;+ int var4255;+ int var4256;+ int var4257;+ int var4258;+ int var4259;+ int var4260;+ int var4261;+ int var4262;+ int var4263;+ int var4264;+ int var4265;+ int var4266;+ int var4267;+ int var4268;+ int var4269;+ int var4270;+ int var4271;+ int var4272;+ int var4273;+ int var4274;+ int var4275;+ int var4276;+ int var4277;+ int var4278;+ int var4279;+ int var4280;+ int var4281;+ int var4282;+ int var4283;+ int var4284;+ int var4285;+ int var4286;+ int var4287;+ int var4288;+ int var4289;+ int var4290;+ int var4291;+ int var4292;+ int var4293;+ int var4294;+ int var4295;+ int var4296;+ int var4297;+ int var4298;+ int var4299;+ int var4300;+ int var4301;+ int var4302;+ int var4303;+ int var4304;+ int var4305;+ int var4306;+ int var4307;+ int var4308;+ int var4309;+ int var4310;+ int var4311;+ int var4312;+ int var4313;+ int var4314;+ int var4315;+ int var4316;+ int var4317;+ int var4318;+ int var4319;+ int var4320;+ int var4321;+ int var4322;+ int var4323;+ int var4324;+ int var4325;+ int var4326;+ int var4327;+ int var4328;+ int var4329;+ int var4330;+ int var4331;+ int var4332;+ int var4333;+ int var4334;+ int var4335;+ int var4336;+ int var4337;+ int var4338;+ int var4339;+ int var4340;+ int var4341;+ int var4342;+ int var4343;+ int var4344;+ int var4345;+ int var4346;+ int var4347;+ int var4348;+ int var4349;+ int var4350;+ int var4351;+ int var4352;+ int var4353;+ int var4354;+ int var4355;+ int var4356;+ int var4357;+ int var4358;+ int var4359;+ int var4360;+ int var4361;+ int var4362;+ int var4363;+ int var4364;+ int var4365;+ int var4366;+ int var4367;+ int var4368;+ int var4369;+ int var4370;+ int var4371;+ int var4372;+ int var4373;+ int var4374;+ int var4375;+ int var4376;+ int var4377;+ int var4378;+ int var4379;+ int var4380;+ int var4381;+ int var4382;+ int var4383;+ int var4384;+ int var4385;+ int var4386;+ int var4387;+ int var4388;+ int var4389;+ int var4390;+ int var4391;+ int var4392;+ int var4393;+ int var4394;+ int var4395;+ int var4396;+ int var4397;+ int var4398;+ int var4399;+ int var4400;+ int var4401;+ int var4402;+ int var4403;+ int var4404;+ int var4405;+ int var4406;+ int var4407;+ int var4408;+ int var4409;+ int var4410;+ int var4411;+ int var4412;+ int var4413;+ int var4414;+ int var4415;+ int var4416;+ int var4417;+ int var4418;+ int var4419;+ int var4420;+ int var4421;+ int var4422;+ int var4423;+ int var4424;+ int var4425;+ int var4426;+ int var4427;+ int var4428;+ int var4429;+ int var4430;+ int var4431;+ int var4432;+ int var4433;+ int var4434;+ int var4435;+ int var4436;+ int var4437;+ int var4438;+ int var4439;+ int var4440;+ int var4441;+ int var4442;+ int var4443;+ int var4444;+ int var4445;+ int var4446;+ int var4447;+ int var4448;+ int var4449;+ int var4450;+ int var4451;+ int var4452;+ int var4453;+ int var4454;+ int var4455;+ int var4456;+ int var4457;+ int var4458;+ int var4459;+ int var4460;+ int var4461;+ int var4462;+ int var4463;+ int var4464;+ int var4465;+ int var4466;+ int var4467;+ int var4468;+ int var4469;+ int var4470;+ int var4471;+ int var4472;+ int var4473;+ int var4474;+ int var4475;+ int var4476;+ int var4477;+ int var4478;+ int var4479;+ int var4480;+ int var4481;+ int var4482;+ int var4483;+ int var4484;+ int var4485;+ int var4486;+ int var4487;+ int var4488;+ int var4489;+ int var4490;+ int var4491;+ int var4492;+ int var4493;+ int var4494;+ int var4495;+ int var4496;+ int var4497;+ int var4498;+ int var4499;+ int var4500;+ int var4501;+ int var4502;+ int var4503;+ int var4504;+ int var4505;+ int var4506;+ int var4507;+ int var4508;+ int var4509;+ int var4510;+ int var4511;+ int var4512;+ int var4513;+ int var4514;+ int var4515;+ int var4516;+ int var4517;+ int var4518;+ int var4519;+ int var4520;+ int var4521;+ int var4522;+ int var4523;+ int var4524;+ int var4525;+ int var4526;+ int var4527;+ int var4528;+ int var4529;+ int var4530;+ int var4531;+ int var4532;+ int var4533;+ int var4534;+ int var4535;+ int var4536;+ int var4537;+ int var4538;+ int var4539;+ int var4540;+ int var4541;+ int var4542;+ int var4543;+ int var4544;+ int var4545;+ int var4546;+ int var4547;+ int var4548;+ int var4549;+ int var4550;+ int var4551;+ int var4552;+ int var4553;+ int var4554;+ int var4555;+ int var4556;+ int var4557;+ int var4558;+ int var4559;+ int var4560;+ int var4561;+ int var4562;+ int var4563;+ int var4564;+ int var4565;+ int var4566;+ int var4567;+ int var4568;+ int var4569;+ int var4570;+ int var4571;+ int var4572;+ int var4573;+ int var4574;+ int var4575;+ int var4576;+ int var4577;+ int var4578;+ int var4579;+ int var4580;+ int var4581;+ int var4582;+ int var4583;+ int var4584;+ int var4585;+ int var4586;+ int var4587;+ int var4588;+ int var4589;+ int var4590;+ int var4591;+ int var4592;+ int var4593;+ int var4594;+ int var4595;+ int var4596;+ int var4597;+ int var4598;+ int var4599;+ int var4600;+ int var4601;+ int var4602;+ int var4603;+ int var4604;+ int var4605;+ int var4606;+ int var4607;+ int var4608;+ int var4609;+ int var4610;+ int var4611;+ int var4612;+ int var4613;+ int var4614;+ int var4615;+ int var4616;+ int var4617;+ int var4618;+ int var4619;+ int var4620;+ int var4621;+ int var4622;+ int var4623;+ int var4624;+ int var4625;+ int var4626;+ int var4627;+ int var4628;+ int var4629;+ int var4630;+ int var4631;+ int var4632;+ int var4633;+ int var4634;+ int var4635;+ int var4636;+ int var4637;+ int var4638;+ int var4639;+ int var4640;+ int var4641;+ int var4642;+ int var4643;+ int var4644;+ int var4645;+ int var4646;+ int var4647;+ int var4648;+ int var4649;+ int var4650;+ int var4651;+ int var4652;+ int var4653;+ int var4654;+ int var4655;+ int var4656;+ int var4657;+ int var4658;+ int var4659;+ int var4660;+ int var4661;+ int var4662;+ int var4663;+ int var4664;+ int var4665;+ int var4666;+ int var4667;+ int var4668;+ int var4669;+ int var4670;+ int var4671;+ int var4672;+ int var4673;+ int var4674;+ int var4675;+ int var4676;+ int var4677;+ int var4678;+ int var4679;+ int var4680;+ int var4681;+ int var4682;+ int var4683;+ int var4684;+ int var4685;+ int var4686;+ int var4687;+ int var4688;+ int var4689;+ int var4690;+ int var4691;+ int var4692;+ int var4693;+ int var4694;+ int var4695;+ int var4696;+ int var4697;+ int var4698;+ int var4699;+ int var4700;+ int var4701;+ int var4702;+ int var4703;+ int var4704;+ int var4705;+ int var4706;+ int var4707;+ int var4708;+ int var4709;+ int var4710;+ int var4711;+ int var4712;+ int var4713;+ int var4714;+ int var4715;+ int var4716;+ int var4717;+ int var4718;+ int var4719;+ int var4720;+ int var4721;+ int var4722;+ int var4723;+ int var4724;+ int var4725;+ int var4726;+ int var4727;+ int var4728;+ int var4729;+ int var4730;+ int var4731;+ int var4732;+ int var4733;+ int var4734;+ int var4735;+ int var4736;+ int var4737;+ int var4738;+ int var4739;+ int var4740;+ int var4741;+ int var4742;+ int var4743;+ int var4744;+ int var4745;+ int var4746;+ int var4747;+ int var4748;+ int var4749;+ int var4750;+ int var4751;+ int var4752;+ int var4753;+ int var4754;+ int var4755;+ int var4756;+ int var4757;+ int var4758;+ int var4759;+ int var4760;+ int var4761;+ int var4762;+ int var4763;+ int var4764;+ int var4765;+ int var4766;+ int var4767;+ int var4768;+ int var4769;+ int var4770;+ int var4771;+ int var4772;+ int var4773;+ int var4774;+ int var4775;+ int var4776;+ int var4777;+ int var4778;+ int var4779;+ int var4780;+ int var4781;+ int var4782;+ int var4783;+ int var4784;+ int var4785;+ int var4786;+ int var4787;+ int var4788;+ int var4789;+ int var4790;+ int var4791;+ int var4792;+ int var4793;+ int var4794;+ int var4795;+ int var4796;+ int var4797;+ int var4798;+ int var4799;+ int var4800;+ int var4801;+ int var4802;+ int var4803;+ int var4804;+ int var4805;+ int var4806;+ int var4807;+ int var4808;+ int var4809;+ int var4810;+ int var4811;+ int var4812;+ int var4813;+ int var4814;+ int var4815;+ int var4816;+ int var4817;+ int var4818;+ int var4819;+ int var4820;+ int var4821;+ int var4822;+ int var4823;+ int var4824;+ int var4825;+ int var4826;+ int var4827;+ int var4828;+ int var4829;+ int var4830;+ int var4831;+ int var4832;+ int var4833;+ int var4834;+ int var4835;+ int var4836;+ int var4837;+ int var4838;+ int var4839;+ int var4840;+ int var4841;+ int var4842;+ int var4843;+ int var4844;+ int var4845;+ int var4846;+ int var4847;+ int var4848;+ int var4849;+ int var4850;+ int var4851;+ int var4852;+ int var4853;+ int var4854;+ int var4855;+ int var4856;+ int var4857;+ int var4858;+ int var4859;+ int var4860;+ int var4861;+ int var4862;+ int var4863;+ int var4864;+ int var4865;+ int var4866;+ int var4867;+ int var4868;+ int var4869;+ int var4870;+ int var4871;+ int var4872;+ int var4873;+ int var4874;+ int var4875;+ int var4876;+ int var4877;+ int var4878;+ int var4879;+ int var4880;+ int var4881;+ int var4882;+ int var4883;+ int var4884;+ int var4885;+ int var4886;+ int var4887;+ int var4888;+ int var4889;+ int var4890;+ int var4891;+ int var4892;+ int var4893;+ int var4894;+ int var4895;+ int var4896;+ int var4897;+ int var4898;+ int var4899;+ int var4900;+ int var4901;+ int var4902;+ int var4903;+ int var4904;+ int var4905;+ int var4906;+ int var4907;+ int var4908;+ int var4909;+ int var4910;+ int var4911;+ int var4912;+ int var4913;+ int var4914;+ int var4915;+ int var4916;+ int var4917;+ int var4918;+ int var4919;+ int var4920;+ int var4921;+ int var4922;+ int var4923;+ int var4924;+ int var4925;+ int var4926;+ int var4927;+ int var4928;+ int var4929;+ int var4930;+ int var4931;+ int var4932;+ int var4933;+ int var4934;+ int var4935;+ int var4936;+ int var4937;+ int var4938;+ int var4939;+ int var4940;+ int var4941;+ int var4942;+ int var4943;+ int var4944;+ int var4945;+ int var4946;+ int var4947;+ int var4948;+ int var4949;+ int var4950;+ int var4951;+ int var4952;+ int var4953;+ int var4954;+ int var4955;+ int var4956;+ int var4957;+ int var4958;+ int var4959;+ int var4960;+ int var4961;+ int var4962;+ int var4963;+ int var4964;+ int var4965;+ int var4966;+ int var4967;+ int var4968;+ int var4969;+ int var4970;+ int var4971;+ int var4972;+ int var4973;+ int var4974;+ int var4975;+ int var4976;+ int var4977;+ int var4978;+ int var4979;+ int var4980;+ int var4981;+ int var4982;+ int var4983;+ int var4984;+ int var4985;+ int var4986;+ int var4987;+ int var4988;+ int var4989;+ int var4990;+ int var4991;+ int var4992;+ int var4993;+ int var4994;+ int var4995;+ int var4996;+ int var4997;+ int var4998;+ int var4999;+ int var5000;+ int var5001;+ int var5002;+ int var5003;+ int var5004;+ int var5005;+ int var5006;+ int var5007;+ int var5008;+ int var5009;+ int var5010;+ int var5011;+ int var5012;+ int var5013;+ int var5014;+ int var5015;+ int var5016;+ int var5017;+ int var5018;+ int var5019;+ int var5020;+ int var5021;+ int var5022;+ int var5023;+ int var5024;+ int var5025;+ int var5026;+ int var5027;+ int var5028;+ int var5029;+ int var5030;+ int var5031;+ int var5032;+ int var5033;+ int var5034;+ int var5035;+ int var5036;+ int var5037;+ int var5038;+ int var5039;+ int var5040;+ int var5041;+ int var5042;+ int var5043;+ int var5044;+ int var5045;+ int var5046;+ int var5047;+ int var5048;+ int var5049;+ int var5050;+ int var5051;+ int var5052;+ int var5053;+ int var5054;+ int var5055;+ int var5056;+ int var5057;+ int var5058;+ int var5059;+ int var5060;+ int var5061;+ int var5062;+ int var5063;+ int var5064;+ int var5065;+ int var5066;+ int var5067;+ int var5068;+ int var5069;+ int var5070;+ int var5071;+ int var5072;+ int var5073;+ int var5074;+ int var5075;+ int var5076;+ int var5077;+ int var5078;+ int var5079;+ int var5080;+ int var5081;+ int var5082;+ int var5083;+ int var5084;+ int var5085;+ int var5086;+ int var5087;+ int var5088;+ int var5089;+ int var5090;+ int var5091;+ int var5092;+ int var5093;+ int var5094;+ int var5095;+ int var5096;+ int var5097;+ int var5098;+ int var5099;+ int var5100;+ int var5101;+ int var5102;+ int var5103;+ int var5104;+ int var5105;+ int var5106;+ int var5107;+ int var5108;+ int var5109;+ int var5110;+ int var5111;+ int var5112;+ int var5113;+ int var5114;+ int var5115;+ int var5116;+ int var5117;+ int var5118;+ int var5119;+ int var5120;+ int var5121;+ int var5122;+ int var5123;+ int var5124;+ int var5125;+ int var5126;+ int var5127;+ int var5128;+ int var5129;+ int var5130;+ int var5131;+ int var5132;+ int var5133;+ int var5134;+ int var5135;+ int var5136;+ int var5137;+ int var5138;+ int var5139;+ int var5140;+ int var5141;+ int var5142;+ int var5143;+ int var5144;+ int var5145;+ int var5146;+ int var5147;+ int var5148;+ int var5149;+ int var5150;+ int var5151;+ int var5152;+ int var5153;+ int var5154;+ int var5155;+ int var5156;+ int var5157;+ int var5158;+ int var5159;+ int var5160;+ int var5161;+ int var5162;+ int var5163;+ int var5164;+ int var5165;+ int var5166;+ int var5167;+ int var5168;+ int var5169;+ int var5170;+ int var5171;+ int var5172;+ int var5173;+ int var5174;+ int var5175;+ int var5176;+ int var5177;+ int var5178;+ int var5179;+ int var5180;+ int var5181;+ int var5182;+ int var5183;+ int var5184;+ int var5185;+ int var5186;+ int var5187;+ int var5188;+ int var5189;+ int var5190;+ int var5191;+ int var5192;+ int var5193;+ int var5194;+ int var5195;+ int var5196;+ int var5197;+ int var5198;+ int var5199;+ int var5200;+ int var5201;+ int var5202;+ int var5203;+ int var5204;+ int var5205;+ int var5206;+ int var5207;+ int var5208;+ int var5209;+ int var5210;+ int var5211;+ int var5212;+ int var5213;+ int var5214;+ int var5215;+ int var5216;+ int var5217;+ int var5218;+ int var5219;+ int var5220;+ int var5221;+ int var5222;+ int var5223;+ int var5224;+ int var5225;+ int var5226;+ int var5227;+ int var5228;+ int var5229;+ int var5230;+ int var5231;+ int var5232;+ int var5233;+ int var5234;+ int var5235;+ int var5236;+ int var5237;+ int var5238;+ int var5239;+ int var5240;+ int var5241;+ int var5242;+ int var5243;+ int var5244;+ int var5245;+ int var5246;+ int var5247;+ int var5248;+ int var5249;+ int var5250;+ int var5251;+ int var5252;+ int var5253;+ int var5254;+ int var5255;+ int var5256;+ int var5257;+ int var5258;+ int var5259;+ int var5260;+ int var5261;+ int var5262;+ int var5263;+ int var5264;+ int var5265;+ int var5266;+ int var5267;+ int var5268;+ int var5269;+ int var5270;+ int var5271;+ int var5272;+ int var5273;+ int var5274;+ int var5275;+ int var5276;+ int var5277;+ int var5278;+ int var5279;+ int var5280;+ int var5281;+ int var5282;+ int var5283;+ int var5284;+ int var5285;+ int var5286;+ int var5287;+ int var5288;+ int var5289;+ int var5290;+ int var5291;+ int var5292;+ int var5293;+ int var5294;+ int var5295;+ int var5296;+ int var5297;+ int var5298;+ int var5299;+ int var5300;+ int var5301;+ int var5302;+ int var5303;+ int var5304;+ int var5305;+ int var5306;+ int var5307;+ int var5308;+ int var5309;+ int var5310;+ int var5311;+ int var5312;+ int var5313;+ int var5314;+ int var5315;+ int var5316;+ int var5317;+ int var5318;+ int var5319;+ int var5320;+ int var5321;+ int var5322;+ int var5323;+ int var5324;+ int var5325;+ int var5326;+ int var5327;+ int var5328;+ int var5329;+ int var5330;+ int var5331;+ int var5332;+ int var5333;+ int var5334;+ int var5335;+ int var5336;+ int var5337;+ int var5338;+ int var5339;+ int var5340;+ int var5341;+ int var5342;+ int var5343;+ int var5344;+ int var5345;+ int var5346;+ int var5347;+ int var5348;+ int var5349;+ int var5350;+ int var5351;+ int var5352;+ int var5353;+ int var5354;+ int var5355;+ int var5356;+ int var5357;+ int var5358;+ int var5359;+ int var5360;+ int var5361;+ int var5362;+ int var5363;+ int var5364;+ int var5365;+ int var5366;+ int var5367;+ int var5368;+ int var5369;+ int var5370;+ int var5371;+ int var5372;+ int var5373;+ int var5374;+ int var5375;+ int var5376;+ int var5377;+ int var5378;+ int var5379;+ int var5380;+ int var5381;+ int var5382;+ int var5383;+ int var5384;+ int var5385;+ int var5386;+ int var5387;+ int var5388;+ int var5389;+ int var5390;+ int var5391;+ int var5392;+ int var5393;+ int var5394;+ int var5395;+ int var5396;+ int var5397;+ int var5398;+ int var5399;+ int var5400;+ int var5401;+ int var5402;+ int var5403;+ int var5404;+ int var5405;+ int var5406;+ int var5407;+ int var5408;+ int var5409;+ int var5410;+ int var5411;+ int var5412;+ int var5413;+ int var5414;+ int var5415;+ int var5416;+ int var5417;+ int var5418;+ int var5419;+ int var5420;+ int var5421;+ int var5422;+ int var5423;+ int var5424;+ int var5425;+ int var5426;+ int var5427;+ int var5428;+ int var5429;+ int var5430;+ int var5431;+ int var5432;+ int var5433;+ int var5434;+ int var5435;+ int var5436;+ int var5437;+ int var5438;+ int var5439;+ int var5440;+ int var5441;+ int var5442;+ int var5443;+ int var5444;+ int var5445;+ int var5446;+ int var5447;+ int var5448;+ int var5449;+ int var5450;+ int var5451;+ int var5452;+ int var5453;+ int var5454;+ int var5455;+ int var5456;+ int var5457;+ int var5458;+ int var5459;+ int var5460;+ int var5461;+ int var5462;+ int var5463;+ int var5464;+ int var5465;+ int var5466;+ int var5467;+ int var5468;+ int var5469;+ int var5470;+ int var5471;+ int var5472;+ int var5473;+ int var5474;+ int var5475;+ int var5476;+ int var5477;+ int var5478;+ int var5479;+ int var5480;+ int var5481;+ int var5482;+ int var5483;+ int var5484;+ int var5485;+ int var5486;+ int var5487;+ int var5488;+ int var5489;+ int var5490;+ int var5491;+ int var5492;+ int var5493;+ int var5494;+ int var5495;+ int var5496;+ int var5497;+ int var5498;+ int var5499;+ int var5500;+ int var5501;+ int var5502;+ int var5503;+ int var5504;+ int var5505;+ int var5506;+ int var5507;+ int var5508;+ int var5509;+ int var5510;+ int var5511;+ int var5512;+ int var5513;+ int var5514;+ int var5515;+ int var5516;+ int var5517;+ int var5518;+ int var5519;+ int var5520;+ int var5521;+ int var5522;+ int var5523;+ int var5524;+ int var5525;+ int var5526;+ int var5527;+ int var5528;+ int var5529;+ int var5530;+ int var5531;+ int var5532;+ int var5533;+ int var5534;+ int var5535;+ int var5536;+ int var5537;+ int var5538;+ int var5539;+ int var5540;+ int var5541;+ int var5542;+ int var5543;+ int var5544;+ int var5545;+ int var5546;+ int var5547;+ int var5548;+ int var5549;+ int var5550;+ int var5551;+ int var5552;+ int var5553;+ int var5554;+ int var5555;+ int var5556;+ int var5557;+ int var5558;+ int var5559;+ int var5560;+ int var5561;+ int var5562;+ int var5563;+ int var5564;+ int var5565;+ int var5566;+ int var5567;+ int var5568;+ int var5569;+ int var5570;+ int var5571;+ int var5572;+ int var5573;+ int var5574;+ int var5575;+ int var5576;+ int var5577;+ int var5578;+ int var5579;+ int var5580;+ int var5581;+ int var5582;+ int var5583;+ int var5584;+ int var5585;+ int var5586;+ int var5587;+ int var5588;+ int var5589;+ int var5590;+ int var5591;+ int var5592;+ int var5593;+ int var5594;+ int var5595;+ int var5596;+ int var5597;+ int var5598;+ int var5599;+ int var5600;+ int var5601;+ int var5602;+ int var5603;+ int var5604;+ int var5605;+ int var5606;+ int var5607;+ int var5608;+ int var5609;+ int var5610;+ int var5611;+ int var5612;+ int var5613;+ int var5614;+ int var5615;+ int var5616;+ int var5617;+ int var5618;+ int var5619;+ int var5620;+ int var5621;+ int var5622;+ int var5623;+ int var5624;+ int var5625;+ int var5626;+ int var5627;+ int var5628;+ int var5629;+ int var5630;+ int var5631;+ int var5632;+ int var5633;+ int var5634;+ int var5635;+ int var5636;+ int var5637;+ int var5638;+ int var5639;+ int var5640;+ int var5641;+ int var5642;+ int var5643;+ int var5644;+ int var5645;+ int var5646;+ int var5647;+ int var5648;+ int var5649;+ int var5650;+ int var5651;+ int var5652;+ int var5653;+ int var5654;+ int var5655;+ int var5656;+ int var5657;+ int var5658;+ int var5659;+ int var5660;+ int var5661;+ int var5662;+ int var5663;+ int var5664;+ int var5665;+ int var5666;+ int var5667;+ int var5668;+ int var5669;+ int var5670;+ int var5671;+ int var5672;+ int var5673;+ int var5674;+ int var5675;+ int var5676;+ int var5677;+ int var5678;+ int var5679;+ int var5680;+ int var5681;+ int var5682;+ int var5683;+ int var5684;+ int var5685;+ int var5686;+ int var5687;+ int var5688;+ int var5689;+ int var5690;+ int var5691;+ int var5692;+ int var5693;+ int var5694;+ int var5695;+ int var5696;+ int var5697;+ int var5698;+ int var5699;+ int var5700;+ int var5701;+ int var5702;+ int var5703;+ int var5704;+ int var5705;+ int var5706;+ int var5707;+ int var5708;+ int var5709;+ int var5710;+ int var5711;+ int var5712;+ int var5713;+ int var5714;+ int var5715;+ int var5716;+ int var5717;+ int var5718;+ int var5719;+ int var5720;+ int var5721;+ int var5722;+ int var5723;+ int var5724;+ int var5725;+ int var5726;+ int var5727;+ int var5728;+ int var5729;+ int var5730;+ int var5731;+ int var5732;+ int var5733;+ int var5734;+ int var5735;+ int var5736;+ int var5737;+ int var5738;+ int var5739;+ int var5740;+ int var5741;+ int var5742;+ int var5743;+ int var5744;+ int var5745;+ int var5746;+ int var5747;+ int var5748;+ int var5749;+ int var5750;+ int var5751;+ int var5752;+ int var5753;+ int var5754;+ int var5755;+ int var5756;+ int var5757;+ int var5758;+ int var5759;+ int var5760;+ int var5761;+ int var5762;+ int var5763;+ int var5764;+ int var5765;+ int var5766;+ int var5767;+ int var5768;+ int var5769;+ int var5770;+ int var5771;+ int var5772;+ int var5773;+ int var5774;+ int var5775;+ int var5776;+ int var5777;+ int var5778;+ int var5779;+ int var5780;+ int var5781;+ int var5782;+ int var5783;+ int var5784;+ int var5785;+ int var5786;+ int var5787;+ int var5788;+ int var5789;+ int var5790;+ int var5791;+ int var5792;+ int var5793;+ int var5794;+ int var5795;+ int var5796;+ int var5797;+ int var5798;+ int var5799;+ int var5800;+ int var5801;+ int var5802;+ int var5803;+ int var5804;+ int var5805;+ int var5806;+ int var5807;+ int var5808;+ int var5809;+ int var5810;+ int var5811;+ int var5812;+ int var5813;+ int var5814;+ int var5815;+ int var5816;+ int var5817;+ int var5818;+ int var5819;+ int var5820;+ int var5821;+ int var5822;+ int var5823;+ int var5824;+ int var5825;+ int var5826;+ int var5827;+ int var5828;+ int var5829;+ int var5830;+ int var5831;+ int var5832;+ int var5833;+ int var5834;+ int var5835;+ int var5836;+ int var5837;+ int var5838;+ int var5839;+ int var5840;+ int var5841;+ int var5842;+ int var5843;+ int var5844;+ int var5845;+ int var5846;+ int var5847;+ int var5848;+ int var5849;+ int var5850;+ int var5851;+ int var5852;+ int var5853;+ int var5854;+ int var5855;+ int var5856;+ int var5857;+ int var5858;+ int var5859;+ int var5860;+ int var5861;+ int var5862;+ int var5863;+ int var5864;+ int var5865;+ int var5866;+ int var5867;+ int var5868;+ int var5869;+ int var5870;+ int var5871;+ int var5872;+ int var5873;+ int var5874;+ int var5875;+ int var5876;+ int var5877;+ int var5878;+ int var5879;+ int var5880;+ int var5881;+ int var5882;+ int var5883;+ int var5884;+ int var5885;+ int var5886;+ int var5887;+ int var5888;+ int var5889;+ int var5890;+ int var5891;+ int var5892;+ int var5893;+ int var5894;+ int var5895;+ int var5896;+ int var5897;+ int var5898;+ int var5899;+ int var5900;+ int var5901;+ int var5902;+ int var5903;+ int var5904;+ int var5905;+ int var5906;+ int var5907;+ int var5908;+ int var5909;+ int var5910;+ int var5911;+ int var5912;+ int var5913;+ int var5914;+ int var5915;+ int var5916;+ int var5917;+ int var5918;+ int var5919;+ int var5920;+ int var5921;+ int var5922;+ int var5923;+ int var5924;+ int var5925;+ int var5926;+ int var5927;+ int var5928;+ int var5929;+ int var5930;+ int var5931;+ int var5932;+ int var5933;+ int var5934;+ int var5935;+ int var5936;+ int var5937;+ int var5938;+ int var5939;+ int var5940;+ int var5941;+ int var5942;+ int var5943;+ int var5944;+ int var5945;+ int var5946;+ int var5947;+ int var5948;+ int var5949;+ int var5950;+ int var5951;+ int var5952;+ int var5953;+ int var5954;+ int var5955;+ int var5956;+ int var5957;+ int var5958;+ int var5959;+ int var5960;+ int var5961;+ int var5962;+ int var5963;+ int var5964;+ int var5965;+ int var5966;+ int var5967;+ int var5968;+ int var5969;+ int var5970;+ int var5971;+ int var5972;+ int var5973;+ int var5974;+ int var5975;+ int var5976;+ int var5977;+ int var5978;+ int var5979;+ int var5980;+ int var5981;+ int var5982;+ int var5983;+ int var5984;+ int var5985;+ int var5986;+ int var5987;+ int var5988;+ int var5989;+ int var5990;+ int var5991;+ int var5992;+ int var5993;+ int var5994;+ int var5995;+ int var5996;+ int var5997;+ int var5998;+ int var5999;+ int var6000;+ int var6001;+ int var6002;+ int var6003;+ int var6004;+ int var6005;+ int var6006;+ int var6007;+ int var6008;+ int var6009;+ int var6010;+ int var6011;+ int var6012;+ int var6013;+ int var6014;+ int var6015;+ int var6016;+ int var6017;+ int var6018;+ int var6019;+ int var6020;+ int var6021;+ int var6022;+ int var6023;+ int var6024;+ int var6025;+ int var6026;+ int var6027;+ int var6028;+ int var6029;+ int var6030;+ int var6031;+ int var6032;+ int var6033;+ int var6034;+ int var6035;+ int var6036;+ int var6037;+ int var6038;+ int var6039;+ int var6040;+ int var6041;+ int var6042;+ int var6043;+ int var6044;+ int var6045;+ int var6046;+ int var6047;+ int var6048;+ int var6049;+ int var6050;+ int var6051;+ int var6052;+ int var6053;+ int var6054;+ int var6055;+ int var6056;+ int var6057;+ int var6058;+ int var6059;+ int var6060;+ int var6061;+ int var6062;+ int var6063;+ int var6064;+ int var6065;+ int var6066;+ int var6067;+ int var6068;+ int var6069;+ int var6070;+ int var6071;+ int var6072;+ int var6073;+ int var6074;+ int var6075;+ int var6076;+ int var6077;+ int var6078;+ int var6079;+ int var6080;+ int var6081;+ int var6082;+ int var6083;+ int var6084;+ int var6085;+ int var6086;+ int var6087;+ int var6088;+ int var6089;+ int var6090;+ int var6091;+ int var6092;+ int var6093;+ int var6094;+ int var6095;+ int var6096;+ int var6097;+ int var6098;+ int var6099;+ int var6100;+ int var6101;+ int var6102;+ int var6103;+ int var6104;+ int var6105;+ int var6106;+ int var6107;+ int var6108;+ int var6109;+ int var6110;+ int var6111;+ int var6112;+ int var6113;+ int var6114;+ int var6115;+ int var6116;+ int var6117;+ int var6118;+ int var6119;+ int var6120;+ int var6121;+ int var6122;+ int var6123;+ int var6124;+ int var6125;+ int var6126;+ int var6127;+ int var6128;+ int var6129;+ int var6130;+ int var6131;+ int var6132;+ int var6133;+ int var6134;+ int var6135;+ int var6136;+ int var6137;+ int var6138;+ int var6139;+ int var6140;+ int var6141;+ int var6142;+ int var6143;+ int var6144;+ int var6145;+ int var6146;+ int var6147;+ int var6148;+ int var6149;+ int var6150;+ int var6151;+ int var6152;+ int var6153;+ int var6154;+ int var6155;+ int var6156;+ int var6157;+ int var6158;+ int var6159;+ int var6160;+ int var6161;+ int var6162;+ int var6163;+ int var6164;+ int var6165;+ int var6166;+ int var6167;+ int var6168;+ int var6169;+ int var6170;+ int var6171;+ int var6172;+ int var6173;+ int var6174;+ int var6175;+ int var6176;+ int var6177;+ int var6178;+ int var6179;+ int var6180;+ int var6181;+ int var6182;+ int var6183;+ int var6184;+ int var6185;+ int var6186;+ int var6187;+ int var6188;+ int var6189;+ int var6190;+ int var6191;+ int var6192;+ int var6193;+ int var6194;+ int var6195;+ int var6196;+ int var6197;+ int var6198;+ int var6199;+ int var6200;+ int var6201;+ int var6202;+ int var6203;+ int var6204;+ int var6205;+ int var6206;+ int var6207;+ int var6208;+ int var6209;+ int var6210;+ int var6211;+ int var6212;+ int var6213;+ int var6214;+ int var6215;+ int var6216;+ int var6217;+ int var6218;+ int var6219;+ int var6220;+ int var6221;+ int var6222;+ int var6223;+ int var6224;+ int var6225;+ int var6226;+ int var6227;+ int var6228;+ int var6229;+ int var6230;+ int var6231;+ int var6232;+ int var6233;+ int var6234;+ int var6235;+ int var6236;+ int var6237;+ int var6238;+ int var6239;+ int var6240;+ int var6241;+ int var6242;+ int var6243;+ int var6244;+ int var6245;+ int var6246;+ int var6247;+ int var6248;+ int var6249;+ int var6250;+ int var6251;+ int var6252;+ int var6253;+ int var6254;+ int var6255;+ int var6256;+ int var6257;+ int var6258;+ int var6259;+ int var6260;+ int var6261;+ int var6262;+ int var6263;+ int var6264;+ int var6265;+ int var6266;+ int var6267;+ int var6268;+ int var6269;+ int var6270;+ int var6271;+ int var6272;+ int var6273;+ int var6274;+ int var6275;+ int var6276;+ int var6277;+ int var6278;+ int var6279;+ int var6280;+ int var6281;+ int var6282;+ int var6283;+ int var6284;+ int var6285;+ int var6286;+ int var6287;+ int var6288;+ int var6289;+ int var6290;+ int var6291;+ int var6292;+ int var6293;+ int var6294;+ int var6295;+ int var6296;+ int var6297;+ int var6298;+ int var6299;+ int var6300;+ int var6301;+ int var6302;+ int var6303;+ int var6304;+ int var6305;+ int var6306;+ int var6307;+ int var6308;+ int var6309;+ int var6310;+ int var6311;+ int var6312;+ int var6313;+ int var6314;+ int var6315;+ int var6316;+ int var6317;+ int var6318;+ int var6319;+ int var6320;+ int var6321;+ int var6322;+ int var6323;+ int var6324;+ int var6325;+ int var6326;+ int var6327;+ int var6328;+ int var6329;+ int var6330;+ int var6331;+ int var6332;+ int var6333;+ int var6334;+ int var6335;+ int var6336;+ int var6337;+ int var6338;+ int var6339;+ int var6340;+ int var6341;+ int var6342;+ int var6343;+ int var6344;+ int var6345;+ int var6346;+ int var6347;+ int var6348;+ int var6349;+ int var6350;+ int var6351;+ int var6352;+ int var6353;+ int var6354;+ int var6355;+ int var6356;+ int var6357;+ int var6358;+ int var6359;+ int var6360;+ int var6361;+ int var6362;+ int var6363;+ int var6364;+ int var6365;+ int var6366;+ int var6367;+ int var6368;+ int var6369;+ int var6370;+ int var6371;+ int var6372;+ int var6373;+ int var6374;+ int var6375;+ int var6376;+ int var6377;+ int var6378;+ int var6379;+ int var6380;+ int var6381;+ int var6382;+ int var6383;+ int var6384;+ int var6385;+ int var6386;+ int var6387;+ int var6388;+ int var6389;+ int var6390;+ int var6391;+ int var6392;+ int var6393;+ int var6394;+ int var6395;+ int var6396;+ int var6397;+ int var6398;+ int var6399;+ int var6400;+ int var6401;+ int var6402;+ int var6403;+ int var6404;+ int var6405;+ int var6406;+ int var6407;+ int var6408;+ int var6409;+ int var6410;+ int var6411;+ int var6412;+ int var6413;+ int var6414;+ int var6415;+ int var6416;+ int var6417;+ int var6418;+ int var6419;+ int var6420;+ int var6421;+ int var6422;+ int var6423;+ int var6424;+ int var6425;+ int var6426;+ int var6427;+ int var6428;+ int var6429;+ int var6430;+ int var6431;+ int var6432;+ int var6433;+ int var6434;+ int var6435;+ int var6436;+ int var6437;+ int var6438;+ int var6439;+ int var6440;+ int var6441;+ int var6442;+ int var6443;+ int var6444;+ int var6445;+ int var6446;+ int var6447;+ int var6448;+ int var6449;+ int var6450;+ int var6451;+ int var6452;+ int var6453;+ int var6454;+ int var6455;+ int var6456;+ int var6457;+ int var6458;+ int var6459;+ int var6460;+ int var6461;+ int var6462;+ int var6463;+ int var6464;+ int var6465;+ int var6466;+ int var6467;+ int var6468;+ int var6469;+ int var6470;+ int var6471;+ int var6472;+ int var6473;+ int var6474;+ int var6475;+ int var6476;+ int var6477;+ int var6478;+ int var6479;+ int var6480;+ int var6481;+ int var6482;+ int var6483;+ int var6484;+ int var6485;+ int var6486;+ int var6487;+ int var6488;+ int var6489;+ int var6490;+ int var6491;+ int var6492;+ int var6493;+ int var6494;+ int var6495;+ int var6496;+ int var6497;+ int var6498;+ int var6499;+ int var6500;+ int var6501;+ int var6502;+ int var6503;+ int var6504;+ int var6505;+ int var6506;+ int var6507;+ int var6508;+ int var6509;+ int var6510;+ int var6511;+ int var6512;+ int var6513;+ int var6514;+ int var6515;+ int var6516;+ int var6517;+ int var6518;+ int var6519;+ int var6520;+ int var6521;+ int var6522;+ int var6523;+ int var6524;+ int var6525;+ int var6526;+ int var6527;+ int var6528;+ int var6529;+ int var6530;+ int var6531;+ int var6532;+ int var6533;+ int var6534;+ int var6535;+ int var6536;+ int var6537;+ int var6538;+ int var6539;+ int var6540;+ int var6541;+ int var6542;+ int var6543;+ int var6544;+ int var6545;+ int var6546;+ int var6547;+ int var6548;+ int var6549;+ int var6550;+ int var6551;+ int var6552;+ int var6553;+ int var6554;+ int var6555;+ int var6556;+ int var6557;+ int var6558;+ int var6559;+ int var6560;+ int var6561;+ int var6562;+ int var6563;+ int var6564;+ int var6565;+ int var6566;+ int var6567;+ int var6568;+ int var6569;+ int var6570;+ int var6571;+ int var6572;+ int var6573;+ int var6574;+ int var6575;+ int var6576;+ int var6577;+ int var6578;+ int var6579;+ int var6580;+ int var6581;+ int var6582;+ int var6583;+ int var6584;+ int var6585;+ int var6586;+ int var6587;+ int var6588;+ int var6589;+ int var6590;+ int var6591;+ int var6592;+ int var6593;+ int var6594;+ int var6595;+ int var6596;+ int var6597;+ int var6598;+ int var6599;+ int var6600;+ int var6601;+ int var6602;+ int var6603;+ int var6604;+ int var6605;+ int var6606;+ int var6607;+ int var6608;+ int var6609;+ int var6610;+ int var6611;+ int var6612;+ int var6613;+ int var6614;+ int var6615;+ int var6616;+ int var6617;+ int var6618;+ int var6619;+ int var6620;+ int var6621;+ int var6622;+ int var6623;+ int var6624;+ int var6625;+ int var6626;+ int var6627;+ int var6628;+ int var6629;+ int var6630;+ int var6631;+ int var6632;+ int var6633;+ int var6634;+ int var6635;+ int var6636;+ int var6637;+ int var6638;+ int var6639;+ int var6640;+ int var6641;+ int var6642;+ int var6643;+ int var6644;+ int var6645;+ int var6646;+ int var6647;+ int var6648;+ int var6649;+ int var6650;+ int var6651;+ int var6652;+ int var6653;+ int var6654;+ int var6655;+ int var6656;+ int var6657;+ int var6658;+ int var6659;+ int var6660;+ int var6661;+ int var6662;+ int var6663;+ int var6664;+ int var6665;+ int var6666;+ int var6667;+ int var6668;+ int var6669;+ int var6670;+ int var6671;+ int var6672;+ int var6673;+ int var6674;+ int var6675;+ int var6676;+ int var6677;+ int var6678;+ int var6679;+ int var6680;+ int var6681;+ int var6682;+ int var6683;+ int var6684;+ int var6685;+ int var6686;+ int var6687;+ int var6688;+ int var6689;+ int var6690;+ int var6691;+ int var6692;+ int var6693;+ int var6694;+ int var6695;+ int var6696;+ int var6697;+ int var6698;+ int var6699;+ int var6700;+ int var6701;+ int var6702;+ int var6703;+ int var6704;+ int var6705;+ int var6706;+ int var6707;+ int var6708;+ int var6709;+ int var6710;+ int var6711;+ int var6712;+ int var6713;+ int var6714;+ int var6715;+ int var6716;+ int var6717;+ int var6718;+ int var6719;+ int var6720;+ int var6721;+ int var6722;+ int var6723;+ int var6724;+ int var6725;+ int var6726;+ int var6727;+ int var6728;+ int var6729;+ int var6730;+ int var6731;+ int var6732;+ int var6733;+ int var6734;+ int var6735;+ int var6736;+ int var6737;+ int var6738;+ int var6739;+ int var6740;+ int var6741;+ int var6742;+ int var6743;+ int var6744;+ int var6745;+ int var6746;+ int var6747;+ int var6748;+ int var6749;+ int var6750;+ int var6751;+ int var6752;+ int var6753;+ int var6754;+ int var6755;+ int var6756;+ int var6757;+ int var6758;+ int var6759;+ int var6760;+ int var6761;+ int var6762;+ int var6763;+ int var6764;+ int var6765;+ int var6766;+ int var6767;+ int var6768;+ int var6769;+ int var6770;+ int var6771;+ int var6772;+ int var6773;+ int var6774;+ int var6775;+ int var6776;+ int var6777;+ int var6778;+ int var6779;+ int var6780;+ int var6781;+ int var6782;+ int var6783;+ int var6784;+ int var6785;+ int var6786;+ int var6787;+ int var6788;+ int var6789;+ int var6790;+ int var6791;+ int var6792;+ int var6793;+ int var6794;+ int var6795;+ int var6796;+ int var6797;+ int var6798;+ int var6799;+ int var6800;+ int var6801;+ int var6802;+ int var6803;+ int var6804;+ int var6805;+ int var6806;+ int var6807;+ int var6808;+ int var6809;+ int var6810;+ int var6811;+ int var6812;+ int var6813;+ int var6814;+ int var6815;+ int var6816;+ int var6817;+ int var6818;+ int var6819;+ int var6820;+ int var6821;+ int var6822;+ int var6823;+ int var6824;+ int var6825;+ int var6826;+ int var6827;+ int var6828;+ int var6829;+ int var6830;+ int var6831;+ int var6832;+ int var6833;+ int var6834;+ int var6835;+ int var6836;+ int var6837;+ int var6838;+ int var6839;+ int var6840;+ int var6841;+ int var6842;+ int var6843;+ int var6844;+ int var6845;+ int var6846;+ int var6847;+ int var6848;+ int var6849;+ int var6850;+ int var6851;+ int var6852;+ int var6853;+ int var6854;+ int var6855;+ int var6856;+ int var6857;+ int var6858;+ int var6859;+ int var6860;+ int var6861;+ int var6862;+ int var6863;+ int var6864;+ int var6865;+ int var6866;+ int var6867;+ int var6868;+ int var6869;+ int var6870;+ int var6871;+ int var6872;+ int var6873;+ int var6874;+ int var6875;+ int var6876;+ int var6877;+ int var6878;+ int var6879;+ int var6880;+ int var6881;+ int var6882;+ int var6883;+ int var6884;+ int var6885;+ int var6886;+ int var6887;+ int var6888;+ int var6889;+ int var6890;+ int var6891;+ int var6892;+ int var6893;+ int var6894;+ int var6895;+ int var6896;+ int var6897;+ int var6898;+ int var6899;+ int var6900;+ int var6901;+ int var6902;+ int var6903;+ int var6904;+ int var6905;+ int var6906;+ int var6907;+ int var6908;+ int var6909;+ int var6910;+ int var6911;+ int var6912;+ int var6913;+ int var6914;+ int var6915;+ int var6916;+ int var6917;+ int var6918;+ int var6919;+ int var6920;+ int var6921;+ int var6922;+ int var6923;+ int var6924;+ int var6925;+ int var6926;+ int var6927;+ int var6928;+ int var6929;+ int var6930;+ int var6931;+ int var6932;+ int var6933;+ int var6934;+ int var6935;+ int var6936;+ int var6937;+ int var6938;+ int var6939;+ int var6940;+ int var6941;+ int var6942;+ int var6943;+ int var6944;+ int var6945;+ int var6946;+ int var6947;+ int var6948;+ int var6949;+ int var6950;+ int var6951;+ int var6952;+ int var6953;+ int var6954;+ int var6955;+ int var6956;+ int var6957;+ int var6958;+ int var6959;+ int var6960;+ int var6961;+ int var6962;+ int var6963;+ int var6964;+ int var6965;+ int var6966;+ int var6967;+ int var6968;+ int var6969;+ int var6970;+ int var6971;+ int var6972;+ int var6973;+ int var6974;+ int var6975;+ int var6976;+ int var6977;+ int var6978;+ int var6979;+ int var6980;+ int var6981;+ int var6982;+ int var6983;+ int var6984;+ int var6985;+ int var6986;+ int var6987;+ int var6988;+ int var6989;+ int var6990;+ int var6991;+ int var6992;+ int var6993;+ int var6994;+ int var6995;+ int var6996;+ int var6997;+ int var6998;+ int var6999;+ int var7000;+ int var7001;+ int var7002;+ int var7003;+ int var7004;+ int var7005;+ int var7006;+ int var7007;+ int var7008;+ int var7009;+ int var7010;+ int var7011;+ int var7012;+ int var7013;+ int var7014;+ int var7015;+ int var7016;+ int var7017;+ int var7018;+ int var7019;+ int var7020;+ int var7021;+ int var7022;+ int var7023;+ int var7024;+ int var7025;+ int var7026;+ int var7027;+ int var7028;+ int var7029;+ int var7030;+ int var7031;+ int var7032;+ int var7033;+ int var7034;+ int var7035;+ int var7036;+ int var7037;+ int var7038;+ int var7039;+ int var7040;+ int var7041;+ int var7042;+ int var7043;+ int var7044;+ int var7045;+ int var7046;+ int var7047;+ int var7048;+ int var7049;+ int var7050;+ int var7051;+ int var7052;+ int var7053;+ int var7054;+ int var7055;+ int var7056;+ int var7057;+ int var7058;+ int var7059;+ int var7060;+ int var7061;+ int var7062;+ int var7063;+ int var7064;+ int var7065;+ int var7066;+ int var7067;+ int var7068;+ int var7069;+ int var7070;+ int var7071;+ int var7072;+ int var7073;+ int var7074;+ int var7075;+ int var7076;+ int var7077;+ int var7078;+ int var7079;+ int var7080;+ int var7081;+ int var7082;+ int var7083;+ int var7084;+ int var7085;+ int var7086;+ int var7087;+ int var7088;+ int var7089;+ int var7090;+ int var7091;+ int var7092;+ int var7093;+ int var7094;+ int var7095;+ int var7096;+ int var7097;+ int var7098;+ int var7099;+ int var7100;+ int var7101;+ int var7102;+ int var7103;+ int var7104;+ int var7105;+ int var7106;+ int var7107;+ int var7108;+ int var7109;+ int var7110;+ int var7111;+ int var7112;+ int var7113;+ int var7114;+ int var7115;+ int var7116;+ int var7117;+ int var7118;+ int var7119;+ int var7120;+ int var7121;+ int var7122;+ int var7123;+ int var7124;+ int var7125;+ int var7126;+ int var7127;+ int var7128;+ int var7129;+ int var7130;+ int var7131;+ int var7132;+ int var7133;+ int var7134;+ int var7135;+ int var7136;+ int var7137;+ int var7138;+ int var7139;+ int var7140;+ int var7141;+ int var7142;+ int var7143;+ int var7144;+ int var7145;+ int var7146;+ int var7147;+ int var7148;+ int var7149;+ int var7150;+ int var7151;+ int var7152;+ int var7153;+ int var7154;+ int var7155;+ int var7156;+ int var7157;+ int var7158;+ int var7159;+ int var7160;+ int var7161;+ int var7162;+ int var7163;+ int var7164;+ int var7165;+ int var7166;+ int var7167;+ int var7168;+ int var7169;+ int var7170;+ int var7171;+ int var7172;+ int var7173;+ int var7174;+ int var7175;+ int var7176;+ int var7177;+ int var7178;+ int var7179;+ int var7180;+ int var7181;+ int var7182;+ int var7183;+ int var7184;+ int var7185;+ int var7186;+ int var7187;+ int var7188;+ int var7189;+ int var7190;+ int var7191;+ int var7192;+ int var7193;+ int var7194;+ int var7195;+ int var7196;+ int var7197;+ int var7198;+ int var7199;+ int var7200;+ int var7201;+ int var7202;+ int var7203;+ int var7204;+ int var7205;+ int var7206;+ int var7207;+ int var7208;+ int var7209;+ int var7210;+ int var7211;+ int var7212;+ int var7213;+ int var7214;+ int var7215;+ int var7216;+ int var7217;+ int var7218;+ int var7219;+ int var7220;+ int var7221;+ int var7222;+ int var7223;+ int var7224;+ int var7225;+ int var7226;+ int var7227;+ int var7228;+ int var7229;+ int var7230;+ int var7231;+ int var7232;+ int var7233;+ int var7234;+ int var7235;+ int var7236;+ int var7237;+ int var7238;+ int var7239;+ int var7240;+ int var7241;+ int var7242;+ int var7243;+ int var7244;+ int var7245;+ int var7246;+ int var7247;+ int var7248;+ int var7249;+ int var7250;+ int var7251;+ int var7252;+ int var7253;+ int var7254;+ int var7255;+ int var7256;+ int var7257;+ int var7258;+ int var7259;+ int var7260;+ int var7261;+ int var7262;+ int var7263;+ int var7264;+ int var7265;+ int var7266;+ int var7267;+ int var7268;+ int var7269;+ int var7270;+ int var7271;+ int var7272;+ int var7273;+ int var7274;+ int var7275;+ int var7276;+ int var7277;+ int var7278;+ int var7279;+ int var7280;+ int var7281;+ int var7282;+ int var7283;+ int var7284;+ int var7285;+ int var7286;+ int var7287;+ int var7288;+ int var7289;+ int var7290;+ int var7291;+ int var7292;+ int var7293;+ int var7294;+ int var7295;+ int var7296;+ int var7297;+ int var7298;+ int var7299;+ int var7300;+ int var7301;+ int var7302;+ int var7303;+ int var7304;+ int var7305;+ int var7306;+ int var7307;+ int var7308;+ int var7309;+ int var7310;+ int var7311;+ int var7312;+ int var7313;+ int var7314;+ int var7315;+ int var7316;+ int var7317;+ int var7318;+ int var7319;+ int var7320;+ int var7321;+ int var7322;+ int var7323;+ int var7324;+ int var7325;+ int var7326;+ int var7327;+ int var7328;+ int var7329;+ int var7330;+ int var7331;+ int var7332;+ int var7333;+ int var7334;+ int var7335;+ int var7336;+ int var7337;+ int var7338;+ int var7339;+ int var7340;+ int var7341;+ int var7342;+ int var7343;+ int var7344;+ int var7345;+ int var7346;+ int var7347;+ int var7348;+ int var7349;+ int var7350;+ int var7351;+ int var7352;+ int var7353;+ int var7354;+ int var7355;+ int var7356;+ int var7357;+ int var7358;+ int var7359;+ int var7360;+ int var7361;+ int var7362;+ int var7363;+ int var7364;+ int var7365;+ int var7366;+ int var7367;+ int var7368;+ int var7369;+ int var7370;+ int var7371;+ int var7372;+ int var7373;+ int var7374;+ int var7375;+ int var7376;+ int var7377;+ int var7378;+ int var7379;+ int var7380;+ int var7381;+ int var7382;+ int var7383;+ int var7384;+ int var7385;+ int var7386;+ int var7387;+ int var7388;+ int var7389;+ int var7390;+ int var7391;+ int var7392;+ int var7393;+ int var7394;+ int var7395;+ int var7396;+ int var7397;+ int var7398;+ int var7399;+ int var7400;+ int var7401;+ int var7402;+ int var7403;+ int var7404;+ int var7405;+ int var7406;+ int var7407;+ int var7408;+ int var7409;+ int var7410;+ int var7411;+ int var7412;+ int var7413;+ int var7414;+ int var7415;+ int var7416;+ int var7417;+ int var7418;+ int var7419;+ int var7420;+ int var7421;+ int var7422;+ int var7423;+ int var7424;+ int var7425;+ int var7426;+ int var7427;+ int var7428;+ int var7429;+ int var7430;+ int var7431;+ int var7432;+ int var7433;+ int var7434;+ int var7435;+ int var7436;+ int var7437;+ int var7438;+ int var7439;+ int var7440;+ int var7441;+ int var7442;+ int var7443;+ int var7444;+ int var7445;+ int var7446;+ int var7447;+ int var7448;+ int var7449;+ int var7450;+ int var7451;+ int var7452;+ int var7453;+ int var7454;+ int var7455;+ int var7456;+ int var7457;+ int var7458;+ int var7459;+ int var7460;+ int var7461;+ int var7462;+ int var7463;+ int var7464;+ int var7465;+ int var7466;+ int var7467;+ int var7468;+ int var7469;+ int var7470;+ int var7471;+ int var7472;+ int var7473;+ int var7474;+ int var7475;+ int var7476;+ int var7477;+ int var7478;+ int var7479;+ int var7480;+ int var7481;+ int var7482;+ int var7483;+ int var7484;+ int var7485;+ int var7486;+ int var7487;+ int var7488;+ int var7489;+ int var7490;+ int var7491;+ int var7492;+ int var7493;+ int var7494;+ int var7495;+ int var7496;+ int var7497;+ int var7498;+ int var7499;+ int var7500;+ int var7501;+ int var7502;+ int var7503;+ int var7504;+ int var7505;+ int var7506;+ int var7507;+ int var7508;+ int var7509;+ int var7510;+ int var7511;+ int var7512;+ int var7513;+ int var7514;+ int var7515;+ int var7516;+ int var7517;+ int var7518;+ int var7519;+ int var7520;+ int var7521;+ int var7522;+ int var7523;+ int var7524;+ int var7525;+ int var7526;+ int var7527;+ int var7528;+ int var7529;+ int var7530;+ int var7531;+ int var7532;+ int var7533;+ int var7534;+ int var7535;+ int var7536;+ int var7537;+ int var7538;+ int var7539;+ int var7540;+ int var7541;+ int var7542;+ int var7543;+ int var7544;+ int var7545;+ int var7546;+ int var7547;+ int var7548;+ int var7549;+ int var7550;+ int var7551;+ int var7552;+ int var7553;+ int var7554;+ int var7555;+ int var7556;+ int var7557;+ int var7558;+ int var7559;+ int var7560;+ int var7561;+ int var7562;+ int var7563;+ int var7564;+ int var7565;+ int var7566;+ int var7567;+ int var7568;+ int var7569;+ int var7570;+ int var7571;+ int var7572;+ int var7573;+ int var7574;+ int var7575;+ int var7576;+ int var7577;+ int var7578;+ int var7579;+ int var7580;+ int var7581;+ int var7582;+ int var7583;+ int var7584;+ int var7585;+ int var7586;+ int var7587;+ int var7588;+ int var7589;+ int var7590;+ int var7591;+ int var7592;+ int var7593;+ int var7594;+ int var7595;+ int var7596;+ int var7597;+ int var7598;+ int var7599;+ int var7600;+ int var7601;+ int var7602;+ int var7603;+ int var7604;+ int var7605;+ int var7606;+ int var7607;+ int var7608;+ int var7609;+ int var7610;+ int var7611;+ int var7612;+ int var7613;+ int var7614;+ int var7615;+ int var7616;+ int var7617;+ int var7618;+ int var7619;+ int var7620;+ int var7621;+ int var7622;+ int var7623;+ int var7624;+ int var7625;+ int var7626;+ int var7627;+ int var7628;+ int var7629;+ int var7630;+ int var7631;+ int var7632;+ int var7633;+ int var7634;+ int var7635;+ int var7636;+ int var7637;+ int var7638;+ int var7639;+ int var7640;+ int var7641;+ int var7642;+ int var7643;+ int var7644;+ int var7645;+ int var7646;+ int var7647;+ int var7648;+ int var7649;+ int var7650;+ int var7651;+ int var7652;+ int var7653;+ int var7654;+ int var7655;+ int var7656;+ int var7657;+ int var7658;+ int var7659;+ int var7660;+ int var7661;+ int var7662;+ int var7663;+ int var7664;+ int var7665;+ int var7666;+ int var7667;+ int var7668;+ int var7669;+ int var7670;+ int var7671;+ int var7672;+ int var7673;+ int var7674;+ int var7675;+ int var7676;+ int var7677;+ int var7678;+ int var7679;+ int var7680;+ int var7681;+ int var7682;+ int var7683;+ int var7684;+ int var7685;+ int var7686;+ int var7687;+ int var7688;+ int var7689;+ int var7690;+ int var7691;+ int var7692;+ int var7693;+ int var7694;+ int var7695;+ int var7696;+ int var7697;+ int var7698;+ int var7699;+ int var7700;+ int var7701;+ int var7702;+ int var7703;+ int var7704;+ int var7705;+ int var7706;+ int var7707;+ int var7708;+ int var7709;+ int var7710;+ int var7711;+ int var7712;+ int var7713;+ int var7714;+ int var7715;+ int var7716;+ int var7717;+ int var7718;+ int var7719;+ int var7720;+ int var7721;+ int var7722;+ int var7723;+ int var7724;+ int var7725;+ int var7726;+ int var7727;+ int var7728;+ int var7729;+ int var7730;+ int var7731;+ int var7732;+ int var7733;+ int var7734;+ int var7735;+ int var7736;+ int var7737;+ int var7738;+ int var7739;+ int var7740;+ int var7741;+ int var7742;+ int var7743;+ int var7744;+ int var7745;+ int var7746;+ int var7747;+ int var7748;+ int var7749;+ int var7750;+ int var7751;+ int var7752;+ int var7753;+ int var7754;+ int var7755;+ int var7756;+ int var7757;+ int var7758;+ int var7759;+ int var7760;+ int var7761;+ int var7762;+ int var7763;+ int var7764;+ int var7765;+ int var7766;+ int var7767;+ int var7768;+ int var7769;+ int var7770;+ int var7771;+ int var7772;+ int var7773;+ int var7774;+ int var7775;+ int var7776;+ int var7777;+ int var7778;+ int var7779;+ int var7780;+ int var7781;+ int var7782;+ int var7783;+ int var7784;+ int var7785;+ int var7786;+ int var7787;+ int var7788;+ int var7789;+ int var7790;+ int var7791;+ int var7792;+ int var7793;+ int var7794;+ int var7795;+ int var7796;+ int var7797;+ int var7798;+ int var7799;+ int var7800;+ int var7801;+ int var7802;+ int var7803;+ int var7804;+ int var7805;+ int var7806;+ int var7807;+ int var7808;+ int var7809;+ int var7810;+ int var7811;+ int var7812;+ int var7813;+ int var7814;+ int var7815;+ int var7816;+ int var7817;+ int var7818;+ int var7819;+ int var7820;+ int var7821;+ int var7822;+ int var7823;+ int var7824;+ int var7825;+ int var7826;+ int var7827;+ int var7828;+ int var7829;+ int var7830;+ int var7831;+ int var7832;+ int var7833;+ int var7834;+ int var7835;+ int var7836;+ int var7837;+ int var7838;+ int var7839;+ int var7840;+ int var7841;+ int var7842;+ int var7843;+ int var7844;+ int var7845;+ int var7846;+ int var7847;+ int var7848;+ int var7849;+ int var7850;+ int var7851;+ int var7852;+ int var7853;+ int var7854;+ int var7855;+ int var7856;+ int var7857;+ int var7858;+ int var7859;+ int var7860;+ int var7861;+ int var7862;+ int var7863;+ int var7864;+ int var7865;+ int var7866;+ int var7867;+ int var7868;+ int var7869;+ int var7870;+ int var7871;+ int var7872;+ int var7873;+ int var7874;+ int var7875;+ int var7876;+ int var7877;+ int var7878;+ int var7879;+ int var7880;+ int var7881;+ int var7882;+ int var7883;+ int var7884;+ int var7885;+ int var7886;+ int var7887;+ int var7888;+ int var7889;+ int var7890;+ int var7891;+ int var7892;+ int var7893;+ int var7894;+ int var7895;+ int var7896;+ int var7897;+ int var7898;+ int var7899;+ int var7900;+ int var7901;+ int var7902;+ int var7903;+ int var7904;+ int var7905;+ int var7906;+ int var7907;+ int var7908;+ int var7909;+ int var7910;+ int var7911;+ int var7912;+ int var7913;+ int var7914;+ int var7915;+ int var7916;+ int var7917;+ int var7918;+ int var7919;+ int var7920;+ int var7921;+ int var7922;+ int var7923;+ int var7924;+ int var7925;+ int var7926;+ int var7927;+ int var7928;+ int var7929;+ int var7930;+ int var7931;+ int var7932;+ int var7933;+ int var7934;+ int var7935;+ int var7936;+ int var7937;+ int var7938;+ int var7939;+ int var7940;+ int var7941;+ int var7942;+ int var7943;+ int var7944;+ int var7945;+ int var7946;+ int var7947;+ int var7948;+ int var7949;+ int var7950;+ int var7951;+ int var7952;+ int var7953;+ int var7954;+ int var7955;+ int var7956;+ int var7957;+ int var7958;+ int var7959;+ int var7960;+ int var7961;+ int var7962;+ int var7963;+ int var7964;+ int var7965;+ int var7966;+ int var7967;+ int var7968;+ int var7969;+ int var7970;+ int var7971;+ int var7972;+ int var7973;+ int var7974;+ int var7975;+ int var7976;+ int var7977;+ int var7978;+ int var7979;+ int var7980;+ int var7981;+ int var7982;+ int var7983;+ int var7984;+ int var7985;+ int var7986;+ int var7987;+ int var7988;+ int var7989;+ int var7990;+ int var7991;+ int var7992;+ int var7993;+ int var7994;+ int var7995;+ int var7996;+ int var7997;+ int var7998;+ int var7999;+ int var8000;+ int var8001;+ int var8002;+ int var8003;+ int var8004;+ int var8005;+ int var8006;+ int var8007;+ int var8008;+ int var8009;+ int var8010;+ int var8011;+ int var8012;+ int var8013;+ int var8014;+ int var8015;+ int var8016;+ int var8017;+ int var8018;+ int var8019;+ int var8020;+ int var8021;+ int var8022;+ int var8023;+ int var8024;+ int var8025;+ int var8026;+ int var8027;+ int var8028;+ int var8029;+ int var8030;+ int var8031;+ int var8032;+ int var8033;+ int var8034;+ int var8035;+ int var8036;+ int var8037;+ int var8038;+ int var8039;+ int var8040;+ int var8041;+ int var8042;+ int var8043;+ int var8044;+ int var8045;+ int var8046;+ int var8047;+ int var8048;+ int var8049;+ int var8050;+ int var8051;+ int var8052;+ int var8053;+ int var8054;+ int var8055;+ int var8056;+ int var8057;+ int var8058;+ int var8059;+ int var8060;+ int var8061;+ int var8062;+ int var8063;+ int var8064;+ int var8065;+ int var8066;+ int var8067;+ int var8068;+ int var8069;+ int var8070;+ int var8071;+ int var8072;+ int var8073;+ int var8074;+ int var8075;+ int var8076;+ int var8077;+ int var8078;+ int var8079;+ int var8080;+ int var8081;+ int var8082;+ int var8083;+ int var8084;+ int var8085;+ int var8086;+ int var8087;+ int var8088;+ int var8089;+ int var8090;+ int var8091;+ int var8092;+ int var8093;+ int var8094;+ int var8095;+ int var8096;+ int var8097;+ int var8098;+ int var8099;+ int var8100;+ int var8101;+ int var8102;+ int var8103;+ int var8104;+ int var8105;+ int var8106;+ int var8107;+ int var8108;+ int var8109;+ int var8110;+ int var8111;+ int var8112;+ int var8113;+ int var8114;+ int var8115;+ int var8116;+ int var8117;+ int var8118;+ int var8119;+ int var8120;+ int var8121;+ int var8122;+ int var8123;+ int var8124;+ int var8125;+ int var8126;+ int var8127;+ int var8128;+ int var8129;+ int var8130;+ int var8131;+ int var8132;+ int var8133;+ int var8134;+ int var8135;+ int var8136;+ int var8137;+ int var8138;+ int var8139;+ int var8140;+ int var8141;+ int var8142;+ int var8143;+ int var8144;+ int var8145;+ int var8146;+ int var8147;+ int var8148;+ int var8149;+ int var8150;+ int var8151;+ int var8152;+ int var8153;+ int var8154;+ int var8155;+ int var8156;+ int var8157;+ int var8158;+ int var8159;+ int var8160;+ int var8161;+ int var8162;+ int var8163;+ int var8164;+ int var8165;+ int var8166;+ int var8167;+ int var8168;+ int var8169;+ int var8170;+ int var8171;+ int var8172;+ int var8173;+ int var8174;+ int var8175;+ int var8176;+ int var8177;+ int var8178;+ int var8179;+ int var8180;+ int var8181;+ int var8182;+ int var8183;+ int var8184;+ int var8185;+ int var8186;+ int var8187;+ int var8188;+ int var8189;+ int var8190;+ int var8191;+ int var8192;+ int var8193;+ int var8194;+ int var8195;+ int var8196;+ int var8197;+ int var8198;+ int var8199;+ int var8200;+ int var8201;+ int var8202;+ int var8203;+ int var8204;+ int var8205;+ int var8206;+ int var8207;+ int var8208;+ int var8209;+ int var8210;+ int var8211;+ int var8212;+ int var8213;+ int var8214;+ int var8215;+ int var8216;+ int var8217;+ int var8218;+ int var8219;+ int var8220;+ int var8221;+ int var8222;+ int var8223;+ int var8224;+ int var8225;+ int var8226;+ int var8227;+ int var8228;+ int var8229;+ int var8230;+ int var8231;+ int var8232;+ int var8233;+ int var8234;+ int var8235;+ int var8236;+ int var8237;+ int var8238;+ int var8239;+ int var8240;+ int var8241;+ int var8242;+ int var8243;+ int var8244;+ int var8245;+ int var8246;+ int var8247;+ int var8248;+ int var8249;+ int var8250;+ int var8251;+ int var8252;+ int var8253;+ int var8254;+ int var8255;+ int var8256;+ int var8257;+ int var8258;+ int var8259;+ int var8260;+ int var8261;+ int var8262;+ int var8263;+ int var8264;+ int var8265;+ int var8266;+ int var8267;+ int var8268;+ int var8269;+ int var8270;+ int var8271;+ int var8272;+ int var8273;+ int var8274;+ int var8275;+ int var8276;+ int var8277;+ int var8278;+ int var8279;+ int var8280;+ int var8281;+ int var8282;+ int var8283;+ int var8284;+ int var8285;+ int var8286;+ int var8287;+ int var8288;+ int var8289;+ int var8290;+ int var8291;+ int var8292;+ int var8293;+ int var8294;+ int var8295;+ int var8296;+ int var8297;+ int var8298;+ int var8299;+ int var8300;+ int var8301;+ int var8302;+ int var8303;+ int var8304;+ int var8305;+ int var8306;+ int var8307;+ int var8308;+ int var8309;+ int var8310;+ int var8311;+ int var8312;+ int var8313;+ int var8314;+ int var8315;+ int var8316;+ int var8317;+ int var8318;+ int var8319;+ int var8320;+ int var8321;+ int var8322;+ int var8323;+ int var8324;+ int var8325;+ int var8326;+ int var8327;+ int var8328;+ int var8329;+ int var8330;+ int var8331;+ int var8332;+ int var8333;+ int var8334;+ int var8335;+ int var8336;+ int var8337;+ int var8338;+ int var8339;+ int var8340;+ int var8341;+ int var8342;+ int var8343;+ int var8344;+ int var8345;+ int var8346;+ int var8347;+ int var8348;+ int var8349;+ int var8350;+ int var8351;+ int var8352;+ int var8353;+ int var8354;+ int var8355;+ int var8356;+ int var8357;+ int var8358;+ int var8359;+ int var8360;+ int var8361;+ int var8362;+ int var8363;+ int var8364;+ int var8365;+ int var8366;+ int var8367;+ int var8368;+ int var8369;+ int var8370;+ int var8371;+ int var8372;+ int var8373;+ int var8374;+ int var8375;+ int var8376;+ int var8377;+ int var8378;+ int var8379;+ int var8380;+ int var8381;+ int var8382;+ int var8383;+ int var8384;+ int var8385;+ int var8386;+ int var8387;+ int var8388;+ int var8389;+ int var8390;+ int var8391;+ int var8392;+ int var8393;+ int var8394;+ int var8395;+ int var8396;+ int var8397;+ int var8398;+ int var8399;+ int var8400;+ int var8401;+ int var8402;+ int var8403;+ int var8404;+ int var8405;+ int var8406;+ int var8407;+ int var8408;+ int var8409;+ int var8410;+ int var8411;+ int var8412;+ int var8413;+ int var8414;+ int var8415;+ int var8416;+ int var8417;+ int var8418;+ int var8419;+ int var8420;+ int var8421;+ int var8422;+ int var8423;+ int var8424;+ int var8425;+ int var8426;+ int var8427;+ int var8428;+ int var8429;+ int var8430;+ int var8431;+ int var8432;+ int var8433;+ int var8434;+ int var8435;+ int var8436;+ int var8437;+ int var8438;+ int var8439;+ int var8440;+ int var8441;+ int var8442;+ int var8443;+ int var8444;+ int var8445;+ int var8446;+ int var8447;+ int var8448;+ int var8449;+ int var8450;+ int var8451;+ int var8452;+ int var8453;+ int var8454;+ int var8455;+ int var8456;+ int var8457;+ int var8458;+ int var8459;+ int var8460;+ int var8461;+ int var8462;+ int var8463;+ int var8464;+ int var8465;+ int var8466;+ int var8467;+ int var8468;+ int var8469;+ int var8470;+ int var8471;+ int var8472;+ int var8473;+ int var8474;+ int var8475;+ int var8476;+ int var8477;+ int var8478;+ int var8479;+ int var8480;+ int var8481;+ int var8482;+ int var8483;+ int var8484;+ int var8485;+ int var8486;+ int var8487;+ int var8488;+ int var8489;+ int var8490;+ int var8491;+ int var8492;+ int var8493;+ int var8494;+ int var8495;+ int var8496;+ int var8497;+ int var8498;+ int var8499;+ int var8500;+ int var8501;+ int var8502;+ int var8503;+ int var8504;+ int var8505;+ int var8506;+ int var8507;+ int var8508;+ int var8509;+ int var8510;+ int var8511;+ int var8512;+ int var8513;+ int var8514;+ int var8515;+ int var8516;+ int var8517;+ int var8518;+ int var8519;+ int var8520;+ int var8521;+ int var8522;+ int var8523;+ int var8524;+ int var8525;+ int var8526;+ int var8527;+ int var8528;+ int var8529;+ int var8530;+ int var8531;+ int var8532;+ int var8533;+ int var8534;+ int var8535;+ int var8536;+ int var8537;+ int var8538;+ int var8539;+ int var8540;+ int var8541;+ int var8542;+ int var8543;+ int var8544;+ int var8545;+ int var8546;+ int var8547;+ int var8548;+ int var8549;+ int var8550;+ int var8551;+ int var8552;+ int var8553;+ int var8554;+ int var8555;+ int var8556;+ int var8557;+ int var8558;+ int var8559;+ int var8560;+ int var8561;+ int var8562;+ int var8563;+ int var8564;+ int var8565;+ int var8566;+ int var8567;+ int var8568;+ int var8569;+ int var8570;+ int var8571;+ int var8572;+ int var8573;+ int var8574;+ int var8575;+ int var8576;+ int var8577;+ int var8578;+ int var8579;+ int var8580;+ int var8581;+ int var8582;+ int var8583;+ int var8584;+ int var8585;+ int var8586;+ int var8587;+ int var8588;+ int var8589;+ int var8590;+ int var8591;+ int var8592;+ int var8593;+ int var8594;+ int var8595;+ int var8596;+ int var8597;+ int var8598;+ int var8599;+ int var8600;+ int var8601;+ int var8602;+ int var8603;+ int var8604;+ int var8605;+ int var8606;+ int var8607;+ int var8608;+ int var8609;+ int var8610;+ int var8611;+ int var8612;+ int var8613;+ int var8614;+ int var8615;+ int var8616;+ int var8617;+ int var8618;+ int var8619;+ int var8620;+ int var8621;+ int var8622;+ int var8623;+ int var8624;+ int var8625;+ int var8626;+ int var8627;+ int var8628;+ int var8629;+ int var8630;+ int var8631;+ int var8632;+ int var8633;+ int var8634;+ int var8635;+ int var8636;+ int var8637;+ int var8638;+ int var8639;+ int var8640;+ int var8641;+ int var8642;+ int var8643;+ int var8644;+ int var8645;+ int var8646;+ int var8647;+ int var8648;+ int var8649;+ int var8650;+ int var8651;+ int var8652;+ int var8653;+ int var8654;+ int var8655;+ int var8656;+ int var8657;+ int var8658;+ int var8659;+ int var8660;+ int var8661;+ int var8662;+ int var8663;+ int var8664;+ int var8665;+ int var8666;+ int var8667;+ int var8668;+ int var8669;+ int var8670;+ int var8671;+ int var8672;+ int var8673;+ int var8674;+ int var8675;+ int var8676;+ int var8677;+ int var8678;+ int var8679;+ int var8680;+ int var8681;+ int var8682;+ int var8683;+ int var8684;+ int var8685;+ int var8686;+ int var8687;+ int var8688;+ int var8689;+ int var8690;+ int var8691;+ int var8692;+ int var8693;+ int var8694;+ int var8695;+ int var8696;+ int var8697;+ int var8698;+ int var8699;+ int var8700;+ int var8701;+ int var8702;+ int var8703;+ int var8704;+ int var8705;+ int var8706;+ int var8707;+ int var8708;+ int var8709;+ int var8710;+ int var8711;+ int var8712;+ int var8713;+ int var8714;+ int var8715;+ int var8716;+ int var8717;+ int var8718;+ int var8719;+ int var8720;+ int var8721;+ int var8722;+ int var8723;+ int var8724;+ int var8725;+ int var8726;+ int var8727;+ int var8728;+ int var8729;+ int var8730;+ int var8731;+ int var8732;+ int var8733;+ int var8734;+ int var8735;+ int var8736;+ int var8737;+ int var8738;+ int var8739;+ int var8740;+ int var8741;+ int var8742;+ int var8743;+ int var8744;+ int var8745;+ int var8746;+ int var8747;+ int var8748;+ int var8749;+ int var8750;+ int var8751;+ int var8752;+ int var8753;+ int var8754;+ int var8755;+ int var8756;+ int var8757;+ int var8758;+ int var8759;+ int var8760;+ int var8761;+ int var8762;+ int var8763;+ int var8764;+ int var8765;+ int var8766;+ int var8767;+ int var8768;+ int var8769;+ int var8770;+ int var8771;+ int var8772;+ int var8773;+ int var8774;+ int var8775;+ int var8776;+ int var8777;+ int var8778;+ int var8779;+ int var8780;+ int var8781;+ int var8782;+ int var8783;+ int var8784;+ int var8785;+ int var8786;+ int var8787;+ int var8788;+ int var8789;+ int var8790;+ int var8791;+ int var8792;+ int var8793;+ int var8794;+ int var8795;+ int var8796;+ int var8797;+ int var8798;+ int var8799;+ int var8800;+ int var8801;+ int var8802;+ int var8803;+ int var8804;+ int var8805;+ int var8806;+ int var8807;+ int var8808;+ int var8809;+ int var8810;+ int var8811;+ int var8812;+ int var8813;+ int var8814;+ int var8815;+ int var8816;+ int var8817;+ int var8818;+ int var8819;+ int var8820;+ int var8821;+ int var8822;+ int var8823;+ int var8824;+ int var8825;+ int var8826;+ int var8827;+ int var8828;+ int var8829;+ int var8830;+ int var8831;+ int var8832;+ int var8833;+ int var8834;+ int var8835;+ int var8836;+ int var8837;+ int var8838;+ int var8839;+ int var8840;+ int var8841;+ int var8842;+ int var8843;+ int var8844;+ int var8845;+ int var8846;+ int var8847;+ int var8848;+ int var8849;+ int var8850;+ int var8851;+ int var8852;+ int var8853;+ int var8854;+ int var8855;+ int var8856;+ int var8857;+ int var8858;+ int var8859;+ int var8860;+ int var8861;+ int var8862;+ int var8863;+ int var8864;+ int var8865;+ int var8866;+ int var8867;+ int var8868;+ int var8869;+ int var8870;+ int var8871;+ int var8872;+ int var8873;+ int var8874;+ int var8875;+ int var8876;+ int var8877;+ int var8878;+ int var8879;+ int var8880;+ int var8881;+ int var8882;+ int var8883;+ int var8884;+ int var8885;+ int var8886;+ int var8887;+ int var8888;+ int var8889;+ int var8890;+ int var8891;+ int var8892;+ int var8893;+ int var8894;+ int var8895;+ int var8896;+ int var8897;+ int var8898;+ int var8899;+ int var8900;+ int var8901;+ int var8902;+ int var8903;+ int var8904;+ int var8905;+ int var8906;+ int var8907;+ int var8908;+ int var8909;+ int var8910;+ int var8911;+ int var8912;+ int var8913;+ int var8914;+ int var8915;+ int var8916;+ int var8917;+ int var8918;+ int var8919;+ int var8920;+ int var8921;+ int var8922;+ int var8923;+ int var8924;+ int var8925;+ int var8926;+ int var8927;+ int var8928;+ int var8929;+ int var8930;+ int var8931;+ int var8932;+ int var8933;+ int var8934;+ int var8935;+ int var8936;+ int var8937;+ int var8938;+ int var8939;+ int var8940;+ int var8941;+ int var8942;+ int var8943;+ int var8944;+ int var8945;+ int var8946;+ int var8947;+ int var8948;+ int var8949;+ int var8950;+ int var8951;+ int var8952;+ int var8953;+ int var8954;+ int var8955;+ int var8956;+ int var8957;+ int var8958;+ int var8959;+ int var8960;+ int var8961;+ int var8962;+ int var8963;+ int var8964;+ int var8965;+ int var8966;+ int var8967;+ int var8968;+ int var8969;+ int var8970;+ int var8971;+ int var8972;+ int var8973;+ int var8974;+ int var8975;+ int var8976;+ int var8977;+ int var8978;+ int var8979;+ int var8980;+ int var8981;+ int var8982;+ int var8983;+ int var8984;+ int var8985;+ int var8986;+ int var8987;+ int var8988;+ int var8989;+ int var8990;+ int var8991;+ int var8992;+ int var8993;+ int var8994;+ int var8995;+ int var8996;+ int var8997;+ int var8998;+ int var8999;+ int var9000;+ int var9001;+ int var9002;+ int var9003;+ int var9004;+ int var9005;+ int var9006;+ int var9007;+ int var9008;+ int var9009;+ int var9010;+ int var9011;+ int var9012;+ int var9013;+ int var9014;+ int var9015;+ int var9016;+ int var9017;+ int var9018;+ int var9019;+ int var9020;+ int var9021;+ int var9022;+ int var9023;+ int var9024;+ int var9025;+ int var9026;+ int var9027;+ int var9028;+ int var9029;+ int var9030;+ int var9031;+ int var9032;+ int var9033;+ int var9034;+ int var9035;+ int var9036;+ int var9037;+ int var9038;+ int var9039;+ int var9040;+ int var9041;+ int var9042;+ int var9043;+ int var9044;+ int var9045;+ int var9046;+ int var9047;+ int var9048;+ int var9049;+ int var9050;+ int var9051;+ int var9052;+ int var9053;+ int var9054;+ int var9055;+ int var9056;+ int var9057;+ int var9058;+ int var9059;+ int var9060;+ int var9061;+ int var9062;+ int var9063;+ int var9064;+ int var9065;+ int var9066;+ int var9067;+ int var9068;+ int var9069;+ int var9070;+ int var9071;+ int var9072;+ int var9073;+ int var9074;+ int var9075;+ int var9076;+ int var9077;+ int var9078;+ int var9079;+ int var9080;+ int var9081;+ int var9082;+ int var9083;+ int var9084;+ int var9085;+ int var9086;+ int var9087;+ int var9088;+ int var9089;+ int var9090;+ int var9091;+ int var9092;+ int var9093;+ int var9094;+ int var9095;+ int var9096;+ int var9097;+ int var9098;+ int var9099;+ int var9100;+ int var9101;+ int var9102;+ int var9103;+ int var9104;+ int var9105;+ int var9106;+ int var9107;+ int var9108;+ int var9109;+ int var9110;+ int var9111;+ int var9112;+ int var9113;+ int var9114;+ int var9115;+ int var9116;+ int var9117;+ int var9118;+ int var9119;+ int var9120;+ int var9121;+ int var9122;+ int var9123;+ int var9124;+ int var9125;+ int var9126;+ int var9127;+ int var9128;+ int var9129;+ int var9130;+ int var9131;+ int var9132;+ int var9133;+ int var9134;+ int var9135;+ int var9136;+ int var9137;+ int var9138;+ int var9139;+ int var9140;+ int var9141;+ int var9142;+ int var9143;+ int var9144;+ int var9145;+ int var9146;+ int var9147;+ int var9148;+ int var9149;+ int var9150;+ int var9151;+ int var9152;+ int var9153;+ int var9154;+ int var9155;+ int var9156;+ int var9157;+ int var9158;+ int var9159;+ int var9160;+ int var9161;+ int var9162;+ int var9163;+ int var9164;+ int var9165;+ int var9166;+ int var9167;+ int var9168;+ int var9169;+ int var9170;+ int var9171;+ int var9172;+ int var9173;+ int var9174;+ int var9175;+ int var9176;+ int var9177;+ int var9178;+ int var9179;+ int var9180;+ int var9181;+ int var9182;+ int var9183;+ int var9184;+ int var9185;+ int var9186;+ int var9187;+ int var9188;+ int var9189;+ int var9190;+ int var9191;+ int var9192;+ int var9193;+ int var9194;+ int var9195;+ int var9196;+ int var9197;+ int var9198;+ int var9199;+ int var9200;+ int var9201;+ int var9202;+ int var9203;+ int var9204;+ int var9205;+ int var9206;+ int var9207;+ int var9208;+ int var9209;+ int var9210;+ int var9211;+ int var9212;+ int var9213;+ int var9214;+ int var9215;+ int var9216;+ int var9217;+ int var9218;+ int var9219;+ int var9220;+ int var9221;+ int var9222;+ int var9223;+ int var9224;+ int var9225;+ int var9226;+ int var9227;+ int var9228;+ int var9229;+ int var9230;+ int var9231;+ int var9232;+ int var9233;+ int var9234;+ int var9235;+ int var9236;+ int var9237;+ int var9238;+ int var9239;+ int var9240;+ int var9241;+ int var9242;+ int var9243;+ int var9244;+ int var9245;+ int var9246;+ int var9247;+ int var9248;+ int var9249;+ int var9250;+ int var9251;+ int var9252;+ int var9253;+ int var9254;+ int var9255;+ int var9256;+ int var9257;+ int var9258;+ int var9259;+ int var9260;+ int var9261;+ int var9262;+ int var9263;+ int var9264;+ int var9265;+ int var9266;+ int var9267;+ int var9268;+ int var9269;+ int var9270;+ int var9271;+ int var9272;+ int var9273;+ int var9274;+ int var9275;+ int var9276;+ int var9277;+ int var9278;+ int var9279;+ int var9280;+ int var9281;+ int var9282;+ int var9283;+ int var9284;+ int var9285;+ int var9286;+ int var9287;+ int var9288;+ int var9289;+ int var9290;+ int var9291;+ int var9292;+ int var9293;+ int var9294;+ int var9295;+ int var9296;+ int var9297;+ int var9298;+ int var9299;+ int var9300;+ int var9301;+ int var9302;+ int var9303;+ int var9304;+ int var9305;+ int var9306;+ int var9307;+ int var9308;+ int var9309;+ int var9310;+ int var9311;+ int var9312;+ int var9313;+ int var9314;+ int var9315;+ int var9316;+ int var9317;+ int var9318;+ int var9319;+ int var9320;+ int var9321;+ int var9322;+ int var9323;+ int var9324;+ int var9325;+ int var9326;+ int var9327;+ int var9328;+ int var9329;+ int var9330;+ int var9331;+ int var9332;+ int var9333;+ int var9334;+ int var9335;+ int var9336;+ int var9337;+ int var9338;+ int var9339;+ int var9340;+ int var9341;+ int var9342;+ int var9343;+ int var9344;+ int var9345;+ int var9346;+ int var9347;+ int var9348;+ int var9349;+ int var9350;+ int var9351;+ int var9352;+ int var9353;+ int var9354;+ int var9355;+ int var9356;+ int var9357;+ int var9358;+ int var9359;+ int var9360;+ int var9361;+ int var9362;+ int var9363;+ int var9364;+ int var9365;+ int var9366;+ int var9367;+ int var9368;+ int var9369;+ int var9370;+ int var9371;+ int var9372;+ int var9373;+ int var9374;+ int var9375;+ int var9376;+ int var9377;+ int var9378;+ int var9379;+ int var9380;+ int var9381;+ int var9382;+ int var9383;+ int var9384;+ int var9385;+ int var9386;+ int var9387;+ int var9388;+ int var9389;+ int var9390;+ int var9391;+ int var9392;+ int var9393;+ int var9394;+ int var9395;+ int var9396;+ int var9397;+ int var9398;+ int var9399;+ int var9400;+ int var9401;+ int var9402;+ int var9403;+ int var9404;+ int var9405;+ int var9406;+ int var9407;+ int var9408;+ int var9409;+ int var9410;+ int var9411;+ int var9412;+ int var9413;+ int var9414;+ int var9415;+ int var9416;+ int var9417;+ int var9418;+ int var9419;+ int var9420;+ int var9421;+ int var9422;+ int var9423;+ int var9424;+ int var9425;+ int var9426;+ int var9427;+ int var9428;+ int var9429;+ int var9430;+ int var9431;+ int var9432;+ int var9433;+ int var9434;+ int var9435;+ int var9436;+ int var9437;+ int var9438;+ int var9439;+ int var9440;+ int var9441;+ int var9442;+ int var9443;+ int var9444;+ int var9445;+ int var9446;+ int var9447;+ int var9448;+ int var9449;+ int var9450;+ int var9451;+ int var9452;+ int var9453;+ int var9454;+ int var9455;+ int var9456;+ int var9457;+ int var9458;+ int var9459;+ int var9460;+ int var9461;+ int var9462;+ int var9463;+ int var9464;+ int var9465;+ int var9466;+ int var9467;+ int var9468;+ int var9469;+ int var9470;+ int var9471;+ int var9472;+ int var9473;+ int var9474;+ int var9475;+ int var9476;+ int var9477;+ int var9478;+ int var9479;+ int var9480;+ int var9481;+ int var9482;+ int var9483;+ int var9484;+ int var9485;+ int var9486;+ int var9487;+ int var9488;+ int var9489;+ int var9490;+ int var9491;+ int var9492;+ int var9493;+ int var9494;+ int var9495;+ int var9496;+ int var9497;+ int var9498;+ int var9499;+ int var9500;+ int var9501;+ int var9502;+ int var9503;+ int var9504;+ int var9505;+ int var9506;+ int var9507;+ int var9508;+ int var9509;+ int var9510;+ int var9511;+ int var9512;+ int var9513;+ int var9514;+ int var9515;+ int var9516;+ int var9517;+ int var9518;+ int var9519;+ int var9520;+ int var9521;+ int var9522;+ int var9523;+ int var9524;+ int var9525;+ int var9526;+ int var9527;+ int var9528;+ int var9529;+ int var9530;+ int var9531;+ int var9532;+ int var9533;+ int var9534;+ int var9535;+ int var9536;+ int var9537;+ int var9538;+ int var9539;+ int var9540;+ int var9541;+ int var9542;+ int var9543;+ int var9544;+ int var9545;+ int var9546;+ int var9547;+ int var9548;+ int var9549;+ int var9550;+ int var9551;+ int var9552;+ int var9553;+ int var9554;+ int var9555;+ int var9556;+ int var9557;+ int var9558;+ int var9559;+ int var9560;+ int var9561;+ int var9562;+ int var9563;+ int var9564;+ int var9565;+ int var9566;+ int var9567;+ int var9568;+ int var9569;+ int var9570;+ int var9571;+ int var9572;+ int var9573;+ int var9574;+ int var9575;+ int var9576;+ int var9577;+ int var9578;+ int var9579;+ int var9580;+ int var9581;+ int var9582;+ int var9583;+ int var9584;+ int var9585;+ int var9586;+ int var9587;+ int var9588;+ int var9589;+ int var9590;+ int var9591;+ int var9592;+ int var9593;+ int var9594;+ int var9595;+ int var9596;+ int var9597;+ int var9598;+ int var9599;+ int var9600;+ int var9601;+ int var9602;+ int var9603;+ int var9604;+ int var9605;+ int var9606;+ int var9607;+ int var9608;+ int var9609;+ int var9610;+ int var9611;+ int var9612;+ int var9613;+ int var9614;+ int var9615;+ int var9616;+ int var9617;+ int var9618;+ int var9619;+ int var9620;+ int var9621;+ int var9622;+ int var9623;+ int var9624;+ int var9625;+ int var9626;+ int var9627;+ int var9628;+ int var9629;+ int var9630;+ int var9631;+ int var9632;+ int var9633;+ int var9634;+ int var9635;+ int var9636;+ int var9637;+ int var9638;+ int var9639;+ int var9640;+ int var9641;+ int var9642;+ int var9643;+ int var9644;+ int var9645;+ int var9646;+ int var9647;+ int var9648;+ int var9649;+ int var9650;+ int var9651;+ int var9652;+ int var9653;+ int var9654;+ int var9655;+ int var9656;+ int var9657;+ int var9658;+ int var9659;+ int var9660;+ int var9661;+ int var9662;+ int var9663;+ int var9664;+ int var9665;+ int var9666;+ int var9667;+ int var9668;+ int var9669;+ int var9670;+ int var9671;+ int var9672;+ int var9673;+ int var9674;+ int var9675;+ int var9676;+ int var9677;+ int var9678;+ int var9679;+ int var9680;+ int var9681;+ int var9682;+ int var9683;+ int var9684;+ int var9685;+ int var9686;+ int var9687;+ int var9688;+ int var9689;+ int var9690;+ int var9691;+ int var9692;+ int var9693;+ int var9694;+ int var9695;+ int var9696;+ int var9697;+ int var9698;+ int var9699;+ int var9700;+ int var9701;+ int var9702;+ int var9703;+ int var9704;+ int var9705;+ int var9706;+ int var9707;+ int var9708;+ int var9709;+ int var9710;+ int var9711;+ int var9712;+ int var9713;+ int var9714;+ int var9715;+ int var9716;+ int var9717;+ int var9718;+ int var9719;+ int var9720;+ int var9721;+ int var9722;+ int var9723;+ int var9724;+ int var9725;+ int var9726;+ int var9727;+ int var9728;+ int var9729;+ int var9730;+ int var9731;+ int var9732;+ int var9733;+ int var9734;+ int var9735;+ int var9736;+ int var9737;+ int var9738;+ int var9739;+ int var9740;+ int var9741;+ int var9742;+ int var9743;+ int var9744;+ int var9745;+ int var9746;+ int var9747;+ int var9748;+ int var9749;+ int var9750;+ int var9751;+ int var9752;+ int var9753;+ int var9754;+ int var9755;+ int var9756;+ int var9757;+ int var9758;+ int var9759;+ int var9760;+ int var9761;+ int var9762;+ int var9763;+ int var9764;+ int var9765;+ int var9766;+ int var9767;+ int var9768;+ int var9769;+ int var9770;+ int var9771;+ int var9772;+ int var9773;+ int var9774;+ int var9775;+ int var9776;+ int var9777;+ int var9778;+ int var9779;+ int var9780;+ int var9781;+ int var9782;+ int var9783;+ int var9784;+ int var9785;+ int var9786;+ int var9787;+ int var9788;+ int var9789;+ int var9790;+ int var9791;+ int var9792;+ int var9793;+ int var9794;+ int var9795;+ int var9796;+ int var9797;+ int var9798;+ int var9799;+ int var9800;+ int var9801;+ int var9802;+ int var9803;+ int var9804;+ int var9805;+ int var9806;+ int var9807;+ int var9808;+ int var9809;+ int var9810;+ int var9811;+ int var9812;+ int var9813;+ int var9814;+ int var9815;+ int var9816;+ int var9817;+ int var9818;+ int var9819;+ int var9820;+ int var9821;+ int var9822;+ int var9823;+ int var9824;+ int var9825;+ int var9826;+ int var9827;+ int var9828;+ int var9829;+ int var9830;+ int var9831;+ int var9832;+ int var9833;+ int var9834;+ int var9835;+ int var9836;+ int var9837;+ int var9838;+ int var9839;+ int var9840;+ int var9841;+ int var9842;+ int var9843;+ int var9844;+ int var9845;+ int var9846;+ int var9847;+ int var9848;+ int var9849;+ int var9850;+ int var9851;+ int var9852;+ int var9853;+ int var9854;+ int var9855;+ int var9856;+ int var9857;+ int var9858;+ int var9859;+ int var9860;+ int var9861;+ int var9862;+ int var9863;+ int var9864;+ int var9865;+ int var9866;+ int var9867;+ int var9868;+ int var9869;+ int var9870;+ int var9871;+ int var9872;+ int var9873;+ int var9874;+ int var9875;+ int var9876;+ int var9877;+ int var9878;+ int var9879;+ int var9880;+ int var9881;+ int var9882;+ int var9883;+ int var9884;+ int var9885;+ int var9886;+ int var9887;+ int var9888;+ int var9889;+ int var9890;+ int var9891;+ int var9892;+ int var9893;+ int var9894;+ int var9895;+ int var9896;+ int var9897;+ int var9898;+ int var9899;+ int var9900;+ int var9901;+ int var9902;+ int var9903;+ int var9904;+ int var9905;+ int var9906;+ int var9907;+ int var9908;+ int var9909;+ int var9910;+ int var9911;+ int var9912;+ int var9913;+ int var9914;+ int var9915;+ int var9916;+ int var9917;+ int var9918;+ int var9919;+ int var9920;+ int var9921;+ int var9922;+ int var9923;+ int var9924;+ int var9925;+ int var9926;+ int var9927;+ int var9928;+ int var9929;+ int var9930;+ int var9931;+ int var9932;+ int var9933;+ int var9934;+ int var9935;+ int var9936;+ int var9937;+ int var9938;+ int var9939;+ int var9940;+ int var9941;+ int var9942;+ int var9943;+ int var9944;+ int var9945;+ int var9946;+ int var9947;+ int var9948;+ int var9949;+ int var9950;+ int var9951;+ int var9952;+ int var9953;+ int var9954;+ int var9955;+ int var9956;+ int var9957;+ int var9958;+ int var9959;+ int var9960;+ int var9961;+ int var9962;+ int var9963;+ int var9964;+ int var9965;+ int var9966;+ int var9967;+ int var9968;+ int var9969;+ int var9970;+ int var9971;+ int var9972;+ int var9973;+ int var9974;+ int var9975;+ int var9976;+ int var9977;+ int var9978;+ int var9979;+ int var9980;+ int var9981;+ int var9982;+ int var9983;+ int var9984;+ int var9985;+ int var9986;+ int var9987;+ int var9988;+ int var9989;+ int var9990;+ int var9991;+ int var9992;+ int var9993;+ int var9994;+ int var9995;+ int var9996;+ int var9997;+ int var9998;+ int var9999;+ int var10000;+ return 1+1;+ }F diff --git a/misc/tests/test2.c b/misc/tests/test2.c new file mode 100644 --- /dev/null +++ b/misc/tests/test2.c++ extern int err;++ struct A+ {+ int x;+ int y;+ int kak:1;+ }zeh;++ int main()+ {+ int * const * volatile a[3][2][1];+ struct A kek;+ return 0;+ }F diff --git a/misc/tests/test3.c b/misc/tests/test3.c new file mode 100644 --- /dev/null +++ b/misc/tests/test3.c+ #define max(x,y) (x>y?x:y)+ #if defined VERSION == 1+ int kak;+ #else+ int err;+ #endif+++++ int external_int;+ int static_int;+ int fib(int n)+ {+ max(1,max(1,2));+ int a=1,b=1,c;+ for(n;n>0;--n)+ {+ c=a;+ a+=b;+ b=c;+ }+ return a;++ }+ int main()+ {+ int *a;+ int iff;+ ++external_int;+ a[10*100];+ alert(fib(10));+ +1;+ a->b&c;+ do 1; while(1);+ return 0;+ }F diff --git a/misc/tests/test4.c b/misc/tests/test4.c new file mode 100644 --- /dev/null +++ b/misc/tests/test4.c+ extern int a=10;+ extern int a;+ int main()+ {+ {+ extern int a;+ }+ }F diff --git a/misc/tests/test5.c b/misc/tests/test5.c new file mode 100644 --- /dev/null +++ b/misc/tests/test5.c+ extern int a;+ 1;F diff --git a/misc/tests/testerror.c b/misc/tests/testerror.c new file mode 100644 --- /dev/null +++ b/misc/tests/testerror.c+ long a;+ long long a;+ char a;+++ int main()+ {+ short long kek+1+2+3;+ int asdf[1];+ a??1:1;+ return return;+ return 0;+ }+F diff --git a/program/gcc_arguments.c b/program/gcc_arguments.c new file mode 100644 --- /dev/null +++ b/program/gcc_arguments.c+ #ifndef GCC_ARGUMENTS_C+ #define GCC_ARGUMENTS_C GCC_ARGUMENTS_C+ #include<gcc_arguments.h>++++ struct Command_Arguments* parse_command_arguments(char **argv)+ {+ struct Command_Arguments *ret;+ struct Queue *source_names;++ ret=malloc(sizeof(struct Command_Arguments));+ ret->print_ast=ret->print_tokens=ret->transpile_to_js=ret->is_quiet=0;+ ret->output_file=ret->javascript_extern_file=NULL;++ source_names=malloc(sizeof(struct Queue));+ Queue_Init(source_names);++ ret->error_message=NULL;++ /*we skip the first element(the program name)*/+ for(++argv;*argv;++argv)+ {+ if(gstr_cmp(*argv,"--print-tokens"))+ {+ ret->print_tokens=1;+ }else if(gstr_cmp(*argv,"--print-ast"))+ {+ ret->print_ast=1;+ }else if(gstr_cmp(*argv,"--quiet") || gstr_cmp(*argv,"-q"))+ {+ ret->is_quiet=1;+ if(ret->print_ast || ret->print_tokens)+ {+ ret->error_message="print and quiet conflict. Aborting";+ break;+ }+ }else if(gstr_cmp(*argv,"--transpile_to_js") || gstr_cmp(*argv,"-js"))+ {+ ret->transpile_to_js=1;+ }else if(gstr_cmp(*argv,"-o"))+ {+ ++argv;+ if(*argv==NULL)+ {+ ret->error_message="expected a filename after -o. Aborting";+ break;+ }else+ {+ ret->output_file=fopen(*argv,"w");+ if(ret->output_file==NULL)+ {+ ret->error_message="Couldn't open file for output. Aborting";+ break;+ }+ }+ }else if(gstr_cmp(*argv,"--make-extern-file"))+ {+ ret->javascript_extern_file=fopen(*argv,"w");+ if(ret->javascript_extern_file==NULL)+ {+ ret->error_message="Couldn't open file for extern dump. Aborting";+ break;+ }+ }else if(gstr_cmp(*argv,"--add-html"))+ {+ ret->insert_html=1;+ }else+ {+ Queue_Push(source_names,*argv);+ }+ }++ ret->source_names=malloc((source_names->size+1)*sizeof(char*) );+ ret->source_names[source_names->size]=NULL;+ while(source_names->size)+ {+ ret->source_names[source_names->size-1]=(char*)source_names->first->data;+ Queue_Pop(source_names);+ }+ free(source_names);+ if(ret->transpile_to_js && ret->output_file==NULL)+ {+ ret->output_file=fopen("a.js","w");+ if(ret==NULL)+ ret->error_message="Couldn't open file for output. Aborting";+ }+ return ret;+ }+++ void delete_command_arguments(struct Command_Arguments *args)+ {+ if(args->output_file!=NULL)+ fclose(args->output_file);+ if(args->javascript_extern_file!=NULL)+ fclose(args->javascript_extern_file);++ free(args->source_names);+ free(args);+ }++ #endifF diff --git a/program/gcc_arguments.h b/program/gcc_arguments.h new file mode 100644 --- /dev/null +++ b/program/gcc_arguments.h+ #ifndef GCC_ARGUMENTS_H+ #define GCC_ARGUMENTS_H GCC_ARGUMENTS_H+ #include <gcc_arguments.hh>+ #include <queue.h>+ #include <gcc_string.h>+ #include <stdio.h>+++ struct Command_Arguments+ {+ char **source_names;+ char print_tokens:1;+ char print_ast:1;+ char is_quiet:1;+ char transpile_to_js:1;+ char insert_html:1;+++ FILE* output_file;+ FILE* javascript_extern_file;+++ char *error_message;+ };++ struct Command_Arguments* parse_command_arguments(char **argv);+ void delete_command_arguments(struct Command_Arguments *args);++ #endifF diff --git a/program/gcc_arguments.hh b/program/gcc_arguments.hh new file mode 100644 --- /dev/null +++ b/program/gcc_arguments.hh+ #ifndef GCC_ARGUMENTS_HH+ #define GCC_ARGUMENTS_HH GCC_ARGUMENTS_HH+++ struct Command_Arguments;+++ #endifF diff --git a/program/gcc_error.c b/program/gcc_error.c new file mode 100644 --- /dev/null +++ b/program/gcc_error.c+ #ifndef GCC_ERROR_C+ #define GCC_ERROR_C GCC_ERROR_C+ #include <gcc_error.h>++++ struct Translation_Error* get_translation_error(const char *error_message,size_t line,size_t column,const char *filename)+ {+ struct Translation_Error *ret;+ ret=malloc(sizeof(struct Translation_Error));+ ret->error_message=error_message;+ ret->column=column;+ ret->line=line;+ ret->filename=filename;+ }++ struct Translation_Error* get_translation_error_by_token(const char *error_message,struct token *error_token)+ {+ if(error_token==NULL)+ {+ return get_translation_error(error_message,0,0,"");+ }else+ {+ return get_translation_error(error_message,error_token->line+1,error_token->column+1,error_token->filename);+ }+ }++ void push_translation_error(const char *error_message,struct Translation_Data *translation_data)+ {+ if(translation_data->tokens->size==0)+ {+ get_translation_error(error_message,0,0,"");+ }else+ {+ Queue_Push(translation_data->errors,get_translation_error_by_token(error_message,(struct token*)translation_data->tokens->first->data));+ }+ }++ void push_lexing_error(const char *error_message,struct Source_File *src,struct Translation_Data *translation_data)+ {+ Queue_Push(translation_data->errors,get_translation_error(error_message,src->which_row+1,src->which_column+1,src->src_name->filename));+ }+ void print_translation_error(FILE *out,struct Translation_Error *error)+ {+ fprintf(out,"Error ");+ if(error->filename!=NULL)+ {+ fprintf(out,"(line %i column %i) ",error->line,error->column);+ fprintf(out,"in %s ",error->filename);+ }+ fprintf(out,": %s\n",error->error_message);+ }+++ void delete_translation_error(struct Translation_Error *translation_error)+ {+ free(translation_error);+ }+ #endifF diff --git a/program/gcc_error.h b/program/gcc_error.h new file mode 100644 --- /dev/null +++ b/program/gcc_error.h+ #ifndef GCC_ERROR_H+ #define GCC_ERROR_H GCC_ERROR_H+ #include <gcc_error.hh>+ #include <lexer.h>+ #include <stdio.h>++++ struct Translation_Error+ {+ const char *error_message;+ size_t line,column;+ const char *filename;++ };++++ struct Translation_Error* get_translation_error(const char *error_message,size_t line,size_t column,const char *filename);+ struct Translation_Error* get_translation_error_by_token(const char *error_message,struct token *error_token);+ void push_translation_error(const char *error_message,struct Translation_Data *translation_data);+ void push_lexing_error(const char *error_message,struct Source_File *src,struct Translation_Data *translation_data);+ void print_translation_error(FILE *out,struct Translation_Error *error);++ void delete_translation_error(struct Translation_Error *translation_error);+ #endifF diff --git a/program/gcc_error.hh b/program/gcc_error.hh new file mode 100644 --- /dev/null +++ b/program/gcc_error.hh+ #ifndef GCC_ERROR_H+ #define GCC_ERROR_H GCC_ERROR_H+++ struct Translation_Error;+++ #endifF diff --git a/program/program.c b/program/program.c new file mode 100644 --- /dev/null +++ b/program/program.c+ #ifndef GCC_PROGRAM_C+ #define GCC_PROGRAM_C GCC_PROGRAM_C+ #/*Don't mind me*/include/*When I grow up I want to be a new line*/ <program.h>+++ struct Program* get_program()+ {+ struct Program *ret;+ ret=malloc(sizeof(struct Program));+ ret->translation_units=malloc(sizeof(struct Queue));+ ret->source_files=malloc(sizeof(struct Queue));+ ret->errors=malloc(sizeof(struct Queue));+ ret->types=malloc(sizeof(struct Map));+ ret->external_linkage=malloc(sizeof(struct Linkage));++ Queue_Init(ret->translation_units);+ Queue_Init(ret->source_files);+ Queue_Init(ret->errors);++++ Map_Init(ret->types);++ return ret;+ }+ struct Source_File* extract_source_file(FILE *in,struct Source_Name *name)+ {+ long file_size;+ struct Source_File *src;+++ if(fseek(in,0,SEEK_END)==-1)+ return NULL;+ if((file_size=ftell(in))==-1)+ return NULL;+ if(fseek(in,0,SEEK_SET)==-1)+ return NULL;++ src=malloc(sizeof(struct Source_File));++ src->src_name=name;++ src->src=malloc(file_size+1);+ src->src_size=file_size;++ src->where_in_src=0;++ src->which_column=0;+ src->which_row=0;+ src->is_in_the_begining_of_line=1;++ src->src[file_size]='\0';++ fread(src->src,1,file_size,in);+ fclose(in);+ return src;+ }+ struct Translation_Data* get_translation_data(struct Map *types,struct Linkage *internal_linkage,struct Linkage *external_linkage)+ {+ struct Translation_Data *ret;+ ret=malloc(sizeof(struct Translation_Data));+ ret->tokens=malloc(sizeof(struct Queue));+ ret->errors=malloc(sizeof(struct Queue));+ ret->source_files=malloc(sizeof(struct Queue));+ Queue_Init(ret->tokens);+ Queue_Init(ret->errors);+ Queue_Init(ret->source_files);++ ret->macros=malloc(sizeof(struct Map));+ Map_Init(ret->macros);++ ret->types=types;++ ret->number_of_errors_when_last_checked=0;++ ret->external_linkage=external_linkage;+ ret->internal_linkage=internal_linkage;++ return ret;+ }+ struct Source_Name* get_source_name(char *filename,char *base)+ {+ struct Source_Name *ret;+ ret=malloc(sizeof(struct Source_Name));+ ret->base=gstrcpy(base);+ ret->filename=gstrcpy(filename);+ normalise_source_name(ret);+ return ret;+ }+ /*where_to_search ends in a NULL pointer*/+ struct Source_File* get_source_file(char *filename,char **where_to_search)+ {+ FILE *in;+ char *temp_name;+ char is_directory=0;+ struct Source_Name *name;+ struct Source_File *file;++ assert(where_to_search!=NULL);+ assert(*where_to_search!=NULL);+ do+ {+ temp_name=gstr_append(*where_to_search,filename);+ in=fopen(temp_name,"r");+ free(temp_name);+ if(in==NULL)+ continue;++ name=get_source_name(filename,*where_to_search);+ file=extract_source_file(in,name);+ if(file!=NULL)+ {+ return file;+ }else+ {+ delete_source_name(name);+ }+ }while(*(++where_to_search));+ return NULL;+ }++ /*this might cause compatability issues TODO*/+ void normalise_source_name(struct Source_Name *name)+ {+ size_t offset;+ size_t i;+ size_t last_slash;+ char *hold_base;++ for(last_slash=offset=0;name->filename[offset];++offset)+ {+ if(name->filename[offset]=='/')+ {+ last_slash=offset;+ }+ }++ if(last_slash==0)+ return;++ if(name->base==NULL)+ {+ offset=0;+ name->base=malloc(last_slash+1);+ name->base[last_slash]='\0';+ name->base[last_slash-1]='/';++ }else+ {+ offset=gstrlen((char*)name->base);+ hold_base=malloc(offset+last_slash+2);+ strmv(hold_base,(char*)name->base);++ hold_base[last_slash+offset]='/';+ hold_base[last_slash+offset+1]='\0';+ free((void*)name->base);++ name->base=hold_base;+ }++ for(i=0;i<last_slash;++i)+ name->base[offset+i]=name->filename[i];+++ ++i;+ /*prune the filename*/+ offset=gstrlen(name->filename+i);+ hold_base=malloc(offset+1);+ strmv(hold_base,name->filename+i);+ free(name->filename);+ name->filename=hold_base;+++ }++ struct Program* parse_program(char **base_source_names)+ {+ struct Source_File *base_file;+ struct Program *program;+ struct Translation_Data *hold_translation_data;+ char *this_directory[]={"./",NULL};++ assert(base_source_names!=NULL);++ if(*base_source_names==NULL)+ {+ return NULL;+ }++ program=get_program();+ hold_translation_data=get_translation_data(program->types,get_linkage(),program->external_linkage);+ do+ {+ base_file=get_source_file(*base_source_names,this_directory);+ if(base_file==NULL)+ {+ /*TODO error*/+ free(base_file);+ continue;+ }else+ {+ Queue_Push(hold_translation_data->source_files,base_file);+ lex(base_file,hold_translation_data);+ if(!has_new_errors(hold_translation_data))+ {+ Queue_Push(program->translation_units,parse_translation_unit(hold_translation_data));+ }else+ {+ flush_tokens(hold_translation_data->tokens);+ }+ assimilate_translation_data(program,hold_translation_data);+ }+ }while(*(++base_source_names));++ delete_translation_data(hold_translation_data);+ return program;+ }++ void lex_program(struct Translation_Data *hold,struct Source_File *file)+ {+ Queue_Push(hold->source_files,file);+ lex(file,hold);+ }+++ char has_new_errors(struct Translation_Data *translation_data)+ {+ if(translation_data->errors->size != translation_data->number_of_errors_when_last_checked)+ {+ translation_data->number_of_errors_when_last_checked=translation_data->errors->size;+ return 1;+ }else+ {+ return 0;+ }+ }++ void delete_program(struct Program *program)+ {+ while(program->translation_units->size>0)+ delete_ast(Queue_Pop(program->translation_units));+ free(program->translation_units);++++ while(program->source_files->size>0)+ delete_source_file(Queue_Pop(program->source_files));+ free(program->source_files);+++ while(program->errors->size>0)+ delete_translation_error(Queue_Pop(program->errors));+ free(program->errors);+++ delete_linkage(program->external_linkage);++ /*BEWARE*/+ Map_Map(program->types,delete_type);+ Map_Destroy(program->types);+ free(program->types);++ free(program);++ }+ void delete_translation_data(struct Translation_Data *translation_data)+ {+ assert(translation_data->tokens->size==0 &&+ translation_data->errors->size==0 &&+ translation_data->source_files->size==0);+ free(translation_data->tokens);+ free(translation_data->errors);+ free(translation_data->source_files);++ Map_Map(translation_data->macros,delete_macro);+ Map_Destroy(translation_data->macros);+ free(translation_data->macros);++ free(translation_data);++ }+ void assimilate_translation_data(struct Program *program,struct Translation_Data *translation_data)+ {+ Queue_Append(program->errors,translation_data->errors);+ Queue_Append(program->source_files,translation_data->source_files);++ flush_tokens(translation_data->tokens);++ Queue_Init(translation_data->errors);+ Queue_Init(translation_data->source_files);++ translation_data->number_of_errors_when_last_checked=0;+++ }+ char has_no_tokens(struct Translation_Data *translation_data)+ {+ return (translation_data->tokens->size)==0;+ }+ #endifF diff --git a/program/program.h b/program/program.h new file mode 100644 --- /dev/null +++ b/program/program.h+ #ifndef GCC_PROGRAM_H+ #define GCC_PROGRAM_H GCC_PROGRAM_H+++ #include <program.hh>+ #include <queue.h>+ #include <scope.h>+ #include <lexer.h>+ #include <gcc_string.h>+ #include <gcc_arguments.h>+ #include <parse_translation_unit.h>+++ struct Program+ {+ struct Queue *translation_units;+ struct Queue *source_files;+ struct Queue *errors;++ /*+ we the type node structures from+ all the translation units are stored here+ */+ struct Map *types;++ struct Linkage *external_linkage;+ };+ struct Translation_Data+ {+ struct Queue *tokens;+++ struct Queue *errors;+ size_t number_of_errors_when_last_checked;+++ struct Queue *source_files;++ struct Map *macros;++ /*passed from program struct*/+ struct Map *types;+ struct Linkage *external_linkage;+ struct Linkage *internal_linkage;+ /*end of passed from program struct*/+ };++ struct Program* get_program();+ struct Source_Name* get_source_name(char *filename,char *base);++ struct Source_File* extract_source_file(FILE *in,struct Source_Name *name);+ struct Source_File* get_source_file(char *filename,char **where_to_search);+ void normalise_source_name(struct Source_Name *name);++ struct Translation_Data* get_translation_data(struct Map *types,struct Linkage *internal_linkage,struct Linkage *external_linkage);+++ struct Program* parse_program(char **base_source_names);+ void lex_program(struct Translation_Data *hold,struct Source_File *file);+ void entype_program(struct Program *program);+++ char has_new_errors(struct Translation_Data *translation_data);+ char has_no_tokens(struct Translation_Data *translation_data);++ void delete_program(struct Program *program);+ void delete_translation_data(struct Translation_Data *translation_data);+ void destroy_translation_data(struct Translation_Data *translation_data);+ void assimilate_translation_data(struct Program *program,struct Translation_Data *translation_data);++ #endifF diff --git a/program/program.hh b/program/program.hh new file mode 100644 --- /dev/null +++ b/program/program.hh+ #ifndef GCC_PROGRAM_HH+ #define GCC_PROGRAM_HH GCC_PROGRAM_HH++ struct Program;+ struct Translation_Data;+++ #endifF diff --git a/tests/test.c b/tests/test.c deleted file mode 100644 --- a/tests/test.c +++ /dev/null- int main()- {- int var1;- int var2;- int var3;- int var4;- int var5;- int var6;- int var7;- int var8;- int var9;- int var10;- int var11;- int var12;- int var13;- int var14;- int var15;- int var16;- int var17;- int var18;- int var19;- int var20;- int var21;- int var22;- int var23;- int var24;- int var25;- int var26;- int var27;- int var28;- int var29;- int var30;- int var31;- int var32;- int var33;- int var34;- int var35;- int var36;- int var37;- int var38;- int var39;- int var40;- int var41;- int var42;- int var43;- int var44;- int var45;- int var46;- int var47;- int var48;- int var49;- int var50;- int var51;- int var52;- int var53;- int var54;- int var55;- int var56;- int var57;- int var58;- int var59;- int var60;- int var61;- int var62;- int var63;- int var64;- int var65;- int var66;- int var67;- int var68;- int var69;- int var70;- int var71;- int var72;- int var73;- int var74;- int var75;- int var76;- int var77;- int var78;- int var79;- int var80;- int var81;- int var82;- int var83;- int var84;- int var85;- int var86;- int var87;- int var88;- int var89;- int var90;- int var91;- int var92;- int var93;- int var94;- int var95;- int var96;- int var97;- int var98;- int var99;- int var100;- int var101;- int var102;- int var103;- int var104;- int var105;- int var106;- int var107;- int var108;- int var109;- int var110;- int var111;- int var112;- int var113;- int var114;- int var115;- int var116;- int var117;- int var118;- int var119;- int var120;- int var121;- int var122;- int var123;- int var124;- int var125;- int var126;- int var127;- int var128;- int var129;- int var130;- int var131;- int var132;- int var133;- int var134;- int var135;- int var136;- int var137;- int var138;- int var139;- int var140;- int var141;- int var142;- int var143;- int var144;- int var145;- int var146;- int var147;- int var148;- int var149;- int var150;- int var151;- int var152;- int var153;- int var154;- int var155;- int var156;- int var157;- int var158;- int var159;- int var160;- int var161;- int var162;- int var163;- int var164;- int var165;- int var166;- int var167;- int var168;- int var169;- int var170;- int var171;- int var172;- int var173;- int var174;- int var175;- int var176;- int var177;- int var178;- int var179;- int var180;- int var181;- int var182;- int var183;- int var184;- int var185;- int var186;- int var187;- int var188;- int var189;- int var190;- int var191;- int var192;- int var193;- int var194;- int var195;- int var196;- int var197;- int var198;- int var199;- int var200;- int var201;- int var202;- int var203;- int var204;- int var205;- int var206;- int var207;- int var208;- int var209;- int var210;- int var211;- int var212;- int var213;- int var214;- int var215;- int var216;- int var217;- int var218;- int var219;- int var220;- int var221;- int var222;- int var223;- int var224;- int var225;- int var226;- int var227;- int var228;- int var229;- int var230;- int var231;- int var232;- int var233;- int var234;- int var235;- int var236;- int var237;- int var238;- int var239;- int var240;- int var241;- int var242;- int var243;- int var244;- int var245;- int var246;- int var247;- int var248;- int var249;- int var250;- int var251;- int var252;- int var253;- int var254;- int var255;- int var256;- int var257;- int var258;- int var259;- int var260;- int var261;- int var262;- int var263;- int var264;- int var265;- int var266;- int var267;- int var268;- int var269;- int var270;- int var271;- int var272;- int var273;- int var274;- int var275;- int var276;- int var277;- int var278;- int var279;- int var280;- int var281;- int var282;- int var283;- int var284;- int var285;- int var286;- int var287;- int var288;- int var289;- int var290;- int var291;- int var292;- int var293;- int var294;- int var295;- int var296;- int var297;- int var298;- int var299;- int var300;- int var301;- int var302;- int var303;- int var304;- int var305;- int var306;- int var307;- int var308;- int var309;- int var310;- int var311;- int var312;- int var313;- int var314;- int var315;- int var316;- int var317;- int var318;- int var319;- int var320;- int var321;- int var322;- int var323;- int var324;- int var325;- int var326;- int var327;- int var328;- int var329;- int var330;- int var331;- int var332;- int var333;- int var334;- int var335;- int var336;- int var337;- int var338;- int var339;- int var340;- int var341;- int var342;- int var343;- int var344;- int var345;- int var346;- int var347;- int var348;- int var349;- int var350;- int var351;- int var352;- int var353;- int var354;- int var355;- int var356;- int var357;- int var358;- int var359;- int var360;- int var361;- int var362;- int var363;- int var364;- int var365;- int var366;- int var367;- int var368;- int var369;- int var370;- int var371;- int var372;- int var373;- int var374;- int var375;- int var376;- int var377;- int var378;- int var379;- int var380;- int var381;- int var382;- int var383;- int var384;- int var385;- int var386;- int var387;- int var388;- int var389;- int var390;- int var391;- int var392;- int var393;- int var394;- int var395;- int var396;- int var397;- int var398;- int var399;- int var400;- int var401;- int var402;- int var403;- int var404;- int var405;- int var406;- int var407;- int var408;- int var409;- int var410;- int var411;- int var412;- int var413;- int var414;- int var415;- int var416;- int var417;- int var418;- int var419;- int var420;- int var421;- int var422;- int var423;- int var424;- int var425;- int var426;- int var427;- int var428;- int var429;- int var430;- int var431;- int var432;- int var433;- int var434;- int var435;- int var436;- int var437;- int var438;- int var439;- int var440;- int var441;- int var442;- int var443;- int var444;- int var445;- int var446;- int var447;- int var448;- int var449;- int var450;- int var451;- int var452;- int var453;- int var454;- int var455;- int var456;- int var457;- int var458;- int var459;- int var460;- int var461;- int var462;- int var463;- int var464;- int var465;- int var466;- int var467;- int var468;- int var469;- int var470;- int var471;- int var472;- int var473;- int var474;- int var475;- int var476;- int var477;- int var478;- int var479;- int var480;- int var481;- int var482;- int var483;- int var484;- int var485;- int var486;- int var487;- int var488;- int var489;- int var490;- int var491;- int var492;- int var493;- int var494;- int var495;- int var496;- int var497;- int var498;- int var499;- int var500;- int var501;- int var502;- int var503;- int var504;- int var505;- int var506;- int var507;- int var508;- int var509;- int var510;- int var511;- int var512;- int var513;- int var514;- int var515;- int var516;- int var517;- int var518;- int var519;- int var520;- int var521;- int var522;- int var523;- int var524;- int var525;- int var526;- int var527;- int var528;- int var529;- int var530;- int var531;- int var532;- int var533;- int var534;- int var535;- int var536;- int var537;- int var538;- int var539;- int var540;- int var541;- int var542;- int var543;- int var544;- int var545;- int var546;- int var547;- int var548;- int var549;- int var550;- int var551;- int var552;- int var553;- int var554;- int var555;- int var556;- int var557;- int var558;- int var559;- int var560;- int var561;- int var562;- int var563;- int var564;- int var565;- int var566;- int var567;- int var568;- int var569;- int var570;- int var571;- int var572;- int var573;- int var574;- int var575;- int var576;- int var577;- int var578;- int var579;- int var580;- int var581;- int var582;- int var583;- int var584;- int var585;- int var586;- int var587;- int var588;- int var589;- int var590;- int var591;- int var592;- int var593;- int var594;- int var595;- int var596;- int var597;- int var598;- int var599;- int var600;- int var601;- int var602;- int var603;- int var604;- int var605;- int var606;- int var607;- int var608;- int var609;- int var610;- int var611;- int var612;- int var613;- int var614;- int var615;- int var616;- int var617;- int var618;- int var619;- int var620;- int var621;- int var622;- int var623;- int var624;- int var625;- int var626;- int var627;- int var628;- int var629;- int var630;- int var631;- int var632;- int var633;- int var634;- int var635;- int var636;- int var637;- int var638;- int var639;- int var640;- int var641;- int var642;- int var643;- int var644;- int var645;- int var646;- int var647;- int var648;- int var649;- int var650;- int var651;- int var652;- int var653;- int var654;- int var655;- int var656;- int var657;- int var658;- int var659;- int var660;- int var661;- int var662;- int var663;- int var664;- int var665;- int var666;- int var667;- int var668;- int var669;- int var670;- int var671;- int var672;- int var673;- int var674;- int var675;- int var676;- int var677;- int var678;- int var679;- int var680;- int var681;- int var682;- int var683;- int var684;- int var685;- int var686;- int var687;- int var688;- int var689;- int var690;- int var691;- int var692;- int var693;- int var694;- int var695;- int var696;- int var697;- int var698;- int var699;- int var700;- int var701;- int var702;- int var703;- int var704;- int var705;- int var706;- int var707;- int var708;- int var709;- int var710;- int var711;- int var712;- int var713;- int var714;- int var715;- int var716;- int var717;- int var718;- int var719;- int var720;- int var721;- int var722;- int var723;- int var724;- int var725;- int var726;- int var727;- int var728;- int var729;- int var730;- int var731;- int var732;- int var733;- int var734;- int var735;- int var736;- int var737;- int var738;- int var739;- int var740;- int var741;- int var742;- int var743;- int var744;- int var745;- int var746;- int var747;- int var748;- int var749;- int var750;- int var751;- int var752;- int var753;- int var754;- int var755;- int var756;- int var757;- int var758;- int var759;- int var760;- int var761;- int var762;- int var763;- int var764;- int var765;- int var766;- int var767;- int var768;- int var769;- int var770;- int var771;- int var772;- int var773;- int var774;- int var775;- int var776;- int var777;- int var778;- int var779;- int var780;- int var781;- int var782;- int var783;- int var784;- int var785;- int var786;- int var787;- int var788;- int var789;- int var790;- int var791;- int var792;- int var793;- int var794;- int var795;- int var796;- int var797;- int var798;- int var799;- int var800;- int var801;- int var802;- int var803;- int var804;- int var805;- int var806;- int var807;- int var808;- int var809;- int var810;- int var811;- int var812;- int var813;- int var814;- int var815;- int var816;- int var817;- int var818;- int var819;- int var820;- int var821;- int var822;- int var823;- int var824;- int var825;- int var826;- int var827;- int var828;- int var829;- int var830;- int var831;- int var832;- int var833;- int var834;- int var835;- int var836;- int var837;- int var838;- int var839;- int var840;- int var841;- int var842;- int var843;- int var844;- int var845;- int var846;- int var847;- int var848;- int var849;- int var850;- int var851;- int var852;- int var853;- int var854;- int var855;- int var856;- int var857;- int var858;- int var859;- int var860;- int var861;- int var862;- int var863;- int var864;- int var865;- int var866;- int var867;- int var868;- int var869;- int var870;- int var871;- int var872;- int var873;- int var874;- int var875;- int var876;- int var877;- int var878;- int var879;- int var880;- int var881;- int var882;- int var883;- int var884;- int var885;- int var886;- int var887;- int var888;- int var889;- int var890;- int var891;- int var892;- int var893;- int var894;- int var895;- int var896;- int var897;- int var898;- int var899;- int var900;- int var901;- int var902;- int var903;- int var904;- int var905;- int var906;- int var907;- int var908;- int var909;- int var910;- int var911;- int var912;- int var913;- int var914;- int var915;- int var916;- int var917;- int var918;- int var919;- int var920;- int var921;- int var922;- int var923;- int var924;- int var925;- int var926;- int var927;- int var928;- int var929;- int var930;- int var931;- int var932;- int var933;- int var934;- int var935;- int var936;- int var937;- int var938;- int var939;- int var940;- int var941;- int var942;- int var943;- int var944;- int var945;- int var946;- int var947;- int var948;- int var949;- int var950;- int var951;- int var952;- int var953;- int var954;- int var955;- int var956;- int var957;- int var958;- int var959;- int var960;- int var961;- int var962;- int var963;- int var964;- int var965;- int var966;- int var967;- int var968;- int var969;- int var970;- int var971;- int var972;- int var973;- int var974;- int var975;- int var976;- int var977;- int var978;- int var979;- int var980;- int var981;- int var982;- int var983;- int var984;- int var985;- int var986;- int var987;- int var988;- int var989;- int var990;- int var991;- int var992;- int var993;- int var994;- int var995;- int var996;- int var997;- int var998;- int var999;- int var1000;- int var1001;- int var1002;- int var1003;- int var1004;- int var1005;- int var1006;- int var1007;- int var1008;- int var1009;- int var1010;- int var1011;- int var1012;- int var1013;- int var1014;- int var1015;- int var1016;- int var1017;- int var1018;- int var1019;- int var1020;- int var1021;- int var1022;- int var1023;- int var1024;- int var1025;- int var1026;- int var1027;- int var1028;- int var1029;- int var1030;- int var1031;- int var1032;- int var1033;- int var1034;- int var1035;- int var1036;- int var1037;- int var1038;- int var1039;- int var1040;- int var1041;- int var1042;- int var1043;- int var1044;- int var1045;- int var1046;- int var1047;- int var1048;- int var1049;- int var1050;- int var1051;- int var1052;- int var1053;- int var1054;- int var1055;- int var1056;- int var1057;- int var1058;- int var1059;- int var1060;- int var1061;- int var1062;- int var1063;- int var1064;- int var1065;- int var1066;- int var1067;- int var1068;- int var1069;- int var1070;- int var1071;- int var1072;- int var1073;- int var1074;- int var1075;- int var1076;- int var1077;- int var1078;- int var1079;- int var1080;- int var1081;- int var1082;- int var1083;- int var1084;- int var1085;- int var1086;- int var1087;- int var1088;- int var1089;- int var1090;- int var1091;- int var1092;- int var1093;- int var1094;- int var1095;- int var1096;- int var1097;- int var1098;- int var1099;- int var1100;- int var1101;- int var1102;- int var1103;- int var1104;- int var1105;- int var1106;- int var1107;- int var1108;- int var1109;- int var1110;- int var1111;- int var1112;- int var1113;- int var1114;- int var1115;- int var1116;- int var1117;- int var1118;- int var1119;- int var1120;- int var1121;- int var1122;- int var1123;- int var1124;- int var1125;- int var1126;- int var1127;- int var1128;- int var1129;- int var1130;- int var1131;- int var1132;- int var1133;- int var1134;- int var1135;- int var1136;- int var1137;- int var1138;- int var1139;- int var1140;- int var1141;- int var1142;- int var1143;- int var1144;- int var1145;- int var1146;- int var1147;- int var1148;- int var1149;- int var1150;- int var1151;- int var1152;- int var1153;- int var1154;- int var1155;- int var1156;- int var1157;- int var1158;- int var1159;- int var1160;- int var1161;- int var1162;- int var1163;- int var1164;- int var1165;- int var1166;- int var1167;- int var1168;- int var1169;- int var1170;- int var1171;- int var1172;- int var1173;- int var1174;- int var1175;- int var1176;- int var1177;- int var1178;- int var1179;- int var1180;- int var1181;- int var1182;- int var1183;- int var1184;- int var1185;- int var1186;- int var1187;- int var1188;- int var1189;- int var1190;- int var1191;- int var1192;- int var1193;- int var1194;- int var1195;- int var1196;- int var1197;- int var1198;- int var1199;- int var1200;- int var1201;- int var1202;- int var1203;- int var1204;- int var1205;- int var1206;- int var1207;- int var1208;- int var1209;- int var1210;- int var1211;- int var1212;- int var1213;- int var1214;- int var1215;- int var1216;- int var1217;- int var1218;- int var1219;- int var1220;- int var1221;- int var1222;- int var1223;- int var1224;- int var1225;- int var1226;- int var1227;- int var1228;- int var1229;- int var1230;- int var1231;- int var1232;- int var1233;- int var1234;- int var1235;- int var1236;- int var1237;- int var1238;- int var1239;- int var1240;- int var1241;- int var1242;- int var1243;- int var1244;- int var1245;- int var1246;- int var1247;- int var1248;- int var1249;- int var1250;- int var1251;- int var1252;- int var1253;- int var1254;- int var1255;- int var1256;- int var1257;- int var1258;- int var1259;- int var1260;- int var1261;- int var1262;- int var1263;- int var1264;- int var1265;- int var1266;- int var1267;- int var1268;- int var1269;- int var1270;- int var1271;- int var1272;- int var1273;- int var1274;- int var1275;- int var1276;- int var1277;- int var1278;- int var1279;- int var1280;- int var1281;- int var1282;- int var1283;- int var1284;- int var1285;- int var1286;- int var1287;- int var1288;- int var1289;- int var1290;- int var1291;- int var1292;- int var1293;- int var1294;- int var1295;- int var1296;- int var1297;- int var1298;- int var1299;- int var1300;- int var1301;- int var1302;- int var1303;- int var1304;- int var1305;- int var1306;- int var1307;- int var1308;- int var1309;- int var1310;- int var1311;- int var1312;- int var1313;- int var1314;- int var1315;- int var1316;- int var1317;- int var1318;- int var1319;- int var1320;- int var1321;- int var1322;- int var1323;- int var1324;- int var1325;- int var1326;- int var1327;- int var1328;- int var1329;- int var1330;- int var1331;- int var1332;- int var1333;- int var1334;- int var1335;- int var1336;- int var1337;- int var1338;- int var1339;- int var1340;- int var1341;- int var1342;- int var1343;- int var1344;- int var1345;- int var1346;- int var1347;- int var1348;- int var1349;- int var1350;- int var1351;- int var1352;- int var1353;- int var1354;- int var1355;- int var1356;- int var1357;- int var1358;- int var1359;- int var1360;- int var1361;- int var1362;- int var1363;- int var1364;- int var1365;- int var1366;- int var1367;- int var1368;- int var1369;- int var1370;- int var1371;- int var1372;- int var1373;- int var1374;- int var1375;- int var1376;- int var1377;- int var1378;- int var1379;- int var1380;- int var1381;- int var1382;- int var1383;- int var1384;- int var1385;- int var1386;- int var1387;- int var1388;- int var1389;- int var1390;- int var1391;- int var1392;- int var1393;- int var1394;- int var1395;- int var1396;- int var1397;- int var1398;- int var1399;- int var1400;- int var1401;- int var1402;- int var1403;- int var1404;- int var1405;- int var1406;- int var1407;- int var1408;- int var1409;- int var1410;- int var1411;- int var1412;- int var1413;- int var1414;- int var1415;- int var1416;- int var1417;- int var1418;- int var1419;- int var1420;- int var1421;- int var1422;- int var1423;- int var1424;- int var1425;- int var1426;- int var1427;- int var1428;- int var1429;- int var1430;- int var1431;- int var1432;- int var1433;- int var1434;- int var1435;- int var1436;- int var1437;- int var1438;- int var1439;- int var1440;- int var1441;- int var1442;- int var1443;- int var1444;- int var1445;- int var1446;- int var1447;- int var1448;- int var1449;- int var1450;- int var1451;- int var1452;- int var1453;- int var1454;- int var1455;- int var1456;- int var1457;- int var1458;- int var1459;- int var1460;- int var1461;- int var1462;- int var1463;- int var1464;- int var1465;- int var1466;- int var1467;- int var1468;- int var1469;- int var1470;- int var1471;- int var1472;- int var1473;- int var1474;- int var1475;- int var1476;- int var1477;- int var1478;- int var1479;- int var1480;- int var1481;- int var1482;- int var1483;- int var1484;- int var1485;- int var1486;- int var1487;- int var1488;- int var1489;- int var1490;- int var1491;- int var1492;- int var1493;- int var1494;- int var1495;- int var1496;- int var1497;- int var1498;- int var1499;- int var1500;- int var1501;- int var1502;- int var1503;- int var1504;- int var1505;- int var1506;- int var1507;- int var1508;- int var1509;- int var1510;- int var1511;- int var1512;- int var1513;- int var1514;- int var1515;- int var1516;- int var1517;- int var1518;- int var1519;- int var1520;- int var1521;- int var1522;- int var1523;- int var1524;- int var1525;- int var1526;- int var1527;- int var1528;- int var1529;- int var1530;- int var1531;- int var1532;- int var1533;- int var1534;- int var1535;- int var1536;- int var1537;- int var1538;- int var1539;- int var1540;- int var1541;- int var1542;- int var1543;- int var1544;- int var1545;- int var1546;- int var1547;- int var1548;- int var1549;- int var1550;- int var1551;- int var1552;- int var1553;- int var1554;- int var1555;- int var1556;- int var1557;- int var1558;- int var1559;- int var1560;- int var1561;- int var1562;- int var1563;- int var1564;- int var1565;- int var1566;- int var1567;- int var1568;- int var1569;- int var1570;- int var1571;- int var1572;- int var1573;- int var1574;- int var1575;- int var1576;- int var1577;- int var1578;- int var1579;- int var1580;- int var1581;- int var1582;- int var1583;- int var1584;- int var1585;- int var1586;- int var1587;- int var1588;- int var1589;- int var1590;- int var1591;- int var1592;- int var1593;- int var1594;- int var1595;- int var1596;- int var1597;- int var1598;- int var1599;- int var1600;- int var1601;- int var1602;- int var1603;- int var1604;- int var1605;- int var1606;- int var1607;- int var1608;- int var1609;- int var1610;- int var1611;- int var1612;- int var1613;- int var1614;- int var1615;- int var1616;- int var1617;- int var1618;- int var1619;- int var1620;- int var1621;- int var1622;- int var1623;- int var1624;- int var1625;- int var1626;- int var1627;- int var1628;- int var1629;- int var1630;- int var1631;- int var1632;- int var1633;- int var1634;- int var1635;- int var1636;- int var1637;- int var1638;- int var1639;- int var1640;- int var1641;- int var1642;- int var1643;- int var1644;- int var1645;- int var1646;- int var1647;- int var1648;- int var1649;- int var1650;- int var1651;- int var1652;- int var1653;- int var1654;- int var1655;- int var1656;- int var1657;- int var1658;- int var1659;- int var1660;- int var1661;- int var1662;- int var1663;- int var1664;- int var1665;- int var1666;- int var1667;- int var1668;- int var1669;- int var1670;- int var1671;- int var1672;- int var1673;- int var1674;- int var1675;- int var1676;- int var1677;- int var1678;- int var1679;- int var1680;- int var1681;- int var1682;- int var1683;- int var1684;- int var1685;- int var1686;- int var1687;- int var1688;- int var1689;- int var1690;- int var1691;- int var1692;- int var1693;- int var1694;- int var1695;- int var1696;- int var1697;- int var1698;- int var1699;- int var1700;- int var1701;- int var1702;- int var1703;- int var1704;- int var1705;- int var1706;- int var1707;- int var1708;- int var1709;- int var1710;- int var1711;- int var1712;- int var1713;- int var1714;- int var1715;- int var1716;- int var1717;- int var1718;- int var1719;- int var1720;- int var1721;- int var1722;- int var1723;- int var1724;- int var1725;- int var1726;- int var1727;- int var1728;- int var1729;- int var1730;- int var1731;- int var1732;- int var1733;- int var1734;- int var1735;- int var1736;- int var1737;- int var1738;- int var1739;- int var1740;- int var1741;- int var1742;- int var1743;- int var1744;- int var1745;- int var1746;- int var1747;- int var1748;- int var1749;- int var1750;- int var1751;- int var1752;- int var1753;- int var1754;- int var1755;- int var1756;- int var1757;- int var1758;- int var1759;- int var1760;- int var1761;- int var1762;- int var1763;- int var1764;- int var1765;- int var1766;- int var1767;- int var1768;- int var1769;- int var1770;- int var1771;- int var1772;- int var1773;- int var1774;- int var1775;- int var1776;- int var1777;- int var1778;- int var1779;- int var1780;- int var1781;- int var1782;- int var1783;- int var1784;- int var1785;- int var1786;- int var1787;- int var1788;- int var1789;- int var1790;- int var1791;- int var1792;- int var1793;- int var1794;- int var1795;- int var1796;- int var1797;- int var1798;- int var1799;- int var1800;- int var1801;- int var1802;- int var1803;- int var1804;- int var1805;- int var1806;- int var1807;- int var1808;- int var1809;- int var1810;- int var1811;- int var1812;- int var1813;- int var1814;- int var1815;- int var1816;- int var1817;- int var1818;- int var1819;- int var1820;- int var1821;- int var1822;- int var1823;- int var1824;- int var1825;- int var1826;- int var1827;- int var1828;- int var1829;- int var1830;- int var1831;- int var1832;- int var1833;- int var1834;- int var1835;- int var1836;- int var1837;- int var1838;- int var1839;- int var1840;- int var1841;- int var1842;- int var1843;- int var1844;- int var1845;- int var1846;- int var1847;- int var1848;- int var1849;- int var1850;- int var1851;- int var1852;- int var1853;- int var1854;- int var1855;- int var1856;- int var1857;- int var1858;- int var1859;- int var1860;- int var1861;- int var1862;- int var1863;- int var1864;- int var1865;- int var1866;- int var1867;- int var1868;- int var1869;- int var1870;- int var1871;- int var1872;- int var1873;- int var1874;- int var1875;- int var1876;- int var1877;- int var1878;- int var1879;- int var1880;- int var1881;- int var1882;- int var1883;- int var1884;- int var1885;- int var1886;- int var1887;- int var1888;- int var1889;- int var1890;- int var1891;- int var1892;- int var1893;- int var1894;- int var1895;- int var1896;- int var1897;- int var1898;- int var1899;- int var1900;- int var1901;- int var1902;- int var1903;- int var1904;- int var1905;- int var1906;- int var1907;- int var1908;- int var1909;- int var1910;- int var1911;- int var1912;- int var1913;- int var1914;- int var1915;- int var1916;- int var1917;- int var1918;- int var1919;- int var1920;- int var1921;- int var1922;- int var1923;- int var1924;- int var1925;- int var1926;- int var1927;- int var1928;- int var1929;- int var1930;- int var1931;- int var1932;- int var1933;- int var1934;- int var1935;- int var1936;- int var1937;- int var1938;- int var1939;- int var1940;- int var1941;- int var1942;- int var1943;- int var1944;- int var1945;- int var1946;- int var1947;- int var1948;- int var1949;- int var1950;- int var1951;- int var1952;- int var1953;- int var1954;- int var1955;- int var1956;- int var1957;- int var1958;- int var1959;- int var1960;- int var1961;- int var1962;- int var1963;- int var1964;- int var1965;- int var1966;- int var1967;- int var1968;- int var1969;- int var1970;- int var1971;- int var1972;- int var1973;- int var1974;- int var1975;- int var1976;- int var1977;- int var1978;- int var1979;- int var1980;- int var1981;- int var1982;- int var1983;- int var1984;- int var1985;- int var1986;- int var1987;- int var1988;- int var1989;- int var1990;- int var1991;- int var1992;- int var1993;- int var1994;- int var1995;- int var1996;- int var1997;- int var1998;- int var1999;- int var2000;- int var2001;- int var2002;- int var2003;- int var2004;- int var2005;- int var2006;- int var2007;- int var2008;- int var2009;- int var2010;- int var2011;- int var2012;- int var2013;- int var2014;- int var2015;- int var2016;- int var2017;- int var2018;- int var2019;- int var2020;- int var2021;- int var2022;- int var2023;- int var2024;- int var2025;- int var2026;- int var2027;- int var2028;- int var2029;- int var2030;- int var2031;- int var2032;- int var2033;- int var2034;- int var2035;- int var2036;- int var2037;- int var2038;- int var2039;- int var2040;- int var2041;- int var2042;- int var2043;- int var2044;- int var2045;- int var2046;- int var2047;- int var2048;- int var2049;- int var2050;- int var2051;- int var2052;- int var2053;- int var2054;- int var2055;- int var2056;- int var2057;- int var2058;- int var2059;- int var2060;- int var2061;- int var2062;- int var2063;- int var2064;- int var2065;- int var2066;- int var2067;- int var2068;- int var2069;- int var2070;- int var2071;- int var2072;- int var2073;- int var2074;- int var2075;- int var2076;- int var2077;- int var2078;- int var2079;- int var2080;- int var2081;- int var2082;- int var2083;- int var2084;- int var2085;- int var2086;- int var2087;- int var2088;- int var2089;- int var2090;- int var2091;- int var2092;- int var2093;- int var2094;- int var2095;- int var2096;- int var2097;- int var2098;- int var2099;- int var2100;- int var2101;- int var2102;- int var2103;- int var2104;- int var2105;- int var2106;- int var2107;- int var2108;- int var2109;- int var2110;- int var2111;- int var2112;- int var2113;- int var2114;- int var2115;- int var2116;- int var2117;- int var2118;- int var2119;- int var2120;- int var2121;- int var2122;- int var2123;- int var2124;- int var2125;- int var2126;- int var2127;- int var2128;- int var2129;- int var2130;- int var2131;- int var2132;- int var2133;- int var2134;- int var2135;- int var2136;- int var2137;- int var2138;- int var2139;- int var2140;- int var2141;- int var2142;- int var2143;- int var2144;- int var2145;- int var2146;- int var2147;- int var2148;- int var2149;- int var2150;- int var2151;- int var2152;- int var2153;- int var2154;- int var2155;- int var2156;- int var2157;- int var2158;- int var2159;- int var2160;- int var2161;- int var2162;- int var2163;- int var2164;- int var2165;- int var2166;- int var2167;- int var2168;- int var2169;- int var2170;- int var2171;- int var2172;- int var2173;- int var2174;- int var2175;- int var2176;- int var2177;- int var2178;- int var2179;- int var2180;- int var2181;- int var2182;- int var2183;- int var2184;- int var2185;- int var2186;- int var2187;- int var2188;- int var2189;- int var2190;- int var2191;- int var2192;- int var2193;- int var2194;- int var2195;- int var2196;- int var2197;- int var2198;- int var2199;- int var2200;- int var2201;- int var2202;- int var2203;- int var2204;- int var2205;- int var2206;- int var2207;- int var2208;- int var2209;- int var2210;- int var2211;- int var2212;- int var2213;- int var2214;- int var2215;- int var2216;- int var2217;- int var2218;- int var2219;- int var2220;- int var2221;- int var2222;- int var2223;- int var2224;- int var2225;- int var2226;- int var2227;- int var2228;- int var2229;- int var2230;- int var2231;- int var2232;- int var2233;- int var2234;- int var2235;- int var2236;- int var2237;- int var2238;- int var2239;- int var2240;- int var2241;- int var2242;- int var2243;- int var2244;- int var2245;- int var2246;- int var2247;- int var2248;- int var2249;- int var2250;- int var2251;- int var2252;- int var2253;- int var2254;- int var2255;- int var2256;- int var2257;- int var2258;- int var2259;- int var2260;- int var2261;- int var2262;- int var2263;- int var2264;- int var2265;- int var2266;- int var2267;- int var2268;- int var2269;- int var2270;- int var2271;- int var2272;- int var2273;- int var2274;- int var2275;- int var2276;- int var2277;- int var2278;- int var2279;- int var2280;- int var2281;- int var2282;- int var2283;- int var2284;- int var2285;- int var2286;- int var2287;- int var2288;- int var2289;- int var2290;- int var2291;- int var2292;- int var2293;- int var2294;- int var2295;- int var2296;- int var2297;- int var2298;- int var2299;- int var2300;- int var2301;- int var2302;- int var2303;- int var2304;- int var2305;- int var2306;- int var2307;- int var2308;- int var2309;- int var2310;- int var2311;- int var2312;- int var2313;- int var2314;- int var2315;- int var2316;- int var2317;- int var2318;- int var2319;- int var2320;- int var2321;- int var2322;- int var2323;- int var2324;- int var2325;- int var2326;- int var2327;- int var2328;- int var2329;- int var2330;- int var2331;- int var2332;- int var2333;- int var2334;- int var2335;- int var2336;- int var2337;- int var2338;- int var2339;- int var2340;- int var2341;- int var2342;- int var2343;- int var2344;- int var2345;- int var2346;- int var2347;- int var2348;- int var2349;- int var2350;- int var2351;- int var2352;- int var2353;- int var2354;- int var2355;- int var2356;- int var2357;- int var2358;- int var2359;- int var2360;- int var2361;- int var2362;- int var2363;- int var2364;- int var2365;- int var2366;- int var2367;- int var2368;- int var2369;- int var2370;- int var2371;- int var2372;- int var2373;- int var2374;- int var2375;- int var2376;- int var2377;- int var2378;- int var2379;- int var2380;- int var2381;- int var2382;- int var2383;- int var2384;- int var2385;- int var2386;- int var2387;- int var2388;- int var2389;- int var2390;- int var2391;- int var2392;- int var2393;- int var2394;- int var2395;- int var2396;- int var2397;- int var2398;- int var2399;- int var2400;- int var2401;- int var2402;- int var2403;- int var2404;- int var2405;- int var2406;- int var2407;- int var2408;- int var2409;- int var2410;- int var2411;- int var2412;- int var2413;- int var2414;- int var2415;- int var2416;- int var2417;- int var2418;- int var2419;- int var2420;- int var2421;- int var2422;- int var2423;- int var2424;- int var2425;- int var2426;- int var2427;- int var2428;- int var2429;- int var2430;- int var2431;- int var2432;- int var2433;- int var2434;- int var2435;- int var2436;- int var2437;- int var2438;- int var2439;- int var2440;- int var2441;- int var2442;- int var2443;- int var2444;- int var2445;- int var2446;- int var2447;- int var2448;- int var2449;- int var2450;- int var2451;- int var2452;- int var2453;- int var2454;- int var2455;- int var2456;- int var2457;- int var2458;- int var2459;- int var2460;- int var2461;- int var2462;- int var2463;- int var2464;- int var2465;- int var2466;- int var2467;- int var2468;- int var2469;- int var2470;- int var2471;- int var2472;- int var2473;- int var2474;- int var2475;- int var2476;- int var2477;- int var2478;- int var2479;- int var2480;- int var2481;- int var2482;- int var2483;- int var2484;- int var2485;- int var2486;- int var2487;- int var2488;- int var2489;- int var2490;- int var2491;- int var2492;- int var2493;- int var2494;- int var2495;- int var2496;- int var2497;- int var2498;- int var2499;- int var2500;- int var2501;- int var2502;- int var2503;- int var2504;- int var2505;- int var2506;- int var2507;- int var2508;- int var2509;- int var2510;- int var2511;- int var2512;- int var2513;- int var2514;- int var2515;- int var2516;- int var2517;- int var2518;- int var2519;- int var2520;- int var2521;- int var2522;- int var2523;- int var2524;- int var2525;- int var2526;- int var2527;- int var2528;- int var2529;- int var2530;- int var2531;- int var2532;- int var2533;- int var2534;- int var2535;- int var2536;- int var2537;- int var2538;- int var2539;- int var2540;- int var2541;- int var2542;- int var2543;- int var2544;- int var2545;- int var2546;- int var2547;- int var2548;- int var2549;- int var2550;- int var2551;- int var2552;- int var2553;- int var2554;- int var2555;- int var2556;- int var2557;- int var2558;- int var2559;- int var2560;- int var2561;- int var2562;- int var2563;- int var2564;- int var2565;- int var2566;- int var2567;- int var2568;- int var2569;- int var2570;- int var2571;- int var2572;- int var2573;- int var2574;- int var2575;- int var2576;- int var2577;- int var2578;- int var2579;- int var2580;- int var2581;- int var2582;- int var2583;- int var2584;- int var2585;- int var2586;- int var2587;- int var2588;- int var2589;- int var2590;- int var2591;- int var2592;- int var2593;- int var2594;- int var2595;- int var2596;- int var2597;- int var2598;- int var2599;- int var2600;- int var2601;- int var2602;- int var2603;- int var2604;- int var2605;- int var2606;- int var2607;- int var2608;- int var2609;- int var2610;- int var2611;- int var2612;- int var2613;- int var2614;- int var2615;- int var2616;- int var2617;- int var2618;- int var2619;- int var2620;- int var2621;- int var2622;- int var2623;- int var2624;- int var2625;- int var2626;- int var2627;- int var2628;- int var2629;- int var2630;- int var2631;- int var2632;- int var2633;- int var2634;- int var2635;- int var2636;- int var2637;- int var2638;- int var2639;- int var2640;- int var2641;- int var2642;- int var2643;- int var2644;- int var2645;- int var2646;- int var2647;- int var2648;- int var2649;- int var2650;- int var2651;- int var2652;- int var2653;- int var2654;- int var2655;- int var2656;- int var2657;- int var2658;- int var2659;- int var2660;- int var2661;- int var2662;- int var2663;- int var2664;- int var2665;- int var2666;- int var2667;- int var2668;- int var2669;- int var2670;- int var2671;- int var2672;- int var2673;- int var2674;- int var2675;- int var2676;- int var2677;- int var2678;- int var2679;- int var2680;- int var2681;- int var2682;- int var2683;- int var2684;- int var2685;- int var2686;- int var2687;- int var2688;- int var2689;- int var2690;- int var2691;- int var2692;- int var2693;- int var2694;- int var2695;- int var2696;- int var2697;- int var2698;- int var2699;- int var2700;- int var2701;- int var2702;- int var2703;- int var2704;- int var2705;- int var2706;- int var2707;- int var2708;- int var2709;- int var2710;- int var2711;- int var2712;- int var2713;- int var2714;- int var2715;- int var2716;- int var2717;- int var2718;- int var2719;- int var2720;- int var2721;- int var2722;- int var2723;- int var2724;- int var2725;- int var2726;- int var2727;- int var2728;- int var2729;- int var2730;- int var2731;- int var2732;- int var2733;- int var2734;- int var2735;- int var2736;- int var2737;- int var2738;- int var2739;- int var2740;- int var2741;- int var2742;- int var2743;- int var2744;- int var2745;- int var2746;- int var2747;- int var2748;- int var2749;- int var2750;- int var2751;- int var2752;- int var2753;- int var2754;- int var2755;- int var2756;- int var2757;- int var2758;- int var2759;- int var2760;- int var2761;- int var2762;- int var2763;- int var2764;- int var2765;- int var2766;- int var2767;- int var2768;- int var2769;- int var2770;- int var2771;- int var2772;- int var2773;- int var2774;- int var2775;- int var2776;- int var2777;- int var2778;- int var2779;- int var2780;- int var2781;- int var2782;- int var2783;- int var2784;- int var2785;- int var2786;- int var2787;- int var2788;- int var2789;- int var2790;- int var2791;- int var2792;- int var2793;- int var2794;- int var2795;- int var2796;- int var2797;- int var2798;- int var2799;- int var2800;- int var2801;- int var2802;- int var2803;- int var2804;- int var2805;- int var2806;- int var2807;- int var2808;- int var2809;- int var2810;- int var2811;- int var2812;- int var2813;- int var2814;- int var2815;- int var2816;- int var2817;- int var2818;- int var2819;- int var2820;- int var2821;- int var2822;- int var2823;- int var2824;- int var2825;- int var2826;- int var2827;- int var2828;- int var2829;- int var2830;- int var2831;- int var2832;- int var2833;- int var2834;- int var2835;- int var2836;- int var2837;- int var2838;- int var2839;- int var2840;- int var2841;- int var2842;- int var2843;- int var2844;- int var2845;- int var2846;- int var2847;- int var2848;- int var2849;- int var2850;- int var2851;- int var2852;- int var2853;- int var2854;- int var2855;- int var2856;- int var2857;- int var2858;- int var2859;- int var2860;- int var2861;- int var2862;- int var2863;- int var2864;- int var2865;- int var2866;- int var2867;- int var2868;- int var2869;- int var2870;- int var2871;- int var2872;- int var2873;- int var2874;- int var2875;- int var2876;- int var2877;- int var2878;- int var2879;- int var2880;- int var2881;- int var2882;- int var2883;- int var2884;- int var2885;- int var2886;- int var2887;- int var2888;- int var2889;- int var2890;- int var2891;- int var2892;- int var2893;- int var2894;- int var2895;- int var2896;- int var2897;- int var2898;- int var2899;- int var2900;- int var2901;- int var2902;- int var2903;- int var2904;- int var2905;- int var2906;- int var2907;- int var2908;- int var2909;- int var2910;- int var2911;- int var2912;- int var2913;- int var2914;- int var2915;- int var2916;- int var2917;- int var2918;- int var2919;- int var2920;- int var2921;- int var2922;- int var2923;- int var2924;- int var2925;- int var2926;- int var2927;- int var2928;- int var2929;- int var2930;- int var2931;- int var2932;- int var2933;- int var2934;- int var2935;- int var2936;- int var2937;- int var2938;- int var2939;- int var2940;- int var2941;- int var2942;- int var2943;- int var2944;- int var2945;- int var2946;- int var2947;- int var2948;- int var2949;- int var2950;- int var2951;- int var2952;- int var2953;- int var2954;- int var2955;- int var2956;- int var2957;- int var2958;- int var2959;- int var2960;- int var2961;- int var2962;- int var2963;- int var2964;- int var2965;- int var2966;- int var2967;- int var2968;- int var2969;- int var2970;- int var2971;- int var2972;- int var2973;- int var2974;- int var2975;- int var2976;- int var2977;- int var2978;- int var2979;- int var2980;- int var2981;- int var2982;- int var2983;- int var2984;- int var2985;- int var2986;- int var2987;- int var2988;- int var2989;- int var2990;- int var2991;- int var2992;- int var2993;- int var2994;- int var2995;- int var2996;- int var2997;- int var2998;- int var2999;- int var3000;- int var3001;- int var3002;- int var3003;- int var3004;- int var3005;- int var3006;- int var3007;- int var3008;- int var3009;- int var3010;- int var3011;- int var3012;- int var3013;- int var3014;- int var3015;- int var3016;- int var3017;- int var3018;- int var3019;- int var3020;- int var3021;- int var3022;- int var3023;- int var3024;- int var3025;- int var3026;- int var3027;- int var3028;- int var3029;- int var3030;- int var3031;- int var3032;- int var3033;- int var3034;- int var3035;- int var3036;- int var3037;- int var3038;- int var3039;- int var3040;- int var3041;- int var3042;- int var3043;- int var3044;- int var3045;- int var3046;- int var3047;- int var3048;- int var3049;- int var3050;- int var3051;- int var3052;- int var3053;- int var3054;- int var3055;- int var3056;- int var3057;- int var3058;- int var3059;- int var3060;- int var3061;- int var3062;- int var3063;- int var3064;- int var3065;- int var3066;- int var3067;- int var3068;- int var3069;- int var3070;- int var3071;- int var3072;- int var3073;- int var3074;- int var3075;- int var3076;- int var3077;- int var3078;- int var3079;- int var3080;- int var3081;- int var3082;- int var3083;- int var3084;- int var3085;- int var3086;- int var3087;- int var3088;- int var3089;- int var3090;- int var3091;- int var3092;- int var3093;- int var3094;- int var3095;- int var3096;- int var3097;- int var3098;- int var3099;- int var3100;- int var3101;- int var3102;- int var3103;- int var3104;- int var3105;- int var3106;- int var3107;- int var3108;- int var3109;- int var3110;- int var3111;- int var3112;- int var3113;- int var3114;- int var3115;- int var3116;- int var3117;- int var3118;- int var3119;- int var3120;- int var3121;- int var3122;- int var3123;- int var3124;- int var3125;- int var3126;- int var3127;- int var3128;- int var3129;- int var3130;- int var3131;- int var3132;- int var3133;- int var3134;- int var3135;- int var3136;- int var3137;- int var3138;- int var3139;- int var3140;- int var3141;- int var3142;- int var3143;- int var3144;- int var3145;- int var3146;- int var3147;- int var3148;- int var3149;- int var3150;- int var3151;- int var3152;- int var3153;- int var3154;- int var3155;- int var3156;- int var3157;- int var3158;- int var3159;- int var3160;- int var3161;- int var3162;- int var3163;- int var3164;- int var3165;- int var3166;- int var3167;- int var3168;- int var3169;- int var3170;- int var3171;- int var3172;- int var3173;- int var3174;- int var3175;- int var3176;- int var3177;- int var3178;- int var3179;- int var3180;- int var3181;- int var3182;- int var3183;- int var3184;- int var3185;- int var3186;- int var3187;- int var3188;- int var3189;- int var3190;- int var3191;- int var3192;- int var3193;- int var3194;- int var3195;- int var3196;- int var3197;- int var3198;- int var3199;- int var3200;- int var3201;- int var3202;- int var3203;- int var3204;- int var3205;- int var3206;- int var3207;- int var3208;- int var3209;- int var3210;- int var3211;- int var3212;- int var3213;- int var3214;- int var3215;- int var3216;- int var3217;- int var3218;- int var3219;- int var3220;- int var3221;- int var3222;- int var3223;- int var3224;- int var3225;- int var3226;- int var3227;- int var3228;- int var3229;- int var3230;- int var3231;- int var3232;- int var3233;- int var3234;- int var3235;- int var3236;- int var3237;- int var3238;- int var3239;- int var3240;- int var3241;- int var3242;- int var3243;- int var3244;- int var3245;- int var3246;- int var3247;- int var3248;- int var3249;- int var3250;- int var3251;- int var3252;- int var3253;- int var3254;- int var3255;- int var3256;- int var3257;- int var3258;- int var3259;- int var3260;- int var3261;- int var3262;- int var3263;- int var3264;- int var3265;- int var3266;- int var3267;- int var3268;- int var3269;- int var3270;- int var3271;- int var3272;- int var3273;- int var3274;- int var3275;- int var3276;- int var3277;- int var3278;- int var3279;- int var3280;- int var3281;- int var3282;- int var3283;- int var3284;- int var3285;- int var3286;- int var3287;- int var3288;- int var3289;- int var3290;- int var3291;- int var3292;- int var3293;- int var3294;- int var3295;- int var3296;- int var3297;- int var3298;- int var3299;- int var3300;- int var3301;- int var3302;- int var3303;- int var3304;- int var3305;- int var3306;- int var3307;- int var3308;- int var3309;- int var3310;- int var3311;- int var3312;- int var3313;- int var3314;- int var3315;- int var3316;- int var3317;- int var3318;- int var3319;- int var3320;- int var3321;- int var3322;- int var3323;- int var3324;- int var3325;- int var3326;- int var3327;- int var3328;- int var3329;- int var3330;- int var3331;- int var3332;- int var3333;- int var3334;- int var3335;- int var3336;- int var3337;- int var3338;- int var3339;- int var3340;- int var3341;- int var3342;- int var3343;- int var3344;- int var3345;- int var3346;- int var3347;- int var3348;- int var3349;- int var3350;- int var3351;- int var3352;- int var3353;- int var3354;- int var3355;- int var3356;- int var3357;- int var3358;- int var3359;- int var3360;- int var3361;- int var3362;- int var3363;- int var3364;- int var3365;- int var3366;- int var3367;- int var3368;- int var3369;- int var3370;- int var3371;- int var3372;- int var3373;- int var3374;- int var3375;- int var3376;- int var3377;- int var3378;- int var3379;- int var3380;- int var3381;- int var3382;- int var3383;- int var3384;- int var3385;- int var3386;- int var3387;- int var3388;- int var3389;- int var3390;- int var3391;- int var3392;- int var3393;- int var3394;- int var3395;- int var3396;- int var3397;- int var3398;- int var3399;- int var3400;- int var3401;- int var3402;- int var3403;- int var3404;- int var3405;- int var3406;- int var3407;- int var3408;- int var3409;- int var3410;- int var3411;- int var3412;- int var3413;- int var3414;- int var3415;- int var3416;- int var3417;- int var3418;- int var3419;- int var3420;- int var3421;- int var3422;- int var3423;- int var3424;- int var3425;- int var3426;- int var3427;- int var3428;- int var3429;- int var3430;- int var3431;- int var3432;- int var3433;- int var3434;- int var3435;- int var3436;- int var3437;- int var3438;- int var3439;- int var3440;- int var3441;- int var3442;- int var3443;- int var3444;- int var3445;- int var3446;- int var3447;- int var3448;- int var3449;- int var3450;- int var3451;- int var3452;- int var3453;- int var3454;- int var3455;- int var3456;- int var3457;- int var3458;- int var3459;- int var3460;- int var3461;- int var3462;- int var3463;- int var3464;- int var3465;- int var3466;- int var3467;- int var3468;- int var3469;- int var3470;- int var3471;- int var3472;- int var3473;- int var3474;- int var3475;- int var3476;- int var3477;- int var3478;- int var3479;- int var3480;- int var3481;- int var3482;- int var3483;- int var3484;- int var3485;- int var3486;- int var3487;- int var3488;- int var3489;- int var3490;- int var3491;- int var3492;- int var3493;- int var3494;- int var3495;- int var3496;- int var3497;- int var3498;- int var3499;- int var3500;- int var3501;- int var3502;- int var3503;- int var3504;- int var3505;- int var3506;- int var3507;- int var3508;- int var3509;- int var3510;- int var3511;- int var3512;- int var3513;- int var3514;- int var3515;- int var3516;- int var3517;- int var3518;- int var3519;- int var3520;- int var3521;- int var3522;- int var3523;- int var3524;- int var3525;- int var3526;- int var3527;- int var3528;- int var3529;- int var3530;- int var3531;- int var3532;- int var3533;- int var3534;- int var3535;- int var3536;- int var3537;- int var3538;- int var3539;- int var3540;- int var3541;- int var3542;- int var3543;- int var3544;- int var3545;- int var3546;- int var3547;- int var3548;- int var3549;- int var3550;- int var3551;- int var3552;- int var3553;- int var3554;- int var3555;- int var3556;- int var3557;- int var3558;- int var3559;- int var3560;- int var3561;- int var3562;- int var3563;- int var3564;- int var3565;- int var3566;- int var3567;- int var3568;- int var3569;- int var3570;- int var3571;- int var3572;- int var3573;- int var3574;- int var3575;- int var3576;- int var3577;- int var3578;- int var3579;- int var3580;- int var3581;- int var3582;- int var3583;- int var3584;- int var3585;- int var3586;- int var3587;- int var3588;- int var3589;- int var3590;- int var3591;- int var3592;- int var3593;- int var3594;- int var3595;- int var3596;- int var3597;- int var3598;- int var3599;- int var3600;- int var3601;- int var3602;- int var3603;- int var3604;- int var3605;- int var3606;- int var3607;- int var3608;- int var3609;- int var3610;- int var3611;- int var3612;- int var3613;- int var3614;- int var3615;- int var3616;- int var3617;- int var3618;- int var3619;- int var3620;- int var3621;- int var3622;- int var3623;- int var3624;- int var3625;- int var3626;- int var3627;- int var3628;- int var3629;- int var3630;- int var3631;- int var3632;- int var3633;- int var3634;- int var3635;- int var3636;- int var3637;- int var3638;- int var3639;- int var3640;- int var3641;- int var3642;- int var3643;- int var3644;- int var3645;- int var3646;- int var3647;- int var3648;- int var3649;- int var3650;- int var3651;- int var3652;- int var3653;- int var3654;- int var3655;- int var3656;- int var3657;- int var3658;- int var3659;- int var3660;- int var3661;- int var3662;- int var3663;- int var3664;- int var3665;- int var3666;- int var3667;- int var3668;- int var3669;- int var3670;- int var3671;- int var3672;- int var3673;- int var3674;- int var3675;- int var3676;- int var3677;- int var3678;- int var3679;- int var3680;- int var3681;- int var3682;- int var3683;- int var3684;- int var3685;- int var3686;- int var3687;- int var3688;- int var3689;- int var3690;- int var3691;- int var3692;- int var3693;- int var3694;- int var3695;- int var3696;- int var3697;- int var3698;- int var3699;- int var3700;- int var3701;- int var3702;- int var3703;- int var3704;- int var3705;- int var3706;- int var3707;- int var3708;- int var3709;- int var3710;- int var3711;- int var3712;- int var3713;- int var3714;- int var3715;- int var3716;- int var3717;- int var3718;- int var3719;- int var3720;- int var3721;- int var3722;- int var3723;- int var3724;- int var3725;- int var3726;- int var3727;- int var3728;- int var3729;- int var3730;- int var3731;- int var3732;- int var3733;- int var3734;- int var3735;- int var3736;- int var3737;- int var3738;- int var3739;- int var3740;- int var3741;- int var3742;- int var3743;- int var3744;- int var3745;- int var3746;- int var3747;- int var3748;- int var3749;- int var3750;- int var3751;- int var3752;- int var3753;- int var3754;- int var3755;- int var3756;- int var3757;- int var3758;- int var3759;- int var3760;- int var3761;- int var3762;- int var3763;- int var3764;- int var3765;- int var3766;- int var3767;- int var3768;- int var3769;- int var3770;- int var3771;- int var3772;- int var3773;- int var3774;- int var3775;- int var3776;- int var3777;- int var3778;- int var3779;- int var3780;- int var3781;- int var3782;- int var3783;- int var3784;- int var3785;- int var3786;- int var3787;- int var3788;- int var3789;- int var3790;- int var3791;- int var3792;- int var3793;- int var3794;- int var3795;- int var3796;- int var3797;- int var3798;- int var3799;- int var3800;- int var3801;- int var3802;- int var3803;- int var3804;- int var3805;- int var3806;- int var3807;- int var3808;- int var3809;- int var3810;- int var3811;- int var3812;- int var3813;- int var3814;- int var3815;- int var3816;- int var3817;- int var3818;- int var3819;- int var3820;- int var3821;- int var3822;- int var3823;- int var3824;- int var3825;- int var3826;- int var3827;- int var3828;- int var3829;- int var3830;- int var3831;- int var3832;- int var3833;- int var3834;- int var3835;- int var3836;- int var3837;- int var3838;- int var3839;- int var3840;- int var3841;- int var3842;- int var3843;- int var3844;- int var3845;- int var3846;- int var3847;- int var3848;- int var3849;- int var3850;- int var3851;- int var3852;- int var3853;- int var3854;- int var3855;- int var3856;- int var3857;- int var3858;- int var3859;- int var3860;- int var3861;- int var3862;- int var3863;- int var3864;- int var3865;- int var3866;- int var3867;- int var3868;- int var3869;- int var3870;- int var3871;- int var3872;- int var3873;- int var3874;- int var3875;- int var3876;- int var3877;- int var3878;- int var3879;- int var3880;- int var3881;- int var3882;- int var3883;- int var3884;- int var3885;- int var3886;- int var3887;- int var3888;- int var3889;- int var3890;- int var3891;- int var3892;- int var3893;- int var3894;- int var3895;- int var3896;- int var3897;- int var3898;- int var3899;- int var3900;- int var3901;- int var3902;- int var3903;- int var3904;- int var3905;- int var3906;- int var3907;- int var3908;- int var3909;- int var3910;- int var3911;- int var3912;- int var3913;- int var3914;- int var3915;- int var3916;- int var3917;- int var3918;- int var3919;- int var3920;- int var3921;- int var3922;- int var3923;- int var3924;- int var3925;- int var3926;- int var3927;- int var3928;- int var3929;- int var3930;- int var3931;- int var3932;- int var3933;- int var3934;- int var3935;- int var3936;- int var3937;- int var3938;- int var3939;- int var3940;- int var3941;- int var3942;- int var3943;- int var3944;- int var3945;- int var3946;- int var3947;- int var3948;- int var3949;- int var3950;- int var3951;- int var3952;- int var3953;- int var3954;- int var3955;- int var3956;- int var3957;- int var3958;- int var3959;- int var3960;- int var3961;- int var3962;- int var3963;- int var3964;- int var3965;- int var3966;- int var3967;- int var3968;- int var3969;- int var3970;- int var3971;- int var3972;- int var3973;- int var3974;- int var3975;- int var3976;- int var3977;- int var3978;- int var3979;- int var3980;- int var3981;- int var3982;- int var3983;- int var3984;- int var3985;- int var3986;- int var3987;- int var3988;- int var3989;- int var3990;- int var3991;- int var3992;- int var3993;- int var3994;- int var3995;- int var3996;- int var3997;- int var3998;- int var3999;- int var4000;- int var4001;- int var4002;- int var4003;- int var4004;- int var4005;- int var4006;- int var4007;- int var4008;- int var4009;- int var4010;- int var4011;- int var4012;- int var4013;- int var4014;- int var4015;- int var4016;- int var4017;- int var4018;- int var4019;- int var4020;- int var4021;- int var4022;- int var4023;- int var4024;- int var4025;- int var4026;- int var4027;- int var4028;- int var4029;- int var4030;- int var4031;- int var4032;- int var4033;- int var4034;- int var4035;- int var4036;- int var4037;- int var4038;- int var4039;- int var4040;- int var4041;- int var4042;- int var4043;- int var4044;- int var4045;- int var4046;- int var4047;- int var4048;- int var4049;- int var4050;- int var4051;- int var4052;- int var4053;- int var4054;- int var4055;- int var4056;- int var4057;- int var4058;- int var4059;- int var4060;- int var4061;- int var4062;- int var4063;- int var4064;- int var4065;- int var4066;- int var4067;- int var4068;- int var4069;- int var4070;- int var4071;- int var4072;- int var4073;- int var4074;- int var4075;- int var4076;- int var4077;- int var4078;- int var4079;- int var4080;- int var4081;- int var4082;- int var4083;- int var4084;- int var4085;- int var4086;- int var4087;- int var4088;- int var4089;- int var4090;- int var4091;- int var4092;- int var4093;- int var4094;- int var4095;- int var4096;- int var4097;- int var4098;- int var4099;- int var4100;- int var4101;- int var4102;- int var4103;- int var4104;- int var4105;- int var4106;- int var4107;- int var4108;- int var4109;- int var4110;- int var4111;- int var4112;- int var4113;- int var4114;- int var4115;- int var4116;- int var4117;- int var4118;- int var4119;- int var4120;- int var4121;- int var4122;- int var4123;- int var4124;- int var4125;- int var4126;- int var4127;- int var4128;- int var4129;- int var4130;- int var4131;- int var4132;- int var4133;- int var4134;- int var4135;- int var4136;- int var4137;- int var4138;- int var4139;- int var4140;- int var4141;- int var4142;- int var4143;- int var4144;- int var4145;- int var4146;- int var4147;- int var4148;- int var4149;- int var4150;- int var4151;- int var4152;- int var4153;- int var4154;- int var4155;- int var4156;- int var4157;- int var4158;- int var4159;- int var4160;- int var4161;- int var4162;- int var4163;- int var4164;- int var4165;- int var4166;- int var4167;- int var4168;- int var4169;- int var4170;- int var4171;- int var4172;- int var4173;- int var4174;- int var4175;- int var4176;- int var4177;- int var4178;- int var4179;- int var4180;- int var4181;- int var4182;- int var4183;- int var4184;- int var4185;- int var4186;- int var4187;- int var4188;- int var4189;- int var4190;- int var4191;- int var4192;- int var4193;- int var4194;- int var4195;- int var4196;- int var4197;- int var4198;- int var4199;- int var4200;- int var4201;- int var4202;- int var4203;- int var4204;- int var4205;- int var4206;- int var4207;- int var4208;- int var4209;- int var4210;- int var4211;- int var4212;- int var4213;- int var4214;- int var4215;- int var4216;- int var4217;- int var4218;- int var4219;- int var4220;- int var4221;- int var4222;- int var4223;- int var4224;- int var4225;- int var4226;- int var4227;- int var4228;- int var4229;- int var4230;- int var4231;- int var4232;- int var4233;- int var4234;- int var4235;- int var4236;- int var4237;- int var4238;- int var4239;- int var4240;- int var4241;- int var4242;- int var4243;- int var4244;- int var4245;- int var4246;- int var4247;- int var4248;- int var4249;- int var4250;- int var4251;- int var4252;- int var4253;- int var4254;- int var4255;- int var4256;- int var4257;- int var4258;- int var4259;- int var4260;- int var4261;- int var4262;- int var4263;- int var4264;- int var4265;- int var4266;- int var4267;- int var4268;- int var4269;- int var4270;- int var4271;- int var4272;- int var4273;- int var4274;- int var4275;- int var4276;- int var4277;- int var4278;- int var4279;- int var4280;- int var4281;- int var4282;- int var4283;- int var4284;- int var4285;- int var4286;- int var4287;- int var4288;- int var4289;- int var4290;- int var4291;- int var4292;- int var4293;- int var4294;- int var4295;- int var4296;- int var4297;- int var4298;- int var4299;- int var4300;- int var4301;- int var4302;- int var4303;- int var4304;- int var4305;- int var4306;- int var4307;- int var4308;- int var4309;- int var4310;- int var4311;- int var4312;- int var4313;- int var4314;- int var4315;- int var4316;- int var4317;- int var4318;- int var4319;- int var4320;- int var4321;- int var4322;- int var4323;- int var4324;- int var4325;- int var4326;- int var4327;- int var4328;- int var4329;- int var4330;- int var4331;- int var4332;- int var4333;- int var4334;- int var4335;- int var4336;- int var4337;- int var4338;- int var4339;- int var4340;- int var4341;- int var4342;- int var4343;- int var4344;- int var4345;- int var4346;- int var4347;- int var4348;- int var4349;- int var4350;- int var4351;- int var4352;- int var4353;- int var4354;- int var4355;- int var4356;- int var4357;- int var4358;- int var4359;- int var4360;- int var4361;- int var4362;- int var4363;- int var4364;- int var4365;- int var4366;- int var4367;- int var4368;- int var4369;- int var4370;- int var4371;- int var4372;- int var4373;- int var4374;- int var4375;- int var4376;- int var4377;- int var4378;- int var4379;- int var4380;- int var4381;- int var4382;- int var4383;- int var4384;- int var4385;- int var4386;- int var4387;- int var4388;- int var4389;- int var4390;- int var4391;- int var4392;- int var4393;- int var4394;- int var4395;- int var4396;- int var4397;- int var4398;- int var4399;- int var4400;- int var4401;- int var4402;- int var4403;- int var4404;- int var4405;- int var4406;- int var4407;- int var4408;- int var4409;- int var4410;- int var4411;- int var4412;- int var4413;- int var4414;- int var4415;- int var4416;- int var4417;- int var4418;- int var4419;- int var4420;- int var4421;- int var4422;- int var4423;- int var4424;- int var4425;- int var4426;- int var4427;- int var4428;- int var4429;- int var4430;- int var4431;- int var4432;- int var4433;- int var4434;- int var4435;- int var4436;- int var4437;- int var4438;- int var4439;- int var4440;- int var4441;- int var4442;- int var4443;- int var4444;- int var4445;- int var4446;- int var4447;- int var4448;- int var4449;- int var4450;- int var4451;- int var4452;- int var4453;- int var4454;- int var4455;- int var4456;- int var4457;- int var4458;- int var4459;- int var4460;- int var4461;- int var4462;- int var4463;- int var4464;- int var4465;- int var4466;- int var4467;- int var4468;- int var4469;- int var4470;- int var4471;- int var4472;- int var4473;- int var4474;- int var4475;- int var4476;- int var4477;- int var4478;- int var4479;- int var4480;- int var4481;- int var4482;- int var4483;- int var4484;- int var4485;- int var4486;- int var4487;- int var4488;- int var4489;- int var4490;- int var4491;- int var4492;- int var4493;- int var4494;- int var4495;- int var4496;- int var4497;- int var4498;- int var4499;- int var4500;- int var4501;- int var4502;- int var4503;- int var4504;- int var4505;- int var4506;- int var4507;- int var4508;- int var4509;- int var4510;- int var4511;- int var4512;- int var4513;- int var4514;- int var4515;- int var4516;- int var4517;- int var4518;- int var4519;- int var4520;- int var4521;- int var4522;- int var4523;- int var4524;- int var4525;- int var4526;- int var4527;- int var4528;- int var4529;- int var4530;- int var4531;- int var4532;- int var4533;- int var4534;- int var4535;- int var4536;- int var4537;- int var4538;- int var4539;- int var4540;- int var4541;- int var4542;- int var4543;- int var4544;- int var4545;- int var4546;- int var4547;- int var4548;- int var4549;- int var4550;- int var4551;- int var4552;- int var4553;- int var4554;- int var4555;- int var4556;- int var4557;- int var4558;- int var4559;- int var4560;- int var4561;- int var4562;- int var4563;- int var4564;- int var4565;- int var4566;- int var4567;- int var4568;- int var4569;- int var4570;- int var4571;- int var4572;- int var4573;- int var4574;- int var4575;- int var4576;- int var4577;- int var4578;- int var4579;- int var4580;- int var4581;- int var4582;- int var4583;- int var4584;- int var4585;- int var4586;- int var4587;- int var4588;- int var4589;- int var4590;- int var4591;- int var4592;- int var4593;- int var4594;- int var4595;- int var4596;- int var4597;- int var4598;- int var4599;- int var4600;- int var4601;- int var4602;- int var4603;- int var4604;- int var4605;- int var4606;- int var4607;- int var4608;- int var4609;- int var4610;- int var4611;- int var4612;- int var4613;- int var4614;- int var4615;- int var4616;- int var4617;- int var4618;- int var4619;- int var4620;- int var4621;- int var4622;- int var4623;- int var4624;- int var4625;- int var4626;- int var4627;- int var4628;- int var4629;- int var4630;- int var4631;- int var4632;- int var4633;- int var4634;- int var4635;- int var4636;- int var4637;- int var4638;- int var4639;- int var4640;- int var4641;- int var4642;- int var4643;- int var4644;- int var4645;- int var4646;- int var4647;- int var4648;- int var4649;- int var4650;- int var4651;- int var4652;- int var4653;- int var4654;- int var4655;- int var4656;- int var4657;- int var4658;- int var4659;- int var4660;- int var4661;- int var4662;- int var4663;- int var4664;- int var4665;- int var4666;- int var4667;- int var4668;- int var4669;- int var4670;- int var4671;- int var4672;- int var4673;- int var4674;- int var4675;- int var4676;- int var4677;- int var4678;- int var4679;- int var4680;- int var4681;- int var4682;- int var4683;- int var4684;- int var4685;- int var4686;- int var4687;- int var4688;- int var4689;- int var4690;- int var4691;- int var4692;- int var4693;- int var4694;- int var4695;- int var4696;- int var4697;- int var4698;- int var4699;- int var4700;- int var4701;- int var4702;- int var4703;- int var4704;- int var4705;- int var4706;- int var4707;- int var4708;- int var4709;- int var4710;- int var4711;- int var4712;- int var4713;- int var4714;- int var4715;- int var4716;- int var4717;- int var4718;- int var4719;- int var4720;- int var4721;- int var4722;- int var4723;- int var4724;- int var4725;- int var4726;- int var4727;- int var4728;- int var4729;- int var4730;- int var4731;- int var4732;- int var4733;- int var4734;- int var4735;- int var4736;- int var4737;- int var4738;- int var4739;- int var4740;- int var4741;- int var4742;- int var4743;- int var4744;- int var4745;- int var4746;- int var4747;- int var4748;- int var4749;- int var4750;- int var4751;- int var4752;- int var4753;- int var4754;- int var4755;- int var4756;- int var4757;- int var4758;- int var4759;- int var4760;- int var4761;- int var4762;- int var4763;- int var4764;- int var4765;- int var4766;- int var4767;- int var4768;- int var4769;- int var4770;- int var4771;- int var4772;- int var4773;- int var4774;- int var4775;- int var4776;- int var4777;- int var4778;- int var4779;- int var4780;- int var4781;- int var4782;- int var4783;- int var4784;- int var4785;- int var4786;- int var4787;- int var4788;- int var4789;- int var4790;- int var4791;- int var4792;- int var4793;- int var4794;- int var4795;- int var4796;- int var4797;- int var4798;- int var4799;- int var4800;- int var4801;- int var4802;- int var4803;- int var4804;- int var4805;- int var4806;- int var4807;- int var4808;- int var4809;- int var4810;- int var4811;- int var4812;- int var4813;- int var4814;- int var4815;- int var4816;- int var4817;- int var4818;- int var4819;- int var4820;- int var4821;- int var4822;- int var4823;- int var4824;- int var4825;- int var4826;- int var4827;- int var4828;- int var4829;- int var4830;- int var4831;- int var4832;- int var4833;- int var4834;- int var4835;- int var4836;- int var4837;- int var4838;- int var4839;- int var4840;- int var4841;- int var4842;- int var4843;- int var4844;- int var4845;- int var4846;- int var4847;- int var4848;- int var4849;- int var4850;- int var4851;- int var4852;- int var4853;- int var4854;- int var4855;- int var4856;- int var4857;- int var4858;- int var4859;- int var4860;- int var4861;- int var4862;- int var4863;- int var4864;- int var4865;- int var4866;- int var4867;- int var4868;- int var4869;- int var4870;- int var4871;- int var4872;- int var4873;- int var4874;- int var4875;- int var4876;- int var4877;- int var4878;- int var4879;- int var4880;- int var4881;- int var4882;- int var4883;- int var4884;- int var4885;- int var4886;- int var4887;- int var4888;- int var4889;- int var4890;- int var4891;- int var4892;- int var4893;- int var4894;- int var4895;- int var4896;- int var4897;- int var4898;- int var4899;- int var4900;- int var4901;- int var4902;- int var4903;- int var4904;- int var4905;- int var4906;- int var4907;- int var4908;- int var4909;- int var4910;- int var4911;- int var4912;- int var4913;- int var4914;- int var4915;- int var4916;- int var4917;- int var4918;- int var4919;- int var4920;- int var4921;- int var4922;- int var4923;- int var4924;- int var4925;- int var4926;- int var4927;- int var4928;- int var4929;- int var4930;- int var4931;- int var4932;- int var4933;- int var4934;- int var4935;- int var4936;- int var4937;- int var4938;- int var4939;- int var4940;- int var4941;- int var4942;- int var4943;- int var4944;- int var4945;- int var4946;- int var4947;- int var4948;- int var4949;- int var4950;- int var4951;- int var4952;- int var4953;- int var4954;- int var4955;- int var4956;- int var4957;- int var4958;- int var4959;- int var4960;- int var4961;- int var4962;- int var4963;- int var4964;- int var4965;- int var4966;- int var4967;- int var4968;- int var4969;- int var4970;- int var4971;- int var4972;- int var4973;- int var4974;- int var4975;- int var4976;- int var4977;- int var4978;- int var4979;- int var4980;- int var4981;- int var4982;- int var4983;- int var4984;- int var4985;- int var4986;- int var4987;- int var4988;- int var4989;- int var4990;- int var4991;- int var4992;- int var4993;- int var4994;- int var4995;- int var4996;- int var4997;- int var4998;- int var4999;- int var5000;- int var5001;- int var5002;- int var5003;- int var5004;- int var5005;- int var5006;- int var5007;- int var5008;- int var5009;- int var5010;- int var5011;- int var5012;- int var5013;- int var5014;- int var5015;- int var5016;- int var5017;- int var5018;- int var5019;- int var5020;- int var5021;- int var5022;- int var5023;- int var5024;- int var5025;- int var5026;- int var5027;- int var5028;- int var5029;- int var5030;- int var5031;- int var5032;- int var5033;- int var5034;- int var5035;- int var5036;- int var5037;- int var5038;- int var5039;- int var5040;- int var5041;- int var5042;- int var5043;- int var5044;- int var5045;- int var5046;- int var5047;- int var5048;- int var5049;- int var5050;- int var5051;- int var5052;- int var5053;- int var5054;- int var5055;- int var5056;- int var5057;- int var5058;- int var5059;- int var5060;- int var5061;- int var5062;- int var5063;- int var5064;- int var5065;- int var5066;- int var5067;- int var5068;- int var5069;- int var5070;- int var5071;- int var5072;- int var5073;- int var5074;- int var5075;- int var5076;- int var5077;- int var5078;- int var5079;- int var5080;- int var5081;- int var5082;- int var5083;- int var5084;- int var5085;- int var5086;- int var5087;- int var5088;- int var5089;- int var5090;- int var5091;- int var5092;- int var5093;- int var5094;- int var5095;- int var5096;- int var5097;- int var5098;- int var5099;- int var5100;- int var5101;- int var5102;- int var5103;- int var5104;- int var5105;- int var5106;- int var5107;- int var5108;- int var5109;- int var5110;- int var5111;- int var5112;- int var5113;- int var5114;- int var5115;- int var5116;- int var5117;- int var5118;- int var5119;- int var5120;- int var5121;- int var5122;- int var5123;- int var5124;- int var5125;- int var5126;- int var5127;- int var5128;- int var5129;- int var5130;- int var5131;- int var5132;- int var5133;- int var5134;- int var5135;- int var5136;- int var5137;- int var5138;- int var5139;- int var5140;- int var5141;- int var5142;- int var5143;- int var5144;- int var5145;- int var5146;- int var5147;- int var5148;- int var5149;- int var5150;- int var5151;- int var5152;- int var5153;- int var5154;- int var5155;- int var5156;- int var5157;- int var5158;- int var5159;- int var5160;- int var5161;- int var5162;- int var5163;- int var5164;- int var5165;- int var5166;- int var5167;- int var5168;- int var5169;- int var5170;- int var5171;- int var5172;- int var5173;- int var5174;- int var5175;- int var5176;- int var5177;- int var5178;- int var5179;- int var5180;- int var5181;- int var5182;- int var5183;- int var5184;- int var5185;- int var5186;- int var5187;- int var5188;- int var5189;- int var5190;- int var5191;- int var5192;- int var5193;- int var5194;- int var5195;- int var5196;- int var5197;- int var5198;- int var5199;- int var5200;- int var5201;- int var5202;- int var5203;- int var5204;- int var5205;- int var5206;- int var5207;- int var5208;- int var5209;- int var5210;- int var5211;- int var5212;- int var5213;- int var5214;- int var5215;- int var5216;- int var5217;- int var5218;- int var5219;- int var5220;- int var5221;- int var5222;- int var5223;- int var5224;- int var5225;- int var5226;- int var5227;- int var5228;- int var5229;- int var5230;- int var5231;- int var5232;- int var5233;- int var5234;- int var5235;- int var5236;- int var5237;- int var5238;- int var5239;- int var5240;- int var5241;- int var5242;- int var5243;- int var5244;- int var5245;- int var5246;- int var5247;- int var5248;- int var5249;- int var5250;- int var5251;- int var5252;- int var5253;- int var5254;- int var5255;- int var5256;- int var5257;- int var5258;- int var5259;- int var5260;- int var5261;- int var5262;- int var5263;- int var5264;- int var5265;- int var5266;- int var5267;- int var5268;- int var5269;- int var5270;- int var5271;- int var5272;- int var5273;- int var5274;- int var5275;- int var5276;- int var5277;- int var5278;- int var5279;- int var5280;- int var5281;- int var5282;- int var5283;- int var5284;- int var5285;- int var5286;- int var5287;- int var5288;- int var5289;- int var5290;- int var5291;- int var5292;- int var5293;- int var5294;- int var5295;- int var5296;- int var5297;- int var5298;- int var5299;- int var5300;- int var5301;- int var5302;- int var5303;- int var5304;- int var5305;- int var5306;- int var5307;- int var5308;- int var5309;- int var5310;- int var5311;- int var5312;- int var5313;- int var5314;- int var5315;- int var5316;- int var5317;- int var5318;- int var5319;- int var5320;- int var5321;- int var5322;- int var5323;- int var5324;- int var5325;- int var5326;- int var5327;- int var5328;- int var5329;- int var5330;- int var5331;- int var5332;- int var5333;- int var5334;- int var5335;- int var5336;- int var5337;- int var5338;- int var5339;- int var5340;- int var5341;- int var5342;- int var5343;- int var5344;- int var5345;- int var5346;- int var5347;- int var5348;- int var5349;- int var5350;- int var5351;- int var5352;- int var5353;- int var5354;- int var5355;- int var5356;- int var5357;- int var5358;- int var5359;- int var5360;- int var5361;- int var5362;- int var5363;- int var5364;- int var5365;- int var5366;- int var5367;- int var5368;- int var5369;- int var5370;- int var5371;- int var5372;- int var5373;- int var5374;- int var5375;- int var5376;- int var5377;- int var5378;- int var5379;- int var5380;- int var5381;- int var5382;- int var5383;- int var5384;- int var5385;- int var5386;- int var5387;- int var5388;- int var5389;- int var5390;- int var5391;- int var5392;- int var5393;- int var5394;- int var5395;- int var5396;- int var5397;- int var5398;- int var5399;- int var5400;- int var5401;- int var5402;- int var5403;- int var5404;- int var5405;- int var5406;- int var5407;- int var5408;- int var5409;- int var5410;- int var5411;- int var5412;- int var5413;- int var5414;- int var5415;- int var5416;- int var5417;- int var5418;- int var5419;- int var5420;- int var5421;- int var5422;- int var5423;- int var5424;- int var5425;- int var5426;- int var5427;- int var5428;- int var5429;- int var5430;- int var5431;- int var5432;- int var5433;- int var5434;- int var5435;- int var5436;- int var5437;- int var5438;- int var5439;- int var5440;- int var5441;- int var5442;- int var5443;- int var5444;- int var5445;- int var5446;- int var5447;- int var5448;- int var5449;- int var5450;- int var5451;- int var5452;- int var5453;- int var5454;- int var5455;- int var5456;- int var5457;- int var5458;- int var5459;- int var5460;- int var5461;- int var5462;- int var5463;- int var5464;- int var5465;- int var5466;- int var5467;- int var5468;- int var5469;- int var5470;- int var5471;- int var5472;- int var5473;- int var5474;- int var5475;- int var5476;- int var5477;- int var5478;- int var5479;- int var5480;- int var5481;- int var5482;- int var5483;- int var5484;- int var5485;- int var5486;- int var5487;- int var5488;- int var5489;- int var5490;- int var5491;- int var5492;- int var5493;- int var5494;- int var5495;- int var5496;- int var5497;- int var5498;- int var5499;- int var5500;- int var5501;- int var5502;- int var5503;- int var5504;- int var5505;- int var5506;- int var5507;- int var5508;- int var5509;- int var5510;- int var5511;- int var5512;- int var5513;- int var5514;- int var5515;- int var5516;- int var5517;- int var5518;- int var5519;- int var5520;- int var5521;- int var5522;- int var5523;- int var5524;- int var5525;- int var5526;- int var5527;- int var5528;- int var5529;- int var5530;- int var5531;- int var5532;- int var5533;- int var5534;- int var5535;- int var5536;- int var5537;- int var5538;- int var5539;- int var5540;- int var5541;- int var5542;- int var5543;- int var5544;- int var5545;- int var5546;- int var5547;- int var5548;- int var5549;- int var5550;- int var5551;- int var5552;- int var5553;- int var5554;- int var5555;- int var5556;- int var5557;- int var5558;- int var5559;- int var5560;- int var5561;- int var5562;- int var5563;- int var5564;- int var5565;- int var5566;- int var5567;- int var5568;- int var5569;- int var5570;- int var5571;- int var5572;- int var5573;- int var5574;- int var5575;- int var5576;- int var5577;- int var5578;- int var5579;- int var5580;- int var5581;- int var5582;- int var5583;- int var5584;- int var5585;- int var5586;- int var5587;- int var5588;- int var5589;- int var5590;- int var5591;- int var5592;- int var5593;- int var5594;- int var5595;- int var5596;- int var5597;- int var5598;- int var5599;- int var5600;- int var5601;- int var5602;- int var5603;- int var5604;- int var5605;- int var5606;- int var5607;- int var5608;- int var5609;- int var5610;- int var5611;- int var5612;- int var5613;- int var5614;- int var5615;- int var5616;- int var5617;- int var5618;- int var5619;- int var5620;- int var5621;- int var5622;- int var5623;- int var5624;- int var5625;- int var5626;- int var5627;- int var5628;- int var5629;- int var5630;- int var5631;- int var5632;- int var5633;- int var5634;- int var5635;- int var5636;- int var5637;- int var5638;- int var5639;- int var5640;- int var5641;- int var5642;- int var5643;- int var5644;- int var5645;- int var5646;- int var5647;- int var5648;- int var5649;- int var5650;- int var5651;- int var5652;- int var5653;- int var5654;- int var5655;- int var5656;- int var5657;- int var5658;- int var5659;- int var5660;- int var5661;- int var5662;- int var5663;- int var5664;- int var5665;- int var5666;- int var5667;- int var5668;- int var5669;- int var5670;- int var5671;- int var5672;- int var5673;- int var5674;- int var5675;- int var5676;- int var5677;- int var5678;- int var5679;- int var5680;- int var5681;- int var5682;- int var5683;- int var5684;- int var5685;- int var5686;- int var5687;- int var5688;- int var5689;- int var5690;- int var5691;- int var5692;- int var5693;- int var5694;- int var5695;- int var5696;- int var5697;- int var5698;- int var5699;- int var5700;- int var5701;- int var5702;- int var5703;- int var5704;- int var5705;- int var5706;- int var5707;- int var5708;- int var5709;- int var5710;- int var5711;- int var5712;- int var5713;- int var5714;- int var5715;- int var5716;- int var5717;- int var5718;- int var5719;- int var5720;- int var5721;- int var5722;- int var5723;- int var5724;- int var5725;- int var5726;- int var5727;- int var5728;- int var5729;- int var5730;- int var5731;- int var5732;- int var5733;- int var5734;- int var5735;- int var5736;- int var5737;- int var5738;- int var5739;- int var5740;- int var5741;- int var5742;- int var5743;- int var5744;- int var5745;- int var5746;- int var5747;- int var5748;- int var5749;- int var5750;- int var5751;- int var5752;- int var5753;- int var5754;- int var5755;- int var5756;- int var5757;- int var5758;- int var5759;- int var5760;- int var5761;- int var5762;- int var5763;- int var5764;- int var5765;- int var5766;- int var5767;- int var5768;- int var5769;- int var5770;- int var5771;- int var5772;- int var5773;- int var5774;- int var5775;- int var5776;- int var5777;- int var5778;- int var5779;- int var5780;- int var5781;- int var5782;- int var5783;- int var5784;- int var5785;- int var5786;- int var5787;- int var5788;- int var5789;- int var5790;- int var5791;- int var5792;- int var5793;- int var5794;- int var5795;- int var5796;- int var5797;- int var5798;- int var5799;- int var5800;- int var5801;- int var5802;- int var5803;- int var5804;- int var5805;- int var5806;- int var5807;- int var5808;- int var5809;- int var5810;- int var5811;- int var5812;- int var5813;- int var5814;- int var5815;- int var5816;- int var5817;- int var5818;- int var5819;- int var5820;- int var5821;- int var5822;- int var5823;- int var5824;- int var5825;- int var5826;- int var5827;- int var5828;- int var5829;- int var5830;- int var5831;- int var5832;- int var5833;- int var5834;- int var5835;- int var5836;- int var5837;- int var5838;- int var5839;- int var5840;- int var5841;- int var5842;- int var5843;- int var5844;- int var5845;- int var5846;- int var5847;- int var5848;- int var5849;- int var5850;- int var5851;- int var5852;- int var5853;- int var5854;- int var5855;- int var5856;- int var5857;- int var5858;- int var5859;- int var5860;- int var5861;- int var5862;- int var5863;- int var5864;- int var5865;- int var5866;- int var5867;- int var5868;- int var5869;- int var5870;- int var5871;- int var5872;- int var5873;- int var5874;- int var5875;- int var5876;- int var5877;- int var5878;- int var5879;- int var5880;- int var5881;- int var5882;- int var5883;- int var5884;- int var5885;- int var5886;- int var5887;- int var5888;- int var5889;- int var5890;- int var5891;- int var5892;- int var5893;- int var5894;- int var5895;- int var5896;- int var5897;- int var5898;- int var5899;- int var5900;- int var5901;- int var5902;- int var5903;- int var5904;- int var5905;- int var5906;- int var5907;- int var5908;- int var5909;- int var5910;- int var5911;- int var5912;- int var5913;- int var5914;- int var5915;- int var5916;- int var5917;- int var5918;- int var5919;- int var5920;- int var5921;- int var5922;- int var5923;- int var5924;- int var5925;- int var5926;- int var5927;- int var5928;- int var5929;- int var5930;- int var5931;- int var5932;- int var5933;- int var5934;- int var5935;- int var5936;- int var5937;- int var5938;- int var5939;- int var5940;- int var5941;- int var5942;- int var5943;- int var5944;- int var5945;- int var5946;- int var5947;- int var5948;- int var5949;- int var5950;- int var5951;- int var5952;- int var5953;- int var5954;- int var5955;- int var5956;- int var5957;- int var5958;- int var5959;- int var5960;- int var5961;- int var5962;- int var5963;- int var5964;- int var5965;- int var5966;- int var5967;- int var5968;- int var5969;- int var5970;- int var5971;- int var5972;- int var5973;- int var5974;- int var5975;- int var5976;- int var5977;- int var5978;- int var5979;- int var5980;- int var5981;- int var5982;- int var5983;- int var5984;- int var5985;- int var5986;- int var5987;- int var5988;- int var5989;- int var5990;- int var5991;- int var5992;- int var5993;- int var5994;- int var5995;- int var5996;- int var5997;- int var5998;- int var5999;- int var6000;- int var6001;- int var6002;- int var6003;- int var6004;- int var6005;- int var6006;- int var6007;- int var6008;- int var6009;- int var6010;- int var6011;- int var6012;- int var6013;- int var6014;- int var6015;- int var6016;- int var6017;- int var6018;- int var6019;- int var6020;- int var6021;- int var6022;- int var6023;- int var6024;- int var6025;- int var6026;- int var6027;- int var6028;- int var6029;- int var6030;- int var6031;- int var6032;- int var6033;- int var6034;- int var6035;- int var6036;- int var6037;- int var6038;- int var6039;- int var6040;- int var6041;- int var6042;- int var6043;- int var6044;- int var6045;- int var6046;- int var6047;- int var6048;- int var6049;- int var6050;- int var6051;- int var6052;- int var6053;- int var6054;- int var6055;- int var6056;- int var6057;- int var6058;- int var6059;- int var6060;- int var6061;- int var6062;- int var6063;- int var6064;- int var6065;- int var6066;- int var6067;- int var6068;- int var6069;- int var6070;- int var6071;- int var6072;- int var6073;- int var6074;- int var6075;- int var6076;- int var6077;- int var6078;- int var6079;- int var6080;- int var6081;- int var6082;- int var6083;- int var6084;- int var6085;- int var6086;- int var6087;- int var6088;- int var6089;- int var6090;- int var6091;- int var6092;- int var6093;- int var6094;- int var6095;- int var6096;- int var6097;- int var6098;- int var6099;- int var6100;- int var6101;- int var6102;- int var6103;- int var6104;- int var6105;- int var6106;- int var6107;- int var6108;- int var6109;- int var6110;- int var6111;- int var6112;- int var6113;- int var6114;- int var6115;- int var6116;- int var6117;- int var6118;- int var6119;- int var6120;- int var6121;- int var6122;- int var6123;- int var6124;- int var6125;- int var6126;- int var6127;- int var6128;- int var6129;- int var6130;- int var6131;- int var6132;- int var6133;- int var6134;- int var6135;- int var6136;- int var6137;- int var6138;- int var6139;- int var6140;- int var6141;- int var6142;- int var6143;- int var6144;- int var6145;- int var6146;- int var6147;- int var6148;- int var6149;- int var6150;- int var6151;- int var6152;- int var6153;- int var6154;- int var6155;- int var6156;- int var6157;- int var6158;- int var6159;- int var6160;- int var6161;- int var6162;- int var6163;- int var6164;- int var6165;- int var6166;- int var6167;- int var6168;- int var6169;- int var6170;- int var6171;- int var6172;- int var6173;- int var6174;- int var6175;- int var6176;- int var6177;- int var6178;- int var6179;- int var6180;- int var6181;- int var6182;- int var6183;- int var6184;- int var6185;- int var6186;- int var6187;- int var6188;- int var6189;- int var6190;- int var6191;- int var6192;- int var6193;- int var6194;- int var6195;- int var6196;- int var6197;- int var6198;- int var6199;- int var6200;- int var6201;- int var6202;- int var6203;- int var6204;- int var6205;- int var6206;- int var6207;- int var6208;- int var6209;- int var6210;- int var6211;- int var6212;- int var6213;- int var6214;- int var6215;- int var6216;- int var6217;- int var6218;- int var6219;- int var6220;- int var6221;- int var6222;- int var6223;- int var6224;- int var6225;- int var6226;- int var6227;- int var6228;- int var6229;- int var6230;- int var6231;- int var6232;- int var6233;- int var6234;- int var6235;- int var6236;- int var6237;- int var6238;- int var6239;- int var6240;- int var6241;- int var6242;- int var6243;- int var6244;- int var6245;- int var6246;- int var6247;- int var6248;- int var6249;- int var6250;- int var6251;- int var6252;- int var6253;- int var6254;- int var6255;- int var6256;- int var6257;- int var6258;- int var6259;- int var6260;- int var6261;- int var6262;- int var6263;- int var6264;- int var6265;- int var6266;- int var6267;- int var6268;- int var6269;- int var6270;- int var6271;- int var6272;- int var6273;- int var6274;- int var6275;- int var6276;- int var6277;- int var6278;- int var6279;- int var6280;- int var6281;- int var6282;- int var6283;- int var6284;- int var6285;- int var6286;- int var6287;- int var6288;- int var6289;- int var6290;- int var6291;- int var6292;- int var6293;- int var6294;- int var6295;- int var6296;- int var6297;- int var6298;- int var6299;- int var6300;- int var6301;- int var6302;- int var6303;- int var6304;- int var6305;- int var6306;- int var6307;- int var6308;- int var6309;- int var6310;- int var6311;- int var6312;- int var6313;- int var6314;- int var6315;- int var6316;- int var6317;- int var6318;- int var6319;- int var6320;- int var6321;- int var6322;- int var6323;- int var6324;- int var6325;- int var6326;- int var6327;- int var6328;- int var6329;- int var6330;- int var6331;- int var6332;- int var6333;- int var6334;- int var6335;- int var6336;- int var6337;- int var6338;- int var6339;- int var6340;- int var6341;- int var6342;- int var6343;- int var6344;- int var6345;- int var6346;- int var6347;- int var6348;- int var6349;- int var6350;- int var6351;- int var6352;- int var6353;- int var6354;- int var6355;- int var6356;- int var6357;- int var6358;- int var6359;- int var6360;- int var6361;- int var6362;- int var6363;- int var6364;- int var6365;- int var6366;- int var6367;- int var6368;- int var6369;- int var6370;- int var6371;- int var6372;- int var6373;- int var6374;- int var6375;- int var6376;- int var6377;- int var6378;- int var6379;- int var6380;- int var6381;- int var6382;- int var6383;- int var6384;- int var6385;- int var6386;- int var6387;- int var6388;- int var6389;- int var6390;- int var6391;- int var6392;- int var6393;- int var6394;- int var6395;- int var6396;- int var6397;- int var6398;- int var6399;- int var6400;- int var6401;- int var6402;- int var6403;- int var6404;- int var6405;- int var6406;- int var6407;- int var6408;- int var6409;- int var6410;- int var6411;- int var6412;- int var6413;- int var6414;- int var6415;- int var6416;- int var6417;- int var6418;- int var6419;- int var6420;- int var6421;- int var6422;- int var6423;- int var6424;- int var6425;- int var6426;- int var6427;- int var6428;- int var6429;- int var6430;- int var6431;- int var6432;- int var6433;- int var6434;- int var6435;- int var6436;- int var6437;- int var6438;- int var6439;- int var6440;- int var6441;- int var6442;- int var6443;- int var6444;- int var6445;- int var6446;- int var6447;- int var6448;- int var6449;- int var6450;- int var6451;- int var6452;- int var6453;- int var6454;- int var6455;- int var6456;- int var6457;- int var6458;- int var6459;- int var6460;- int var6461;- int var6462;- int var6463;- int var6464;- int var6465;- int var6466;- int var6467;- int var6468;- int var6469;- int var6470;- int var6471;- int var6472;- int var6473;- int var6474;- int var6475;- int var6476;- int var6477;- int var6478;- int var6479;- int var6480;- int var6481;- int var6482;- int var6483;- int var6484;- int var6485;- int var6486;- int var6487;- int var6488;- int var6489;- int var6490;- int var6491;- int var6492;- int var6493;- int var6494;- int var6495;- int var6496;- int var6497;- int var6498;- int var6499;- int var6500;- int var6501;- int var6502;- int var6503;- int var6504;- int var6505;- int var6506;- int var6507;- int var6508;- int var6509;- int var6510;- int var6511;- int var6512;- int var6513;- int var6514;- int var6515;- int var6516;- int var6517;- int var6518;- int var6519;- int var6520;- int var6521;- int var6522;- int var6523;- int var6524;- int var6525;- int var6526;- int var6527;- int var6528;- int var6529;- int var6530;- int var6531;- int var6532;- int var6533;- int var6534;- int var6535;- int var6536;- int var6537;- int var6538;- int var6539;- int var6540;- int var6541;- int var6542;- int var6543;- int var6544;- int var6545;- int var6546;- int var6547;- int var6548;- int var6549;- int var6550;- int var6551;- int var6552;- int var6553;- int var6554;- int var6555;- int var6556;- int var6557;- int var6558;- int var6559;- int var6560;- int var6561;- int var6562;- int var6563;- int var6564;- int var6565;- int var6566;- int var6567;- int var6568;- int var6569;- int var6570;- int var6571;- int var6572;- int var6573;- int var6574;- int var6575;- int var6576;- int var6577;- int var6578;- int var6579;- int var6580;- int var6581;- int var6582;- int var6583;- int var6584;- int var6585;- int var6586;- int var6587;- int var6588;- int var6589;- int var6590;- int var6591;- int var6592;- int var6593;- int var6594;- int var6595;- int var6596;- int var6597;- int var6598;- int var6599;- int var6600;- int var6601;- int var6602;- int var6603;- int var6604;- int var6605;- int var6606;- int var6607;- int var6608;- int var6609;- int var6610;- int var6611;- int var6612;- int var6613;- int var6614;- int var6615;- int var6616;- int var6617;- int var6618;- int var6619;- int var6620;- int var6621;- int var6622;- int var6623;- int var6624;- int var6625;- int var6626;- int var6627;- int var6628;- int var6629;- int var6630;- int var6631;- int var6632;- int var6633;- int var6634;- int var6635;- int var6636;- int var6637;- int var6638;- int var6639;- int var6640;- int var6641;- int var6642;- int var6643;- int var6644;- int var6645;- int var6646;- int var6647;- int var6648;- int var6649;- int var6650;- int var6651;- int var6652;- int var6653;- int var6654;- int var6655;- int var6656;- int var6657;- int var6658;- int var6659;- int var6660;- int var6661;- int var6662;- int var6663;- int var6664;- int var6665;- int var6666;- int var6667;- int var6668;- int var6669;- int var6670;- int var6671;- int var6672;- int var6673;- int var6674;- int var6675;- int var6676;- int var6677;- int var6678;- int var6679;- int var6680;- int var6681;- int var6682;- int var6683;- int var6684;- int var6685;- int var6686;- int var6687;- int var6688;- int var6689;- int var6690;- int var6691;- int var6692;- int var6693;- int var6694;- int var6695;- int var6696;- int var6697;- int var6698;- int var6699;- int var6700;- int var6701;- int var6702;- int var6703;- int var6704;- int var6705;- int var6706;- int var6707;- int var6708;- int var6709;- int var6710;- int var6711;- int var6712;- int var6713;- int var6714;- int var6715;- int var6716;- int var6717;- int var6718;- int var6719;- int var6720;- int var6721;- int var6722;- int var6723;- int var6724;- int var6725;- int var6726;- int var6727;- int var6728;- int var6729;- int var6730;- int var6731;- int var6732;- int var6733;- int var6734;- int var6735;- int var6736;- int var6737;- int var6738;- int var6739;- int var6740;- int var6741;- int var6742;- int var6743;- int var6744;- int var6745;- int var6746;- int var6747;- int var6748;- int var6749;- int var6750;- int var6751;- int var6752;- int var6753;- int var6754;- int var6755;- int var6756;- int var6757;- int var6758;- int var6759;- int var6760;- int var6761;- int var6762;- int var6763;- int var6764;- int var6765;- int var6766;- int var6767;- int var6768;- int var6769;- int var6770;- int var6771;- int var6772;- int var6773;- int var6774;- int var6775;- int var6776;- int var6777;- int var6778;- int var6779;- int var6780;- int var6781;- int var6782;- int var6783;- int var6784;- int var6785;- int var6786;- int var6787;- int var6788;- int var6789;- int var6790;- int var6791;- int var6792;- int var6793;- int var6794;- int var6795;- int var6796;- int var6797;- int var6798;- int var6799;- int var6800;- int var6801;- int var6802;- int var6803;- int var6804;- int var6805;- int var6806;- int var6807;- int var6808;- int var6809;- int var6810;- int var6811;- int var6812;- int var6813;- int var6814;- int var6815;- int var6816;- int var6817;- int var6818;- int var6819;- int var6820;- int var6821;- int var6822;- int var6823;- int var6824;- int var6825;- int var6826;- int var6827;- int var6828;- int var6829;- int var6830;- int var6831;- int var6832;- int var6833;- int var6834;- int var6835;- int var6836;- int var6837;- int var6838;- int var6839;- int var6840;- int var6841;- int var6842;- int var6843;- int var6844;- int var6845;- int var6846;- int var6847;- int var6848;- int var6849;- int var6850;- int var6851;- int var6852;- int var6853;- int var6854;- int var6855;- int var6856;- int var6857;- int var6858;- int var6859;- int var6860;- int var6861;- int var6862;- int var6863;- int var6864;- int var6865;- int var6866;- int var6867;- int var6868;- int var6869;- int var6870;- int var6871;- int var6872;- int var6873;- int var6874;- int var6875;- int var6876;- int var6877;- int var6878;- int var6879;- int var6880;- int var6881;- int var6882;- int var6883;- int var6884;- int var6885;- int var6886;- int var6887;- int var6888;- int var6889;- int var6890;- int var6891;- int var6892;- int var6893;- int var6894;- int var6895;- int var6896;- int var6897;- int var6898;- int var6899;- int var6900;- int var6901;- int var6902;- int var6903;- int var6904;- int var6905;- int var6906;- int var6907;- int var6908;- int var6909;- int var6910;- int var6911;- int var6912;- int var6913;- int var6914;- int var6915;- int var6916;- int var6917;- int var6918;- int var6919;- int var6920;- int var6921;- int var6922;- int var6923;- int var6924;- int var6925;- int var6926;- int var6927;- int var6928;- int var6929;- int var6930;- int var6931;- int var6932;- int var6933;- int var6934;- int var6935;- int var6936;- int var6937;- int var6938;- int var6939;- int var6940;- int var6941;- int var6942;- int var6943;- int var6944;- int var6945;- int var6946;- int var6947;- int var6948;- int var6949;- int var6950;- int var6951;- int var6952;- int var6953;- int var6954;- int var6955;- int var6956;- int var6957;- int var6958;- int var6959;- int var6960;- int var6961;- int var6962;- int var6963;- int var6964;- int var6965;- int var6966;- int var6967;- int var6968;- int var6969;- int var6970;- int var6971;- int var6972;- int var6973;- int var6974;- int var6975;- int var6976;- int var6977;- int var6978;- int var6979;- int var6980;- int var6981;- int var6982;- int var6983;- int var6984;- int var6985;- int var6986;- int var6987;- int var6988;- int var6989;- int var6990;- int var6991;- int var6992;- int var6993;- int var6994;- int var6995;- int var6996;- int var6997;- int var6998;- int var6999;- int var7000;- int var7001;- int var7002;- int var7003;- int var7004;- int var7005;- int var7006;- int var7007;- int var7008;- int var7009;- int var7010;- int var7011;- int var7012;- int var7013;- int var7014;- int var7015;- int var7016;- int var7017;- int var7018;- int var7019;- int var7020;- int var7021;- int var7022;- int var7023;- int var7024;- int var7025;- int var7026;- int var7027;- int var7028;- int var7029;- int var7030;- int var7031;- int var7032;- int var7033;- int var7034;- int var7035;- int var7036;- int var7037;- int var7038;- int var7039;- int var7040;- int var7041;- int var7042;- int var7043;- int var7044;- int var7045;- int var7046;- int var7047;- int var7048;- int var7049;- int var7050;- int var7051;- int var7052;- int var7053;- int var7054;- int var7055;- int var7056;- int var7057;- int var7058;- int var7059;- int var7060;- int var7061;- int var7062;- int var7063;- int var7064;- int var7065;- int var7066;- int var7067;- int var7068;- int var7069;- int var7070;- int var7071;- int var7072;- int var7073;- int var7074;- int var7075;- int var7076;- int var7077;- int var7078;- int var7079;- int var7080;- int var7081;- int var7082;- int var7083;- int var7084;- int var7085;- int var7086;- int var7087;- int var7088;- int var7089;- int var7090;- int var7091;- int var7092;- int var7093;- int var7094;- int var7095;- int var7096;- int var7097;- int var7098;- int var7099;- int var7100;- int var7101;- int var7102;- int var7103;- int var7104;- int var7105;- int var7106;- int var7107;- int var7108;- int var7109;- int var7110;- int var7111;- int var7112;- int var7113;- int var7114;- int var7115;- int var7116;- int var7117;- int var7118;- int var7119;- int var7120;- int var7121;- int var7122;- int var7123;- int var7124;- int var7125;- int var7126;- int var7127;- int var7128;- int var7129;- int var7130;- int var7131;- int var7132;- int var7133;- int var7134;- int var7135;- int var7136;- int var7137;- int var7138;- int var7139;- int var7140;- int var7141;- int var7142;- int var7143;- int var7144;- int var7145;- int var7146;- int var7147;- int var7148;- int var7149;- int var7150;- int var7151;- int var7152;- int var7153;- int var7154;- int var7155;- int var7156;- int var7157;- int var7158;- int var7159;- int var7160;- int var7161;- int var7162;- int var7163;- int var7164;- int var7165;- int var7166;- int var7167;- int var7168;- int var7169;- int var7170;- int var7171;- int var7172;- int var7173;- int var7174;- int var7175;- int var7176;- int var7177;- int var7178;- int var7179;- int var7180;- int var7181;- int var7182;- int var7183;- int var7184;- int var7185;- int var7186;- int var7187;- int var7188;- int var7189;- int var7190;- int var7191;- int var7192;- int var7193;- int var7194;- int var7195;- int var7196;- int var7197;- int var7198;- int var7199;- int var7200;- int var7201;- int var7202;- int var7203;- int var7204;- int var7205;- int var7206;- int var7207;- int var7208;- int var7209;- int var7210;- int var7211;- int var7212;- int var7213;- int var7214;- int var7215;- int var7216;- int var7217;- int var7218;- int var7219;- int var7220;- int var7221;- int var7222;- int var7223;- int var7224;- int var7225;- int var7226;- int var7227;- int var7228;- int var7229;- int var7230;- int var7231;- int var7232;- int var7233;- int var7234;- int var7235;- int var7236;- int var7237;- int var7238;- int var7239;- int var7240;- int var7241;- int var7242;- int var7243;- int var7244;- int var7245;- int var7246;- int var7247;- int var7248;- int var7249;- int var7250;- int var7251;- int var7252;- int var7253;- int var7254;- int var7255;- int var7256;- int var7257;- int var7258;- int var7259;- int var7260;- int var7261;- int var7262;- int var7263;- int var7264;- int var7265;- int var7266;- int var7267;- int var7268;- int var7269;- int var7270;- int var7271;- int var7272;- int var7273;- int var7274;- int var7275;- int var7276;- int var7277;- int var7278;- int var7279;- int var7280;- int var7281;- int var7282;- int var7283;- int var7284;- int var7285;- int var7286;- int var7287;- int var7288;- int var7289;- int var7290;- int var7291;- int var7292;- int var7293;- int var7294;- int var7295;- int var7296;- int var7297;- int var7298;- int var7299;- int var7300;- int var7301;- int var7302;- int var7303;- int var7304;- int var7305;- int var7306;- int var7307;- int var7308;- int var7309;- int var7310;- int var7311;- int var7312;- int var7313;- int var7314;- int var7315;- int var7316;- int var7317;- int var7318;- int var7319;- int var7320;- int var7321;- int var7322;- int var7323;- int var7324;- int var7325;- int var7326;- int var7327;- int var7328;- int var7329;- int var7330;- int var7331;- int var7332;- int var7333;- int var7334;- int var7335;- int var7336;- int var7337;- int var7338;- int var7339;- int var7340;- int var7341;- int var7342;- int var7343;- int var7344;- int var7345;- int var7346;- int var7347;- int var7348;- int var7349;- int var7350;- int var7351;- int var7352;- int var7353;- int var7354;- int var7355;- int var7356;- int var7357;- int var7358;- int var7359;- int var7360;- int var7361;- int var7362;- int var7363;- int var7364;- int var7365;- int var7366;- int var7367;- int var7368;- int var7369;- int var7370;- int var7371;- int var7372;- int var7373;- int var7374;- int var7375;- int var7376;- int var7377;- int var7378;- int var7379;- int var7380;- int var7381;- int var7382;- int var7383;- int var7384;- int var7385;- int var7386;- int var7387;- int var7388;- int var7389;- int var7390;- int var7391;- int var7392;- int var7393;- int var7394;- int var7395;- int var7396;- int var7397;- int var7398;- int var7399;- int var7400;- int var7401;- int var7402;- int var7403;- int var7404;- int var7405;- int var7406;- int var7407;- int var7408;- int var7409;- int var7410;- int var7411;- int var7412;- int var7413;- int var7414;- int var7415;- int var7416;- int var7417;- int var7418;- int var7419;- int var7420;- int var7421;- int var7422;- int var7423;- int var7424;- int var7425;- int var7426;- int var7427;- int var7428;- int var7429;- int var7430;- int var7431;- int var7432;- int var7433;- int var7434;- int var7435;- int var7436;- int var7437;- int var7438;- int var7439;- int var7440;- int var7441;- int var7442;- int var7443;- int var7444;- int var7445;- int var7446;- int var7447;- int var7448;- int var7449;- int var7450;- int var7451;- int var7452;- int var7453;- int var7454;- int var7455;- int var7456;- int var7457;- int var7458;- int var7459;- int var7460;- int var7461;- int var7462;- int var7463;- int var7464;- int var7465;- int var7466;- int var7467;- int var7468;- int var7469;- int var7470;- int var7471;- int var7472;- int var7473;- int var7474;- int var7475;- int var7476;- int var7477;- int var7478;- int var7479;- int var7480;- int var7481;- int var7482;- int var7483;- int var7484;- int var7485;- int var7486;- int var7487;- int var7488;- int var7489;- int var7490;- int var7491;- int var7492;- int var7493;- int var7494;- int var7495;- int var7496;- int var7497;- int var7498;- int var7499;- int var7500;- int var7501;- int var7502;- int var7503;- int var7504;- int var7505;- int var7506;- int var7507;- int var7508;- int var7509;- int var7510;- int var7511;- int var7512;- int var7513;- int var7514;- int var7515;- int var7516;- int var7517;- int var7518;- int var7519;- int var7520;- int var7521;- int var7522;- int var7523;- int var7524;- int var7525;- int var7526;- int var7527;- int var7528;- int var7529;- int var7530;- int var7531;- int var7532;- int var7533;- int var7534;- int var7535;- int var7536;- int var7537;- int var7538;- int var7539;- int var7540;- int var7541;- int var7542;- int var7543;- int var7544;- int var7545;- int var7546;- int var7547;- int var7548;- int var7549;- int var7550;- int var7551;- int var7552;- int var7553;- int var7554;- int var7555;- int var7556;- int var7557;- int var7558;- int var7559;- int var7560;- int var7561;- int var7562;- int var7563;- int var7564;- int var7565;- int var7566;- int var7567;- int var7568;- int var7569;- int var7570;- int var7571;- int var7572;- int var7573;- int var7574;- int var7575;- int var7576;- int var7577;- int var7578;- int var7579;- int var7580;- int var7581;- int var7582;- int var7583;- int var7584;- int var7585;- int var7586;- int var7587;- int var7588;- int var7589;- int var7590;- int var7591;- int var7592;- int var7593;- int var7594;- int var7595;- int var7596;- int var7597;- int var7598;- int var7599;- int var7600;- int var7601;- int var7602;- int var7603;- int var7604;- int var7605;- int var7606;- int var7607;- int var7608;- int var7609;- int var7610;- int var7611;- int var7612;- int var7613;- int var7614;- int var7615;- int var7616;- int var7617;- int var7618;- int var7619;- int var7620;- int var7621;- int var7622;- int var7623;- int var7624;- int var7625;- int var7626;- int var7627;- int var7628;- int var7629;- int var7630;- int var7631;- int var7632;- int var7633;- int var7634;- int var7635;- int var7636;- int var7637;- int var7638;- int var7639;- int var7640;- int var7641;- int var7642;- int var7643;- int var7644;- int var7645;- int var7646;- int var7647;- int var7648;- int var7649;- int var7650;- int var7651;- int var7652;- int var7653;- int var7654;- int var7655;- int var7656;- int var7657;- int var7658;- int var7659;- int var7660;- int var7661;- int var7662;- int var7663;- int var7664;- int var7665;- int var7666;- int var7667;- int var7668;- int var7669;- int var7670;- int var7671;- int var7672;- int var7673;- int var7674;- int var7675;- int var7676;- int var7677;- int var7678;- int var7679;- int var7680;- int var7681;- int var7682;- int var7683;- int var7684;- int var7685;- int var7686;- int var7687;- int var7688;- int var7689;- int var7690;- int var7691;- int var7692;- int var7693;- int var7694;- int var7695;- int var7696;- int var7697;- int var7698;- int var7699;- int var7700;- int var7701;- int var7702;- int var7703;- int var7704;- int var7705;- int var7706;- int var7707;- int var7708;- int var7709;- int var7710;- int var7711;- int var7712;- int var7713;- int var7714;- int var7715;- int var7716;- int var7717;- int var7718;- int var7719;- int var7720;- int var7721;- int var7722;- int var7723;- int var7724;- int var7725;- int var7726;- int var7727;- int var7728;- int var7729;- int var7730;- int var7731;- int var7732;- int var7733;- int var7734;- int var7735;- int var7736;- int var7737;- int var7738;- int var7739;- int var7740;- int var7741;- int var7742;- int var7743;- int var7744;- int var7745;- int var7746;- int var7747;- int var7748;- int var7749;- int var7750;- int var7751;- int var7752;- int var7753;- int var7754;- int var7755;- int var7756;- int var7757;- int var7758;- int var7759;- int var7760;- int var7761;- int var7762;- int var7763;- int var7764;- int var7765;- int var7766;- int var7767;- int var7768;- int var7769;- int var7770;- int var7771;- int var7772;- int var7773;- int var7774;- int var7775;- int var7776;- int var7777;- int var7778;- int var7779;- int var7780;- int var7781;- int var7782;- int var7783;- int var7784;- int var7785;- int var7786;- int var7787;- int var7788;- int var7789;- int var7790;- int var7791;- int var7792;- int var7793;- int var7794;- int var7795;- int var7796;- int var7797;- int var7798;- int var7799;- int var7800;- int var7801;- int var7802;- int var7803;- int var7804;- int var7805;- int var7806;- int var7807;- int var7808;- int var7809;- int var7810;- int var7811;- int var7812;- int var7813;- int var7814;- int var7815;- int var7816;- int var7817;- int var7818;- int var7819;- int var7820;- int var7821;- int var7822;- int var7823;- int var7824;- int var7825;- int var7826;- int var7827;- int var7828;- int var7829;- int var7830;- int var7831;- int var7832;- int var7833;- int var7834;- int var7835;- int var7836;- int var7837;- int var7838;- int var7839;- int var7840;- int var7841;- int var7842;- int var7843;- int var7844;- int var7845;- int var7846;- int var7847;- int var7848;- int var7849;- int var7850;- int var7851;- int var7852;- int var7853;- int var7854;- int var7855;- int var7856;- int var7857;- int var7858;- int var7859;- int var7860;- int var7861;- int var7862;- int var7863;- int var7864;- int var7865;- int var7866;- int var7867;- int var7868;- int var7869;- int var7870;- int var7871;- int var7872;- int var7873;- int var7874;- int var7875;- int var7876;- int var7877;- int var7878;- int var7879;- int var7880;- int var7881;- int var7882;- int var7883;- int var7884;- int var7885;- int var7886;- int var7887;- int var7888;- int var7889;- int var7890;- int var7891;- int var7892;- int var7893;- int var7894;- int var7895;- int var7896;- int var7897;- int var7898;- int var7899;- int var7900;- int var7901;- int var7902;- int var7903;- int var7904;- int var7905;- int var7906;- int var7907;- int var7908;- int var7909;- int var7910;- int var7911;- int var7912;- int var7913;- int var7914;- int var7915;- int var7916;- int var7917;- int var7918;- int var7919;- int var7920;- int var7921;- int var7922;- int var7923;- int var7924;- int var7925;- int var7926;- int var7927;- int var7928;- int var7929;- int var7930;- int var7931;- int var7932;- int var7933;- int var7934;- int var7935;- int var7936;- int var7937;- int var7938;- int var7939;- int var7940;- int var7941;- int var7942;- int var7943;- int var7944;- int var7945;- int var7946;- int var7947;- int var7948;- int var7949;- int var7950;- int var7951;- int var7952;- int var7953;- int var7954;- int var7955;- int var7956;- int var7957;- int var7958;- int var7959;- int var7960;- int var7961;- int var7962;- int var7963;- int var7964;- int var7965;- int var7966;- int var7967;- int var7968;- int var7969;- int var7970;- int var7971;- int var7972;- int var7973;- int var7974;- int var7975;- int var7976;- int var7977;- int var7978;- int var7979;- int var7980;- int var7981;- int var7982;- int var7983;- int var7984;- int var7985;- int var7986;- int var7987;- int var7988;- int var7989;- int var7990;- int var7991;- int var7992;- int var7993;- int var7994;- int var7995;- int var7996;- int var7997;- int var7998;- int var7999;- int var8000;- int var8001;- int var8002;- int var8003;- int var8004;- int var8005;- int var8006;- int var8007;- int var8008;- int var8009;- int var8010;- int var8011;- int var8012;- int var8013;- int var8014;- int var8015;- int var8016;- int var8017;- int var8018;- int var8019;- int var8020;- int var8021;- int var8022;- int var8023;- int var8024;- int var8025;- int var8026;- int var8027;- int var8028;- int var8029;- int var8030;- int var8031;- int var8032;- int var8033;- int var8034;- int var8035;- int var8036;- int var8037;- int var8038;- int var8039;- int var8040;- int var8041;- int var8042;- int var8043;- int var8044;- int var8045;- int var8046;- int var8047;- int var8048;- int var8049;- int var8050;- int var8051;- int var8052;- int var8053;- int var8054;- int var8055;- int var8056;- int var8057;- int var8058;- int var8059;- int var8060;- int var8061;- int var8062;- int var8063;- int var8064;- int var8065;- int var8066;- int var8067;- int var8068;- int var8069;- int var8070;- int var8071;- int var8072;- int var8073;- int var8074;- int var8075;- int var8076;- int var8077;- int var8078;- int var8079;- int var8080;- int var8081;- int var8082;- int var8083;- int var8084;- int var8085;- int var8086;- int var8087;- int var8088;- int var8089;- int var8090;- int var8091;- int var8092;- int var8093;- int var8094;- int var8095;- int var8096;- int var8097;- int var8098;- int var8099;- int var8100;- int var8101;- int var8102;- int var8103;- int var8104;- int var8105;- int var8106;- int var8107;- int var8108;- int var8109;- int var8110;- int var8111;- int var8112;- int var8113;- int var8114;- int var8115;- int var8116;- int var8117;- int var8118;- int var8119;- int var8120;- int var8121;- int var8122;- int var8123;- int var8124;- int var8125;- int var8126;- int var8127;- int var8128;- int var8129;- int var8130;- int var8131;- int var8132;- int var8133;- int var8134;- int var8135;- int var8136;- int var8137;- int var8138;- int var8139;- int var8140;- int var8141;- int var8142;- int var8143;- int var8144;- int var8145;- int var8146;- int var8147;- int var8148;- int var8149;- int var8150;- int var8151;- int var8152;- int var8153;- int var8154;- int var8155;- int var8156;- int var8157;- int var8158;- int var8159;- int var8160;- int var8161;- int var8162;- int var8163;- int var8164;- int var8165;- int var8166;- int var8167;- int var8168;- int var8169;- int var8170;- int var8171;- int var8172;- int var8173;- int var8174;- int var8175;- int var8176;- int var8177;- int var8178;- int var8179;- int var8180;- int var8181;- int var8182;- int var8183;- int var8184;- int var8185;- int var8186;- int var8187;- int var8188;- int var8189;- int var8190;- int var8191;- int var8192;- int var8193;- int var8194;- int var8195;- int var8196;- int var8197;- int var8198;- int var8199;- int var8200;- int var8201;- int var8202;- int var8203;- int var8204;- int var8205;- int var8206;- int var8207;- int var8208;- int var8209;- int var8210;- int var8211;- int var8212;- int var8213;- int var8214;- int var8215;- int var8216;- int var8217;- int var8218;- int var8219;- int var8220;- int var8221;- int var8222;- int var8223;- int var8224;- int var8225;- int var8226;- int var8227;- int var8228;- int var8229;- int var8230;- int var8231;- int var8232;- int var8233;- int var8234;- int var8235;- int var8236;- int var8237;- int var8238;- int var8239;- int var8240;- int var8241;- int var8242;- int var8243;- int var8244;- int var8245;- int var8246;- int var8247;- int var8248;- int var8249;- int var8250;- int var8251;- int var8252;- int var8253;- int var8254;- int var8255;- int var8256;- int var8257;- int var8258;- int var8259;- int var8260;- int var8261;- int var8262;- int var8263;- int var8264;- int var8265;- int var8266;- int var8267;- int var8268;- int var8269;- int var8270;- int var8271;- int var8272;- int var8273;- int var8274;- int var8275;- int var8276;- int var8277;- int var8278;- int var8279;- int var8280;- int var8281;- int var8282;- int var8283;- int var8284;- int var8285;- int var8286;- int var8287;- int var8288;- int var8289;- int var8290;- int var8291;- int var8292;- int var8293;- int var8294;- int var8295;- int var8296;- int var8297;- int var8298;- int var8299;- int var8300;- int var8301;- int var8302;- int var8303;- int var8304;- int var8305;- int var8306;- int var8307;- int var8308;- int var8309;- int var8310;- int var8311;- int var8312;- int var8313;- int var8314;- int var8315;- int var8316;- int var8317;- int var8318;- int var8319;- int var8320;- int var8321;- int var8322;- int var8323;- int var8324;- int var8325;- int var8326;- int var8327;- int var8328;- int var8329;- int var8330;- int var8331;- int var8332;- int var8333;- int var8334;- int var8335;- int var8336;- int var8337;- int var8338;- int var8339;- int var8340;- int var8341;- int var8342;- int var8343;- int var8344;- int var8345;- int var8346;- int var8347;- int var8348;- int var8349;- int var8350;- int var8351;- int var8352;- int var8353;- int var8354;- int var8355;- int var8356;- int var8357;- int var8358;- int var8359;- int var8360;- int var8361;- int var8362;- int var8363;- int var8364;- int var8365;- int var8366;- int var8367;- int var8368;- int var8369;- int var8370;- int var8371;- int var8372;- int var8373;- int var8374;- int var8375;- int var8376;- int var8377;- int var8378;- int var8379;- int var8380;- int var8381;- int var8382;- int var8383;- int var8384;- int var8385;- int var8386;- int var8387;- int var8388;- int var8389;- int var8390;- int var8391;- int var8392;- int var8393;- int var8394;- int var8395;- int var8396;- int var8397;- int var8398;- int var8399;- int var8400;- int var8401;- int var8402;- int var8403;- int var8404;- int var8405;- int var8406;- int var8407;- int var8408;- int var8409;- int var8410;- int var8411;- int var8412;- int var8413;- int var8414;- int var8415;- int var8416;- int var8417;- int var8418;- int var8419;- int var8420;- int var8421;- int var8422;- int var8423;- int var8424;- int var8425;- int var8426;- int var8427;- int var8428;- int var8429;- int var8430;- int var8431;- int var8432;- int var8433;- int var8434;- int var8435;- int var8436;- int var8437;- int var8438;- int var8439;- int var8440;- int var8441;- int var8442;- int var8443;- int var8444;- int var8445;- int var8446;- int var8447;- int var8448;- int var8449;- int var8450;- int var8451;- int var8452;- int var8453;- int var8454;- int var8455;- int var8456;- int var8457;- int var8458;- int var8459;- int var8460;- int var8461;- int var8462;- int var8463;- int var8464;- int var8465;- int var8466;- int var8467;- int var8468;- int var8469;- int var8470;- int var8471;- int var8472;- int var8473;- int var8474;- int var8475;- int var8476;- int var8477;- int var8478;- int var8479;- int var8480;- int var8481;- int var8482;- int var8483;- int var8484;- int var8485;- int var8486;- int var8487;- int var8488;- int var8489;- int var8490;- int var8491;- int var8492;- int var8493;- int var8494;- int var8495;- int var8496;- int var8497;- int var8498;- int var8499;- int var8500;- int var8501;- int var8502;- int var8503;- int var8504;- int var8505;- int var8506;- int var8507;- int var8508;- int var8509;- int var8510;- int var8511;- int var8512;- int var8513;- int var8514;- int var8515;- int var8516;- int var8517;- int var8518;- int var8519;- int var8520;- int var8521;- int var8522;- int var8523;- int var8524;- int var8525;- int var8526;- int var8527;- int var8528;- int var8529;- int var8530;- int var8531;- int var8532;- int var8533;- int var8534;- int var8535;- int var8536;- int var8537;- int var8538;- int var8539;- int var8540;- int var8541;- int var8542;- int var8543;- int var8544;- int var8545;- int var8546;- int var8547;- int var8548;- int var8549;- int var8550;- int var8551;- int var8552;- int var8553;- int var8554;- int var8555;- int var8556;- int var8557;- int var8558;- int var8559;- int var8560;- int var8561;- int var8562;- int var8563;- int var8564;- int var8565;- int var8566;- int var8567;- int var8568;- int var8569;- int var8570;- int var8571;- int var8572;- int var8573;- int var8574;- int var8575;- int var8576;- int var8577;- int var8578;- int var8579;- int var8580;- int var8581;- int var8582;- int var8583;- int var8584;- int var8585;- int var8586;- int var8587;- int var8588;- int var8589;- int var8590;- int var8591;- int var8592;- int var8593;- int var8594;- int var8595;- int var8596;- int var8597;- int var8598;- int var8599;- int var8600;- int var8601;- int var8602;- int var8603;- int var8604;- int var8605;- int var8606;- int var8607;- int var8608;- int var8609;- int var8610;- int var8611;- int var8612;- int var8613;- int var8614;- int var8615;- int var8616;- int var8617;- int var8618;- int var8619;- int var8620;- int var8621;- int var8622;- int var8623;- int var8624;- int var8625;- int var8626;- int var8627;- int var8628;- int var8629;- int var8630;- int var8631;- int var8632;- int var8633;- int var8634;- int var8635;- int var8636;- int var8637;- int var8638;- int var8639;- int var8640;- int var8641;- int var8642;- int var8643;- int var8644;- int var8645;- int var8646;- int var8647;- int var8648;- int var8649;- int var8650;- int var8651;- int var8652;- int var8653;- int var8654;- int var8655;- int var8656;- int var8657;- int var8658;- int var8659;- int var8660;- int var8661;- int var8662;- int var8663;- int var8664;- int var8665;- int var8666;- int var8667;- int var8668;- int var8669;- int var8670;- int var8671;- int var8672;- int var8673;- int var8674;- int var8675;- int var8676;- int var8677;- int var8678;- int var8679;- int var8680;- int var8681;- int var8682;- int var8683;- int var8684;- int var8685;- int var8686;- int var8687;- int var8688;- int var8689;- int var8690;- int var8691;- int var8692;- int var8693;- int var8694;- int var8695;- int var8696;- int var8697;- int var8698;- int var8699;- int var8700;- int var8701;- int var8702;- int var8703;- int var8704;- int var8705;- int var8706;- int var8707;- int var8708;- int var8709;- int var8710;- int var8711;- int var8712;- int var8713;- int var8714;- int var8715;- int var8716;- int var8717;- int var8718;- int var8719;- int var8720;- int var8721;- int var8722;- int var8723;- int var8724;- int var8725;- int var8726;- int var8727;- int var8728;- int var8729;- int var8730;- int var8731;- int var8732;- int var8733;- int var8734;- int var8735;- int var8736;- int var8737;- int var8738;- int var8739;- int var8740;- int var8741;- int var8742;- int var8743;- int var8744;- int var8745;- int var8746;- int var8747;- int var8748;- int var8749;- int var8750;- int var8751;- int var8752;- int var8753;- int var8754;- int var8755;- int var8756;- int var8757;- int var8758;- int var8759;- int var8760;- int var8761;- int var8762;- int var8763;- int var8764;- int var8765;- int var8766;- int var8767;- int var8768;- int var8769;- int var8770;- int var8771;- int var8772;- int var8773;- int var8774;- int var8775;- int var8776;- int var8777;- int var8778;- int var8779;- int var8780;- int var8781;- int var8782;- int var8783;- int var8784;- int var8785;- int var8786;- int var8787;- int var8788;- int var8789;- int var8790;- int var8791;- int var8792;- int var8793;- int var8794;- int var8795;- int var8796;- int var8797;- int var8798;- int var8799;- int var8800;- int var8801;- int var8802;- int var8803;- int var8804;- int var8805;- int var8806;- int var8807;- int var8808;- int var8809;- int var8810;- int var8811;- int var8812;- int var8813;- int var8814;- int var8815;- int var8816;- int var8817;- int var8818;- int var8819;- int var8820;- int var8821;- int var8822;- int var8823;- int var8824;- int var8825;- int var8826;- int var8827;- int var8828;- int var8829;- int var8830;- int var8831;- int var8832;- int var8833;- int var8834;- int var8835;- int var8836;- int var8837;- int var8838;- int var8839;- int var8840;- int var8841;- int var8842;- int var8843;- int var8844;- int var8845;- int var8846;- int var8847;- int var8848;- int var8849;- int var8850;- int var8851;- int var8852;- int var8853;- int var8854;- int var8855;- int var8856;- int var8857;- int var8858;- int var8859;- int var8860;- int var8861;- int var8862;- int var8863;- int var8864;- int var8865;- int var8866;- int var8867;- int var8868;- int var8869;- int var8870;- int var8871;- int var8872;- int var8873;- int var8874;- int var8875;- int var8876;- int var8877;- int var8878;- int var8879;- int var8880;- int var8881;- int var8882;- int var8883;- int var8884;- int var8885;- int var8886;- int var8887;- int var8888;- int var8889;- int var8890;- int var8891;- int var8892;- int var8893;- int var8894;- int var8895;- int var8896;- int var8897;- int var8898;- int var8899;- int var8900;- int var8901;- int var8902;- int var8903;- int var8904;- int var8905;- int var8906;- int var8907;- int var8908;- int var8909;- int var8910;- int var8911;- int var8912;- int var8913;- int var8914;- int var8915;- int var8916;- int var8917;- int var8918;- int var8919;- int var8920;- int var8921;- int var8922;- int var8923;- int var8924;- int var8925;- int var8926;- int var8927;- int var8928;- int var8929;- int var8930;- int var8931;- int var8932;- int var8933;- int var8934;- int var8935;- int var8936;- int var8937;- int var8938;- int var8939;- int var8940;- int var8941;- int var8942;- int var8943;- int var8944;- int var8945;- int var8946;- int var8947;- int var8948;- int var8949;- int var8950;- int var8951;- int var8952;- int var8953;- int var8954;- int var8955;- int var8956;- int var8957;- int var8958;- int var8959;- int var8960;- int var8961;- int var8962;- int var8963;- int var8964;- int var8965;- int var8966;- int var8967;- int var8968;- int var8969;- int var8970;- int var8971;- int var8972;- int var8973;- int var8974;- int var8975;- int var8976;- int var8977;- int var8978;- int var8979;- int var8980;- int var8981;- int var8982;- int var8983;- int var8984;- int var8985;- int var8986;- int var8987;- int var8988;- int var8989;- int var8990;- int var8991;- int var8992;- int var8993;- int var8994;- int var8995;- int var8996;- int var8997;- int var8998;- int var8999;- int var9000;- int var9001;- int var9002;- int var9003;- int var9004;- int var9005;- int var9006;- int var9007;- int var9008;- int var9009;- int var9010;- int var9011;- int var9012;- int var9013;- int var9014;- int var9015;- int var9016;- int var9017;- int var9018;- int var9019;- int var9020;- int var9021;- int var9022;- int var9023;- int var9024;- int var9025;- int var9026;- int var9027;- int var9028;- int var9029;- int var9030;- int var9031;- int var9032;- int var9033;- int var9034;- int var9035;- int var9036;- int var9037;- int var9038;- int var9039;- int var9040;- int var9041;- int var9042;- int var9043;- int var9044;- int var9045;- int var9046;- int var9047;- int var9048;- int var9049;- int var9050;- int var9051;- int var9052;- int var9053;- int var9054;- int var9055;- int var9056;- int var9057;- int var9058;- int var9059;- int var9060;- int var9061;- int var9062;- int var9063;- int var9064;- int var9065;- int var9066;- int var9067;- int var9068;- int var9069;- int var9070;- int var9071;- int var9072;- int var9073;- int var9074;- int var9075;- int var9076;- int var9077;- int var9078;- int var9079;- int var9080;- int var9081;- int var9082;- int var9083;- int var9084;- int var9085;- int var9086;- int var9087;- int var9088;- int var9089;- int var9090;- int var9091;- int var9092;- int var9093;- int var9094;- int var9095;- int var9096;- int var9097;- int var9098;- int var9099;- int var9100;- int var9101;- int var9102;- int var9103;- int var9104;- int var9105;- int var9106;- int var9107;- int var9108;- int var9109;- int var9110;- int var9111;- int var9112;- int var9113;- int var9114;- int var9115;- int var9116;- int var9117;- int var9118;- int var9119;- int var9120;- int var9121;- int var9122;- int var9123;- int var9124;- int var9125;- int var9126;- int var9127;- int var9128;- int var9129;- int var9130;- int var9131;- int var9132;- int var9133;- int var9134;- int var9135;- int var9136;- int var9137;- int var9138;- int var9139;- int var9140;- int var9141;- int var9142;- int var9143;- int var9144;- int var9145;- int var9146;- int var9147;- int var9148;- int var9149;- int var9150;- int var9151;- int var9152;- int var9153;- int var9154;- int var9155;- int var9156;- int var9157;- int var9158;- int var9159;- int var9160;- int var9161;- int var9162;- int var9163;- int var9164;- int var9165;- int var9166;- int var9167;- int var9168;- int var9169;- int var9170;- int var9171;- int var9172;- int var9173;- int var9174;- int var9175;- int var9176;- int var9177;- int var9178;- int var9179;- int var9180;- int var9181;- int var9182;- int var9183;- int var9184;- int var9185;- int var9186;- int var9187;- int var9188;- int var9189;- int var9190;- int var9191;- int var9192;- int var9193;- int var9194;- int var9195;- int var9196;- int var9197;- int var9198;- int var9199;- int var9200;- int var9201;- int var9202;- int var9203;- int var9204;- int var9205;- int var9206;- int var9207;- int var9208;- int var9209;- int var9210;- int var9211;- int var9212;- int var9213;- int var9214;- int var9215;- int var9216;- int var9217;- int var9218;- int var9219;- int var9220;- int var9221;- int var9222;- int var9223;- int var9224;- int var9225;- int var9226;- int var9227;- int var9228;- int var9229;- int var9230;- int var9231;- int var9232;- int var9233;- int var9234;- int var9235;- int var9236;- int var9237;- int var9238;- int var9239;- int var9240;- int var9241;- int var9242;- int var9243;- int var9244;- int var9245;- int var9246;- int var9247;- int var9248;- int var9249;- int var9250;- int var9251;- int var9252;- int var9253;- int var9254;- int var9255;- int var9256;- int var9257;- int var9258;- int var9259;- int var9260;- int var9261;- int var9262;- int var9263;- int var9264;- int var9265;- int var9266;- int var9267;- int var9268;- int var9269;- int var9270;- int var9271;- int var9272;- int var9273;- int var9274;- int var9275;- int var9276;- int var9277;- int var9278;- int var9279;- int var9280;- int var9281;- int var9282;- int var9283;- int var9284;- int var9285;- int var9286;- int var9287;- int var9288;- int var9289;- int var9290;- int var9291;- int var9292;- int var9293;- int var9294;- int var9295;- int var9296;- int var9297;- int var9298;- int var9299;- int var9300;- int var9301;- int var9302;- int var9303;- int var9304;- int var9305;- int var9306;- int var9307;- int var9308;- int var9309;- int var9310;- int var9311;- int var9312;- int var9313;- int var9314;- int var9315;- int var9316;- int var9317;- int var9318;- int var9319;- int var9320;- int var9321;- int var9322;- int var9323;- int var9324;- int var9325;- int var9326;- int var9327;- int var9328;- int var9329;- int var9330;- int var9331;- int var9332;- int var9333;- int var9334;- int var9335;- int var9336;- int var9337;- int var9338;- int var9339;- int var9340;- int var9341;- int var9342;- int var9343;- int var9344;- int var9345;- int var9346;- int var9347;- int var9348;- int var9349;- int var9350;- int var9351;- int var9352;- int var9353;- int var9354;- int var9355;- int var9356;- int var9357;- int var9358;- int var9359;- int var9360;- int var9361;- int var9362;- int var9363;- int var9364;- int var9365;- int var9366;- int var9367;- int var9368;- int var9369;- int var9370;- int var9371;- int var9372;- int var9373;- int var9374;- int var9375;- int var9376;- int var9377;- int var9378;- int var9379;- int var9380;- int var9381;- int var9382;- int var9383;- int var9384;- int var9385;- int var9386;- int var9387;- int var9388;- int var9389;- int var9390;- int var9391;- int var9392;- int var9393;- int var9394;- int var9395;- int var9396;- int var9397;- int var9398;- int var9399;- int var9400;- int var9401;- int var9402;- int var9403;- int var9404;- int var9405;- int var9406;- int var9407;- int var9408;- int var9409;- int var9410;- int var9411;- int var9412;- int var9413;- int var9414;- int var9415;- int var9416;- int var9417;- int var9418;- int var9419;- int var9420;- int var9421;- int var9422;- int var9423;- int var9424;- int var9425;- int var9426;- int var9427;- int var9428;- int var9429;- int var9430;- int var9431;- int var9432;- int var9433;- int var9434;- int var9435;- int var9436;- int var9437;- int var9438;- int var9439;- int var9440;- int var9441;- int var9442;- int var9443;- int var9444;- int var9445;- int var9446;- int var9447;- int var9448;- int var9449;- int var9450;- int var9451;- int var9452;- int var9453;- int var9454;- int var9455;- int var9456;- int var9457;- int var9458;- int var9459;- int var9460;- int var9461;- int var9462;- int var9463;- int var9464;- int var9465;- int var9466;- int var9467;- int var9468;- int var9469;- int var9470;- int var9471;- int var9472;- int var9473;- int var9474;- int var9475;- int var9476;- int var9477;- int var9478;- int var9479;- int var9480;- int var9481;- int var9482;- int var9483;- int var9484;- int var9485;- int var9486;- int var9487;- int var9488;- int var9489;- int var9490;- int var9491;- int var9492;- int var9493;- int var9494;- int var9495;- int var9496;- int var9497;- int var9498;- int var9499;- int var9500;- int var9501;- int var9502;- int var9503;- int var9504;- int var9505;- int var9506;- int var9507;- int var9508;- int var9509;- int var9510;- int var9511;- int var9512;- int var9513;- int var9514;- int var9515;- int var9516;- int var9517;- int var9518;- int var9519;- int var9520;- int var9521;- int var9522;- int var9523;- int var9524;- int var9525;- int var9526;- int var9527;- int var9528;- int var9529;- int var9530;- int var9531;- int var9532;- int var9533;- int var9534;- int var9535;- int var9536;- int var9537;- int var9538;- int var9539;- int var9540;- int var9541;- int var9542;- int var9543;- int var9544;- int var9545;- int var9546;- int var9547;- int var9548;- int var9549;- int var9550;- int var9551;- int var9552;- int var9553;- int var9554;- int var9555;- int var9556;- int var9557;- int var9558;- int var9559;- int var9560;- int var9561;- int var9562;- int var9563;- int var9564;- int var9565;- int var9566;- int var9567;- int var9568;- int var9569;- int var9570;- int var9571;- int var9572;- int var9573;- int var9574;- int var9575;- int var9576;- int var9577;- int var9578;- int var9579;- int var9580;- int var9581;- int var9582;- int var9583;- int var9584;- int var9585;- int var9586;- int var9587;- int var9588;- int var9589;- int var9590;- int var9591;- int var9592;- int var9593;- int var9594;- int var9595;- int var9596;- int var9597;- int var9598;- int var9599;- int var9600;- int var9601;- int var9602;- int var9603;- int var9604;- int var9605;- int var9606;- int var9607;- int var9608;- int var9609;- int var9610;- int var9611;- int var9612;- int var9613;- int var9614;- int var9615;- int var9616;- int var9617;- int var9618;- int var9619;- int var9620;- int var9621;- int var9622;- int var9623;- int var9624;- int var9625;- int var9626;- int var9627;- int var9628;- int var9629;- int var9630;- int var9631;- int var9632;- int var9633;- int var9634;- int var9635;- int var9636;- int var9637;- int var9638;- int var9639;- int var9640;- int var9641;- int var9642;- int var9643;- int var9644;- int var9645;- int var9646;- int var9647;- int var9648;- int var9649;- int var9650;- int var9651;- int var9652;- int var9653;- int var9654;- int var9655;- int var9656;- int var9657;- int var9658;- int var9659;- int var9660;- int var9661;- int var9662;- int var9663;- int var9664;- int var9665;- int var9666;- int var9667;- int var9668;- int var9669;- int var9670;- int var9671;- int var9672;- int var9673;- int var9674;- int var9675;- int var9676;- int var9677;- int var9678;- int var9679;- int var9680;- int var9681;- int var9682;- int var9683;- int var9684;- int var9685;- int var9686;- int var9687;- int var9688;- int var9689;- int var9690;- int var9691;- int var9692;- int var9693;- int var9694;- int var9695;- int var9696;- int var9697;- int var9698;- int var9699;- int var9700;- int var9701;- int var9702;- int var9703;- int var9704;- int var9705;- int var9706;- int var9707;- int var9708;- int var9709;- int var9710;- int var9711;- int var9712;- int var9713;- int var9714;- int var9715;- int var9716;- int var9717;- int var9718;- int var9719;- int var9720;- int var9721;- int var9722;- int var9723;- int var9724;- int var9725;- int var9726;- int var9727;- int var9728;- int var9729;- int var9730;- int var9731;- int var9732;- int var9733;- int var9734;- int var9735;- int var9736;- int var9737;- int var9738;- int var9739;- int var9740;- int var9741;- int var9742;- int var9743;- int var9744;- int var9745;- int var9746;- int var9747;- int var9748;- int var9749;- int var9750;- int var9751;- int var9752;- int var9753;- int var9754;- int var9755;- int var9756;- int var9757;- int var9758;- int var9759;- int var9760;- int var9761;- int var9762;- int var9763;- int var9764;- int var9765;- int var9766;- int var9767;- int var9768;- int var9769;- int var9770;- int var9771;- int var9772;- int var9773;- int var9774;- int var9775;- int var9776;- int var9777;- int var9778;- int var9779;- int var9780;- int var9781;- int var9782;- int var9783;- int var9784;- int var9785;- int var9786;- int var9787;- int var9788;- int var9789;- int var9790;- int var9791;- int var9792;- int var9793;- int var9794;- int var9795;- int var9796;- int var9797;- int var9798;- int var9799;- int var9800;- int var9801;- int var9802;- int var9803;- int var9804;- int var9805;- int var9806;- int var9807;- int var9808;- int var9809;- int var9810;- int var9811;- int var9812;- int var9813;- int var9814;- int var9815;- int var9816;- int var9817;- int var9818;- int var9819;- int var9820;- int var9821;- int var9822;- int var9823;- int var9824;- int var9825;- int var9826;- int var9827;- int var9828;- int var9829;- int var9830;- int var9831;- int var9832;- int var9833;- int var9834;- int var9835;- int var9836;- int var9837;- int var9838;- int var9839;- int var9840;- int var9841;- int var9842;- int var9843;- int var9844;- int var9845;- int var9846;- int var9847;- int var9848;- int var9849;- int var9850;- int var9851;- int var9852;- int var9853;- int var9854;- int var9855;- int var9856;- int var9857;- int var9858;- int var9859;- int var9860;- int var9861;- int var9862;- int var9863;- int var9864;- int var9865;- int var9866;- int var9867;- int var9868;- int var9869;- int var9870;- int var9871;- int var9872;- int var9873;- int var9874;- int var9875;- int var9876;- int var9877;- int var9878;- int var9879;- int var9880;- int var9881;- int var9882;- int var9883;- int var9884;- int var9885;- int var9886;- int var9887;- int var9888;- int var9889;- int var9890;- int var9891;- int var9892;- int var9893;- int var9894;- int var9895;- int var9896;- int var9897;- int var9898;- int var9899;- int var9900;- int var9901;- int var9902;- int var9903;- int var9904;- int var9905;- int var9906;- int var9907;- int var9908;- int var9909;- int var9910;- int var9911;- int var9912;- int var9913;- int var9914;- int var9915;- int var9916;- int var9917;- int var9918;- int var9919;- int var9920;- int var9921;- int var9922;- int var9923;- int var9924;- int var9925;- int var9926;- int var9927;- int var9928;- int var9929;- int var9930;- int var9931;- int var9932;- int var9933;- int var9934;- int var9935;- int var9936;- int var9937;- int var9938;- int var9939;- int var9940;- int var9941;- int var9942;- int var9943;- int var9944;- int var9945;- int var9946;- int var9947;- int var9948;- int var9949;- int var9950;- int var9951;- int var9952;- int var9953;- int var9954;- int var9955;- int var9956;- int var9957;- int var9958;- int var9959;- int var9960;- int var9961;- int var9962;- int var9963;- int var9964;- int var9965;- int var9966;- int var9967;- int var9968;- int var9969;- int var9970;- int var9971;- int var9972;- int var9973;- int var9974;- int var9975;- int var9976;- int var9977;- int var9978;- int var9979;- int var9980;- int var9981;- int var9982;- int var9983;- int var9984;- int var9985;- int var9986;- int var9987;- int var9988;- int var9989;- int var9990;- int var9991;- int var9992;- int var9993;- int var9994;- int var9995;- int var9996;- int var9997;- int var9998;- int var9999;- int var10000;- return 1+1;- }F diff --git a/tests/test2.c b/tests/test2.c deleted file mode 100644 --- a/tests/test2.c +++ /dev/null-- extern int err;-- struct A- {- int x;- int y;- int kak:1;- }zeh;-- int main()- {- int * const * volatile a[3][2][1];- struct A kek;- return 0;- }F diff --git a/tests/test3.c b/tests/test3.c deleted file mode 100644 --- a/tests/test3.c +++ /dev/null- #define max(x,y) (x>y?x:y)- #if defined VERSION == 1- int kak;- #else- int err;- #endif----- int external_int;- int static_int;- int fib(int n)- {- max(1,max(1,2));- int a=1,b=1,c;- for(n;n>0;--n)- {- c=a;- a+=b;- b=c;- }- return a;-- }- int main()- {- int *a;- int iff;- ++external_int;- a[10*100];- alert(fib(10));- +1;- a->b&c;- do 1; while(1);- return 0;- }F diff --git a/tests/test4.c b/tests/test4.c deleted file mode 100644 --- a/tests/test4.c +++ /dev/null- extern int a=10;- extern int a;- int main()- {- {- extern int a;- }- }F diff --git a/tests/test5.c b/tests/test5.c deleted file mode 100644 --- a/tests/test5.c +++ /dev/null- extern int a;- 1;F diff --git a/tests/testerror.c b/tests/testerror.c deleted file mode 100644 --- a/tests/testerror.c +++ /dev/null- long a;- long long a;- char a;--- int main()- {- short long kek+1+2+3;- int asdf[1];- a??1:1;- return return;- return 0;- }-F diff --git a/wonky.c b/wonky.c new file mode 100644 --- /dev/null +++ b/wonky.c+ #include<stdio.h>+ #include<stdlib.h>++ #include <all.h>+++++ int id(int a)+ {+ return a;+ }+ int (*test(int (*a)(int)))(int)+ {+ return a;+ }++ int main(int argc,char **argv)+ {+ /*+ int (*k)(int a,char** b)=main;+ FILE *in;+ char *src;+ struct Queue tokens;+ struct AST* test_expression;+ struct AST* test_declaration;+ struct AST* test_translation_unit;+ struct Type* test_typename;+ struct Scope *global_scope;+ const const const volatile typedef const int const volatile * const index;+ int typedef kek;++ //printf("%i",test(id)(1));++ in=fopen(argv[1],"r");+ if(in==NULL)+ {+ return -1;+ }+ src=get_src(in);++ tokens=lex(src);+ // print_tokens(stdout,&tokens);+ // printf("\n---------------------------\n");++ global_scope=get_scope(NULL);+ test_translation_unit=parse_translation_unit(&tokens,global_scope);+ print_ast(stdout,(struct AST*)test_translation_unit);+ // test_typename=parse_type_name(&tokens);+ // test_expression=parse_statement(&tokens);+ // print_expression(test_expression,stdout,0);++ */+ struct Command_Arguments *command_arguments;+ struct Program *program;++ command_arguments=parse_command_arguments(argv);+ if(command_arguments->error_message!=NULL)+ {+ fprintf(stderr,command_arguments->error_message);+ return 1;+ }+ if(command_arguments->print_tokens && !command_arguments->is_quiet)+ {+ return print_tokens_of_program(stdout,command_arguments->source_names);+ }else+ {+ program=parse_program(command_arguments->source_names);+ if(program==NULL)+ return 0;+ if(program->errors->size>0)+ {+ if(!command_arguments->is_quiet)+ {+ print_errors(stdout,program->errors);+ }+ delete_command_arguments(command_arguments);+ delete_program(program);+ return 1;+ }else if(command_arguments->print_ast && !command_arguments->is_quiet)+ {+ print_program_ast(stdout,program);+ }else if(command_arguments->transpile_to_js)+ {+ transpile_to_javascript(command_arguments->output_file,program,command_arguments);+ }+ }+++ /*+ program=get_program();+ lex_program(argv[1],program);+ print_program_tokens(stdout,program);+ parse_program(program);+ print_program_ast(stdout,program);+ */++++ delete_command_arguments(command_arguments);+ delete_program(program);+ return 0;+ }++++ /*++ int const index=111+222;+ kek test;+ if(1)+ {+ while(2)+ {+ (kek)-1+2;+ }+ 1?a,b:1?2:3*1;+ }else+ {+ do+ {+ {+ --a;+ }+ }while(a>b?1:0);+ for(;;);+ switch(a)+ {+ case b:+ return 0;+ break;+ default:+ return 1;+ return a=b=c=a->b->c->d;+ }+ goto error;+ }+ */F diff --git a/wonky.h b/wonky.h new file mode 100644 --- /dev/null +++ b/wonky.h+ #ifndef GCC_ALL+ #define GCC_ALL GCC_ALL+++ #include <gcc_arguments.h>++ #include <ast.h>+ #include <denoted.h>+ #include <lexer.h>+ #include <location.h>+ #include <parse_declaration.h>+ #include <parse_expression.h>+ #include <parse_statement.h>+ #include <parse_translation_unit.h>+ #include <preprocessing.h>+ #include <program.h>+ #include <scope.h>+ #include <semantics.h>+ #include <type.h>+ #include <transpile_to_js.h>++ #include <queue.h>+ #include <map.h>+ #include <stack.h>++ #include <print.h>+++ #endif