Statistics
| Branch: | Revision:

iof-bird-daemon / filter / config.Y @ e29fa06e

History | View | Annotate | Download (15.8 KB)

1
/*
2
 *	BIRD - filters
3
 *
4
 *	Copyright 1998--2000 Pavel Machek
5
 *
6
 *	Can be freely distributed and used under the terms of the GNU GPL.
7
 *
8
	FIXME: priority of ! should be lower
9
 */
10

    
11
CF_HDR
12

    
13
CF_DEFINES
14

    
15
#define P(a,b) ((a<<8) | b)
16

    
17
CF_DECLS
18

    
19
CF_KEYWORDS(FUNCTION, PRINT, PRINTN, UNSET, RETURN,
20
	ACCEPT, REJECT, ERROR, QUITBIRD,
21
	INT, BOOL, IP, PREFIX, PAIR, SET, STRING, BGPMASK, BGPPATH, CLIST,
22
	IF, THEN, ELSE, CASE,
23
	TRUE, FALSE,
24
	FROM, GW, NET, MASK, PROTO, SOURCE, SCOPE, CAST, DEST, PREFERENCE,
25
	LEN,
26
	DEFINED,
27
	ADD, DELETE, CONTAINS, RESET,
28
	PREPEND, MATCH,
29
	EMPTY,
30
	FILTER, WHERE, EVAL)
31

    
32
%nonassoc THEN
33
%nonassoc ELSE
34

    
35
%type <x> term block cmds cmd function_body constant print_one print_list var_list var_listn dynamic_attr static_attr function_call
36
%type <f> filter filter_body where_filter
37
%type <i> type break_command pair
38
%type <e> set_item set_items switch_body
39
%type <v> set_atom fprefix fprefix_s fipa
40
%type <s> decls declsn one_decl function_params 
41
%type <h> bgp_path
42

    
43
CF_GRAMMAR
44

    
45
CF_ADDTO(conf, filter_def)
46
filter_def:
47
   FILTER SYM { cf_push_scope( $2 ); } filter_body {
48
     $2 = cf_define_symbol($2, SYM_FILTER, $4);
49
     $4->name = $2->name;
50
     DBG( "We have new filter defined (%s)\n", $2->name );
51
     cf_pop_scope();
52
   }
53
 ;
54

    
55
CF_ADDTO(conf, filter_eval)
56
filter_eval:
57
   EVAL term { f_eval_int($2); }
58
 ;
59

    
60
type:
61
   INT { $$ = T_INT; }
62
 | BOOL { $$ = T_BOOL; }
63
 | IP { $$ = T_IP; }
64
 | PREFIX { $$ = T_PREFIX; }
65
 | PAIR { $$ = T_PAIR; }
66
 | STRING { $$ = T_STRING; }
67
 | BGPMASK { $$ = T_PATH_MASK; }
68
 | BGPPATH { $$ = T_PATH; }
69
 | CLIST { $$ = T_CLIST; }
70
 | type SET { 
71
	switch ($1) {
72
	  default:
73
		cf_error( "You can't create sets of this type." );
74
	  case T_INT: case T_IP: case T_PREFIX: case T_PAIR: ;
75
	}
76
	$$ = $1 | T_SET;
77
	}
78
 ;
79

    
80
one_decl:
81
   type SYM {
82
     $2 = cf_define_symbol($2, SYM_VARIABLE | $1, NULL);
83
     DBG( "New variable %s type %x\n", $2->name, $1 );
84
     $2->aux = 0;
85
     {
86
       struct f_val * val; 
87
       val = cfg_alloc(sizeof(struct f_val)); 
88
       val->type = $1; 
89
       $2->aux2 = val;
90
     }
91
     $$=$2;
92
   }
93
 ;
94

    
95
/* Decls with ';' at the end */
96
decls: /* EMPTY */ { $$ = NULL; }
97
 | one_decl ';' decls {
98
     $$ = $1;
99
     $$->aux = (int) $3;
100
   }
101
 ;
102

    
103
/* Declarations that have no ';' at the end. */
104
declsn: one_decl { $$ = $1; }
105
 | declsn ';' one_decl {
106
     $$ = $1;
107
     $$->aux = (int) $3;
108
   }
109
 ;
110

    
111
filter_body:
112
   function_body {
113
     struct filter *f = cfg_alloc(sizeof(struct filter));
114
     f->name = NULL;
115
     f->root = $1;
116
     $$ = f;
117
   }
