diff options
author | Daniel Borkmann <dborkman@redhat.com> | 2013-03-25 20:27:23 +0100 |
---|---|---|
committer | Daniel Borkmann <dborkman@redhat.com> | 2013-03-25 20:27:23 +0100 |
commit | 48cdbcaea2a826688ec9fb4df1af2cfb38352f9b (patch) | |
tree | 8053241fb38c9075390f68838cb30e605d6051c1 | |
parent | f9591eebe40c9d898483c83c6d4d23d553ec43fc (diff) |
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 <dborkman@redhat.com>
-rw-r--r-- | trafgen_parser.y | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/trafgen_parser.y b/trafgen_parser.y index b0e7e33..37c9a15 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;} ; |