From 62c5e65d28833c1068d195778c0e3a710acaa104 Mon Sep 17 00:00:00 2001 From: Haru Date: Sat, 5 Oct 2013 07:01:54 +0200 Subject: Added support for trailing commas within libconfig arrays - A trailing comma in conf/plugins.conf will no longer cause a parse error. This makes it easier to comment out plugins to disable them. - conf/plugins.conf has been updated to reflect this change. Signed-off-by: Haru --- 3rdparty/libconfig/extra/gen/grammar.y | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to '3rdparty/libconfig/extra/gen/grammar.y') diff --git a/3rdparty/libconfig/extra/gen/grammar.y b/3rdparty/libconfig/extra/gen/grammar.y index f578897cb..576241c01 100644 --- a/3rdparty/libconfig/extra/gen/grammar.y +++ b/3rdparty/libconfig/extra/gen/grammar.y @@ -118,6 +118,11 @@ setting_terminator: | TOK_COMMA ; +comma_optional: + /* empty */ + | TOK_COMMA + ; + setting: TOK_NAME { @@ -359,9 +364,13 @@ value_list_optional: | value_list ; -simple_value_list: +simple_value_list_sub: simple_value - | simple_value_list TOK_COMMA simple_value + | simple_value_list_sub TOK_COMMA simple_value + ; + +simple_value_list: + simple_value_list_sub comma_optional ; simple_value_list_optional: -- cgit v1.2.3-60-g2f50