118
 ;
119

    
120
filter:
121
   SYM {
122
     if ($1->class != SYM_FILTER) cf_error("No such filter.");
123
     $$ = $1->def;
124
   }
125
 | filter_body
126
 ;
127

    
128
where_filter:
129
   WHERE term {
130
     /* Construct 'IF term THEN ACCEPT; REJECT;' */
131
     struct filter *f = cfg_alloc(sizeof(struct filter));
132
     struct f_inst *i, *acc, *rej;
133
     acc = f_new_inst();		/* ACCEPT */
134
     acc->code = P('p',',');
135
     acc->a1.p = NULL;
136
     acc->a2.i = F_ACCEPT;
137
     rej = f_new_inst();		/* REJECT */
138
     rej->code = P('p',',');
139
     rej->a1.p = NULL;
140
     rej->a2.i = F_REJECT;
141
     i = f_new_inst();			/* IF */
142
     i->code = '?';
143
     i->a1.p = $2;
144
     i->a2.p = acc;
145
     i->next = rej;
146
     f->name = NULL;
147
     f->root = i;
148
     $$ = f;
149
  }
150
 ;
151

    
152
function_params:
153
   '(' declsn ')' { DBG( "Have function parameters\n" ); $$=$2; }
154
 | '(' ')' { $$=NULL; }
155
 ;
156

    
157
function_body:
158
   decls '{' cmds '}' {
159
     $$ = $3;
160
   }
161
 ;
162

    
163
CF_ADDTO(conf, function_def)
164
function_def:
165
   FUNCTION SYM { DBG( "Beginning of function %s\n", $2->name );
166
     $2 = cf_define_symbol($2, SYM_FUNCTION, NULL);
167
     cf_push_scope($2);
168
   } function_params function_body {
169
     $2->def = $5;
170
     $2->aux = (int) $4;
171
     $2->aux2 = $5;
172
     DBG("Hmm, we've got one function here - %s\n", $2->name); 
173
     cf_pop_scope();
174
   }
175
 ;
176

    
177
/* Programs */
178

    
179
cmds: /* EMPTY */ { $$ = NULL; }
180
 | cmd cmds {
181
     if ($1) {
182
       if ($1->next)
183
	 bug("Command has next already set");
184
       $1->next = $2;
185
       $$ = $1;
186
     } else $$ = $2;
187
   }
188
 ;
189

    
190
block:
191
   cmd {
192
     $$=$1;
193
   }
194
 | '{' cmds '}' {
195
     $$=$2;
196
   }
197
 ;
198

    
199
/*
200
 * Simple types, their bison value is int
201
 */
202
pair:
203
   '(' NUM ',' NUM ')' { $$ = $2 << 16 | $4; }
204
 ;
205

    
206
/*
207
 * Complex types, their bison value is struct f_val
208
 */
209
fprefix_s:
210
   IPA '/' NUM %prec '/' {
211
     if (!ip_is_prefix($1, $3)) cf_error("Invalid network prefix: %I/%d.", $1, $3);
212
     $$.type = T_PREFIX; $$.val.px.ip = $1; $$.val.px.len = $3;
213
   }
214
 ;
215

    
216
fprefix:
217
   fprefix_s { $$ = $1; }
218
 | fprefix_s '+' { $$ = $1; $$.val.px.len |= LEN_PLUS; }
219
 | fprefix_s '-' { $$ = $1; $$.val.px.len |= LEN_MINUS; }
220
 | fprefix_s '{' NUM ',' NUM '}' { $$ = $1; $$.val.px.len |= LEN_RANGE | ($3 << 16) | ($5 << 8); }
221
 ;
222

    
223
fipa:
224
   IPA %prec PREFIX_DUMMY { $$.type = T_IP; $$.val.px.ip = $1; }
225
 ;
226

    
227
set_atom:
228
   NUM  { $$.type = T_INT; $$.val.i = $1; }
229
 | pair { $$.type = T_PAIR; $$.val.i = $1; }
230
 | fipa { $$ = $1; }
231
 | fprefix { $$ = $1; }
232
 | ENUM {  $$.type = $1 >> 16; $$.val.i = $1 & 0xffff; }
233
 ; 
