From 4e5fcd691545ea51d17a2aa8accfc89d303c3d9f Mon Sep 17 00:00:00 2001 From: Alessandro Iezzi Date: Tue, 13 Aug 2024 11:08:56 +0200 Subject: Add possibility of using ':' and '=' as values --- properties.y | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'properties.y') diff --git a/properties.y b/properties.y index 7bdd864..9cf460e 100644 --- a/properties.y +++ b/properties.y @@ -36,7 +36,16 @@ property: KEY DIV value { } ; -value: VALUE { +value: DIV { + $$.value = cpyval(2, sizeof(char), $1.value); + } + | value DIV { + char *s = strdup($$.value); + $$.value = calloc(strlen(s) + strlen($2.value) + 1, sizeof(char)); + strcat($$.value, s); + strcat($$.value, $2.value); + } + | VALUE { $$.value = cpyval(2, sizeof(char), $1.value); } | value VALUE { -- cgit v1.2.3