vppapigen: fix enum types

enums can return signed or unsigned integers
enumflags are unsigned integers

Type: fix

Change-Id: Iafc8f8f09c96679c5983d2cb807699fcf90ca0d7
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
diff --git a/src/tools/vppapigen/vppapigen.py b/src/tools/vppapigen/vppapigen.py
index 0782dd2..eabf8f0 100755
--- a/src/tools/vppapigen/vppapigen.py
+++ b/src/tools/vppapigen/vppapigen.py
@@ -719,7 +719,7 @@
         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 @@
     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):