⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 trafo.c

📁 这是一个Linux下的集成开发环境
💻 C
📖 第 1 页 / 共 5 页
字号:
   return IdentifyProcGlobal (yyP13);yyL2:;/* line 589 "tcl.puma" */   return NULL;}static tTree get_namespace#if defined __STDC__ | defined __cplusplus(register tTree yyP14)#else(yyP14) register tTree yyP14;#endif{ yyRecursion:  if (yyP14->Kind == kenv) {  if (yyP14->env.object->Kind == knamespace) {/* line 597 "tcl.puma" */   return yyP14;  }  if (yyP14->env.object->Kind == kprogram) {/* line 597 "tcl.puma" */   return yyP14;  }/* line 600 "tcl.puma" */   yyP14 = yyP14->env.env;   goto yyRecursion;  } yyAbort ("get_namespace"); return 0;}static void pass2#if defined __STDC__ | defined __cplusplus(register tTree t)#else(t) register tTree t;#endif{ yyRecursion:  if (t->Kind == kstmt) {  if (t->stmt.words->Kind == kone_word) {  if (Tree_IsType (t->stmt.words->one_word.next, kword_c)) {/* line 606 "tcl.puma" */  {/* line 608 "tcl.puma" */   add_qualifications (t->stmt.words->one_word.ident, t->stmt.words->one_word.next);/* line 609 "tcl.puma" */   pass2 (t->stmt.words);/* line 610 "tcl.puma" */   t = t->stmt.next;   goto yyRecursion;  }  }  }/* line 612 "tcl.puma" */  {/* line 613 "tcl.puma" */   pass2 (t->stmt.words);/* line 614 "tcl.puma" */   t = t->stmt.next;   goto yyRecursion;  }  }  if (t->Kind == kproc) {  if (t->proc.qualification->Kind == klocal_ident) {/* line 616 "tcl.puma" */ {  tString prev_proc;  {/* line 618 "tcl.puma" *//* line 618 "tcl.puma" */   prev_proc = cur_proc_ptr;/* line 619 "tcl.puma" */   cur_proc_ptr = GetCStr (t->proc.qualification->local_ident.ident);/* line 620 "tcl.puma" */   pass2 (t->proc.block);/* line 621 "tcl.puma" */   cur_proc_ptr = prev_proc;/* line 622 "tcl.puma" */   t = t->proc.next;   goto yyRecursion;  } }  }  if (t->proc.qualification->Kind == kglobal_ident) {/* line 616 "tcl.puma" */ {  tString prev_proc;  {/* line 618 "tcl.puma" *//* line 618 "tcl.puma" */   prev_proc = cur_proc_ptr;/* line 619 "tcl.puma" */   cur_proc_ptr = GetCStr (t->proc.qualification->global_ident.ident);/* line 620 "tcl.puma" */   pass2 (t->proc.block);/* line 621 "tcl.puma" */   cur_proc_ptr = prev_proc;/* line 622 "tcl.puma" */   t = t->proc.next;   goto yyRecursion;  } }  }  if (t->proc.qualification->Kind == klocal_text) {/* line 624 "tcl.puma" */ {  tString prev_proc;  {/* line 626 "tcl.puma" *//* line 626 "tcl.puma" */   prev_proc = cur_proc_ptr;/* line 627 "tcl.puma" */   cur_proc_ptr = GetCStr (get_ident (t->proc.qualification));/* line 628 "tcl.puma" */   pass2 (t->proc.block);/* line 629 "tcl.puma" */   cur_proc_ptr = prev_proc;/* line 630 "tcl.puma" */   t = t->proc.next;   goto yyRecursion;  } }  }  if (t->proc.qualification->Kind == kglobal_text) {/* line 624 "tcl.puma" */ {  tString prev_proc;  {/* line 626 "tcl.puma" *//* line 626 "tcl.puma" */   prev_proc = cur_proc_ptr;/* line 627 "tcl.puma" */   cur_proc_ptr = GetCStr (get_ident (t->proc.qualification));/* line 628 "tcl.puma" */   pass2 (t->proc.block);/* line 629 "tcl.puma" */   cur_proc_ptr = prev_proc;/* line 630 "tcl.puma" */   t = t->proc.next;   goto yyRecursion;  } }  }  if (t->proc.block->texts.env->Kind == kenv) {/* line 632 "tcl.puma" */ {  tTree e;  tIdent ident;  tString prev_proc;  tString prev_class;  {/* line 635 "tcl.puma" *//* line 635 "tcl.puma" */   e = get_env (t->proc.qualification);/* line 636 "tcl.puma" *//* line 636 "tcl.puma" */   ident = get_ident (t->proc.qualification);/* line 637 "tcl.puma" */  if (e) {      t->proc.env = e;      t->proc.block->texts.env->env.env = e;      e->env.objects = mobject (t, ident, e->env.objects);      dcl (e->env.objects);   } else {      t->proc.env->env.objects = mobject (t, ident, t->proc.env->env.objects);      dcl (t->proc.env->env.objects);   }/* line 647 "tcl.puma" *//* line 647 "tcl.puma" */   prev_proc = cur_proc_ptr;/* line 648 "tcl.puma" */   cur_proc_ptr = GetCStr (ident);/* line 649 "tcl.puma" *//* line 649 "tcl.puma" */   prev_class = cur_class_ptr;/* line 650 "tcl.puma" */   cur_class_ptr = get_class (t->proc.qualification);/* line 651 "tcl.puma" */   get_param_objects (t->proc.param_names);/* line 652 "tcl.puma" */   get_objects (t->proc.block);/* line 653 "tcl.puma" */   pass2 (t->proc.block);/* line 654 "tcl.puma" */   cur_proc_ptr = prev_proc;/* line 655 "tcl.puma" */   cur_class_ptr = prev_class;/* line 656 "tcl.puma" */   t = t->proc.next;   goto yyRecursion;  } }  }  }  if (t->Kind == knamespace) {  if (t->namespace.qualification->Kind == klocal_ident) {/* line 658 "tcl.puma" */ {  tString prev_class;  {/* line 660 "tcl.puma" *//* line 660 "tcl.puma" */   prev_class = cur_class_ptr;/* line 661 "tcl.puma" */   cur_class_ptr = GetCStr (t->namespace.qualification->local_ident.ident);/* line 662 "tcl.puma" */   pass2 (t->namespace.block);/* line 663 "tcl.puma" */   cur_class_ptr = prev_class;/* line 664 "tcl.puma" */   t = t->namespace.next;   goto yyRecursion;  } }  }  if (t->namespace.qualification->Kind == kglobal_ident) {/* line 658 "tcl.puma" */ {  tString prev_class;  {/* line 660 "tcl.puma" *//* line 660 "tcl.puma" */   prev_class = cur_class_ptr;/* line 661 "tcl.puma" */   cur_class_ptr = GetCStr (t->namespace.qualification->global_ident.ident);/* line 662 "tcl.puma" */   pass2 (t->namespace.block);/* line 663 "tcl.puma" */   cur_class_ptr = prev_class;/* line 664 "tcl.puma" */   t = t->namespace.next;   goto yyRecursion;  } }  }  if (t->namespace.qualification->Kind == klocal_text) {/* line 666 "tcl.puma" */ {  tString prev_class;  {/* line 668 "tcl.puma" *//* line 668 "tcl.puma" */   prev_class = cur_class_ptr;/* line 669 "tcl.puma" */   cur_class_ptr = GetCStr (get_ident (t->namespace.qualification));/* line 670 "tcl.puma" */   pass2 (t->namespace.block);/* line 671 "tcl.puma" */   cur_class_ptr = prev_class;/* line 672 "tcl.puma" */   t = t->namespace.next;   goto yyRecursion;  } }  }  if (t->namespace.qualification->Kind == kglobal_text) {/* line 666 "tcl.puma" */ {  tString prev_class;  {/* line 668 "tcl.puma" *//* line 668 "tcl.puma" */   prev_class = cur_class_ptr;/* line 669 "tcl.puma" */   cur_class_ptr = GetCStr (get_ident (t->namespace.qualification));/* line 670 "tcl.puma" */   pass2 (t->namespace.block);/* line 671 "tcl.puma" */   cur_class_ptr = prev_class;/* line 672 "tcl.puma" */   t = t->namespace.next;   goto yyRecursion;  } }  }  if (t->namespace.block->texts.env->Kind == kenv) {/* line 674 "tcl.puma" */ {  tTree e;  tIdent ident;  tTree obj;  tString prev_class;  {/* line 676 "tcl.puma" *//* line 676 "tcl.puma" */   e = get_env (t->namespace.qualification);/* line 677 "tcl.puma" *//* line 677 "tcl.puma" */   ident = get_ident (t->namespace.qualification);/* line 678 "tcl.puma" *//* line 679 "tcl.puma" */  if (e) {      t->namespace.env = e;      t->namespace.block->texts.env->env.env = e;      obj = IdentifyLocal (ident, e->env.objects);      if (obj != NoTree && obj->object.object->Kind == knamespace) {	 relocate (t->namespace.block, obj->object.object->namespace.block->texts.env);	 use (obj, t->namespace.qualification->qualification_c.pos, PAF_REF_READ);      } else {	 e->env.objects = mobject (t, ident, e->env.objects);	 dcl (e->env.objects);      }   } else {      t->namespace.env->env.objects = mobject (t, ident, t->namespace.env->env.objects);      dcl (t->namespace.env->env.objects);   }/* line 695 "tcl.puma" *//* line 695 "tcl.puma" */   prev_class = cur_class_ptr;/* line 696 "tcl.puma" */   cur_class_ptr = GetCStr (ident);/* line 697 "tcl.puma" */   get_objects (t->namespace.block);/* line 698 "tcl.puma" */   pass2 (t->namespace.block);/* line 699 "tcl.puma" */   cur_class_ptr = prev_class;/* line 700 "tcl.puma" */   t = t->namespace.next;   goto yyRecursion;  } }  }  }  switch (t->Kind) {  case kstmt_c:  case kstmt:  case kproc_c:  case kproc:  case kmethod:  case kbody:  case kconfigbody:  case kconstructor:  case kdestructor:  case knamespace_c:  case knamespace:  case kclass:  case kitcl_class:/* line 702 "tcl.puma" */  {/* line 703 "tcl.puma" */   t = t->stmt_c.next;   goto yyRecursion;  }  case kone_word:/* line 705 "tcl.puma" */  {/* line 706 "tcl.puma" */   t = t->one_word.next;   goto yyRecursion;  }  case kqual_word:/* line 708 "tcl.puma" */  {/* line 709 "tcl.puma" */   pass2 (t->qual_word.qualification);/* line 710 "tcl.puma" */   t = t->qual_word.next;   goto yyRecursion;  }  case kqual_words:/* line 712 "tcl.puma" */  {/* line 713 "tcl.puma" */   pass2 (t->qual_words.qualifications);/* line 714 "tcl.puma" */   t = t->qual_words.next;   goto yyRecursion;  }  case kone_qualification:/* line 716 "tcl.puma" */  {/* line 717 "tcl.puma" */   pass2 (t->one_qualification.qualification);/* line 718 "tcl.puma" */   t = t->one_qualification.next;   goto yyRecursion;  }  case kblock:/* line 720 "tcl.puma" */  {/* line 721 "tcl.puma" */   pass2 (t->block.stmts);/* line 722 "tcl.puma" */   t = t->block.next;   goto yyRecursion;  }  case kcontent:/* line 724 "tcl.puma" */  {/* line 725 "tcl.puma" */   pass2 (t->content.qualification);/* line 726 "tcl.puma" */   t = t->content.next;   goto yyRecursion;  }  case kblock_content:/* line 728 "tcl.puma" */  {/* line 729 "tcl.puma" */   pass2 (t->block_content.stmts);/* line 730 "tcl.puma" */   t = t->block_content.next;   goto yyRecursion;  }  case ktext:  case kcharacter:  case kident:/* line 732 "tcl.puma" */  {/* line 733 "tcl.puma" */   t = t->text.next;   goto yyRecursion;  }  case klocal_text:/* line 735 "tcl.puma" */  {/* line 736 "tcl.puma" */   t = t->local_text.texts;   goto yyRecursion;  }  case kglobal_text:/* line 738 "tcl.puma" */  {/* line 739 "tcl.puma" */   t = t->global_text.texts;   goto yyRecursion;  }  case kqualification:/* line 741 "tcl.puma" */  {/* line 742 "tcl.puma" */   t = t->qualification.qualification;   goto yyRecursion;  }  case kcomplex_qual:/* line 744 "tcl.puma" */  {/* line 745 "tcl.puma" */   pass2 (t->complex_qual.qualification);/* line 746 "tcl.puma" */   t = t->complex_qual.texts;   goto yyRecursion;  }  case ksubscription:/* line 748 "tcl.puma" */  {/* line 749 "tcl.puma" */   pass2 (t->subscription.qualification);/* line 750 "tcl.puma" */   t = t->subscription.index;   goto yyRecursion;  }  };}static void pass3#if defined __STDC__ | defined __cplusplus(register tTree yyP15)#else(yyP15) register tTree yyP15;#endif{ yyRecursion:  switch (yyP15->Kind) {  case kstmt:  if (yyP15->stmt.words->Kind == kone_word) {/* line 757 "tcl.puma" */  {/* line 759 "tcl.puma" */   if (! (GetCStr (yyP15->stmt.words->one_word.ident) [0] == '#')) goto yyL1;  {/* line 760 "tcl.puma" */   yyP15 = yyP15->stmt.next;   goto yyRecursion;  }  }yyL1:;  if (Tree_IsType (yyP15->stmt.words->one_word.next, kword_c)) {  if (Tree_IsType (yyP15->stmt.words->one_word.next->word_c.next, kword_c)) {  if (equaltIdent (yyP15->stmt.words->one_word.ident, (irename))) {/* line 762 "tcl.puma" */  {/* line 766 "tcl.puma" */   use_proc_undef (irename, yyP15->stmt.words->one_word.pos);/* line 767 "tcl.puma" */   use_proc (yyP15->stmt.words->one_word.next);/* line 768 "tcl.puma" */   pass3 (yyP15->stmt.words->one_word.next);/* line 769 "tcl.puma" */   yyP15 = yyP15->stmt.next;   goto yyRecursion;  }  }  }  }  }/* line 771 "tcl.puma" */  {/* line 772 "tcl.puma" */   use_proc (yyP15->stmt.words);/* line 773 "tcl.puma" */   pass3 (yyP15->stmt.words);/* line 774 "tcl.puma" */   yyP15 = yyP15->stmt.next;   goto yyRecursion;  }  case kproc:  if (yyP15->proc.qualification->Kind == kqualification) {/* line 776 "tcl.puma" */ {  tString prev_proc;  tString prev_class;  {/* line 777 "tcl.puma" *//* line 777 "tcl.puma" */   prev_proc = cur_proc_ptr;/* line 778 "tcl.puma" */   cur_proc_ptr = GetCStr (get_ident (yyP15->proc.qualification));/* line 779 "tcl.puma" *//* line 779 "tcl.puma" */   prev_class = cur_class_ptr;/* line 780 "tcl.puma" */   cur_class_ptr = get_class (yyP15->proc.qualification);/* line 781 "tcl.puma" */   pass3 (yyP15->proc.qualification);/* line 783 "tcl.puma" */   pass3 (yyP15->proc.block);/* line 784 "tcl.puma" */   cur_proc_ptr = prev_proc;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -