@@ -23,9 +23,9 @@ def parse(self, text, filename='', debuglevel=0,
2323
2424 # _scope_stack[-1] is the current (topmost) scope.
2525
26- initial_scope = dict (( tpsym , 1 ) for tpsym in initial_type_symbols )
26+ initial_scope = { tpsym : 1 for tpsym in initial_type_symbols }
2727 initial_scope .update (
28- dict (( tpsym , 1 ) for tpsym in self .initial_type_symbols ) )
28+ { tpsym : 1 for tpsym in self .initial_type_symbols } )
2929 self ._scope_stack = [initial_scope ]
3030
3131 if not text or text .isspace ():
@@ -479,7 +479,7 @@ class GnuCParser(_AsmAndAttributesMixin, CParserBase):
479479
480480 from pycparserext .ext_c_lexer import GnuCLexer as lexer_class # noqa
481481
482- initial_type_symbols = set ([ "__builtin_va_list" ])
482+ initial_type_symbols = { "__builtin_va_list" }
483483
484484 def p_function_specifier_gnu (self , p ):
485485 """ function_specifier : __INLINE
@@ -585,32 +585,32 @@ class OpenCLCParser(_AsmAndAttributesMixin, CParserBase):
585585
586586 INT_BIT_COUNTS = [8 , 16 , 32 , 64 ]
587587 initial_type_symbols = (
588- set ([
588+ {
589589 "%s%d" % (base_name , count )
590590 for base_name in [
591591 'char' , 'uchar' , 'short' , 'ushort' , 'int' , 'uint' ,
592592 'long' , 'ulong' , 'float' , 'double' , 'half' ]
593593 for count in [2 , 3 , 4 , 8 , 16 ]
594- ])
595- | set ([
594+ }
595+ | {
596596 "intptr_t" , "uintptr_t" ,
597597 "intmax_t" , "uintmax_t" ,
598598 "size_t" , "ptrdiff_t" ,
599599 "uint" , "ulong" , "ushort" , "uchar" ,
600- "half" , "bool" ])
601- | set ([ "int%d_t" % bc for bc in INT_BIT_COUNTS ])
602- | set ([ "uint%d_t" % bc for bc in INT_BIT_COUNTS ])
603- | set ([ "int_least%d_t" % bc for bc in INT_BIT_COUNTS ])
604- | set ([ "uint_least%d_t" % bc for bc in INT_BIT_COUNTS ])
605- | set ([ "int_fast%d_t" % bc for bc in INT_BIT_COUNTS ])
606- | set ([ "uint_fast%d_t" % bc for bc in INT_BIT_COUNTS ])
607- | set ([
600+ "half" , "bool" }
601+ | { "int%d_t" % bc for bc in INT_BIT_COUNTS }
602+ | { "uint%d_t" % bc for bc in INT_BIT_COUNTS }
603+ | { "int_least%d_t" % bc for bc in INT_BIT_COUNTS }
604+ | { "uint_least%d_t" % bc for bc in INT_BIT_COUNTS }
605+ | { "int_fast%d_t" % bc for bc in INT_BIT_COUNTS }
606+ | { "uint_fast%d_t" % bc for bc in INT_BIT_COUNTS }
607+ | {
608608 "image1d_t" , "image1d_array_t" , "image1d_buffer_t" ,
609609 "image2d_t" , "image2d_array_t" ,
610610 "image3d_t" ,
611611 "sampler_t" , "event_t"
612- ])
613- | set ([ "cfloat_t" , "cdouble_t" ]) # PyOpenCL extension
612+ }
613+ | { "cfloat_t" , "cdouble_t" } # PyOpenCL extension
614614 )
615615
616616 def p_pp_directive (self , p ):
0 commit comments