From e3937b620a317f48c7bfa2a3248f09ec99249389 Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Fri, 14 Nov 2003 11:23:25 +0000 Subject: [PATCH] Fixed spurious syntax errors for including files that don't begin with a SEMICOLON token (a newline or semicolon, or one of these preceded by a comment and/or whitespace). The input stream was switched too early and the parser was expecting a SEMICOLON in the included file instead of after the filename in the include directive. Submitted by: Stefan Farfeleder Kept alive by: Adam C. Migus --- usr.sbin/config/config.y | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/usr.sbin/config/config.y b/usr.sbin/config/config.y index 12440dd5ea38..0ee7f285c1f4 100644 --- a/usr.sbin/config/config.y +++ b/usr.sbin/config/config.y @@ -118,6 +118,9 @@ Spec: | Config_spec SEMICOLON | + INCLUDE ID SEMICOLON + = { include($2, 0); }; + | SEMICOLON | error SEMICOLON @@ -164,9 +167,7 @@ Config_spec: = { hints = $2; hintmode = 1; - } | - INCLUDE ID - = { include($2, 0); }; + } System_spec: CONFIG System_id System_parameter_list