%type <a> ipa
%type <net> net_ip4_ net_ip4 net_ip6_ net_ip6 net_ip_ net_ip net_or_ipa
%type <net_ptr> net_ net_any net_vpn4_ net_vpn6_ net_vpn_ net_roa4_ net_roa6_ net_roa_ net_ip6_sadr_ net_mpls_
-%type <mls> label_stack_start label_stack
+%type <ad> label_stack_start label_stack
%type <t> text opttext
-%type <s> symbol
-%type <kw> kw_sym
+ %type <bs> bytestring
+%type <s> symbol symbol_known toksym
+ %type <v> bytestring_text
+ %type <x> bytestring_expr
+
%nonassoc PREFIX_DUMMY
%left AND OR
%nonassoc '=' '<' '>' '~' GEQ LEQ NEQ NMA PO PC
| /* empty */ { $$ = NULL; }
;
- | bytestring_expr { $$ = cf_eval($1, T_BYTESTRING).val.bs; }
+ bytestring:
+ BYTETEXT
- $$ = cf_eval($1, T_VOID);
++ | bytestring_expr { $$ = cf_eval($1, T_BYTESTRING)->val.bs; }
+ ;
+
+ bytestring_text:
+ BYTETEXT { $$.type = T_BYTESTRING; $$.val.bs = $1; }
+ | TEXT { $$.type = T_STRING; $$.val.s = $1; }
+ | bytestring_expr {
++ $$ = *cf_eval($1, T_VOID);
+ if (($$.type != T_BYTESTRING) && ($$.type != T_STRING))
+ cf_error("Bytestring or string value expected");
+ }
+ ;
+
+ bytestring_expr:
+ symbol_value
+ | term_bs
+ | '(' term ')' { $$ = $2; }
+ ;
+
CF_CODE