/* config.l 1.14 83/05/18 */
#define tprintf if (do_trace) printf
{ "controller", CONTROLLER },
{ "maxusers", MAXUSERS },
{ "priority", PRIORITY },
{ "pseudo-device",PSEUDO_DEVICE },
{ "timezone", TIMEZONE },
WORD [A-Za-z_][-A-Za-z_]*
if ((i = kw_lookup(yytext)) == -1)
tprintf("id(%s) ", yytext);
tprintf("(%s) ", yytext);
yytext[strlen(yytext)-1] = '\0';
yylval.val = octal(yytext);
tprintf("#O:%o ", yylval.val);
yylval.val = hex(yytext);
tprintf("#X:%x ", yylval.val);
yylval.val = atoi(yytext);
tprintf("#D:%d ", yylval.val);
yylval.val = (int) (60 * atof(yytext) + 0.5);
#.* { /* Ignored (comment) */; }
[ \t]* { /* Ignored (white space) */; }
";" { return SEMICOLON; }
* Look up a string in the keyword table. Returns a -1 if the
* string is not a keyword otherwise it returns the keyword number
for (kp = key_words; kp->kt_name != 0; kp++)
if (eq(word, kp->kt_name))
* Number conversion routines
(void) sscanf(str, "%o", &num);
(void) sscanf(str+2, "%x", &num);