From 2da5c22ea345fa6a57121560e79c47bc125a3959 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Thu, 1 Jul 1999 16:20:16 +0000 Subject: [PATCH] Don't include trailing whitespace in ID tokens before comments. ie: options FOO=10 # comment would give FOO the value of "10 " and that caused unwanted touches on the opt_*.h files. I hope I've got this right.. --- usr.sbin/config/lang.l | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/config/lang.l b/usr.sbin/config/lang.l index 4368695dca1e..b8ae325707aa 100644 --- a/usr.sbin/config/lang.l +++ b/usr.sbin/config/lang.l @@ -78,6 +78,7 @@ struct kt { { "minor", MINOR }, { "net", NET }, /* XXX going away */ { "nexus", NEXUS }, + { "option", OPTIONS }, { "options", OPTIONS }, { "port", PORT }, { "priority", PRIORITY }, @@ -149,7 +150,7 @@ ID [A-Za-z_][-A-Za-z_0-9]* tprintf("id(%s) ", yytext+1); return ID; } -[^#\n]* { +[^# \t\n]* { BEGIN 0; yylval.str = strdup(yytext); tprintf("id(%s) ", yytext);