📄 trafo.c
字号:
{/* line 189 "tcl.puma" */ s = s->local_text.texts; goto yyRecursion; } case kglobal_text:/* line 191 "tcl.puma" */ {/* line 192 "tcl.puma" */ s = s->global_text.texts; goto yyRecursion; } case kqualification:/* line 194 "tcl.puma" */ {/* line 195 "tcl.puma" */ s = s->qualification.qualification; goto yyRecursion; } case kcomplex_qual:/* line 197 "tcl.puma" */ {/* line 198 "tcl.puma" */ get_objects (s->complex_qual.qualification);/* line 199 "tcl.puma" */ s = s->complex_qual.texts; goto yyRecursion; } case ksubscription:/* line 201 "tcl.puma" */ {/* line 202 "tcl.puma" */ get_objects (s->subscription.qualification);/* line 203 "tcl.puma" */ s = s->subscription.index; goto yyRecursion; } };}static void get_param_objects#if defined __STDC__ | defined __cplusplus(register tTree s)#else(s) register tTree s;#endif{ yyRecursion: if (s->Kind == kone_word) {/* line 210 "tcl.puma" */ { register tTree yyV1; {/* line 211 "tcl.puma" */ yyALLOC (tTree,Tree_PoolFreePtr,Tree_PoolStartPtr, Tree_Alloc,yobject,MakeTree,yyV1,kobject,Tree_InitHead) yyV1->object.object = s; yyV1->object.ident = s->one_word.ident; yyV1->object.next = s->one_word.env -> env . objects; s->one_word.env -> env . objects = yyV1;/* line 212 "tcl.puma" */ dcl (s->one_word.env -> env . objects);/* line 213 "tcl.puma" */ s = s->one_word.next; goto yyRecursion; } } } if (Tree_IsType (s, kword_c)) {/* line 215 "tcl.puma" */ {/* line 216 "tcl.puma" */ s = s->word_c.next; goto yyRecursion; } };}static void add_variables#if defined __STDC__ | defined __cplusplus(register tIdent yyP3, register tTree yyP2)#else(yyP3, yyP2) register tIdent yyP3; register tTree yyP2;#endif{ if (equaltIdent (yyP3, (iset))) { if (yyP2->word_c.next->Kind == knoword) {/* line 223 "tcl.puma" */ {/* line 224 "tcl.puma" */ add_var (yyP2, PAF_REF_READ); } return; } } if (equaltIdent (yyP3, (iset))) {/* line 226 "tcl.puma" */ {/* line 227 "tcl.puma" */ add_var (yyP2, PAF_REF_WRITE); } return; } if (equaltIdent (yyP3, (iglobal))) {/* line 229 "tcl.puma" */ {/* line 230 "tcl.puma" */ add_global_vars (yyP2); } return; } if (equaltIdent (yyP3, (ivariable))) { if (yyP2->word_c.next->Kind == knoword) {/* line 232 "tcl.puma" */ {/* line 233 "tcl.puma" */ add_variable_vars (yyP2, PAF_REF_READ); } return; } } if (equaltIdent (yyP3, (ivariable))) {/* line 235 "tcl.puma" */ {/* line 236 "tcl.puma" */ add_variable_vars (yyP2, PAF_REF_WRITE); } return; } if (equaltIdent (yyP3, (iappend))) {/* line 238 "tcl.puma" */ {/* line 239 "tcl.puma" */ add_var (yyP2, PAF_REF_WRITE); } return; } if (equaltIdent (yyP3, (ilappend))) {/* line 241 "tcl.puma" */ {/* line 242 "tcl.puma" */ add_var (yyP2, PAF_REF_WRITE); } return; } if (equaltIdent (yyP3, (iarray))) { if (yyP2->Kind == kone_word) { if (Tree_IsType (yyP2->one_word.next, kword_c)) { if (equaltIdent (yyP2->one_word.ident, (iset))) {/* line 244 "tcl.puma" */ {/* line 246 "tcl.puma" */ add_var (yyP2->one_word.next, PAF_REF_WRITE); } return; } } } } if (equaltIdent (yyP3, (iarray))) { if (Tree_IsType (yyP2->word_c.next, kword_c)) {/* line 248 "tcl.puma" */ {/* line 249 "tcl.puma" */ add_var (yyP2->word_c.next, PAF_REF_READ); } return; } } if (equaltIdent (yyP3, (ibinary))) { if (yyP2->Kind == kone_word) { if (Tree_IsType (yyP2->one_word.next, kword_c)) { if (Tree_IsType (yyP2->one_word.next->word_c.next, kword_c)) { if (Tree_IsType (yyP2->one_word.next->word_c.next->word_c.next, kword_c)) { if (equaltIdent (yyP2->one_word.ident, (iscan))) {/* line 251 "tcl.puma" */ {/* line 255 "tcl.puma" */ add_vars (yyP2->one_word.next->word_c.next->word_c.next, PAF_REF_WRITE); } return; } } } } } } if (equaltIdent (yyP3, (iscan))) { if (Tree_IsType (yyP2->word_c.next, kword_c)) { if (Tree_IsType (yyP2->word_c.next->word_c.next, kword_c)) {/* line 257 "tcl.puma" */ {/* line 260 "tcl.puma" */ add_vars (yyP2->word_c.next->word_c.next, PAF_REF_WRITE); } return; } } } if (equaltIdent (yyP3, (iforeach))) {/* line 262 "tcl.puma" */ {/* line 263 "tcl.puma" */ add_foreach_vars (yyP2); } return; } if (equaltIdent (yyP3, (ivwait))) {/* line 265 "tcl.puma" */ {/* line 266 "tcl.puma" */ add_var (yyP2, PAF_REF_READ); } return; } if (equaltIdent (yyP3, (iincr))) {/* line 268 "tcl.puma" */ {/* line 269 "tcl.puma" */ add_var (yyP2, PAF_REF_WRITE); } return; } if (equaltIdent (yyP3, (iparray))) {/* line 271 "tcl.puma" */ {/* line 272 "tcl.puma" */ add_var (yyP2, PAF_REF_READ); } return; } if (equaltIdent (yyP3, (icatch))) { if (Tree_IsType (yyP2->word_c.next, kword_c)) {/* line 274 "tcl.puma" */ {/* line 275 "tcl.puma" */ add_var (yyP2->word_c.next, PAF_REF_WRITE); } return; } } if (equaltIdent (yyP3, (igets))) { if (Tree_IsType (yyP2->word_c.next, kword_c)) {/* line 277 "tcl.puma" */ {/* line 278 "tcl.puma" */ add_var (yyP2->word_c.next, PAF_REF_WRITE); } return; } } if (equaltIdent (yyP3, (iinfo))) { if (yyP2->Kind == kone_word) { if (Tree_IsType (yyP2->one_word.next, kword_c)) { if (equaltIdent (yyP2->one_word.ident, (iexists))) {/* line 280 "tcl.puma" */ {/* line 282 "tcl.puma" */ add_var (yyP2->one_word.next, PAF_REF_READ); } return; } } } } if (equaltIdent (yyP3, (iinfo))) { if (yyP2->Kind == kone_word) { if (Tree_IsType (yyP2->one_word.next, kword_c)) { if (equaltIdent (yyP2->one_word.ident, (iargs))) {/* line 284 "tcl.puma" */ {/* line 286 "tcl.puma" */ add_var (yyP2->one_word.next, PAF_REF_READ); } return; } } } } if (equaltIdent (yyP3, (iinfo))) { if (yyP2->Kind == kone_word) { if (Tree_IsType (yyP2->one_word.next, kword_c)) { if (equaltIdent (yyP2->one_word.ident, (ibody))) {/* line 288 "tcl.puma" */ {/* line 290 "tcl.puma" */ add_var (yyP2->one_word.next, PAF_REF_READ); } return; } } } } if (equaltIdent (yyP3, (iinfo))) { if (yyP2->Kind == kone_word) { if (Tree_IsType (yyP2->one_word.next, kword_c)) { if (Tree_IsType (yyP2->one_word.next->word_c.next, kword_c)) { if (Tree_IsType (yyP2->one_word.next->word_c.next->word_c.next, kword_c)) { if (equaltIdent (yyP2->one_word.ident, (idefault))) {/* line 292 "tcl.puma" */ {/* line 296 "tcl.puma" */ add_var (yyP2->one_word.next, PAF_REF_READ);/* line 297 "tcl.puma" */ add_var (yyP2->one_word.next->word_c.next->word_c.next, PAF_REF_WRITE); } return; } } } } } } if (equaltIdent (yyP3, (itkinfo))) { if (yyP2->Kind == kone_word) { if (Tree_IsType (yyP2->one_word.next, kword_c)) { if (equaltIdent (yyP2->one_word.ident, (ivariable))) {/* line 299 "tcl.puma" */ {/* line 301 "tcl.puma" */ add_var (yyP2->one_word.next, PAF_REF_READ); } return; } } } } if (equaltIdent (yyP3, (ifile))) { if (yyP2->Kind == kone_word) { if (Tree_IsType (yyP2->one_word.next, kword_c)) { if (Tree_IsType (yyP2->one_word.next->word_c.next, kword_c)) { if (equaltIdent (yyP2->one_word.ident, (ilstat))) {/* line 303 "tcl.puma" */ {/* line 306 "tcl.puma" */ add_var (yyP2->one_word.next->word_c.next, PAF_REF_WRITE); } return; } } } } } if (equaltIdent (yyP3, (ifile))) { if (yyP2->Kind == kone_word) { if (Tree_IsType (yyP2->one_word.next, kword_c)) { if (Tree_IsType (yyP2->one_word.next->word_c.next, kword_c)) { if (equaltIdent (yyP2->one_word.ident, (istat))) {/* line 308 "tcl.puma" */ {/* line 311 "tcl.puma" */ add_var (yyP2->one_word.next->word_c.next, PAF_REF_WRITE); } return; } } } } } if (equaltIdent (yyP3, (iunset))) {/* line 313 "tcl.puma" */ {/* line 314 "tcl.puma" */ add_vars (yyP2, PAF_REF_WRITE); } return; } if (equaltIdent (yyP3, (isource))) { if (yyP2->word_c.next->Kind == knoword) {/* line 321 "tcl.puma" */ {/* line 322 "tcl.puma" */ include (yyP2); } return; } };}static void include#if defined __STDC__ | defined __cplusplus(register tTree yyP4)#else(yyP4) register tTree yyP4;#endif{ if (yyP4->Kind == kone_word) {/* line 329 "tcl.puma" */ {/* line 330 "tcl.puma" */ put_symbol (PAF_INCLUDE_DEF, NULL, GetCStr (yyP4->one_word.ident), current_file, (int) yyP4->one_word.pos . Line, (int) yyP4->one_word.pos . Column - 1, (int) yyP4->one_word.pos . Line, (int) (yyP4->one_word.pos . Column + StLength (GetStringRef (yyP4->one_word.ident)) - 1), 0, NULL, NULL, NULL, NULL, 0, 0, 0, 0); } return; } if (yyP4->Kind == kqual_word) {/* line 335 "tcl.puma" */ return; } if (yyP4->Kind == kqual_words) {/* line 337 "tcl.puma" */ return; };}static void add_global_vars#if defined __STDC__ | defined __cplusplus(register tTree w)#else(w) register tTree w;#endif{ yyRecursion: if (w->Kind == kone_word) {/* line 353 "tcl.puma" */ { register tTree yyV1; register tTree yyV2; {/* line 354 "tcl.puma" */ yyALLOC (tTree,Tree_PoolFreePtr,Tree_PoolStartPtr, Tree_Alloc,yobject,MakeTree,yyV1,kobject,Tree_InitHead) yyV1->object.object = w; yyV1->object.ident = w->one_word.ident; yyV1->object.next = genv -> env . objects; genv -> env . objects = yyV1;/* line 355 "tcl.puma" */ yyALLOC (tTree,Tree_PoolFreePtr,Tree_PoolStartPtr, Tree_Alloc,yobject,MakeTree,yyV2,kobject,Tree_InitHead) yyV2->object.object = w; yyV2->object.ident = w->one_word.ident; yyV2->object.next = w->one_word.env -> env . objects; w->one_word.env -> env . objects = yyV2;/* line 356 "tcl.puma" */ w->one_word.env = genv;/* line 357 "tcl.puma" */ dcl (genv -> env . objects);/* line 358 "tcl.puma" */ w = w->one_word.next; goto yyRecursion; } } } if (w->Kind == kqual_word) { if (w->qual_word.qualification->Kind == kglobal_ident) {/* line 370 "tcl.puma" */ { register tTree yyV1; register tTree yyV2; {/* line 372 "tcl.puma" */ yyALLOC (tTree,Tree_PoolFreePtr,Tree_PoolStartPtr, Tree_Alloc,yobject,MakeTree,yyV1,kobject,Tree_InitHead) yyV1->object.object = w->qual_word.qualification; yyV1->object.ident = w->qual_word.qualification->global_ident.ident; yyV1->object.next = genv -> env . objects; genv -> env . objects = yyV1;/* line 373 "tcl.puma" */ yyALLOC (tTree,Tree_PoolFreePtr,Tree_PoolStartPtr, Tree_Alloc,yobject,MakeTree,yyV2,kobject,Tree_InitHead) yyV2->object.object = w->qual_word.qualification; yyV2->object.ident = w->qual_word.qualification->global_ident.ident; yyV2->object.next = w->qual_word.qualification->global_ident.env -> env . objects; w->qual_word.qualification->global_ident.env -> env . objects = yyV2;/* line 374 "tcl.puma" */ w->qual_word.qualification->global_ident.env = genv;/* line 375 "tcl.puma" */ dcl (w->qual_word.qualification->global_ident.env -> env . objects);/* line 376 "tcl.puma" */ w = w->qual_word.next; goto yyRecursion; } } }/* line 378 "tcl.puma" */ {/* line 380 "tcl.puma" */ w = w->qual_word.next; goto yyRecursion; } } if (w->Kind == kqual_words) {/* line 378 "tcl.puma" */ {/* line 380 "tcl.puma" */ w = w->qual_words.next; goto yyRecursion; } };}static void add_variable_vars#if defined __STDC__ | defined __cplusplus(register tTree w, register int acc)#else(w, acc) register tTree w; register int acc;#endif{/* line 387 "tcl.puma" */ tTree obj, e2; if (w->Kind == kone_word) { if (w->one_word.env->Kind == kenv) {/* line 389 "tcl.puma" */ { register tTree yyV1; {/* line 390 "tcl.puma" */ if (! (w->one_word.env->env.object -> Kind != kproc)) goto yyL1; {/* line 391 "tcl.puma" */ yyALLOC (tTree,Tree_PoolFreePtr,Tree_PoolStartPtr, Tree_Alloc,yobject,MakeTree,yyV1,kobject,Tree_InitHead) yyV1->object.object = w; yyV1->object.ident = w->one_word.ident; yyV1->object.next = w->one_word.env -> env . objects; w->one_word.env -> env . objects = yyV1;/* line 392 "tcl.puma" */ dcl (w->one_word.env -> env . objects);/* line 393 "tcl.puma" */ if (acc == PAF_REF_WRITE) use (w->one_word.env->env.objects, w->one_word.pos, acc); /* line 394 "tcl.puma" */ add_variable_vars_2 (w->one_word.next); } } return; }yyL1:; }/* line 396 "tcl.puma" */ { register tTree yyV1; {/* line 397 "tcl.puma" */ e2 = get_namespace (w->one_word.env);/* line 398 "tcl.puma" */ obj = IdentifyLocal (w->one_word.ident, e2 -> env . objects);/* line 399 "tcl.puma" */ if (! (obj != NULL)) goto yyL2; {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -