BSD 4_3_Tahoe release
[unix-history] / usr / src / etc / config / config.l
index a29890d..46270ec 100644 (file)
@@ -1,5 +1,23 @@
 %{
 %{
-/*     config.l        1.12    82/10/25        */
+
+/*
+ * Copyright (c) 1980 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *     @(#)config.l    5.5 (Berkeley) 6/18/88
+ */
 
 #include <ctype.h>
 #include "y.tab.h"
 
 #include <ctype.h>
 #include "y.tab.h"
@@ -15,15 +33,41 @@ struct kt {
        char *kt_name;
        int kt_val;
 } key_words[] = {
        char *kt_name;
        int kt_val;
 } key_words[] = {
-       "machine", MACHINE,
-       "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,
-       "master", MASTER, "priority", PRIORITY,
-       0,0,
+       { "and",        AND },
+       { "args",       ARGS },
+       { "at",         AT },
+       { "config",     CONFIG },
+       { "controller", CONTROLLER },
+       { "cpu",        CPU },
+       { "csr",        CSR },
+       { "device",     DEVICE },
+       { "disk",       DISK },
+       { "drive",      DRIVE },
+       { "dst",        DST },
+       { "dumps",      DUMPS },
+       { "flags",      FLAGS },
+       { "hz",         HZ },
+       { "ident",      IDENT },
+       { "machine",    MACHINE },
+       { "major",      MAJOR },
+       { "makeoptions", MAKEOPTIONS },
+       { "master",     MASTER },
+       { "maxusers",   MAXUSERS },
+       { "minor",      MINOR },
+       { "nexus",      NEXUS },
+       { "on",         ON },
+       { "options",    OPTIONS },
+       { "priority",   PRIORITY },
+       { "pseudo-device",PSEUDO_DEVICE },
+       { "root",       ROOT },
+       { "size",       SIZE },
+       { "slave",      SLAVE },
+       { "swap",       SWAP },
+       { "tape",       DEVICE },
+       { "timezone",   TIMEZONE },
+       { "trace",      TRACE },
+       { "vector",     VECTOR },
+       { 0, 0 },
 };
 %}
 WORD   [A-Za-z_][-A-Za-z_]*
 };
 %}
 WORD   [A-Za-z_][-A-Za-z_]*
@@ -42,7 +86,7 @@ WORD  [A-Za-z_][-A-Za-z_]*
                }
 \"[^"]+\"      {
                        yytext[strlen(yytext)-1] = '\0';
                }
 \"[^"]+\"      {
                        yytext[strlen(yytext)-1] = '\0';
-                       yylval.val = yytext + 1;
+                       yylval.str = yytext + 1;
                        return ID;
                }
 0[0-7]*                {
                        return ID;
                }
 0[0-7]*                {
@@ -50,7 +94,7 @@ WORD  [A-Za-z_][-A-Za-z_]*
                        tprintf("#O:%o ", yylval.val);
                        return NUMBER;
                }
                        tprintf("#O:%o ", yylval.val);
                        return NUMBER;
                }
-0x[0-9a-f]+    {
+0x[0-9a-fA-F]+ {
                        yylval.val = hex(yytext);
                        tprintf("#X:%x ", yylval.val);
                        return NUMBER;
                        yylval.val = hex(yytext);
                        tprintf("#X:%x ", yylval.val);
                        return NUMBER;