aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/tools/vppapigen/vppapigen.py2
1 files changed, 1 insertions, 1 deletions
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