summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHomer Hsing <homer.xing@intel.com>2012-09-21 12:35:35 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2012-09-28 04:06:00 -0400
commit4b9c14b15536f3292875d4909dea7a103c683c80 (patch)
tree3bab9348a3b609f6077369841e8211b0c7dd9757
parente5962affedd34044ec261bcfc31fb7f41c8033d0 (diff)
Use right-recursing in parser rule inst_option_list
This recursing cost less memory. It is recommended by Bison.
-rw-r--r--src/gram.y12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gram.y b/src/gram.y
index 72a2a80..30abfb0 100644
--- a/src/gram.y
+++ b/src/gram.y
@@ -2434,10 +2434,10 @@ instoptions: /* empty */
{ $$ = $2; }
;
-instoption_list:instoption COMMA instoption_list
+instoption_list:instoption_list COMMA instoption
{
- $$ = $3;
- switch ($1) {
+ $$ = $1;
+ switch ($3) {
case ALIGN1:
$$.header.access_mode = BRW_ALIGN_1;
break;
@@ -2475,10 +2475,10 @@ instoption_list:instoption COMMA instoption_list
$$.header.acc_wr_control = BRW_ACCWRCTRL_ACCWRCTRL;
}
}
- | instoption instoption_list
+ | instoption_list instoption
{
- $$ = $2;
- switch ($1) {
+ $$ = $1;
+ switch ($2) {
case ALIGN1:
$$.header.access_mode = BRW_ALIGN_1;
break;