aboutsummaryrefslogtreecommitdiff
path: root/properties.y
diff options
context:
space:
mode:
authorAlessandro Iezzi <aiezzi@alessandroiezzi.it>2024-08-13 11:08:56 +0200
committerAlessandro Iezzi <aiezzi@alessandroiezzi.it>2024-08-13 11:08:56 +0200
commit4e5fcd691545ea51d17a2aa8accfc89d303c3d9f (patch)
treeb012c9feeaf244bc300c6555559dde8873780e82 /properties.y
parent1cf817eba1ab8c2ee46a73c6bea9b7e70e418cdd (diff)
downloadproperties-4e5fcd691545ea51d17a2aa8accfc89d303c3d9f.tar.gz
properties-4e5fcd691545ea51d17a2aa8accfc89d303c3d9f.zip
Add possibility of using ':' and '=' as values
Diffstat (limited to 'properties.y')
-rw-r--r--properties.y11
1 files changed, 10 insertions, 1 deletions
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 {