summaryrefslogtreecommitdiff
path: root/nest/config.Y
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1998-11-27 21:32:45 +0000
committerMartin Mares <mj@ucw.cz>1998-11-27 21:32:45 +0000
commit0b62c3a7c7548cd447b4f18e0346cc9e74862ab3 (patch)
treeb74b1a9ffa4f59b7d86765eac906c67827e83a12 /nest/config.Y
parentc74c0e3cdf008988a8873d3f76c0d71b29ab8673 (diff)
Trivial 15-line bison excercise: Implemented expressions including
user-defined numeric symbols. Whenever possible, use `expr' instead of `NUM' to get full express ion power :-)
Diffstat (limited to 'nest/config.Y')
-rw-r--r--nest/config.Y3
1 files changed, 2 insertions, 1 deletions
diff --git a/nest/config.Y b/nest/config.Y
index 1de0446b..697d43ec 100644
--- a/nest/config.Y
+++ b/nest/config.Y
@@ -54,9 +54,10 @@ proto_name:
proto_item:
/* EMPTY */
- | PREFERENCE NUM {
+ | PREFERENCE expr {
if ($2 < 0 || $2 > 255) cf_error("Invalid preference");
this_proto->preference = $2;
+die("pref=%d", $2);
}
;