summaryrefslogtreecommitdiff
path: root/assembler
diff options
context:
space:
mode:
authorHomer Hsing <homer.xing@intel.com>2012-09-21 12:35:35 +0800
committerDamien Lespiau <damien.lespiau@intel.com>2013-03-04 15:54:33 +0000
commit5d589dbe132f32718ea144f932fbe3cd37017957 (patch)
tree2a11c7f120549ff290267f9938a811e5f0b5b0f0 /assembler
parenta7b1c09d18fc25069ddc39ef6c6aa00ab67537ad (diff)
Use right-recursing in parser rule inst_option_list
This recursing cost less memory. It is recommended by Bison.
Diffstat (limited to 'assembler')
-rw-r--r--assembler/src/gram.y12
1 files changed, 6 insertions, 6 deletions
diff --git a/assembler/src/gram.y b/assembler/src/gram.y
index 72a2a803..30abfb06 100644
--- a/assembler/src/gram.y
+++ b/assembler/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;