Revision fe9f1a6d conf/confbase.Y

View differences:

conf/confbase.Y
39 39
  int i;
40 40
  u32 i32;
41 41
  ip_addr a;
42
  ip4_addr ip4;
43
  ip6_addr ip6;
42 44
  struct symbol *s;
43 45
  char *t;
44 46
  struct rtable_config *r;
......
66 68
%token GEQ LEQ NEQ AND OR
67 69
%token PO PC
68 70
%token <i> NUM ENUM
69
%token <i32> RTRID
70
%token <a> IPA
71
%token <ip4> IP4
72
%token <ip6> IP6
71 73
%token <s> SYM
72 74
%token <t> TEXT
73 75
%type <iface> ipa_scope
......
75 77
%type <i> expr bool pxlen
76 78
%type <i32> expr_us
77 79
%type <time> datetime
78
%type <a> ipa
80
%type <a> ipa ipa_raw
79 81
%type <px> prefix prefix_or_ipa
80 82
%type <t> text
81 83
%type <t> text_or_none
84
%type <t> opttext
82 85

  
83 86
%nonassoc PREFIX_DUMMY
84 87
%left AND OR
......
148 151

  
149 152
/* Addresses, prefixes and netmasks */
150 153

  
154
ipa_raw:
155
   IP4 { $$ = ipa_from_ip4($1); }
156
 | IP6 { $$ = ipa_from_ip6($1); }
157
 ;
158

  
151 159
ipa:
152
   IPA
160
   ipa_raw
153 161
 | SYM {
154 162
     if ($1->class != (SYM_CONSTANT | T_IP)) cf_error("IP address expected");
155 163
     $$ = SYM_VAL($1).px.ip;
......
205 213
 |      { $$ = NULL; }
206 214
 ;
207 215

  
216
opttext:
217
    TEXT
218
 | /* empty */ { $$ = NULL; }
219
 ;
220

  
221

  
208 222
CF_CODE
209 223

  
210 224
CF_END

Also available in: Unified diff