From e0ad30a9c6810be5d1be04d2d60532dc04901d28 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 18 Mar 2014 12:44:09 +0100 Subject: [PATCH] Allow arrays as operands in constant expressions. Refs #5789 --- lib/config/config_parser.yy | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/config/config_parser.yy b/lib/config/config_parser.yy index cf9cd2e49..f0370bfac 100644 --- a/lib/config/config_parser.yy +++ b/lib/config/config_parser.yy @@ -579,14 +579,10 @@ aterm: '(' aexpression ')' $$ = $2; } -aexpression: T_STRING +aexpression: simplevalue { - $$ = new Value(make_shared(AEReturn, AValue(ATSimple, $1))); - free($1); - } - | T_NUMBER - { - $$ = new Value(make_shared(AEReturn, AValue(ATSimple, $1))); + $$ = new Value(make_shared(AEReturn, AValue(ATSimple, *$1))); + delete $1; } | T_IDENTIFIER {