From cd5382651f5aa8adbd31cde4db934f5dca15608d Mon Sep 17 00:00:00 2001 From: Greg Watson Date: Tue, 24 Jun 2003 17:37:02 +0000 Subject: ifs now have elses git-svn-id: svn://svn.coreboot.org/coreboot/trunk@905 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- util/newconfig/config.g | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'util/newconfig/config.g') diff --git a/util/newconfig/config.g b/util/newconfig/config.g index 6fff45722c..e67ffdb53c 100644 --- a/util/newconfig/config.g +++ b/util/newconfig/config.g @@ -934,6 +934,7 @@ parser Config: token DEP: 'dep' token DIR: 'dir' token DRIVER: 'driver' + token ELSE: 'else' token END: '$|end' token EQ: '=' token EXPORT: 'export' @@ -1040,7 +1041,7 @@ parser Config: # needs to be C and ID, but nested if's are, we hope, not going to # happen. IF so, possibly ID && C could be used. rule iif<>: IF ID {{ c = lookup(ID) }} - (stmt<>)* END + (stmt<>)* [ ELSE (stmt<>)* ] END rule depsacts<>: ( DEP STR {{ if (C): adddep(ID, STR) }} @@ -1098,7 +1099,7 @@ parser Config: rule option<>: OPTION ID EQ value {{ if (C): setoptionstmt(ID, value) }} rule opif: IF ID {{ c = lookup(ID) }} - (option<>)* END + (option<>)* [ ELSE (option<>)* ] END rule opstmt: option<<1>> | opif -- cgit v1.2.3