summaryrefslogtreecommitdiffstats
path: root/src/tools/vppapigen/vppapigen.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/vppapigen/vppapigen.py')
-rwxr-xr-xsrc/tools/vppapigen/vppapigen.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/tools/vppapigen/vppapigen.py b/src/tools/vppapigen/vppapigen.py
index 0782dd294ab..eabf8f0644d 100755
--- a/src/tools/vppapigen/vppapigen.py
+++ b/src/tools/vppapigen/vppapigen.py
@@ -719,7 +719,7 @@ class VPPAPIParser(object):
p[0] = EnumFlag(p[2], p[4])
def p_enumflag_type(self, p):
- ''' enumflag : ENUMFLAG ID ':' enum_size '{' enum_statements '}' ';' ''' # noqa : E502
+ ''' enumflag : ENUMFLAG ID ':' enumflag_size '{' enum_statements '}' ';' ''' # noqa : E502
if len(p) == 9:
p[0] = EnumFlag(p[2], p[6], enumtype=p[4])
else:
@@ -728,7 +728,16 @@ class VPPAPIParser(object):
def p_enum_size(self, p):
''' enum_size : U8
| U16
- | U32 '''
+ | U32
+ | I8
+ | I16
+ | I32 '''
+ p[0] = p[1]
+
+ def p_enumflag_size(self, p):
+ ''' enumflag_size : U8
+ | U16
+ | U32 '''
p[0] = p[1]
def p_define(self, p):