From 2a688c0120274c075f960feffa74e825b55e78d0 Mon Sep 17 00:00:00 2001 From: Ole Troan Date: Thu, 20 Jun 2019 14:06:07 +0200 Subject: vppapigen: allow negative number in NUM token Change-Id: I964cb44f8604187390009dcef7dd766b3804c3ca Type: make Signed-off-by: Ole Troan --- src/tools/vppapigen/vppapigen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/tools/vppapigen/vppapigen.py b/src/tools/vppapigen/vppapigen.py index 576fa548424..9c6b21ed48d 100755 --- a/src/tools/vppapigen/vppapigen.py +++ b/src/tools/vppapigen/vppapigen.py @@ -77,7 +77,7 @@ class VPPAPILexer(object): t_ignore_LINE_COMMENT = '//.*' def t_NUM(self, t): - r'0[xX][0-9a-fA-F]+|\d+' + r'0[xX][0-9a-fA-F]+|-?\d+' base = 16 if t.value.startswith('0x') else 10 t.value = int(t.value, base) return t -- cgit 1.2.3-korg