From 48cdbcaea2a826688ec9fb4df1af2cfb38352f9b Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Mon, 25 Mar 2013 20:27:23 +0100 Subject: [PATCH] trafgen: parser: add possibility for negative numbers The previous commit reduced it, so now we allow it within cX() containers in order to negate a result, if someone needs that. Signed-off-by: Daniel Borkmann --- trafgen_parser.y | 2 ++ 1 file changed, 2 insertions(+) diff --git a/trafgen_parser.y b/trafgen_parser.y index b0e7e338..37c9a156 100644 --- a/trafgen_parser.y +++ b/trafgen_parser.y @@ -431,6 +431,8 @@ expression { $$ = $1 << $4; } | expression '>' '>' expression { $$ = $1 >> $4; } + | '-' expression + { $$ = -1 * $2; } | '(' expression ')' { $$ = $2;} ; -- 2.11.4.GIT