summaryrefslogtreecommitdiff
path: root/lib/conf-parse.y
diff options
context:
space:
mode:
authorFrodo Looijaard <frodol@dds.nl>1998-12-24 01:13:44 +0000
committerFrodo Looijaard <frodol@dds.nl>1998-12-24 01:13:44 +0000
commit1c126658319586e17883d0ee5f5c8636a6a70f77 (patch)
treeef52633fdfdbbfd8e5619aca8b6660e887e78ed3 /lib/conf-parse.y
parent657798a79cbd2fa08f0eb4da6971241411bedca2 (diff)
downloadlm-sensors-git-1c126658319586e17883d0ee5f5c8636a6a70f77.tar.gz
Expanded expressions, slightly new syntax
An expression can now refer to the value it has to compute (@), but also to other values. This is now perfectly valid as an expression: vid + in_min - in_max * 2 / @ Not that this is very sensible, but you get the idea. Please install the new example config file, or replace all old 'val' occurences with '@'. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@107 7894878c-1315-0410-8ee3-d5d059ff63e0
Diffstat (limited to 'lib/conf-parse.y')
-rw-r--r--lib/conf-parse.y4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/conf-parse.y b/lib/conf-parse.y
index 2f817d55..986e3f15 100644
--- a/lib/conf-parse.y
+++ b/lib/conf-parse.y
@@ -211,6 +211,10 @@ expression: FLOAT
$$->data.var = $1;
$$->kind = sensors_kind_var;
}
+ | '@'
+ { $$ = malloc_expr();
+ $$->kind = sensors_kind_source;
+ }
| expression '+' expression
{ $$ = malloc_expr();
$$->kind = sensors_kind_sub;