summaryrefslogtreecommitdiff
path: root/conf
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2013-09-16 23:57:40 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2013-09-16 23:57:40 +0200
commit6a8d3f1c1ffbd964e4d11b452c73e1ea70310af3 (patch)
treeffad2ba5c281d87ec64f3b9f419b17251ef616a6 /conf
parentbf139664aa2ae9956b520ba4813bb6e03bf1a3e8 (diff)
BFD work in progress.
Now it compiles and mostly works.
Diffstat (limited to 'conf')
-rw-r--r--conf/confbase.Y11
1 files changed, 10 insertions, 1 deletions
diff --git a/conf/confbase.Y b/conf/confbase.Y
index c6678e77..b793acb0 100644
--- a/conf/confbase.Y
+++ b/conf/confbase.Y
@@ -73,6 +73,7 @@ CF_DECLS
%type <iface> ipa_scope
%type <i> expr bool pxlen
+%type <i32> expr_us
%type <time> datetime
%type <a> ipa
%type <px> prefix prefix_or_ipa
@@ -86,7 +87,7 @@ CF_DECLS
%left '!'
%nonassoc '.'
-CF_KEYWORDS(DEFINE, ON, OFF, YES, NO)
+CF_KEYWORDS(DEFINE, ON, OFF, YES, NO, XS, XMS, XUS)
CF_GRAMMAR
@@ -124,6 +125,14 @@ expr:
$$ = SYM_VAL($1).i; }
;
+
+/* XXX fix X* symbols, they collide with macros */
+expr_us:
+ expr XS { $$ = (u32) $1 * 1000000; }
+ | expr XMS { $$ = (u32) $1 * 1000; }
+ | expr XUS { $$ = (u32) $1 * 1; }
+ ;
+
/* expr_u16: expr { check_u16($1); $$ = $1; }; */
/* Switches */