diff options
author | Ole Troan <ot@cisco.com> | 2019-06-20 14:06:07 +0200 |
---|---|---|
committer | Paul Vinciguerra <pvinci@vinciconsulting.com> | 2019-06-20 22:09:12 +0000 |
commit | 2a688c0120274c075f960feffa74e825b55e78d0 (patch) | |
tree | 2c1a24ca31bb90473a3507e09fcaa348cd937996 | |
parent | 4f740c8f0085c0cd576744c00bf50a9d9b111470 (diff) |
vppapigen: allow negative number in NUM token
Change-Id: I964cb44f8604187390009dcef7dd766b3804c3ca
Type: make
Signed-off-by: Ole Troan <ot@cisco.com>
-rwxr-xr-x | src/tools/vppapigen/vppapigen.py | 2 |
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 |