Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
3 Fj@sdddlmZddlmZddlmZddlmZmZm Z m Z ddl m Z m Z e GdddeZdS) )yacc)c_ast)CLexer) PLYParser ParseError parameterizedtemplate)fix_switch_casesfix_atomic_specifiersc @seZdZdedddddfddZdqdd Zd d Zd d ZddZddZ ddZ ddZ ddZ ddZ ddZddZddZd d!Zdrd"d#Zdsd$d%Zd&d'Zd(d)Zd~Zd=d>Zd?d@ZdAdBZdCdDZdEdFZdGdHZdIdJZdKdLZdMdNZdOdPZ dQdRZ!dSdTZ"dUdVZ#dWdXZ$dYdZZ%d[d\Z&d]d^Z'd_d`Z(dadbZ)dcddZ*dedfZ+dgdhZ,didjZ-dkdlZ.dmdnZ/dodpZ0dqdrZ1dsdtZ2dudvZ3dwdxZ4dydzZ5d{d|Z6d}d~Z7ddZ8ddZ9ddZ:ddZ;ddZddZ?ddZ@ddZAddZBddZCddZDddZEddZFddZGddZHddZIddZJddZKddZLddZMddZNddZOddZPddZQddZRddZSddZTddZUddZVeWdddddÄZXeWdddddńZYeWdddddDŽZZeWddddɄZ[eWddddd˄Z\eWddddd̈́Z]eWdddddτZ^eWdddddфZ_ddӄZ`ddՄZaddׄZbddلZcddۄZddd݄Zedd߄ZfddZgddZhddZiddZjddZkddZlddZmddZnddZoddZpddZqddZrddZsddZtddZuddZvddZwddZxddZyddZzdd Z{d d Z|d d Z}ddZ~ddZddZddZddZddZddZddZddZd d!Zd"d#Zd$d%Zd&d'Zd(d)Zd*d+Zd,d-Zd.d/Zd0d1Zd2d3Zd4d5Zd6d7Zd8d9Zd:d;Zd<d=Zd>d?Zd@dAZdBdCZdDdEZdFdGZdHdIZdJdKZdLdMZdNdOZdPdQZdRdSZdTdUZdVdWZdXdYZdZd[Zd\d]Zd^d_Zd`daZdbdcZdddeZdfdgZdhdiZdjdkZdldmZdndoZdpS(CParserTzpycparser.lextabzpycparser.yacctabFc Cs||j|j|j|jd|_|jj|||d|jj|_ddddddd d d d d dddg}x|D]} |j| q\Wtj|d||||d|_ t g|_ d|_ dS)a Create a new CParser. Some arguments for controlling the debug/optimization level of the parser are provided. The defaults are tuned for release/performance mode. The simple rules for using them are: *) When tweaking CParser/CLexer, set these to False *) When releasing a stable parser, set to True lex_optimize: Set to False when you're modifying the lexer. Otherwise, changes in the lexer won't be used, if some lextab.py file exists. When releasing with a stable lexer, set to True to save the re-generation of the lexer table on each run. lexer: Set this parameter to define the lexer to use if you're not using the default CLexer. lextab: Points to the lex table that's used for optimized mode. Only if you're modifying the lexer and want some tests to avoid re-generating the table, make this point to a local lex table file (that's been earlier generated with lex_optimize=True) yacc_optimize: Set to False when you're modifying the parser. Otherwise, changes in the parser won't be used, if some parsetab.py file exists. When releasing with a stable parser, set to True to save the re-generation of the parser table on each run. yacctab: Points to the yacc table that's used for optimized mode. Only if you're modifying the parser, make this point to a local yacc table file yacc_debug: Generate a parser.out file that explains how yacc built the parsing table from the grammar. taboutputdir: Set this parameter to control the location of generated lextab and yacctab files. )Z error_funcZon_lbrace_funcZon_rbrace_funcZtype_lookup_func)optimizelextab outputdirZabstract_declaratorZassignment_expressionZdeclaration_listZdeclaration_specifiers_no_typeZ designationZ expressionZidentifier_listZinit_declarator_listZid_init_declarator_listZinitializer_listZparameter_type_listZblock_item_listZtype_qualifier_listZstruct_declarator_listZtranslation_unit_or_empty)modulestartdebugr Z tabmodulerN) _lex_error_func_lex_on_lbrace_func_lex_on_rbrace_func_lex_type_lookup_funcclexbuildtokensZ_create_opt_rulercparserdict _scope_stack_last_yielded_token) selfZ lex_optimizelexerrZ yacc_optimizeZyacctabZ yacc_debugZ taboutputdirZrules_with_optZruler 7/tmp/pip-build-_d5lkt3n/pycparser/pycparser/c_parser.py__init__sF:    zCParser.__init__cCs6||j_|jjtg|_d|_|jj||j|dS)a  Parses C code and returns an AST. text: A string containing the C source code filename: Name of the file being parsed (for meaningful error messages) debug: Debug flag to YACC N)inputrr)rfilenameZ reset_linenorrrrparse)rtextr$rr r r!r%s   z CParser.parsecCs|jjtdS)N)rappendr)rr r r! _push_scopeszCParser._push_scopecCs t|jdkst|jjdS)Nr)lenrAssertionErrorpop)rr r r! _pop_scopeszCParser._pop_scopecCs4|jdj|ds"|jd||d|jd|<dS)zC Add a new typedef name (ie a TYPEID) to the current scope rTz;Typedef %r previously declared as non-typedef in this scopeNr-)rget _parse_error)rnamecoordr r r!_add_typedef_names  zCParser._add_typedef_namecCs4|jdj|dr"|jd||d|jd|<dS)ze Add a new object, function, or enum member name (ie an ID) to the current scope rFz;Non-typedef %r previously declared as typedef in this scopeNr-r-)rr.r/)rr0r1r r r!_add_identifiers  zCParser._add_identifiercCs.x(t|jD]}|j|}|dk r |Sq WdS)z8 Is *name* a typedef-name in the current scope? NF)reversedrr.)rr0ZscopeZin_scoper r r!_is_type_in_scopes  zCParser._is_type_in_scopecCs|j||j||dS)N)r/_coord)rmsglinecolumnr r r!rszCParser._lex_error_funccCs |jdS)N)r()rr r r!rszCParser._lex_on_lbrace_funccCs |jdS)N)r,)rr r r!rszCParser._lex_on_rbrace_funccCs|j|}|S)z Looks up types that were previously defined with typedef. Passed to the lexer for recognizing identifiers that are types. )r5)rr0Zis_typer r r!rs zCParser._lex_type_lookup_funccCs|jjS)z We need access to yacc's lookahead token in certain cases. This is the last token yacc requested from the lexer, so we ask the lexer. )rZ last_token)rr r r!_get_yacc_lookahead_tokensz!CParser._get_yacc_lookahead_tokencCsd|}|}x|jr|j}q Wt|tjr0||_|S|}xt|jtjsL|j}q6W|j|_||_|SdS)z Tacks a type modifier on a declarator, and returns the modified declarator. Note: the declarator and modifier may be modified N)type isinstancerTypeDecl)rdeclmodifierZ modifier_headZ modifier_tailZ decl_tailr r r!_type_modify_decls    zCParser._type_modify_declcCs|}xt|tjs|j}qW|j|_|jdd|_x>|D]6}t|tjs:t|dkrf|j d|j q:||_|Sq:W|st|jtj s|j d|j tjdg|j d|_n tjdd|D|d j d|_|S) z- Fixes a declaration. Modifies decl. Nrz Invalid multiple types specifiedzMissing type in declarationint)r1cSsg|]}|jD]}|qqSr )names).0idr0r r r! Ssz/CParser._fix_decl_name_type..) r<rr=r;declnamer0qualsIdentifierTyper)r/r1FuncDecl)rr>typenamer;tnr r r!_fix_decl_name_type+s.       zCParser._fix_decl_name_typecCs>|ptgggggd}|r*||j|n||jd||S)a Declaration specifiers are represented by a dictionary with the entries: * qual: a list of type qualifiers * storage: a list of storage type qualifiers * type: a list of type specifiers * function: a list of function specifiers * alignment: a list of alignment specifiers This method is given a declaration specifier, and a new specifier of a given kind. If `append` is True, the new specifier is added to the end of the specifiers list, otherwise it's added at the beginning. Returns the declaration specifier, with the new specifier incorporated. )qualstorager;function alignmentrF)rr'insert)rZdeclspecZnewspeckindr'specr r r!_add_declaration_specifierWs z"CParser._add_declaration_specifierc Cspd|dk}g}|djddk r&n>|dddkrt|ddksvt|ddjd ksv|j|ddjd rd }x"|dD]}t|d r|j}PqW|jd |tj|ddjddd|d |ddjd|dd<|dd=nvt |ddtj tj tj tj fsd|dd}xt |tjs8|j}q W|jdkrd|ddjd|_|dd=x|D]} | ddk st|rtjd|d|d| d| djd} nBtjd|d|d |d|d| d| jd| jd| djd } t | jtj tj tj tj fr| } n|j| |d} |rT|rD|j| j| jn|j| j| jt| } |j| qlW|S)z Builds a list of declarations all sharing the given specifiers. If typedef_namespace is true, each declared name is added to the "typedef namespace", which also includes objects, functions, and enum constants. typedefrOrFbitsizeNr>r;r?r1zInvalid declarationrQ)rGr;rHalignr1rN)r0rHrOr;r1rPinit) r0rHrZrOfuncspecr;r[rWr1r-r-r-r-r-r-r-)r.r)rBr5hasattrr1r/rr=r<EnumStructUnionrIr;rGr*ZTypedefDeclrMr2r0r3r r') rrTdeclstypedef_namespaceZ is_typedefZ declarationsr1tZ decls_0_tailr> declarationZ fixed_declr r r!_build_declarationspsv &           zCParser._build_declarationscCsLd|dkr|jd|j|j|t|ddgddd}tj||||jd S) z' Builds a function definition. rVrOzInvalid typedefN)r>r[T)rTrbrcrF)r> param_declsbodyr1)r/r1rfrrZFuncDef)rrTr>rgrhrer r r!_build_function_definitions   z"CParser._build_function_definitioncCs|dkrtjStjSdS)z` Given a token (either STRUCT or UNION), selects the appropriate AST class. structN)rr_r`)rtokenr r r!_select_struct_union_classsz"CParser._select_struct_union_classleftLORLANDORXORANDEQNEGTGELTLERSHIFTLSHIFTPLUSMINUSTIMESDIVIDEMODcCs2|ddkrtjg|d<ntj|d|d<dS)zh translation_unit_or_empty : translation_unit | empty rNrF)rZFileAST)rpr r r!p_translation_unit_or_emptys z#CParser.p_translation_unit_or_emptycCs|d|d<dS)z4 translation_unit : external_declaration rrFNr )rrr r r!p_translation_unit_1szCParser.p_translation_unit_1cCs"|dj|d|d|d<dS)zE translation_unit : translation_unit external_declaration rrXrFN)extend)rrr r r!p_translation_unit_2 szCParser.p_translation_unit_2cCs|dg|d<dS)z7 external_declaration : function_definition rrFNr )rrr r r!p_external_declaration_1sz CParser.p_external_declaration_1cCs|d|d<dS)z/ external_declaration : declaration rrFNr )rrr r r!p_external_declaration_2sz CParser.p_external_declaration_2cCs|dg|d<dS)zi external_declaration : pp_directive | pppragma_directive rrFNr )rrr r r!p_external_declaration_3sz CParser.p_external_declaration_3cCs g|d<dS)z( external_declaration : SEMI rFNr )rrr r r!p_external_declaration_4%sz CParser.p_external_declaration_4cCs|d|d<dS)z1 external_declaration : static_assert rrFNr )rrr r r!p_external_declaration_5*sz CParser.p_external_declaration_5cCsVt|dkr.tj|dd|j|dg|d<n$tj|d|d|j|dg|d<dS)z static_assert : _STATIC_ASSERT LPAREN constant_expression COMMA unified_string_literal RPAREN | _STATIC_ASSERT LPAREN constant_expression RPAREN NrrF)r)rZ StaticAssert _token_coord)rrr r r!p_static_assert_declaration/s "z#CParser.p_static_assert_declarationcCs|jd|j|ddS)z pp_directive : PPHASH zDirectives not supported yetrN)r/r)rrr r r!p_pp_directive8szCParser.p_pp_directivecCsFt|dkr*tj|d|j|d|d<ntjd|j|d|d<dS)zg pppragma_directive : PPPRAGMA | PPPRAGMA PPPRAGMASTR rrXrFr rN)r)rPragmar)rrr r r!p_pppragma_directive>s zCParser.p_pppragma_directivec CsNtgggtjdg|j|ddggd}|j||d|d|dd|d<d S) zU function_definition : id_declarator declaration_list_opt compound_statement rAr)r1)rNrQrOr;rPrXr)rTr>rgrhrFN)rrrIrri)rrrTr r r!p_function_definition_1IszCParser.p_function_definition_1cCs.|d}|j||d|d|dd|d<dS)zl function_definition : declaration_specifiers id_declarator declaration_list_opt compound_statement rrXr)rTr>rgrhrFN)ri)rrrTr r r!p_function_definition_2[s zCParser.p_function_definition_2cCs|d|d<dS)a_ statement : labeled_statement | expression_statement | compound_statement | selection_statement | iteration_statement | jump_statement | pppragma_directive | static_assert rrFNr )rrr r r! p_statementjs zCParser.p_statementcCsTt|dtjrDt|dkrDtj|d|dg|j|dd|d<n |d|d<dS)zx pragmacomp_or_statement : pppragma_directive statement | statement rrrX) block_itemsr1rFN)r<rrr)Compoundr)rrr r r!p_pragmacomp_or_statements z!CParser.p_pragmacomp_or_statementc Cs|d}|ddkr|d}tjtjtjf}t|dkrt|d|rtjd|d|d|d|d |ddd|djd g}q|j|t ddd gd d }n|j||dd d }||d<dS)z decl_body : declaration_specifiers init_declarator_list_opt | declaration_specifiers_no_type id_init_declarator_list_opt rrXNr;rFrNrQrOrP) r0rHrZrOr\r;r[rWr1)r>r[T)rTrbrc) rr_r`r^r)r<rar1rfr)rrrTtyZs_u_or_erbr r r! p_decl_bodys0   zCParser.p_decl_bodycCs|d|d<dS)z& declaration : decl_body SEMI rrFNr )rrr r r! p_declarationszCParser.p_declarationcCs,t|dkr|dn|d|d|d<dS)zj declaration_list : declaration | declaration_list declaration rXrrFN)r))rrr r r!p_declaration_listszCParser.p_declaration_listcCs|j|d|dd|d<dS)z] declaration_specifiers_no_type : type_qualifier declaration_specifiers_no_type_opt rXrrNrFN)rU)rrr r r!"p_declaration_specifiers_no_type_1sz*CParser.p_declaration_specifiers_no_type_1cCs|j|d|dd|d<dS)zf declaration_specifiers_no_type : storage_class_specifier declaration_specifiers_no_type_opt rXrrOrFN)rU)rrr r r!"p_declaration_specifiers_no_type_2 sz*CParser.p_declaration_specifiers_no_type_2cCs|j|d|dd|d<dS)za declaration_specifiers_no_type : function_specifier declaration_specifiers_no_type_opt rXrrPrFN)rU)rrr r r!"p_declaration_specifiers_no_type_3sz*CParser.p_declaration_specifiers_no_type_3cCs|j|d|dd|d<dS)z_ declaration_specifiers_no_type : atomic_specifier declaration_specifiers_no_type_opt rXrr;rFN)rU)rrr r r!"p_declaration_specifiers_no_type_4sz*CParser.p_declaration_specifiers_no_type_4cCs|j|d|dd|d<dS)zb declaration_specifiers_no_type : alignment_specifier declaration_specifiers_no_type_opt rXrrQrFN)rU)rrr r r!"p_declaration_specifiers_no_type_5sz*CParser.p_declaration_specifiers_no_type_5cCs"|j|d|dddd|d<dS)zI declaration_specifiers : declaration_specifiers type_qualifier rrXrNT)r'rFN)rU)rrr r r!p_declaration_specifiers_1!sz"CParser.p_declaration_specifiers_1cCs"|j|d|dddd|d<dS)zR declaration_specifiers : declaration_specifiers storage_class_specifier rrXrOT)r'rFN)rU)rrr r r!p_declaration_specifiers_2&sz"CParser.p_declaration_specifiers_2cCs"|j|d|dddd|d<dS)zM declaration_specifiers : declaration_specifiers function_specifier rrXrPT)r'rFN)rU)rrr r r!p_declaration_specifiers_3+sz"CParser.p_declaration_specifiers_3cCs"|j|d|dddd|d<dS)zS declaration_specifiers : declaration_specifiers type_specifier_no_typeid rrXr;T)r'rFN)rU)rrr r r!p_declaration_specifiers_40sz"CParser.p_declaration_specifiers_4cCs|jd|dd|d<dS)z2 declaration_specifiers : type_specifier Nrr;rF)rU)rrr r r!p_declaration_specifiers_55sz"CParser.p_declaration_specifiers_5cCs"|j|d|dddd|d<dS)zQ declaration_specifiers : declaration_specifiers_no_type type_specifier rrXr;T)r'rFN)rU)rrr r r!p_declaration_specifiers_6:sz"CParser.p_declaration_specifiers_6cCs"|j|d|dddd|d<dS)zN declaration_specifiers : declaration_specifiers alignment_specifier rrXrQT)r'rFN)rU)rrr r r!p_declaration_specifiers_7?sz"CParser.p_declaration_specifiers_7cCs|d|d<dS)a storage_class_specifier : AUTO | REGISTER | STATIC | EXTERN | TYPEDEF | _THREAD_LOCAL rrFNr )rrr r r!p_storage_class_specifierDsz!CParser.p_storage_class_specifiercCs|d|d<dS)zR function_specifier : INLINE | _NORETURN rrFNr )rrr r r!p_function_specifierNszCParser.p_function_specifiercCs$tj|dg|j|dd|d<dS)a+ type_specifier_no_typeid : VOID | _BOOL | CHAR | SHORT | INT | LONG | FLOAT | DOUBLE | _COMPLEX | SIGNED | UNSIGNED | __INT128 r)r1rFN)rrIr)rrr r r!p_type_specifier_no_typeidTsz"CParser.p_type_specifier_no_typeidcCs|d|d<dS)z type_specifier : typedef_name | enum_specifier | struct_or_union_specifier | type_specifier_no_typeid | atomic_specifier rrFNr )rrr r r!p_type_specifierdszCParser.p_type_specifiercCs |d}|jjd||d<dS)z= atomic_specifier : _ATOMIC LPAREN type_name RPAREN rZ_AtomicrFN)rHr')rrtypr r r!p_atomic_specifierns zCParser.p_atomic_specifiercCs|d|d<dS)z type_qualifier : CONST | RESTRICT | VOLATILE | _ATOMIC rrFNr )rrr r r!p_type_qualifieruszCParser.p_type_qualifiercCs0t|dkr|d|dgn|dg|d<dS)z init_declarator_list : init_declarator | init_declarator_list COMMA init_declarator rrrrFN)r))rrr r r!p_init_declarator_list}szCParser.p_init_declarator_listcCs,t|dt|dkr|dndd|d<dS)zb init_declarator : declarator | declarator EQUALS initializer rrXrN)r>r[rF)rr))rrr r r!p_init_declaratorszCParser.p_init_declaratorcCs0t|dkr|d|dgn|dg|d<dS)z id_init_declarator_list : id_init_declarator | id_init_declarator_list COMMA init_declarator rrrrFN)r))rrr r r!p_id_init_declarator_listsz!CParser.p_id_init_declarator_listcCs,t|dt|dkr|dndd|d<dS)zn id_init_declarator : id_declarator | id_declarator EQUALS initializer rrXrN)r>r[rF)rr))rrr r r!p_id_init_declaratorszCParser.p_id_init_declaratorcCs"|j|d|dddd|d<dS)zY specifier_qualifier_list : specifier_qualifier_list type_specifier_no_typeid rrXr;T)r'rFN)rU)rrr r r!p_specifier_qualifier_list_1sz$CParser.p_specifier_qualifier_list_1cCs"|j|d|dddd|d<dS)zO specifier_qualifier_list : specifier_qualifier_list type_qualifier rrXrNT)r'rFN)rU)rrr r r!p_specifier_qualifier_list_2sz$CParser.p_specifier_qualifier_list_2cCs|jd|dd|d<dS)z4 specifier_qualifier_list : type_specifier Nrr;rF)rU)rrr r r!p_specifier_qualifier_list_3sz$CParser.p_specifier_qualifier_list_3cCs$t|dgg|dggd|d<dS)zH specifier_qualifier_list : type_qualifier_list type_specifier rrX)rNrQrOr;rPrFN)r)rrr r r!p_specifier_qualifier_list_4sz$CParser.p_specifier_qualifier_list_4cCs tg|dggggd|d<dS)z9 specifier_qualifier_list : alignment_specifier r)rNrQrOr;rPrFN)r)rrr r r!p_specifier_qualifier_list_5sz$CParser.p_specifier_qualifier_list_5cCs|j|d|dd|d<dS)zR specifier_qualifier_list : specifier_qualifier_list alignment_specifier rrXrQrFN)rU)rrr r r!p_specifier_qualifier_list_6sz$CParser.p_specifier_qualifier_list_6cCs0|j|d}||dd|j|dd|d<dS)z{ struct_or_union_specifier : struct_or_union ID | struct_or_union TYPEID rrXN)r0rbr1rF)rlr)rrklassr r r!p_struct_or_union_specifier_1s z%CParser.p_struct_or_union_specifier_1cCsX|j|d}t|dkr6|dg|j|dd|d<n|d|d|j|dd|d<dS)z struct_or_union_specifier : struct_or_union brace_open struct_declaration_list brace_close | struct_or_union brace_open brace_close rrNrX)r0rbr1rFr)rlr)r)rrrr r r!p_struct_or_union_specifier_2s z%CParser.p_struct_or_union_specifier_2cCs`|j|d}t|dkr:||dg|j|dd|d<n"||d|d|j|dd|d<dS)a struct_or_union_specifier : struct_or_union ID brace_open struct_declaration_list brace_close | struct_or_union ID brace_open brace_close | struct_or_union TYPEID brace_open struct_declaration_list brace_close | struct_or_union TYPEID brace_open brace_close rrrX)r0rbr1rFrN)rlr)r)rrrr r r!p_struct_or_union_specifier_3s z%CParser.p_struct_or_union_specifier_3cCs|d|d<dS)zF struct_or_union : STRUCT | UNION rrFNr )rrr r r!p_struct_or_unionszCParser.p_struct_or_unioncCs:t|dkr|dpg|d<n|d|dp.g|d<dS)z struct_declaration_list : struct_declaration | struct_declaration_list struct_declaration rXrrFN)r))rrr r r!p_struct_declaration_lists z!CParser.p_struct_declaration_listcCs|d}d|dkst|ddk r8|j||dd}nht|ddkr|dd}t|tjrf|}n tj|}|j|t|d gd}n|j|tddd gd}||d<dS) zW struct_declaration : specifier_qualifier_list struct_declarator_list_opt SEMI rrVrOrXN)rTrbr;rF)r>)r>r[)r*rfr)r<rNoderIr)rrrTrbnodeZ decl_typer r r!p_struct_declaration_1s$    zCParser.p_struct_declaration_1cCs d|d<dS)z# struct_declaration : SEMI NrFr )rrr r r!p_struct_declaration_2"szCParser.p_struct_declaration_2cCs|dg|d<dS)z1 struct_declaration : pppragma_directive rrFNr )rrr r r!p_struct_declaration_3'szCParser.p_struct_declaration_3cCs0t|dkr|d|dgn|dg|d<dS)z struct_declarator_list : struct_declarator | struct_declarator_list COMMA struct_declarator rrrrFN)r))rrr r r!p_struct_declarator_list,sz CParser.p_struct_declarator_listcCs|ddd|d<dS)z( struct_declarator : declarator rN)r>rWrFr )rrr r r!p_struct_declarator_15szCParser.p_struct_declarator_1cCsFt|dkr$|d|dd|d<ntjdddd|dd|d<dS)z struct_declarator : declarator COLON constant_expression | COLON constant_expression rr)r>rWrFNrX)r)rr=)rrr r r!p_struct_declarator_2:s zCParser.p_struct_declarator_2cCs"tj|dd|j|d|d<dS)zM enum_specifier : ENUM ID | ENUM TYPEID rXNrrF)rr^r)rrr r r!p_enum_specifier_1CszCParser.p_enum_specifier_1cCs"tjd|d|j|d|d<dS)zG enum_specifier : ENUM brace_open enumerator_list brace_close NrrrF)rr^r)rrr r r!p_enum_specifier_2IszCParser.p_enum_specifier_2cCs&tj|d|d|j|d|d<dS)z enum_specifier : ENUM ID brace_open enumerator_list brace_close | ENUM TYPEID brace_open enumerator_list brace_close rXrrrFN)rr^r)rrr r r!p_enum_specifier_3NszCParser.p_enum_specifier_3cCsht|dkr*tj|dg|dj|d<n:t|dkrD|d|d<n |djj|d|d|d<dS)z enumerator_list : enumerator | enumerator_list COMMA | enumerator_list COMMA enumerator rXrrFrN)r)rZEnumeratorListr1Z enumeratorsr')rrr r r!p_enumerator_listTs   zCParser.p_enumerator_listcCs tj|d|j|d|d<dS)z alignment_specifier : _ALIGNAS LPAREN type_name RPAREN | _ALIGNAS LPAREN constant_expression RPAREN rrrFN)rZAlignasr)rrr r r!p_alignment_specifieraszCParser.p_alignment_specifiercCsbt|dkr(tj|dd|j|d}ntj|d|d|j|d}|j|j|j||d<dS)zR enumerator : ID | ID EQUALS constant_expression rXrNrrF)r)rZ Enumeratorrr3r0r1)rrZ enumeratorr r r! p_enumeratorgs  zCParser.p_enumeratorcCs|d|d<dS)zQ declarator : id_declarator | typeid_declarator rrFNr )rrr r r! p_declaratorwszCParser.p_declaratorrDIDtypeidTYPEIDtypeid_noparencCs|d|d<dS)z1 xxx_declarator : direct_xxx_declarator rrFNr )rrr r r!p_xxx_declarator_1}szCParser.p_xxx_declarator_1cCs|j|d|d|d<dS)z9 xxx_declarator : pointer direct_xxx_declarator rXrrFN)r@)rrr r r!p_xxx_declarator_2szCParser.p_xxx_declarator_2cCs(tj|dddd|j|dd|d<dS)z' direct_xxx_declarator : yyy rN)rGr;rHrZr1rF)rr=r)rrr r r!p_direct_xxx_declarator_1s z!CParser.p_direct_xxx_declarator_1cCs|d|d<dS)z@ direct_xxx_declarator : LPAREN xxx_declarator RPAREN rXrFNr )rrr r r!p_direct_xxx_declarator_2sz!CParser.p_direct_xxx_declarator_2cCsft|dkr|dngpg}tjdt|dkr6|dn|d||djd}|j|d|d|d<dS) z} direct_xxx_declarator : direct_xxx_declarator LBRACKET type_qualifier_list_opt assignment_expression_opt RBRACKET rrNrr)r;dim dim_qualsr1)r>r?rF)r)r ArrayDeclr1r@)rrrHarrr r r!p_direct_xxx_declarator_3sz!CParser.p_direct_xxx_declarator_3cCs^dd|d|dgD}dd|D}tjd|d||djd }|j|d|d |d <dS) z direct_xxx_declarator : direct_xxx_declarator LBRACKET STATIC type_qualifier_list_opt assignment_expression RBRACKET | direct_xxx_declarator LBRACKET type_qualifier_list STATIC assignment_expression RBRACKET cSs g|]}t|tr|n|gqSr )r<list)rCitemr r r!rEsz5CParser.p_direct_xxx_declarator_4..rrcSs"g|]}|D]}|dk r |q qS)Nr )rCZsublistrNr r r!rEs Nrr)r;rrr1)r>r?rF)rrr1r@)rrZ listed_qualsrrr r r!p_direct_xxx_declarator_4sz!CParser.p_direct_xxx_declarator_4cCsZtjdtj|d|j|d|ddk r0|dng|djd}|j|d|d|d<dS)zi direct_xxx_declarator : direct_xxx_declarator LBRACKET type_qualifier_list_opt TIMES RBRACKET Nrrr)r;rrr1)r>r?rF)rrrrr1r@)rrrr r r!p_direct_xxx_declarator_5s z!CParser.p_direct_xxx_declarator_5cCs|tj|dd|djd}|jjdkrb|jdk rbx.|jjD]"}t|tjrNP|j |j |jqr?rF) rrJr1r:r;rparamsr< EllipsisParamr3r0r@)rrfuncparamr r r!p_direct_xxx_declarator_6s   z!CParser.p_direct_xxx_declarator_6cCsn|j|d}tj|dpgd|d}t|dkrb|d}x|jdk rL|j}q:W||_|d|d<n||d<dS)zm pointer : TIMES type_qualifier_list_opt | TIMES type_qualifier_list_opt pointer rrXN)rHr;r1rrF)rrZPtrDeclr)r;)rrr1Z nested_typeZ tail_typer r r! p_pointers    zCParser.p_pointercCs0t|dkr|dgn|d|dg|d<dS)zs type_qualifier_list : type_qualifier | type_qualifier_list type_qualifier rXrrFN)r))rrr r r!p_type_qualifier_listszCParser.p_type_qualifier_listcCs:t|dkr*|djjtj|j|d|d|d<dS)zn parameter_type_list : parameter_list | parameter_list COMMA ELLIPSIS rXrrrFN)r)rr'rrr)rrr r r!p_parameter_type_list s zCParser.p_parameter_type_listcCsNt|dkr*tj|dg|dj|d<n |djj|d|d|d<dS)zz parameter_list : parameter_declaration | parameter_list COMMA parameter_declaration rXrrFrN)r)r ParamListr1rr')rrr r r!p_parameter_lists zCParser.p_parameter_listcCsT|d}|ds.tjdg|j|ddg|d<|j|t|ddgdd|d<d S) z parameter_declaration : declaration_specifiers id_declarator | declaration_specifiers typeid_noparen_declarator rr;rA)r1rX)r>)rTrbrFN)rrIrrfr)rrrTr r r!p_parameter_declaration_1)sz!CParser.p_parameter_declaration_1c Cs|d}|ds.tjdg|j|ddg|d<t|ddkrt|dd jdkr|j|ddjdr|j|t|dddgd d}nHtjd |d d|dptj dddd|j|dd }|d}|j ||}||d<dS)zR parameter_declaration : declaration_specifiers abstract_declarator_opt rr;rA)r1rFrXN)r>r[)rTrbr rN)r0rHrZr;r1r-r-) rrIrr)rBr5rfrTypenamer=rM)rrrTr>rKr r r!p_parameter_declaration_25s$& z!CParser.p_parameter_declaration_2cCsNt|dkr*tj|dg|dj|d<n |djj|d|d|d<dS)ze identifier_list : identifier | identifier_list COMMA identifier rXrrFrN)r)rrr1rr')rrr r r!p_identifier_listUs zCParser.p_identifier_listcCs|d|d<dS)z- initializer : assignment_expression rrFNr )rrr r r!p_initializer_1_szCParser.p_initializer_1cCs6|ddkr&tjg|j|d|d<n |d|d<dS)z initializer : brace_open initializer_list_opt brace_close | brace_open initializer_list COMMA brace_close rXNrrF)rInitListr)rrr r r!p_initializer_2ds zCParser.p_initializer_2cCst|dkrN|ddkr |dntj|d|d}tj|g|dj|d<nD|ddkrb|dntj|d|d}|djj||d|d<dS)z initializer_list : designation_opt initializer | initializer_list COMMA designation_opt initializer rrNrXrFr)r)rZNamedInitializerrr1exprsr')rrr[r r r!p_initializer_listms  ((zCParser.p_initializer_listcCs|d|d<dS)z. designation : designator_list EQUALS rrFNr )rrr r r! p_designationyszCParser.p_designationcCs0t|dkr|dgn|d|dg|d<dS)z_ designator_list : designator | designator_list designator rXrrFN)r))rrr r r!p_designator_listszCParser.p_designator_listcCs|d|d<dS)zi designator : LBRACKET constant_expression RBRACKET | PERIOD identifier rXrFNr )rrr r r! p_designatorszCParser.p_designatorc Cs\tjd|ddddd|dp0tjdddd|j|dd}|j||dd|d<dS) zH type_name : specifier_qualifier_list abstract_declarator_opt r rrNNrX)r0rHrZr;r1r;rF)rrr=rrM)rrrKr r r! p_type_nameszCParser.p_type_namecCs*tjdddd}|j||dd|d<dS)z+ abstract_declarator : pointer Nr)r>r?rF)rr=r@)rrZ dummytyper r r!p_abstract_declarator_1szCParser.p_abstract_declarator_1cCs|j|d|d|d<dS)zF abstract_declarator : pointer direct_abstract_declarator rXrrFN)r@)rrr r r!p_abstract_declarator_2szCParser.p_abstract_declarator_2cCs|d|d<dS)z> abstract_declarator : direct_abstract_declarator rrFNr )rrr r r!p_abstract_declarator_3szCParser.p_abstract_declarator_3cCs|d|d<dS)zA direct_abstract_declarator : LPAREN abstract_declarator RPAREN rXrFNr )rrr r r!p_direct_abstract_declarator_1sz&CParser.p_direct_abstract_declarator_1cCs6tjd|dg|djd}|j|d|d|d<dS)zn direct_abstract_declarator : direct_abstract_declarator LBRACKET assignment_expression_opt RBRACKET Nrr)r;rrr1)r>r?rF)rrr1r@)rrrr r r!p_direct_abstract_declarator_2s z&CParser.p_direct_abstract_declarator_2cCsbt|dkr|dngpg}tjtjddddt|dkrB|dn|d||j|dd|d<dS)zk direct_abstract_declarator : LBRACKET type_qualifier_list_opt assignment_expression_opt RBRACKET rrXNrr)r;rrr1rF)r)rrr=r)rrrHr r r!p_direct_abstract_declarator_3s z&CParser.p_direct_abstract_declarator_3cCsFtjdtj|d|j|dg|djd}|j|d|d|d<dS)zZ direct_abstract_declarator : direct_abstract_declarator LBRACKET TIMES RBRACKET Nrr)r;rrr1)r>r?rF)rrrrr1r@)rrrr r r!p_direct_abstract_declarator_4s z&CParser.p_direct_abstract_declarator_4cCsBtjtjddddtj|d|j|dg|j|dd|d<dS)z? direct_abstract_declarator : LBRACKET TIMES RBRACKET Nrr)r;rrr1rF)rrr=rr)rrr r r!p_direct_abstract_declarator_5s z&CParser.p_direct_abstract_declarator_5cCs4tj|dd|djd}|j|d|d|d<dS)zh direct_abstract_declarator : direct_abstract_declarator LPAREN parameter_type_list_opt RPAREN rNr)rr;r1)r>r?rF)rrJr1r@)rrrr r r!p_direct_abstract_declarator_6s z&CParser.p_direct_abstract_declarator_6cCs0tj|dtjdddd|j|dd|d<dS)zM direct_abstract_declarator : LPAREN parameter_type_list_opt RPAREN rXNr)rr;r1rF)rrJr=r)rrr r r!p_direct_abstract_declarator_7sz&CParser.p_direct_abstract_declarator_7cCs(t|dtr|dn|dg|d<dS)zG block_item : declaration | statement rrFN)r<r)rrr r r! p_block_itemszCParser.p_block_itemcCs:t|dks|ddgkr"|dn|d|d|d<dS)z_ block_item_list : block_item | block_item_list block_item rXNrrF)r))rrr r r!p_block_item_listszCParser.p_block_item_listcCs"tj|d|j|dd|d<dS)zA compound_statement : brace_open block_item_list_opt brace_close rXr)rr1rFN)rrr)rrr r r!p_compound_statement_1szCParser.p_compound_statement_1cCs&tj|d|d|j|d|d<dS)z6 labeled_statement : ID COLON pragmacomp_or_statement rrrFN)rZLabelr)rrr r r!p_labeled_statement_1szCParser.p_labeled_statement_1cCs(tj|d|dg|j|d|d<dS)zL labeled_statement : CASE constant_expression COLON pragmacomp_or_statement rXrrrFN)rZCaser)rrr r r!p_labeled_statement_2 szCParser.p_labeled_statement_2cCs"tj|dg|j|d|d<dS)z; labeled_statement : DEFAULT COLON pragmacomp_or_statement rrrFN)rZDefaultr)rrr r r!p_labeled_statement_3szCParser.p_labeled_statement_3cCs(tj|d|dd|j|d|d<dS)zK selection_statement : IF LPAREN expression RPAREN pragmacomp_or_statement rrNrrF)rIfr)rrr r r!p_selection_statement_1szCParser.p_selection_statement_1cCs,tj|d|d|d|j|d|d<dS)zZ selection_statement : IF LPAREN expression RPAREN statement ELSE pragmacomp_or_statement rrrrFN)rrr)rrr r r!p_selection_statement_2szCParser.p_selection_statement_2cCs*ttj|d|d|j|d|d<dS)zO selection_statement : SWITCH LPAREN expression RPAREN pragmacomp_or_statement rrrrFN)r rZSwitchr)rrr r r!p_selection_statement_3szCParser.p_selection_statement_3cCs&tj|d|d|j|d|d<dS)zN iteration_statement : WHILE LPAREN expression RPAREN pragmacomp_or_statement rrrrFN)rWhiler)rrr r r!p_iteration_statement_1 szCParser.p_iteration_statement_1cCs&tj|d|d|j|d|d<dS)zV iteration_statement : DO pragmacomp_or_statement WHILE LPAREN expression RPAREN SEMI rrXrrFN)rZDoWhiler)rrr r r!p_iteration_statement_2$szCParser.p_iteration_statement_2cCs2tj|d|d|d|d|j|d|d<dS)zx iteration_statement : FOR LPAREN expression_opt SEMI expression_opt SEMI expression_opt RPAREN pragmacomp_or_statement rrr  rrFN)rForr)rrr r r!p_iteration_statement_3(szCParser.p_iteration_statement_3cCsBtjtj|d|j|d|d|d|d|j|d|d<dS)zp iteration_statement : FOR LPAREN declaration expression_opt SEMI expression_opt RPAREN pragmacomp_or_statement rrrrFN)rrZDeclListr)rrr r r!p_iteration_statement_4,szCParser.p_iteration_statement_4cCs tj|d|j|d|d<dS)z jump_statement : GOTO ID SEMI rXrrFN)rZGotor)rrr r r!p_jump_statement_11szCParser.p_jump_statement_1cCstj|j|d|d<dS)z jump_statement : BREAK SEMI rrFN)rBreakr)rrr r r!p_jump_statement_25szCParser.p_jump_statement_2cCstj|j|d|d<dS)z! jump_statement : CONTINUE SEMI rrFN)rContinuer)rrr r r!p_jump_statement_39szCParser.p_jump_statement_3cCs0tjt|dkr|dnd|j|d|d<dS)z\ jump_statement : RETURN expression SEMI | RETURN SEMI rrXNrrF)rReturnr)r)rrr r r!p_jump_statement_4=szCParser.p_jump_statement_4cCs4|ddkr$tj|j|d|d<n |d|d<dS)z, expression_statement : expression_opt SEMI rNrXrF)rZEmptyStatementr)rrr r r!p_expression_statementCs zCParser.p_expression_statementcCsjt|dkr|d|d<nLt|dtjsFtj|dg|dj|d<|djj|d|d|d<dS)zn expression : assignment_expression | expression COMMA assignment_expression rXrrFrN)r)r<rExprListr1rr')rrr r r! p_expressionJs  zCParser.p_expressioncCs|d|d<dS)z: assignment_expression : LPAREN compound_statement RPAREN rXrFNr )rrr r r!#p_parenthesized_compound_expressionWsz+CParser.p_parenthesized_compound_expressioncCs$tj|dg|j|dd|d<dS)z typedef_name : TYPEID r)r1rFN)rrIr)rrr r r!p_typedef_name[szCParser.p_typedef_namecCsDt|dkr|d|d<n&tj|d|d|d|dj|d<dS)z assignment_expression : conditional_expression | unary_expression assignment_operator assignment_expression rXrrFrN)r)rZ Assignmentr1)rrr r r!p_assignment_expression_s zCParser.p_assignment_expressioncCs|d|d<dS)a assignment_operator : EQUALS | XOREQUAL | TIMESEQUAL | DIVEQUAL | MODEQUAL | PLUSEQUAL | MINUSEQUAL | LSHIFTEQUAL | RSHIFTEQUAL | ANDEQUAL | OREQUAL rrFNr )rrr r r!p_assignment_operatorms zCParser.p_assignment_operatorcCs|d|d<dS)z. constant_expression : conditional_expression rrFNr )rrr r r!p_constant_expression|szCParser.p_constant_expressioncCsDt|dkr|d|d<n&tj|d|d|d|dj|d<dS)z conditional_expression : binary_expression | binary_expression CONDOP expression COLON conditional_expression rXrrFrrN)r)rZ TernaryOpr1)rrr r r!p_conditional_expressions z CParser.p_conditional_expressioncCsDt|dkr|d|d<n&tj|d|d|d|dj|d<dS)ak binary_expression : cast_expression | binary_expression TIMES binary_expression | binary_expression DIVIDE binary_expression | binary_expression MOD binary_expression | binary_expression PLUS binary_expression | binary_expression MINUS binary_expression | binary_expression RSHIFT binary_expression | binary_expression LSHIFT binary_expression | binary_expression LT binary_expression | binary_expression LE binary_expression | binary_expression GE binary_expression | binary_expression GT binary_expression | binary_expression EQ binary_expression | binary_expression NE binary_expression | binary_expression AND binary_expression | binary_expression OR binary_expression | binary_expression XOR binary_expression | binary_expression LAND binary_expression | binary_expression LOR binary_expression rXrrFrN)r)rZBinaryOpr1)rrr r r!p_binary_expressions zCParser.p_binary_expressioncCs|d|d<dS)z$ cast_expression : unary_expression rrFNr )rrr r r!p_cast_expression_1szCParser.p_cast_expression_1cCs&tj|d|d|j|d|d<dS)z; cast_expression : LPAREN type_name RPAREN cast_expression rXrrrFN)rZCastr)rrr r r!p_cast_expression_2szCParser.p_cast_expression_2cCs|d|d<dS)z* unary_expression : postfix_expression rrFNr )rrr r r!p_unary_expression_1szCParser.p_unary_expression_1cCs$tj|d|d|dj|d<dS)z unary_expression : PLUSPLUS unary_expression | MINUSMINUS unary_expression | unary_operator cast_expression rrXrFN)rUnaryOpr1)rrr r r!p_unary_expression_2szCParser.p_unary_expression_2cCs:tj|dt|dkr|dn|d|j|d|d<dS)z unary_expression : SIZEOF unary_expression | SIZEOF LPAREN type_name RPAREN | _ALIGNOF LPAREN type_name RPAREN rrrXrFN)rr*r)r)rrr r r!p_unary_expression_3szCParser.p_unary_expression_3cCs|d|d<dS)z unary_operator : AND | TIMES | PLUS | MINUS | NOT | LNOT rrFNr )rrr r r!p_unary_operatorszCParser.p_unary_operatorcCs|d|d<dS)z* postfix_expression : primary_expression rrFNr )rrr r r!p_postfix_expression_1szCParser.p_postfix_expression_1cCs$tj|d|d|dj|d<dS)zG postfix_expression : postfix_expression LBRACKET expression RBRACKET rrrFN)rArrayRefr1)rrr r r!p_postfix_expression_2szCParser.p_postfix_expression_2cCs4tj|dt|dkr|dnd|dj|d<dS)z postfix_expression : postfix_expression LPAREN argument_expression_list RPAREN | postfix_expression LPAREN RPAREN rrrNrF)rFuncCallr)r1)rrr r r!p_postfix_expression_3szCParser.p_postfix_expression_3cCs>tj|d|j|d}tj|d|d||dj|d<dS)z postfix_expression : postfix_expression PERIOD ID | postfix_expression PERIOD TYPEID | postfix_expression ARROW ID | postfix_expression ARROW TYPEID rrrXrFN)rrr StructRefr1)rrfieldr r r!p_postfix_expression_4szCParser.p_postfix_expression_4cCs(tjd|d|d|dj|d<dS)z{ postfix_expression : postfix_expression PLUSPLUS | postfix_expression MINUSMINUS rrXrrFN)rr*r1)rrr r r!p_postfix_expression_5szCParser.p_postfix_expression_5cCstj|d|d|d<dS)z postfix_expression : LPAREN type_name RPAREN brace_open initializer_list brace_close | LPAREN type_name RPAREN brace_open initializer_list COMMA brace_close rXrrFN)rZCompoundLiteral)rrr r r!p_postfix_expression_6szCParser.p_postfix_expression_6cCs|d|d<dS)z" primary_expression : identifier rrFNr )rrr r r!p_primary_expression_1szCParser.p_primary_expression_1cCs|d|d<dS)z primary_expression : constant rrFNr )rrr r r!p_primary_expression_2szCParser.p_primary_expression_2cCs|d|d<dS)zp primary_expression : unified_string_literal | unified_wstring_literal rrFNr )rrr r r!p_primary_expression_3szCParser.p_primary_expression_3cCs|d|d<dS)z0 primary_expression : LPAREN expression RPAREN rXrFNr )rrr r r!p_primary_expression_4szCParser.p_primary_expression_4cCsB|j|d}tjtj|d|tj|d|dg|||d<dS)za primary_expression : OFFSETOF LPAREN type_name COMMA offsetof_member_designator RPAREN rrrrFN)rrr1rr)rrr1r r r!p_primary_expression_5s zCParser.p_primary_expression_5cCst|dkr|d|d<nrt|dkrNtj|d|d|d|dj|d<n>t|dkr|tj|d|d|dj|d<ntdt|dS) z offsetof_member_designator : identifier | offsetof_member_designator PERIOD identifier | offsetof_member_designator LBRACKET expression RBRACKET rXrrFrrrz$Unexpected parsing state. len(p): %uN)r)rr3r1r/NotImplementedError)rrr r r!p_offsetof_member_designators  ( "z$CParser.p_offsetof_member_designatorcCsNt|dkr*tj|dg|dj|d<n |djj|d|d|d<dS)z argument_expression_list : assignment_expression | argument_expression_list COMMA assignment_expression rXrrFrN)r)rrr1rr')rrr r r!p_argument_expression_lists z"CParser.p_argument_expression_listcCs tj|d|j|d|d<dS)z identifier : ID rrFN)rrr)rrr r r! p_identifierszCParser.p_identifiercCsd}d}x:|dddD]&}|dkr0|d7}q|dkr|d7}qWd }|dkrZtd n|d krjtd d |d|}tj|d|d|j|d|d<dS)z constant : INT_CONST_DEC | INT_CONST_OCT | INT_CONST_HEX | INT_CONST_BIN | INT_CONST_CHAR rFrrNlLuUr z.Constant cannot have more than one u/U suffix.rXz.Constant cannot have more than two l/L suffix.z unsigned zlong rA)rArB)rCrD) ValueErrorrConstantr)rrZuCountZlCountxrdprefixr r r! p_constant_1#s   zCParser.p_constant_1cCshd|djkrd}n0|dd d kr,d}n|dddkrBd}nd }tj||d|j|d|d <d S)zM constant : FLOAT_CONST | HEX_FLOAT_CONST rHrfloatfFrArBz long doubledoublerFNr-)rLrMr-)rArB)lowerrrGr)rrrdr r r! p_constant_2:szCParser.p_constant_2cCs"tjd|d|j|d|d<dS)z constant : CHAR_CONST | WCHAR_CONST | U8CHAR_CONST | U16CHAR_CONST | U32CHAR_CONST charrrFN)rrGr)rrr r r! p_constant_3KszCParser.p_constant_3cCsdt|dkr,tjd|d|j|d|d<n4|djdd|ddd|d_|d|d<dS)z~ unified_string_literal : STRING_LITERAL | unified_string_literal STRING_LITERAL rXstringrrFNr-)r)rrGrvalue)rrr r r!p_unified_string_literalZs  (z CParser.p_unified_string_literalcCsht|dkr,tjd|d|j|d|d<n8|djjdd|ddd|d_|d|d<dS)a unified_wstring_literal : WSTRING_LITERAL | U8STRING_LITERAL | U16STRING_LITERAL | U32STRING_LITERAL | unified_wstring_literal WSTRING_LITERAL | unified_wstring_literal U8STRING_LITERAL | unified_wstring_literal U16STRING_LITERAL | unified_wstring_literal U32STRING_LITERAL rXrSrrFNr-)r)rrGrrTrstrip)rrr r r!p_unified_wstring_literales ,z!CParser.p_unified_wstring_literalcCs"|d|d<|jd|jddS)z brace_open : LBRACE rrFN) set_linenolineno)rrr r r! p_brace_openvs zCParser.p_brace_opencCs"|d|d<|jd|jddS)z brace_close : RBRACE rrFN)rXrY)rrr r r! p_brace_close|s zCParser.p_brace_closecCs d|d<dS)zempty : NrFr )rrr r r!p_emptyszCParser.p_emptycCs@|r,|jd|j|j|j|jj|dn|jd|jjdS)Nz before: %s)rYr9zAt end of input)r/rTr6rYrZfind_tok_columnr$)rrr r r!p_errors zCParser.p_errorN)r F)F)Frmrnrmrormrprmrqrmrrrmrsrtrmrurvrwrxrmryrzrmr{r|rmr}r~r) r^r_r`rarbrcrdrerfrg)rDr)rr)rr)rDr)rr)rr)rDr)rr)rr)rDr)rr)rDr)rr)rr)rDr)rr)rr)rDr)rr)rr)rDr)rr)rr)__name__ __module__ __qualname__rr"r%r(r,r2r3r5rrrrr:r@rMrUrfrirl precedencerrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr r r rrrrrrrrrrr r!r"r#r$r%r&r'r(r)r+r,r-r.r0r2r5r6r7r8r9r:r;r<r>r?r@rJrPrRrUrWrZr[r\r]r r r r!r sr g     )2,  Y     7=       &                                                                r N)Zplyrr rZc_lexerrZ plyparserrrrrZast_transformsr r r r r r r! s