11 ER: Tabelle extra gross gemacht, da es anscheinend ein Problem mit der
12 der Verkettung gibt, irgendwann irgendwo wird mal ein nlist->next
13 ueberschrieben, was in eineme SIGSEGV resultiert.
14 Den GDB mit watchpoint hab ich aber nach 2 Tagen abgebrochen..
15 so loeppt's jedenfalls erstmal..
19 static Nlist
*nlist
[NLSIZE
];
30 {"ifdef", KIFDEF
, ISKW
},
31 {"ifndef", KIFNDEF
, ISKW
},
32 {"elif", KELIF
, ISKW
},
33 {"else", KELSE
, ISKW
},
34 {"endif", KENDIF
, ISKW
},
35 {"include", KINCLUDE
, ISKW
},
36 {"include_next", KINCLUDENEXT
, ISKW
},
37 {"import", KIMPORT
, ISKW
},
38 {"define", KDEFINE
, ISKW
},
39 {"undef", KUNDEF
, ISKW
},
40 {"line", KLINE
, ISKW
},
41 {"error", KERROR
, ISKW
},
42 {"pragma", KPRAGMA
, ISKW
},
43 {"ident", KIDENT
, ISKW
},
44 {"eval", KEVAL
, ISKW
},
45 {"defined", KDEFINED
, ISDEFINED
+ ISUNCHANGE
},
46 {"machine", KMACHINE
, ISDEFINED
+ ISUNCHANGE
},
47 {"__LINE__", KLINENO
, ISMAC
+ ISUNCHANGE
},
48 {"__FILE__", KFILE
, ISMAC
+ ISUNCHANGE
},
49 {"__DATE__", KDATE
, ISMAC
+ ISUNCHANGE
},
50 {"__TIME__", KTIME
, ISMAC
+ ISUNCHANGE
},
51 {"__STDC__", KSTDC
, ISUNCHANGE
},
55 unsigned long namebit
[077 + 1];
63 static Token deftoken
[1] = {{NAME
, 0, 0, 7, (uchar
*) "defined", 0}};
64 static Tokenrow deftr
= {deftoken
, deftoken
, deftoken
+ 1, 1};
66 for (kp
= kwtab
; kp
->kw
; kp
++)
68 t
.t
= (uchar
*) kp
->kw
;
69 t
.len
= strlen(kp
->kw
);
71 np
->flag
= (char) kp
->flag
;
72 np
->val
= (char) kp
->val
;
73 if (np
->val
== KDEFINED
)
84 lookup(Token
* tp
, int install
)
91 for (cp
= tp
->t
, cpe
= cp
+ tp
->len
; cp
< cpe
;)
97 if (*tp
->t
== *np
->name
&& tp
->len
== (unsigned int)np
->len
98 && strncmp((char *)tp
->t
, (char *)np
->name
, tp
->len
) == 0)
110 np
->name
= newstring(tp
->t
, tp
->len
, 0);
113 quickset(tp
->t
[0], tp
->len
> 1 ? tp
->t
[1] : 0);