Make rta. syntax optional.
This commit is contained in:
parent
febe526303
commit
6c14255dd6
1 changed files with 13 additions and 10 deletions
|
@ -269,6 +269,9 @@ any_dynamic:
|
||||||
| RIP_TAG { $$ = f_new_inst(); $$->aux = T_INT; $$->a2.i = EA_RIP_TAG; }
|
| RIP_TAG { $$ = f_new_inst(); $$->aux = T_INT; $$->a2.i = EA_RIP_TAG; }
|
||||||
;
|
;
|
||||||
|
|
||||||
|
rtadot: /* EMPTY */
|
||||||
|
| RTA '.' { }
|
||||||
|
;
|
||||||
|
|
||||||
term:
|
term:
|
||||||
'(' term ')' { $$ = $2; }
|
'(' term ')' { $$ = $2; }
|
||||||
|
@ -298,13 +301,13 @@ term:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
| RTA '.' FROM { $$ = f_new_inst(); $$->code = 'a'; $$->aux = T_IP; $$->a2.i = OFFSETOF(struct rta, from); }
|
| rtadot FROM { $$ = f_new_inst(); $$->code = 'a'; $$->aux = T_IP; $$->a2.i = OFFSETOF(struct rta, from); }
|
||||||
|
|
||||||
| RTA '.' GW { $$ = f_new_inst(); $$->code = 'a'; $$->aux = T_IP; $$->a2.i = OFFSETOF(struct rta, gw); }
|
| rtadot GW { $$ = f_new_inst(); $$->code = 'a'; $$->aux = T_IP; $$->a2.i = OFFSETOF(struct rta, gw); }
|
||||||
| RTA '.' NET { $$ = f_new_inst(); $$->code = 'a'; $$->aux = T_PREFIX; $$->a2.i = 0x12345678; }
|
| rtadot NET { $$ = f_new_inst(); $$->code = 'a'; $$->aux = T_PREFIX; $$->a2.i = 0x12345678; }
|
||||||
| RTA '.' SOURCE { $$ = f_new_inst(); $$->code = 'a'; $$->aux = T_ENUM_RTS; $$->a2.i = OFFSETOF(struct rta, gw); }
|
| rtadot SOURCE { $$ = f_new_inst(); $$->code = 'a'; $$->aux = T_ENUM_RTS; $$->a2.i = OFFSETOF(struct rta, gw); }
|
||||||
|
|
||||||
| RTA '.' any_dynamic { $$ = $3; $$->code = 'ea'; }
|
| rtadot any_dynamic { $$ = $2; $$->code = 'ea'; }
|
||||||
|
|
||||||
| term '.' IP { $$ = f_new_inst(); $$->code = 'cp'; $$->a1.p = $1; $$->aux = T_IP; }
|
| term '.' IP { $$ = f_new_inst(); $$->code = 'cp'; $$->a1.p = $1; $$->aux = T_IP; }
|
||||||
| term '.' LEN { $$ = f_new_inst(); $$->code = 'cp'; $$->a1.p = $1; $$->aux = T_INT; }
|
| term '.' LEN { $$ = f_new_inst(); $$->code = 'cp'; $$->a1.p = $1; $$->aux = T_INT; }
|
||||||
|
@ -379,13 +382,13 @@ cmd:
|
||||||
$$->a1.p = $1;
|
$$->a1.p = $1;
|
||||||
$$->a2.p = $3;
|
$$->a2.p = $3;
|
||||||
}
|
}
|
||||||
| RTA '.' any_dynamic '=' term ';' {
|
| rtadot any_dynamic '=' term ';' {
|
||||||
$$ = $3;
|
$$ = $2;
|
||||||
$$->code = 'eS';
|
$$->code = 'eS';
|
||||||
$$->a1.p = $5;
|
$$->a1.p = $4;
|
||||||
}
|
}
|
||||||
| UNSET '(' RTA '.' any_dynamic ')' ';' {
|
| UNSET '(' rtadot any_dynamic ')' ';' {
|
||||||
$$ = $5;
|
$$ = $4;
|
||||||
$$->aux = T_VOID;
|
$$->aux = T_VOID;
|
||||||
$$->code = 'eS';
|
$$->code = 'eS';
|
||||||
$$->a1.p = NULL;
|
$$->a1.p = NULL;
|
||||||
|
|
Loading…
Reference in a new issue