/* translation of file "../useocc.k" */ /* generated by: * @(#)$Author: Kimwitu version: V4_6 (c) 1990-1996 University of Twente $ */ #define KC_FUNCTIONS_useocc #define KIMW_FUNCTIONS_useocc /* for backwards compatibility */ /* define our own macro if we have a 'standard' (ansi) C(++) compiler */ #ifndef KC_NO_STDC # if defined(__STDC__) || defined(__cplusplus) || defined(_WIN32) # define KC_STDC # endif #endif #include #ifdef KC_STDC # include #endif #include "k.h" /* included stuff */ #line 2 "../useocc.k" /* * The Termprocessor Kimwitu * * Copyright (c) 1991 University of Twente, Dept TIOS. * All rights reserved. * */ #line 29 "useocc.c" #line 14 "../useocc.k" #if ! (defined(lint) || defined(SABER) || defined(CODECENTER)) static char useocc_kAccesSid[] = "@(#)$Id: useocc.k,v 1.12 1996/10/14 11:12:31 belinfan Rel $"; #endif #line 35 "useocc.c" /* end included stuff */ #include "useocc.h" void v_useoccuroperator #ifdef KC_USE_PROTOTYPES (ID id) #else (id) ID id; #endif #line 25 "../useocc.k" { (void) f_useoccuroperator( id ); #line 27 "../useocc.k" } #line 51 "useocc.c" boolean f_useoccuroperator #ifdef KC_USE_PROTOTYPES (ID id) #else (id) ID id; #endif #line 30 "../useocc.k" { { #line 31 "../useocc.k" ID kc_selvar_0_1 = id ; #line 31 "../useocc.k" /*SUPPRESS 622*/ assert_ID(kc_selvar_0_1, "with_expression (1)"); #line 70 "useocc.c" if (( kc_selvar_0_1->prod_sel == sel_Id)) { #line 32 "../useocc.k" uniqID uid = kc_selvar_0_1->u.Id.uniqID_1; #line 32 "../useocc.k" { #line 33 "../useocc.k" IDtype kc_selvar_1_1 = uid->type ; #line 33 "../useocc.k" /*SUPPRESS 622*/ assert_IDtype(kc_selvar_1_1, "with_expression (1)"); #line 85 "useocc.c" if (( kc_selvar_1_1->prod_sel == sel_ITUserOperator)) { #line 35 "../useocc.k" return True; #line 89 "useocc.c" } else if (( kc_selvar_1_1->prod_sel == sel_ITPredefinedOperator)) { #line 34 "../useocc.k" v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1ID( "undefined operator (it's predefined, you're not supposed to use those):", id ))); return False; #line 94 "useocc.c" } else { #line 36 "../useocc.k" v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1tID( "undefined operator", id ))); return False; #line 99 "useocc.c" } } #line 37 "../useocc.k" #line 104 "useocc.c" } else { kc_no_default_in_with( "f_useoccuroperator", __LINE__, __FILE__ ); return (boolean)0; } } #line 37 "../useocc.k" #line 37 "../useocc.k" } #line 113 "useocc.c" void v_warnifnotvariable #ifdef KC_USE_PROTOTYPES (ID id) #else (id) ID id; #endif #line 40 "../useocc.k" { (void) f_warnifnotvariable( id ); #line 42 "../useocc.k" } #line 127 "useocc.c" boolean f_warnifnotvariable #ifdef KC_USE_PROTOTYPES (ID id) #else (id) ID id; #endif #line 45 "../useocc.k" { { #line 46 "../useocc.k" ID kc_selvar_0_1 = id ; #line 46 "../useocc.k" /*SUPPRESS 622*/ assert_ID(kc_selvar_0_1, "with_expression (1)"); #line 146 "useocc.c" if (( kc_selvar_0_1->prod_sel == sel_Id)) { #line 47 "../useocc.k" uniqID uid = kc_selvar_0_1->u.Id.uniqID_1; #line 47 "../useocc.k" { #line 48 "../useocc.k" IDtype kc_selvar_1_1 = uid->type ; #line 48 "../useocc.k" /*SUPPRESS 622*/ assert_IDtype(kc_selvar_1_1, "with_expression (1)"); #line 161 "useocc.c" if (( kc_selvar_1_1->prod_sel == sel_ITUnknown)) { #line 50 "../useocc.k" return False; #line 165 "useocc.c" } else if (( kc_selvar_1_1->prod_sel == sel_ITPatternVariable)) { #line 50 "../useocc.k" return False; #line 170 "useocc.c" } else { #line 51 "../useocc.k" v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1tID( "variable expected:", id ))); return True; #line 175 "useocc.c" } } #line 52 "../useocc.k" #line 180 "useocc.c" } else { kc_no_default_in_with( "f_warnifnotvariable", __LINE__, __FILE__ ); return (boolean)0; } } #line 52 "../useocc.k" #line 52 "../useocc.k" } #line 189 "useocc.c" void v_useoccurphylum #ifdef KC_USE_PROTOTYPES (ID id) #else (id) ID id; #endif #line 56 "../useocc.k" { (void) f_useoccurphylum( id ); #line 58 "../useocc.k" } #line 203 "useocc.c" boolean f_useoccurphylum #ifdef KC_USE_PROTOTYPES (ID id) #else (id) ID id; #endif #line 61 "../useocc.k" { { #line 62 "../useocc.k" ID kc_selvar_0_1 = id ; #line 62 "../useocc.k" /*SUPPRESS 622*/ assert_ID(kc_selvar_0_1, "with_expression (1)"); #line 222 "useocc.c" if (( kc_selvar_0_1->prod_sel == sel_Id)) { #line 63 "../useocc.k" uniqID uid = kc_selvar_0_1->u.Id.uniqID_1; #line 63 "../useocc.k" { #line 64 "../useocc.k" IDtype kc_selvar_1_1 = uid->type ; #line 64 "../useocc.k" /*SUPPRESS 622*/ assert_IDtype(kc_selvar_1_1, "with_expression (1)"); #line 237 "useocc.c" if (( kc_selvar_1_1->prod_sel == sel_ITUserPhylum)) { #line 67 "../useocc.k" return True; #line 241 "useocc.c" } else if (( kc_selvar_1_1->prod_sel == sel_ITPredefinedPhylum)) { #line 66 "../useocc.k" return True; #line 246 "useocc.c" } else if (( kc_selvar_1_1->prod_sel == sel_ITPredefinedBigatomPhylum)) { #line 66 "../useocc.k" return True; #line 251 "useocc.c" } else { #line 68 "../useocc.k" v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1tID( "undefined phylum", id ))); return False; #line 256 "useocc.c" } } #line 69 "../useocc.k" #line 261 "useocc.c" } else { kc_no_default_in_with( "f_useoccurphylum", __LINE__, __FILE__ ); return (boolean)0; } } #line 69 "../useocc.k" #line 69 "../useocc.k" } #line 270 "useocc.c" void v_useoccurlistphylum #ifdef KC_USE_PROTOTYPES (ID id) #else (id) ID id; #endif #line 73 "../useocc.k" { (void) f_useoccurlistphylum( id ); #line 75 "../useocc.k" } #line 284 "useocc.c" boolean f_useoccurlistphylum #ifdef KC_USE_PROTOTYPES (ID id) #else (id) ID id; #endif #line 78 "../useocc.k" { { #line 79 "../useocc.k" ID kc_selvar_0_1 = id ; #line 79 "../useocc.k" /*SUPPRESS 622*/ assert_ID(kc_selvar_0_1, "with_expression (1)"); #line 303 "useocc.c" if (( kc_selvar_0_1->prod_sel == sel_Id)) { #line 80 "../useocc.k" uniqID uid = kc_selvar_0_1->u.Id.uniqID_1; #line 80 "../useocc.k" { #line 81 "../useocc.k" IDtype kc_selvar_1_1 = uid->type ; #line 81 "../useocc.k" /*SUPPRESS 622*/ assert_IDtype(kc_selvar_1_1, "with_expression (1)"); #line 318 "useocc.c" if (( kc_selvar_1_1->prod_sel == sel_ITUserPhylum)) { #line 82 "../useocc.k" phylumdeclaration pd = kc_selvar_1_1->u.ITUserPhylum.phylumdeclaration_1; #line 82 "../useocc.k" { #line 83 "../useocc.k" phylumdeclaration kc_selvar_2_1 = pd ; #line 83 "../useocc.k" /*SUPPRESS 622*/ assert_phylumdeclaration(kc_selvar_2_1, "with_expression (1)"); #line 333 "useocc.c" if (( kc_selvar_2_1->prod_sel == sel_PhylumDeclaration) && ( kc_selvar_2_1->u.PhylumDeclaration.productionblock_1->prod_sel == sel_PredefinedAlternatives)) { #line 87 "../useocc.k" v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1ID( "undefined list phylum (it's a predefined phylum):", id ))); return False; #line 337 "useocc.c" } else if (( kc_selvar_2_1->prod_sel == sel_PhylumDeclaration) && ( kc_selvar_2_1->u.PhylumDeclaration.productionblock_1->prod_sel == sel_NonlistAlternatives)) { #line 86 "../useocc.k" v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1ID( "undefined list phylum (it's a non-list phylum):", id ))); return False; #line 342 "useocc.c" } else if (( kc_selvar_2_1->prod_sel == sel_PhylumDeclaration) && ( kc_selvar_2_1->u.PhylumDeclaration.productionblock_1->prod_sel == sel_ListAlternatives)) { #line 85 "../useocc.k" return True; #line 347 "useocc.c" } else if (( kc_selvar_2_1->prod_sel == sel_PhylumDeclaration) && ( kc_selvar_2_1->u.PhylumDeclaration.productionblock_1->prod_sel == sel_Emptyproductionblock)) { #line 84 "../useocc.k" v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1ID( "undefined list phylum (the productionblock is empty):", id ))); return False; #line 352 "useocc.c" } else { kc_no_default_in_with( "f_useoccurlistphylum", __LINE__, __FILE__ ); return (boolean)0; } } #line 88 "../useocc.k" #line 359 "useocc.c" } else { #line 89 "../useocc.k" v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1tID( "undefined list phylum", id ))); return False; #line 364 "useocc.c" } } #line 90 "../useocc.k" #line 369 "useocc.c" } else { kc_no_default_in_with( "f_useoccurlistphylum", __LINE__, __FILE__ ); return (boolean)0; } } #line 90 "../useocc.k" #line 90 "../useocc.k" } #line 378 "useocc.c" void v_useoccuruviewname #ifdef KC_USE_PROTOTYPES (ID id) #else (id) ID id; #endif #line 93 "../useocc.k" { (void) f_useoccuruviewname( id ); #line 95 "../useocc.k" } #line 392 "useocc.c" boolean f_useoccuruviewname #ifdef KC_USE_PROTOTYPES (ID id) #else (id) ID id; #endif #line 98 "../useocc.k" { { #line 99 "../useocc.k" ID kc_selvar_0_1 = id ; #line 99 "../useocc.k" /*SUPPRESS 622*/ assert_ID(kc_selvar_0_1, "with_expression (1)"); #line 411 "useocc.c" if (( kc_selvar_0_1->prod_sel == sel_Id)) { #line 100 "../useocc.k" uniqID uid = kc_selvar_0_1->u.Id.uniqID_1; #line 100 "../useocc.k" { #line 101 "../useocc.k" IDtype kc_selvar_1_1 = uid->type ; #line 101 "../useocc.k" /*SUPPRESS 622*/ assert_IDtype(kc_selvar_1_1, "with_expression (1)"); #line 426 "useocc.c" if (( kc_selvar_1_1->prod_sel == sel_ITUserUView)) { #line 103 "../useocc.k" return True; #line 430 "useocc.c" } else if (( kc_selvar_1_1->prod_sel == sel_ITPredefinedUView)) { #line 102 "../useocc.k" return True; #line 435 "useocc.c" } else { #line 104 "../useocc.k" v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1tID( "undefined unparse view:", id ))); return False; #line 440 "useocc.c" } } #line 105 "../useocc.k" #line 445 "useocc.c" } else { kc_no_default_in_with( "f_useoccuruviewname", __LINE__, __FILE__ ); return (boolean)0; } } #line 105 "../useocc.k" #line 105 "../useocc.k" } #line 454 "useocc.c" void v_useoccurrviewname #ifdef KC_USE_PROTOTYPES (ID id) #else (id) ID id; #endif #line 108 "../useocc.k" { (void) f_useoccurrviewname( id ); #line 110 "../useocc.k" } #line 468 "useocc.c" boolean f_useoccurrviewname #ifdef KC_USE_PROTOTYPES (ID id) #else (id) ID id; #endif #line 113 "../useocc.k" { { #line 114 "../useocc.k" ID kc_selvar_0_1 = id ; #line 114 "../useocc.k" /*SUPPRESS 622*/ assert_ID(kc_selvar_0_1, "with_expression (1)"); #line 487 "useocc.c" if (( kc_selvar_0_1->prod_sel == sel_Id)) { #line 115 "../useocc.k" uniqID uid = kc_selvar_0_1->u.Id.uniqID_1; #line 115 "../useocc.k" { #line 116 "../useocc.k" IDtype kc_selvar_1_1 = uid->type ; #line 116 "../useocc.k" /*SUPPRESS 622*/ assert_IDtype(kc_selvar_1_1, "with_expression (1)"); #line 502 "useocc.c" if (( kc_selvar_1_1->prod_sel == sel_ITUserRView)) { #line 118 "../useocc.k" return True; #line 506 "useocc.c" } else if (( kc_selvar_1_1->prod_sel == sel_ITPredefinedRView)) { #line 117 "../useocc.k" return True; #line 511 "useocc.c" } else { #line 119 "../useocc.k" v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1tID( "undefined rewrite view:", id ))); return False; #line 516 "useocc.c" } } #line 120 "../useocc.k" #line 521 "useocc.c" } else { kc_no_default_in_with( "f_useoccurrviewname", __LINE__, __FILE__ ); return (boolean)0; } } #line 120 "../useocc.k" #line 120 "../useocc.k" } #line 530 "useocc.c" void v_useoccurstorageclass #ifdef KC_USE_PROTOTYPES (ID id) #else (id) ID id; #endif #line 123 "../useocc.k" { (void) f_useoccurstorageclass( id ); #line 125 "../useocc.k" } #line 544 "useocc.c" boolean f_useoccurstorageclass #ifdef KC_USE_PROTOTYPES (ID id) #else (id) ID id; #endif #line 128 "../useocc.k" { { #line 129 "../useocc.k" ID kc_selvar_0_1 = id ; #line 129 "../useocc.k" /*SUPPRESS 622*/ assert_ID(kc_selvar_0_1, "with_expression (1)"); #line 563 "useocc.c" if (( kc_selvar_0_1->prod_sel == sel_Id)) { #line 130 "../useocc.k" uniqID uid = kc_selvar_0_1->u.Id.uniqID_1; #line 130 "../useocc.k" { #line 131 "../useocc.k" IDtype kc_selvar_1_1 = uid->type ; #line 131 "../useocc.k" /*SUPPRESS 622*/ assert_IDtype(kc_selvar_1_1, "with_expression (1)"); #line 578 "useocc.c" if (( kc_selvar_1_1->prod_sel == sel_ITStorageClass)) { #line 133 "../useocc.k" return True; #line 582 "useocc.c" } else if (( kc_selvar_1_1->prod_sel == sel_ITPredefinedStorageClass)) { #line 132 "../useocc.k" return True; #line 587 "useocc.c" } else { #line 134 "../useocc.k" v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1tID( "undefined storage class:", id ))); return False; #line 592 "useocc.c" } } #line 135 "../useocc.k" #line 597 "useocc.c" } else { kc_no_default_in_with( "f_useoccurstorageclass", __LINE__, __FILE__ ); return (boolean)0; } } #line 135 "../useocc.k" #line 135 "../useocc.k" } #line 606 "useocc.c" void v_useoccurpatternvariable #ifdef KC_USE_PROTOTYPES (ID id) #else (id) ID id; #endif #line 138 "../useocc.k" { (void) f_useoccurpatternvariable( id ); #line 140 "../useocc.k" } #line 620 "useocc.c" boolean f_useoccurpatternvariable #ifdef KC_USE_PROTOTYPES (ID id) #else (id) ID id; #endif #line 143 "../useocc.k" { { #line 144 "../useocc.k" ID kc_selvar_0_1 = id ; #line 144 "../useocc.k" /*SUPPRESS 622*/ assert_ID(kc_selvar_0_1, "with_expression (1)"); #line 639 "useocc.c" if (( kc_selvar_0_1->prod_sel == sel_Id)) { #line 145 "../useocc.k" uniqID uid = kc_selvar_0_1->u.Id.uniqID_1; #line 145 "../useocc.k" { #line 146 "../useocc.k" IDtype kc_selvar_1_1 = uid->type ; #line 146 "../useocc.k" /*SUPPRESS 622*/ assert_IDtype(kc_selvar_1_1, "with_expression (1)"); #line 654 "useocc.c" if (( kc_selvar_1_1->prod_sel == sel_ITPatternVariable)) { #line 147 "../useocc.k" return True; #line 658 "useocc.c" } else { #line 148 "../useocc.k" v_report(NonFatal( FileLine( id->file, id->line ), Problem1S1tID( "undefined pattern variable:", id ))); return False; #line 663 "useocc.c" } } #line 149 "../useocc.k" #line 668 "useocc.c" } else { kc_no_default_in_with( "f_useoccurpatternvariable", __LINE__, __FILE__ ); return (boolean)0; } } #line 149 "../useocc.k" #line 149 "../useocc.k" } #line 677 "useocc.c"