Added quoated identifiers
authorMichael Toy <toy@ucbvax.Berkeley.EDU>
Fri, 3 Apr 1981 08:45:20 +0000 (00:45 -0800)
committerMichael Toy <toy@ucbvax.Berkeley.EDU>
Fri, 3 Apr 1981 08:45:20 +0000 (00:45 -0800)
SCCS-vsn: usr.sbin/config/lang.l 1.7
SCCS-vsn: usr.sbin/config/config.y 1.6

usr/src/usr.sbin/config/config.y
usr/src/usr.sbin/config/lang.l

index 7f2a5e2..9c2c0dc 100644 (file)
@@ -2,7 +2,7 @@
 %token CONTROLLER PSEUDO_DEVICE FLAGS ID SEMICOLON NUMBER FPNUMBER TRACE
 %token DISK SLAVE AT HZ TIMEZONE DST MAXUSERS MASTER COMMA
 %{
 %token CONTROLLER PSEUDO_DEVICE FLAGS ID SEMICOLON NUMBER FPNUMBER TRACE
 %token DISK SLAVE AT HZ TIMEZONE DST MAXUSERS MASTER COMMA
 %{
-/*     config.y        1.5     81/03/31        */
+/*     config.y        1.6     81/04/02        */
 #include "config.h"
 #include <stdio.h>
        struct device cur;
 #include "config.h"
 #include <stdio.h>
        struct device cur;
@@ -28,9 +28,9 @@ Spec:
        ;
 
 Config_spec:
        ;
 
 Config_spec:
-       CPU Save_id NUMBER = {
+       CPU Save_id = {
                    struct cputype *cp = malloc(sizeof (struct cputype));
                    struct cputype *cp = malloc(sizeof (struct cputype));
-                   cp->cpu_name = ns(sprintf(errbuf, "%s%d", $2, $3));
+                   cp->cpu_name = ns($2);
                    cp->cpu_next = cputype;
                    cputype = cp;
                    free(temp_id);
                    cp->cpu_next = cputype;
                    cputype = cp;
                    free(temp_id);
index 91f56a4..b89894c 100644 (file)
@@ -1,5 +1,5 @@
 %{
 %{
-/*     lang.l  1.6     81/03/31        */
+/*     lang.l  1.7     81/04/02        */
 
 #include <ctype.h>
 #include "y.tab.h"
 
 #include <ctype.h>
 #include "y.tab.h"
@@ -41,6 +41,11 @@ WORD [A-Za-z_][-A-Za-z_]*
                        tprintf("(%s) ", yytext);
                        return i;
                }
                        tprintf("(%s) ", yytext);
                        return i;
                }
+\"[^"]+\"      {
+                       yytext[strlen(yytext)-1] = '\0';
+                       yylval = (int) yytext + 1;
+                       return ID;
+               }
 0[0-7]*                {
                        yylval = octal(yytext);
                        tprintf("#O:%o ", yylval);
 0[0-7]*                {
                        yylval = octal(yytext);
                        tprintf("#O:%o ", yylval);