Resolved shift/reduce conflict
This commit is contained in:
parent
e2f4f27564
commit
60de3356ab
3 changed files with 4 additions and 3 deletions
|
@ -56,6 +56,7 @@ CF_DECLS
|
||||||
%type <a> ipa
|
%type <a> ipa
|
||||||
%type <px> prefix prefix_or_ipa
|
%type <px> prefix prefix_or_ipa
|
||||||
|
|
||||||
|
%nonassoc PREFIX_DUMMY
|
||||||
%nonassoc '=' '<' '>' '~' '.' GEQ LEQ NEQ
|
%nonassoc '=' '<' '>' '~' '.' GEQ LEQ NEQ
|
||||||
%left '+' '-'
|
%left '+' '-'
|
||||||
%left '*' '/' '%'
|
%left '*' '/' '%'
|
||||||
|
|
|
@ -211,7 +211,7 @@ pair:
|
||||||
* Complex types, their bison value is struct f_val
|
* Complex types, their bison value is struct f_val
|
||||||
*/
|
*/
|
||||||
fprefix_s:
|
fprefix_s:
|
||||||
IPA '/' NUM {
|
IPA '/' NUM %prec '/' {
|
||||||
if (!ip_is_prefix($1, $3)) cf_error("Invalid network prefix: %I/%d", $1, $3);
|
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;
|
$$.type = T_PREFIX; $$.val.px.ip = $1; $$.val.px.len = $3;
|
||||||
}
|
}
|
||||||
|
@ -225,7 +225,7 @@ fprefix:
|
||||||
;
|
;
|
||||||
|
|
||||||
fipa:
|
fipa:
|
||||||
IPA { $$.type = T_IP; $$.val.px.ip = $1; }
|
IPA %prec PREFIX_DUMMY { $$.type = T_IP; $$.val.px.ip = $1; }
|
||||||
;
|
;
|
||||||
|
|
||||||
set_atom:
|
set_atom:
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
router id 62.168.0.1;
|
router id 62.168.0.1;
|
||||||
|
|
||||||
#define xyzzy = 120+10;
|
define xyzzy = (120+10);
|
||||||
|
|
||||||
function callme(int arg1; int arg2)
|
function callme(int arg1; int arg2)
|
||||||
int local1;
|
int local1;
|
||||||
|
|
Loading…
Reference in a new issue