ifs now have elses
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@905 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
2366020f23
commit
cd5382651f
|
@ -934,6 +934,7 @@ parser Config:
|
||||||
token DEP: 'dep'
|
token DEP: 'dep'
|
||||||
token DIR: 'dir'
|
token DIR: 'dir'
|
||||||
token DRIVER: 'driver'
|
token DRIVER: 'driver'
|
||||||
|
token ELSE: 'else'
|
||||||
token END: '$|end'
|
token END: '$|end'
|
||||||
token EQ: '='
|
token EQ: '='
|
||||||
token EXPORT: 'export'
|
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
|
# 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.
|
# happen. IF so, possibly ID && C could be used.
|
||||||
rule iif<<C>>: IF ID {{ c = lookup(ID) }}
|
rule iif<<C>>: IF ID {{ c = lookup(ID) }}
|
||||||
(stmt<<c>>)* END
|
(stmt<<c>>)* [ ELSE (stmt<<not c>>)* ] END
|
||||||
|
|
||||||
rule depsacts<<ID, C>>:
|
rule depsacts<<ID, C>>:
|
||||||
( DEP STR {{ if (C): adddep(ID, STR) }}
|
( DEP STR {{ if (C): adddep(ID, STR) }}
|
||||||
|
@ -1098,7 +1099,7 @@ parser Config:
|
||||||
rule option<<C>>: OPTION ID EQ value {{ if (C): setoptionstmt(ID, value) }}
|
rule option<<C>>: OPTION ID EQ value {{ if (C): setoptionstmt(ID, value) }}
|
||||||
|
|
||||||
rule opif: IF ID {{ c = lookup(ID) }}
|
rule opif: IF ID {{ c = lookup(ID) }}
|
||||||
(option<<c>>)* END
|
(option<<c>>)* [ ELSE (option<<not c>>)* ] END
|
||||||
|
|
||||||
rule opstmt: option<<1>>
|
rule opstmt: option<<1>>
|
||||||
| opif
|
| opif
|
||||||
|
|
Loading…
Reference in New Issue