Simple printing of options. Will make this better.
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@916 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
584997b528
commit
4f22177aa5
|
@ -1101,13 +1101,19 @@ 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<<C>>: IF ID {{ c = lookup(ID) }}
|
||||||
(option<<c>>)* [ ELSE (option<<not c>>)* ] END
|
(opstmt<<C and c>>)*
|
||||||
|
[ ELSE (opstmt<<C and not c>>)* ] END
|
||||||
|
|
||||||
|
rule opstmt<<C>>: option<<C>>
|
||||||
|
| opif<<C>>
|
||||||
|
| pprint<<C>>
|
||||||
|
|
||||||
rule opstmt: option<<1>>
|
|
||||||
| opif
|
|
||||||
# print clashes with a python keyword
|
# print clashes with a python keyword
|
||||||
rule pprint<<C>>: PRINT STR {{ if (C): print "%s\n"%STR}}
|
rule pprint<<C>>: PRINT
|
||||||
|
( STR {{ if (C): print "%s" % dequote(STR) }}
|
||||||
|
| ID {{ if (C): print "%s" % getformated(ID, curpart) }}
|
||||||
|
)
|
||||||
|
|
||||||
# ENTRY for parsing a delayed value
|
# ENTRY for parsing a delayed value
|
||||||
rule delexpr: "{" expr "}" {{ return expr }}
|
rule delexpr: "{" expr "}" {{ return expr }}
|
||||||
|
@ -1116,7 +1122,7 @@ parser Config:
|
||||||
rule board: LOADOPTIONS {{ loadoptions() }}
|
rule board: LOADOPTIONS {{ loadoptions() }}
|
||||||
TARGET DIRPATH {{ target(DIRPATH) }}
|
TARGET DIRPATH {{ target(DIRPATH) }}
|
||||||
(uses<<1>>)*
|
(uses<<1>>)*
|
||||||
(opstmt)*
|
(opstmt<<1>>)*
|
||||||
mainboard {{ return 1 }}
|
mainboard {{ return 1 }}
|
||||||
|
|
||||||
rule defstmts<<ID>>: {{ d = 0 }}
|
rule defstmts<<ID>>: {{ d = 0 }}
|
||||||
|
|
Loading…
Reference in New Issue