diff options
author | Maria Matejka <mq@ucw.cz> | 2022-05-02 20:29:03 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2023-09-12 15:20:50 +0200 |
commit | 8e177cf35b582ec973c1abce4709c80847adb711 (patch) | |
tree | fcf14a0c11d2ae7d5ae67229c658d579e61c32fc /conf/confbase.Y | |
parent | a5a6de581b79641b21b26277580cb4cc118da7ea (diff) |
Conf: Symbol hashes for all scopes
This is a backport cherry-pick of commits
165156beeb2926472bbceca3c103aacc3f81a8cc
cce974e8ea992d0e6d2f649eca7880b436d91d71
from the v3.0 branch as we need symbol hashes directly inside their
scopes for more general usage than before.
Diffstat (limited to 'conf/confbase.Y')
-rw-r--r-- | conf/confbase.Y | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/conf/confbase.Y b/conf/confbase.Y index a43a8cca..0c2807dc 100644 --- a/conf/confbase.Y +++ b/conf/confbase.Y @@ -118,7 +118,7 @@ CF_DECLS %type <t> text opttext %type <bs> bytestring -%type <s> symbol +%type <s> symbol symbol_known %type <v> bytestring_text text_or_ipa %type <x> bytestring_expr @@ -166,7 +166,7 @@ definition: expr: NUM | '(' term ')' { $$ = cf_eval_int($2); } - | CF_SYM_KNOWN { + | symbol_known { if ($1->class != (SYM_CONSTANT | T_INT)) cf_error("Number constant expected"); $$ = SYM_VAL($1).i; } ; @@ -177,7 +177,8 @@ expr_us: | expr US { $$ = $1 US_; } ; -symbol: CF_SYM_UNDEFINED | CF_SYM_KNOWN | KEYWORD { $$ = cf_symbol_from_keyword($1); } ; +symbol: CF_SYM_UNDEFINED | CF_SYM_KNOWN | KEYWORD ; +symbol_known: CF_SYM_KNOWN | KEYWORD ; /* Switches */ |