summaryrefslogtreecommitdiffstats
path: root/src/parser_bison.y
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser_bison.y')
-rw-r--r--src/parser_bison.y15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/parser_bison.y b/src/parser_bison.y
index 8025415c..bf436086 100644
--- a/src/parser_bison.y
+++ b/src/parser_bison.y
@@ -1649,15 +1649,28 @@ stmt_expr : map_stmt_expr
| primary_rhs_expr
;
-nat_stmt_args : TO stmt_expr
+nat_stmt_args : stmt_expr
+ {
+ $<stmt>0->nat.addr = $1;
+ }
+ | TO stmt_expr
{
$<stmt>0->nat.addr = $2;
}
+ | stmt_expr COLON stmt_expr
+ {
+ $<stmt>0->nat.addr = $1;
+ $<stmt>0->nat.proto = $3;
+ }
| TO stmt_expr COLON stmt_expr
{
$<stmt>0->nat.addr = $2;
$<stmt>0->nat.proto = $4;
}
+ | COLON stmt_expr
+ {
+ $<stmt>0->nat.proto = $2;
+ }
| TO COLON stmt_expr
{
$<stmt>0->nat.proto = $3;