BSD 4_3_Tahoe release
[unix-history] / usr / src / etc / htable / scan.l
index da9f9d0..4ed829a 100644 (file)
@@ -1,7 +1,25 @@
 %{
 %{
+
+/*
+ * Copyright (c) 1983 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.
+ */
+
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)scan.l     4.1 (Berkeley) 10/20/82";
-#endif
+static char sccsid[] = "@(#)scan.l     5.6 (Berkeley) 6/18/88";
+#endif /* not lint */
 
 #include "y.tab.h"
 #include "htable.h"
 
 #include "y.tab.h"
 #include "htable.h"
@@ -9,9 +27,9 @@ static char sccsid[] = "@(#)scan.l     4.1 (Berkeley) 10/20/82";
 
 BLANK  [ \t]
 DIGIT  [0-9]
 
 BLANK  [ \t]
 DIGIT  [0-9]
-ALPHA  [A-Z]
-ANUM   [0-9A-Z]
-NAMECHR        [0-9A-Z./-]
+ALPHA  [A-Za-z]
+ANUM   [0-9A-Za-z]
+NAMECHR        [0-9A-Za-z./-]
 
 %%
 "NET"          {
 
 %%
 "NET"          {
@@ -34,7 +52,17 @@ NAMECHR      [0-9A-Z./-]
                        return (NAME);
                }
 
                        return (NAME);
                }
 
-{ALPHA}                return (NAME);
+{ALPHA}                {
+                       yylval.namelist = newname(yytext);
+                       return (NAME);
+               }
+
+{DIGIT}+{ALPHA}{NAMECHR}* {
+                       fprintf(stderr, "Warning: nonstandard name \"%s\"\n",
+                               yytext);
+                       yylval.namelist = newname(yytext);
+                       return (NAME);
+               }
 
 {DIGIT}+       {
                        yylval.number = atoi(yytext);
 
 {DIGIT}+       {
                        yylval.number = atoi(yytext);