From owner-freebsd-arch@FreeBSD.ORG Sat Sep 27 03:53:06 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B54BD16A4B3 for ; Sat, 27 Sep 2003 03:53:06 -0700 (PDT) Received: from fafoe.narf.at (chello212186121237.14.vie.surfer.at [212.186.121.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id BE6164403D for ; Sat, 27 Sep 2003 03:52:52 -0700 (PDT) (envelope-from stefan@fafoe.narf.at) Received: from wombat.fafoe.narf.at (wombat.fafoe.narf.at [192.168.2.102]) by fafoe.narf.at (Postfix) with ESMTP id B299F3FA8; Sat, 27 Sep 2003 12:52:44 +0200 (CEST) Received: by wombat.fafoe.narf.at (Postfix, from userid 1001) id 4B22D5E; Sat, 27 Sep 2003 12:52:44 +0200 (CEST) Date: Sat, 27 Sep 2003 12:52:44 +0200 From: Stefan Farfeleder To: Bruce Evans Message-ID: <20030927105241.GG802@wombat.fafoe.narf.at> References: <20030925092319.H5418@gamplex.bde.org> <49939.204.254.155.35.1064593320.squirrel@mail.migus.org> <20030927080420.N18558@gamplex.bde.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="k1lZvvs/B4yU6o8G" Content-Disposition: inline In-Reply-To: <20030927080420.N18558@gamplex.bde.org> User-Agent: Mutt/1.5.4i cc: arch@FreeBSD.org Subject: Re: sys/conf/DEFAULT[S] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Sep 2003 10:53:06 -0000 --k1lZvvs/B4yU6o8G Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Sep 27, 2003 at 08:14:30AM +1000, Bruce Evans wrote: > Similarly with FOOBAR's contents identical with SMP's contents except > for including FOO instead of GENERIC. So the bug must be related to > the file being included ... adding an empty or comment line to the > beginning of FOO works around it. I guess there is an off-by-1 byte > or line error switching the input stream. The problem is simply that the input stream is switched immediately to the included file after reading the file name and the parser is still waiting for its newline or semicolon from the production Spec -> Config_spec SEMICOLON. Thus the terminal 'machine' on the first line is a syntax error. Stefan --k1lZvvs/B4yU6o8G Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="config.y.diff" Index: src/usr.sbin/config/config.y =================================================================== RCS file: /usr/home/ncvs/src/usr.sbin/config/config.y,v retrieving revision 1.61 diff -u -r1.61 config.y --- src/usr.sbin/config/config.y 6 Jul 2003 02:00:52 -0000 1.61 +++ src/usr.sbin/config/config.y 27 Sep 2003 10:39:13 -0000 @@ -118,6 +118,9 @@ | Config_spec SEMICOLON | + INCLUDE ID SEMICOLON + = { include($2, 0); }; + | SEMICOLON | error SEMICOLON @@ -164,9 +167,7 @@ = { hints = $2; hintmode = 1; - } | - INCLUDE ID - = { include($2, 0); }; + } System_spec: CONFIG System_id System_parameter_list --k1lZvvs/B4yU6o8G--