234

    
235
set_item:
236
   set_atom { 
237
	$$ = f_new_tree(); 
238
	$$->from = $1; 
239
	if ($1.type != T_PREFIX)
240
		$$->to = $1;
241
	else {
242
		$$->to = $1;
243
		$$->to.val.px.ip = ipa_or( $$->to.val.px.ip, ipa_not( ipa_mkmask( $$->to.val.px.len ) ));
244
	}
245
   }
246
 | set_atom '.' '.' set_atom { 
247
	$$ = f_new_tree(); 
248
	$$->from = $1; 
249
	$$->to = $4; 
250
	if (($1.type == T_PREFIX) || ($4.type == T_PREFIX)) cf_error( "You can't use prefixes for range." ); 
251
   }
252
 ;
253

    
254
set_items:
255
   set_item { $$ = $1; }
256
 | set_items ',' set_item { $$ = $3; $$->left = $1; }
257
 ;
258

    
259
switch_body: /* EMPTY */ { $$ = NULL; }
260
 | set_item ':' cmds switch_body {
261
     $$ = $1;
262
     $$->data = $3;
263
     $$->left = $4;
264
   }
265
 | ELSE ':' cmds {
266
     $$ = f_new_tree(); 
267
     $$->from.type = T_VOID; 
268
     $$->to.type = T_VOID;
269
     $$->data = $3;
270
   }
271
 ;
272

    
273
/* CONST '(' expr ')' { $$ = f_new_inst(); $$->code = 'c'; $$->aux = T_INT; $$->a2.i = $3; } */
274

    
275

    
276
bgp_path: 
277
   NUM          { $$ = cfg_alloc(sizeof(struct f_path_mask)); $$->next = NULL; $$->val  = $1; $$->any = 0; }
278
 | '?'          { $$ = cfg_alloc(sizeof(struct f_path_mask)); $$->next = NULL; $$->val  = 0;  $$->any = 1; }
279
 | NUM bgp_path { $$ = cfg_alloc(sizeof(struct f_path_mask)); $$->next = $2;   $$->val  = $1; $$->any = 0; }
280
 | '?' bgp_path { $$ = cfg_alloc(sizeof(struct f_path_mask)); $$->next = $2;   $$->val  = 0;  $$->any = 1; }
281
 ;
282

    
283
constant:
284
   NUM    { $$ = f_new_inst(); $$->code = 'c'; $$->aux = T_INT;  $$->a2.i = $1; }
285
 | TRUE   { $$ = f_new_inst(); $$->code = 'c'; $$->aux = T_BOOL; $$->a2.i = 1;  }
286
 | FALSE  { $$ = f_new_inst(); $$->code = 'c'; $$->aux = T_BOOL; $$->a2.i = 0;  }
287
 | TEXT   { $$ = f_new_inst(); $$->code = 'c'; $$->aux = T_STRING; $$->a2.p = $1; }
288
 | pair   { $$ = f_new_inst(); $$->code = 'c'; $$->aux = T_PAIR;  $$->a2.i = $1; }
289
 | fipa	   { NEW_F_VAL; $$ = f_new_inst(); $$->code = 'C'; $$->a1.p = val; *val = $1; }
290
 | fprefix_s {NEW_F_VAL; $$ = f_new_inst(); $$->code = 'C'; $$->a1.p = val; *val = $1; }
291
 | '[' set_items ']' { DBG( "We've got a set here..." ); $$ = f_new_inst(); $$->code = 'c'; $$->aux = T_SET; $$->a2.p = build_tree($2); DBG( "ook\n" ); }
292
 | ENUM	  { $$ = f_new_inst(); $$->code = 'c'; $$->aux = $1 >> 16; $$->a2.i = $1 & 0xffff; }
293
 | '/' bgp_path '/' { NEW_F_VAL; $$ = f_new_inst(); $$->code = 'C'; val->type = T_PATH_MASK; val->val.path_mask = $2; $$->a1.p = val; }
294
 ;
295

    
296
/*
297
 *  Maybe there are no dynamic attributes defined by protocols.
298
 *  For such cases, we force the dynamic_attr list to contain
299
 *  at least an invalid token, so it's syntantically correct.
300
 */
301
CF_ADDTO(dynamic_attr, INVALID_TOKEN { $$ = NULL; })
302

    
303
rtadot: /* EMPTY, we are not permitted RTA. prefix */
304
 ;
