aboutsummaryrefslogtreecommitdiff
path: root/src/inpla.y
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/inpla.y10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/inpla.y b/src/inpla.y
index 0bdf4b4..bc612f7 100644
--- a/src/inpla.y
+++ b/src/inpla.y
@@ -195,7 +195,7 @@ static char *Errormsg = NULL;
%token INTERFACE IFCE PRNAT FREE EXIT MEMSTAT
%token END_OF_FILE USE
-%type <ast> body astterm astterm_item nameterm agentterm astparam astparams
+%type <ast> body astterm astterm_item nameterm agentterm astparam astparams_rev astparams
val_declare
rule
ap aplist
@@ -513,9 +513,13 @@ astparam
| '(' astparams ')' { $$ = $2; }
;
-astparams
+astparams_rev
: astterm { $$ = ast_makeList1($1); }
-| astparams ',' astterm { $$ = ast_addLast($1, $3); }
+| astparams_rev ',' astterm { $$ = ast_addFirst($1, $3); }
+;
+
+astparams
+: astparams_rev { $$ = ast_reverseList($1); }
;
ap