vppapigen: allow negative number in NUM token
Type: make
@@ -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