305

    
306
function_call:
307
   SYM '(' var_list ')' {
308
     struct symbol *sym;
309
     struct f_inst *inst = $3;
310
     if ($1->class != SYM_FUNCTION)
311
       cf_error("You can't call something which is not a function. Really.");
312
     DBG("You are calling function %s\n", $1->name);
313
     $$ = f_new_inst();
314
     $$->code = P('c','a');
315
     $$->a1.p = inst;
316
     $$->a2.p = $1->aux2;
317
     sym = (void *) $1->aux;
318
     while (sym || inst) {
319
       if (!sym || !inst)
320
	 cf_error("Wrong number of arguments for function %s.", $1->name);
321
       DBG( "You should pass parameter called %s\n", sym->name);
322
       inst->a1.p = sym;
323
       sym = (void *) sym->aux;
324
       inst = inst->next;
325
     }
326
   }
327
 ;
328

    
329
static_attr:
330
   FROM    { $$ = f_new_inst(); $$->aux = T_IP;         $$->a2.i = OFFSETOF(struct rta, from);   $$->a1.i = 1; }
331

    
332
 | GW      { $$ = f_new_inst(); $$->aux = T_IP;         $$->a2.i = OFFSETOF(struct rta, gw);     $$->a1.i = 1; }
333
 | NET     { $$ = f_new_inst(); $$->aux = T_PREFIX;     $$->a2.i = 0x12345678; /* This is actually ok - T_PREFIX is special-cased. */ }
334
 | PROTO   { $$ = f_new_inst(); $$->aux = T_STRING;     $$->a2.i = 0x12345678; /* T_STRING is also special-cased. */ }
335
 | SOURCE  { $$ = f_new_inst(); $$->aux = T_ENUM_RTS;   $$->a2.i = OFFSETOF(struct rta, source); }
336
 | SCOPE   { $$ = f_new_inst(); $$->aux = T_ENUM_SCOPE; $$->a2.i = OFFSETOF(struct rta, scope);  $$->a1.i = 1; }
337
 | CAST    { $$ = f_new_inst(); $$->aux = T_ENUM_RTC;   $$->a2.i = OFFSETOF(struct rta, cast); }
338
 | DEST    { $$ = f_new_inst(); $$->aux = T_ENUM_RTD;   $$->a2.i = OFFSETOF(struct rta, dest); }
339
 ;
340

    
341
term:
342
   '(' term ')'      { $$ = $2; }
343
 | term '+' term     { $$ = f_new_inst(); $$->code = '+';        $$->a1.p = $1; $$->a2.p = $3; }
344
 | term '-' term     { $$ = f_new_inst(); $$->code = '-';        $$->a1.p = $1; $$->a2.p = $3; }
345
 | term '*' term     { $$ = f_new_inst(); $$->code = '*';        $$->a1.p = $1; $$->a2.p = $3; }
346
 | term '/' term     { $$ = f_new_inst(); $$->code = '/';        $$->a1.p = $1; $$->a2.p = $3; }
347
 | term AND term     { $$ = f_new_inst(); $$->code = '&';        $$->a1.p = $1; $$->a2.p = $3; }
348
 | term OR  term     { $$ = f_new_inst(); $$->code = '|';        $$->a1.p = $1; $$->a2.p = $3; }
349
 | term '=' term     { $$ = f_new_inst(); $$->code = P('=','='); $$->a1.p = $1; $$->a2.p = $3; }
350
 | term NEQ term { $$ = f_new_inst(); $$->code = P('!','=');     $$->a1.p = $1; $$->a2.p = $3; }
351
 | term '<' term     { $$ = f_new_inst(); $$->code = '<';        $$->a1.p = $1; $$->a2.p = $3; }
352
 | term LEQ term { $$ = f_new_inst(); $$->code = P('<','=');     $$->a1.p = $1; $$->a2.p = $3; }
353
 | term '>' term     { $$ = f_new_inst(); $$->code = '<';        $$->a1.p = $3; $$->a2.p = $1; }
354
 | term GEQ term { $$ = f_new_inst(); $$->code = P('<','=');     $$->a1.p = $3; $$->a2.p = $1; }
355
 | term '~' term     { $$ = f_new_inst(); $$->code = '~';        $$->a1.p = $1; $$->a2.p = $3; }
356
 | '!' term { $$ = f_new_inst(); $$->code = '!'; $$->a1.p = $2; }
357
 | DEFINED '(' term ')' { $$ = f_new_inst(); $$->code = P('d','e');  $$->a1.p = $3; }
358

    
359
 | constant { $$ = $1; }
