363
364
365
366
367
368
369
370
371
372
373
374
375
376
|
glohash[h].id=0xFFFF;
return h;
}
h=(h+1)%HASH_SIZE;
if(h==m) ParseError("Hash table full\n");
}
}
#define ReturnToken(x,y) do{ tokent=x; tokenv=y; return; }while(0)
static void nxttok1(void) {
int c,i,fl,n,pr;
magain: if(macstack) {
TokenList*tl=0;
|
>
>
>
>
>
>
|
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
|
glohash[h].id=0xFFFF;
return h;
}
h=(h+1)%HASH_SIZE;
if(h==m) ParseError("Hash table full\n");
}
}
static int check_improper_name(void) {
unsigned char*p=tokenstr;
while(*p) if(*p++<=32) return 1;
return 0;
}
#define ReturnToken(x,y) do{ tokent=x; tokenv=y; return; }while(0)
static void nxttok1(void) {
int c,i,fl,n,pr;
magain: if(macstack) {
TokenList*tl=0;
|
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
|
tokenv=look_hash(glohash,HASH_SIZE,0x2800,0x2FFF,num_globals+0x2800,"user global variables")?:(num_globals++)+0x2800;
return;
case 0x0010: // %
ReturnToken(TF_NAME|TF_ABNORMAL,OP_LOCAL);
case 0x0011: // =%
ReturnToken(TF_NAME|TF_ABNORMAL|TF_EQUAL,OP_LOCAL);
case 0x0020: // #
tokent=TF_NAME;
tokenv=look_message_name()+0xC000;
return;
case 0x0040: // $
tokent=TF_NAME;
tokenv=look_class_name()+0x4000;
return;
case 0x0080: // &
tokent=TF_FUNCTION|TF_ABNORMAL;
tokenv=look_hash(glohash,HASH_SIZE,0x8000,0xBFFF,num_functions+0x8000,"user functions")?:(num_functions++)+0x8000;
return;
|
>
>
|
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
|
tokenv=look_hash(glohash,HASH_SIZE,0x2800,0x2FFF,num_globals+0x2800,"user global variables")?:(num_globals++)+0x2800;
return;
case 0x0010: // %
ReturnToken(TF_NAME|TF_ABNORMAL,OP_LOCAL);
case 0x0011: // =%
ReturnToken(TF_NAME|TF_ABNORMAL|TF_EQUAL,OP_LOCAL);
case 0x0020: // #
if(check_improper_name()) ParseError("Improper message name in {make}\n");
tokent=TF_NAME;
tokenv=look_message_name()+0xC000;
return;
case 0x0040: // $
if(!*tokenstr || *tokenstr=='(' || check_improper_name()) ParseError("Improper class name in {make}\n");
tokent=TF_NAME;
tokenv=look_class_name()+0x4000;
return;
case 0x0080: // &
tokent=TF_FUNCTION|TF_ABNORMAL;
tokenv=look_hash(glohash,HASH_SIZE,0x8000,0xBFFF,num_functions+0x8000,"user functions")?:(num_functions++)+0x8000;
return;
|