/* lang.l 1.9 82/07/21 */
#define tprintf if (do_trace) printf
"cpu", CPU, "ident", IDENT, "config", CONFIG, "options", OPTIONS,
"device", DEVICE, "controller", CONTROLLER, "uba", UBA, "mba", MBA,
"csr", CSR, "nexus", NEXUS, "drive", DRIVE, "vector", VECTOR,
"pseudo-device", PSEUDO_DEVICE, "flags", FLAGS, "trace", TRACE,
"disk", DISK, "tape", DEVICE, "slave", SLAVE, "at", AT,
"hz", HZ, "timezone", TIMEZONE, "dst", DST, "maxusers", MAXUSERS,
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 = (int) yytext + 1;
tprintf("#O:%o ", yylval);
tprintf("#X:%x ", yylval);
tprintf("#D:%d ", yylval);
yylval = (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
sscanf(str+2, "%x", &num);