MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / keyword

Function keyword

extern/btyacc/reader.c:278–308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

276};
277
278int keyword()
279{
280 register int c;
281 char *t_cptr = cptr;
282 struct keyword *key;
283
284 c = *++cptr;
285 if (isalpha(c)) {
286 cinc = 0;
287 while (isalnum(c) || c == '_' || c == '.' || c == '$') {
288 cachec(tolower(c));
289 c = *++cptr;
290 }
291 cachec(NUL);
292
293 if ((key = bsearch(cache, keywords, sizeof(keywords)/sizeof(*key),
294 sizeof(*key), (int(*)(const void*, const void*)) strcmp)))
295 return key->token;
296 } else {
297 ++cptr;
298 if (c == '{') return (TEXT);
299 if (c == '%' || c == '\\') return (MARK);
300 if (c == '<') return (LEFT);
301 if (c == '>') return (RIGHT);
302 if (c == '0') return (TOKEN);
303 if (c == '2') return (NONASSOC);
304 }
305 syntax_error(lineno, line, t_cptr);
306 /*NOTREACHED*/
307 return 0;
308}
309
310void copy_ident()
311{

Callers 3

read_declarationsFunction · 0.70
advance_to_startFunction · 0.70
initializeMethod · 0.50

Calls 2

cachecFunction · 0.85
syntax_errorFunction · 0.85

Tested by

no test coverage detected