360
 | SYM {
361
     $$ = f_new_inst();
362
     switch ($1->class) {
363
       case SYM_NUMBER:
364
	$$ = f_new_inst();
365
	$$->code = 'c'; 
366
	$$->aux = T_INT; 
367
	$$->a2.i = $1->aux;
368
	break;
369
       case SYM_IPA:
370
	{ NEW_F_VAL; $$ = f_new_inst(); $$->code = 'C'; $$->a1.p = val; val->type = T_IP; val->val.px.ip = * (ip_addr *) ($1->def); }
371
	break;
372
       case SYM_VARIABLE | T_INT:
373
       case SYM_VARIABLE | T_PAIR:
374
       case SYM_VARIABLE | T_PREFIX:
375
       case SYM_VARIABLE | T_IP:
376
       case SYM_VARIABLE | T_PATH_MASK:
377
       case SYM_VARIABLE | T_PATH:
378
       case SYM_VARIABLE | T_CLIST:
379
	 $$->code = 'C';
380
	 $$->a1.p = $1->aux2;
381
	 break;
382
       default:
383
	 cf_error("%s: variable expected.", $1->name );
384
     }
385
   }
386

    
387
 | PREFERENCE { $$ = f_new_inst(); $$->code = 'P'; }
388

    
389
 | rtadot static_attr { $$ = $2; $$->code = 'a'; }
390

    
391
 | rtadot dynamic_attr { $$ = $2; $$->code = P('e','a'); }
392

    
393
 | term '.' IP { $$ = f_new_inst(); $$->code = P('c','p'); $$->a1.p = $1; $$->aux = T_IP; }
394
 | term '.' LEN { $$ = f_new_inst(); $$->code = 'L'; $$->a1.p = $1; }
395
 | term '.' MASK '(' term ')' { $$ = f_new_inst(); $$->code = P('i','M'); $$->a1.p = $1; $$->a2.p = $5; }
396

    
397
/* Communities */
398
/* This causes one shift/reduce conflict
399
 | rtadot dynamic_attr '.' ADD '(' term ')' { }
400
 | rtadot dynamic_attr '.' DELETE '(' term ')' { }
401
 | rtadot dynamic_attr '.' CONTAINS '(' term ')' { }
402
 | rtadot dynamic_attr '.' RESET{ }
403
*/
404

    
405
 | '+' EMPTY '+' { $$ = f_new_inst(); $$->code = 'E'; $$->aux = T_PATH; }
406
 | '-' EMPTY '-' { $$ = f_new_inst(); $$->code = 'E'; $$->aux = T_CLIST; }
407
 | PREPEND '(' term ',' term ')' { $$ = f_new_inst(); $$->code = P('A','p'); $$->a1.p = $3; $$->a2.p = $5; } 
408
 | ADD '(' term ',' term ')' { $$ = f_new_inst(); $$->code = P('C','a'); $$->a1.p = $3; $$->a2.p = $5; $$->aux = 'a'; } 
409
 | DELETE '(' term ',' term ')' { $$ = f_new_inst(); $$->code = P('C','a'); $$->a1.p = $3; $$->a2.p = $5; $$->aux = 'd'; }
410

    
411
/* | term '.' LEN { $$->code = P('P','l'); } */
412

    
413
/* function_call is inlined here */
414
 | SYM '(' var_list ')' {
415
     struct symbol *sym;
416
     struct f_inst *inst = $3;
417
     if ($1->class != SYM_FUNCTION)
418
       cf_error("You can't call something which is not a function. Really.");
419
     DBG("You are calling function %s\n", $1->name);
420
     $$ = f_new_inst();
421
     $$->code = P('c','a');
422
     $$->a1.p = inst;
423
     $$->a2.p = $1->aux2;
424
     sym = (void *) $1->aux;
425
     while (sym || inst) {
426
       if (!sym || !inst)
427
	 cf_error("Wrong number of arguments for function %s.", $1->name);
428
       DBG( "You should pass parameter called %s\n", sym->name);
429
       inst->a1.p = sym;
430
       sym = (void *) sym->aux;
431
       inst = inst->next;
432
     }
433
   }
434
 ;
435

    
436
break_command:
437
   QUITBIRD { $$ = F_QUITBIRD; }
438
 | ACCEPT { $$ = F_ACCEPT; }
439
 | REJECT { $$ = F_REJECT; }
440
 | ERROR { $$ = F_ERROR; }
441
 | PRINT { $$ = F_NOP; }
442
 | PRINTN { $$ = F_NONL; }
