]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Resolved shift/reduce conflict
authorPavel Machek <pavel@ucw.cz>
Tue, 16 May 2000 14:24:33 +0000 (14:24 +0000)
committerPavel Machek <pavel@ucw.cz>
Tue, 16 May 2000 14:24:33 +0000 (14:24 +0000)
conf/confbase.Y
filter/config.Y
filter/test.conf

index 31b361730c50da90efd7d2ed9e3cd4286365d992..b48a929019ef9c31020243dfdbc2cb8cf2e94905 100644 (file)
@@ -56,6 +56,7 @@ CF_DECLS
 %type <a> ipa
 %type <px> prefix prefix_or_ipa
 
+%nonassoc PREFIX_DUMMY
 %nonassoc '=' '<' '>' '~' '.' GEQ LEQ NEQ
 %left '+' '-'
 %left '*' '/' '%'
index a99e4a5468042d2ea87b24c21932bbd94bd0d687..accf3184aff61b6fff123219e550ba7b40c6d520 100644 (file)
@@ -211,7 +211,7 @@ pair:
  * Complex types, their bison value is struct f_val
  */
 fprefix_s:
-   IPA '/' NUM {
+   IPA '/' NUM %prec '/' {
      if (!ip_is_prefix($1, $3)) cf_error("Invalid network prefix: %I/%d", $1, $3);
      $$.type = T_PREFIX; $$.val.px.ip = $1; $$.val.px.len = $3;
    }
@@ -225,7 +225,7 @@ fprefix:
  ;
 
 fipa:
-   IPA  { $$.type = T_IP; $$.val.px.ip = $1; }
+   IPA %prec PREFIX_DUMMY { $$.type = T_IP; $$.val.px.ip = $1; }
  ;
 
 set_atom:
index bce8cfec91de1c9f9804cb7e520e30e5abfe23c8..c7fe415ffa826aaecaa3d51843b7fcf87bc38404 100644 (file)
@@ -6,7 +6,7 @@
 
 router id 62.168.0.1;
 
-#define xyzzy = 120+10;
+define xyzzy = (120+10);
 
 function callme(int arg1; int arg2)
 int local1;