diff options
Diffstat (limited to 'conf')
-rw-r--r-- | conf/confbase.Y | 11 |
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 */ |