%token XML "xml"
%token JSON "json"
-%type <string> identifier string comment_spec
-%destructor { xfree($$); } identifier string comment_spec
+%type <string> identifier type_identifier string comment_spec
+%destructor { xfree($$); } identifier type_identifier string comment_spec
%type <val> time_spec
-%type <val> type_identifier
+%type <val> type_identifier_list
%type <datatype> data_type
%type <cmd> line
| MEMORY { $$ = NFT_SET_POL_MEMORY; }
;
-data_type : type_identifier
+data_type : type_identifier_list
{
if ($1 & ~TYPE_MASK)
$$ = concat_type_alloc($1);
}
;
-type_identifier : identifier
+type_identifier_list : type_identifier
{
const struct datatype *dtype = datatype_lookup_byname($1);
if (dtype == NULL) {
}
$$ = dtype->type;
}
- | type_identifier DOT identifier
+ | type_identifier_list DOT type_identifier
{
const struct datatype *dtype = datatype_lookup_byname($3);
if (dtype == NULL) {
}
;
+type_identifier : STRING { $$ = $1; }
+ | MARK { $$ = xstrdup("mark"); }
+ ;
+
hook_spec : TYPE STRING HOOK STRING PRIORITY NUM
{
$<chain>0->type = chain_type_name_lookup($2);