443
 ;
444

    
445
print_one:
446
   term { $$ = f_new_inst(); $$->code = 'p'; $$->a1.p = $1; $$->a2.p = NULL; }
447
 ;
448

    
449
print_list: /* EMPTY */ { $$ = NULL; }
450
 | print_one { $$ = $1; }
451
 | print_one ',' print_list {
452
     if ($1) {
453
       $1->next = $3;
454
       $$ = $1;
455
     } else $$ = $3;
456
   }
457
 
458
 ;
459

    
460
var_listn: term { 
461
     $$ = f_new_inst();
462
     $$->code = 's';
463
     $$->a1.p = NULL;
464
     $$->a2.p = $1;
465
     $$->next = NULL;
466
   }
467
 | term ',' var_listn {
468
     $$ = f_new_inst();
469
     $$->code = 's';
470
     $$->a1.p = NULL;
471
     $$->a2.p = $1;
472
     $$->next = $3;
473
   }
474
 ;
475

    
476
var_list: /* EMPTY */ { $$ = NULL; }
477
 | var_listn { $$ = $1; }
478
 ;
479

    
480
cmd:
481
   IF term THEN block {
482
     $$ = f_new_inst();
483
     $$->code = '?';
484
     $$->a1.p = $2;
485
     $$->a2.p = $4;
486
   }
487
 | IF term THEN block ELSE block {
488
     struct f_inst *i = f_new_inst();
489
     i->code = '?';
490
     i->a1.p = $2;
491
     i->a2.p = $4;
492
     $$ = f_new_inst();
493
     $$->code = '?';
494
     $$->a1.p = i;
495
     $$->a2.p = $6;
496
   }
497
 | SYM '=' term ';' {
498
     $$ = f_new_inst();
499
     DBG( "Ook, we'll set value\n" );
500
     if (($1->class & ~T_MASK) != SYM_VARIABLE)
501
       cf_error( "You may set only variables." );
502
     $$->code = 's';
503
     $$->a1.p = $1;
504
     $$->a2.p = $3;
505
   }
506
 | RETURN term ';' {
507
     $$ = f_new_inst();
508
     DBG( "Ook, we'll return the value\n" );
509
     $$->code = 'r';
510
     $$->a1.p = $2;
511
   }
512
 | rtadot dynamic_attr '=' term ';' {
513
     $$ = $2;
514
     $$->code = P('e','S');
515
     $$->a1.p = $4;
516
   }
517
 | rtadot static_attr '=' term ';' {
518
     $$ = $2;
519
     if (!$$->a1.i)
520
       cf_error( "This static attribute is read-only.");
521
     $$->code = P('a','S');
522
     $$->a1.p = $4;
523
   }
524
 | PREFERENCE '=' term ';' {
525
     $$ = f_new_inst();
526
     $$->code = P('P','S');
527
     $$->a1.p = $3;
528
   } 
529
 | UNSET '(' rtadot dynamic_attr ')' ';' {
530
     $$ = $4;
531
     $$->aux = EAF_TYPE_UNDEF | EAF_TEMP;
532
     $$->code = P('e','S');
533
     $$->a1.p = NULL;
534
   }
535
 | break_command print_list ';' { $$ = f_new_inst(); $$->code = P('p',','); $$->a1.p = $2; $$->a2.i = $1; }
536
 | function_call ';' { $$ = $1; }
537
 | CASE term '{' switch_body '}' {
538
      $$ = f_new_inst();
539
      $$->code = P('S','W');
540
      $$->a1.p = $2;
541
      $$->a2.p = build_tree( $4 );
542
   }
543

    
544

    
545
 | rtadot dynamic_attr '.' EMPTY ';' 
546
  { struct f_inst *i = f_new_inst(); i->code = 'E'; i->aux = T_CLIST; $$ = $2; $$->code = P('e','S'); $$->a1.p = i; }
547
 | rtadot dynamic_attr '.' PREPEND '(' term ')' ';'   { $$ = f_generate_complex( P('A','p'), 'x', $2, $6 ); }
548
 | rtadot dynamic_attr '.' ADD '(' term ')' ';'       { $$ = f_generate_complex( P('C','a'), 'a', $2, $6 ); } 
549
 | rtadot dynamic_attr '.' DELETE '(' term ')' ';'    { $$ = f_generate_complex( P('C','a'), 'd', $2, $6 ); } 
550
 ;
551

    
552
CF_END