1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
3

T'íc+[ã/@s†dZddlZddlmZmZmZmZmZmZm	Z	m
Z
mZmZm
Z
ddlmZddlmZmZmZmZddlmZddlmZddlmZdd	lmZdd
lmZddlm Z ddl!m"Z"dd
l#m$Z$m%Z%ddl&m'Z'ddl(m)Z)m*Z*ddl+m,Z,m-Z-ddl.m/Z/ddl0m1Z1ddl2m3Z3ddl4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z=m>Z>m?Z?m@Z@mAZAmBZBmCZCmDZDmEZEmFZFmGZGddlHmIZImJZJmKZKddlLmMZMddlNmOZOddlPmQZQe3jReSƒZTedƒZUed3ZVd!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOg/ZWdPdQdRdSdTdUdVdWgZXdXdYgdZd[gd\d]gd^d_gd`dagdbdcddgdedfdgdhgdidjgdkdlgdmdndogdpdqggZYdrdsdmd`dkdldtdudvdwg
ZZdxdydzd{d|d}d~dd€dd‚dƒd„d…gZ[d†Z\dd‡dˆgZ]ej^d‰ej_ƒZ`ej^dŠƒZaGd‹dŒ„dŒebƒZcGddŽ„dŽe6ƒZdGdd„de6ƒZeGd‘d’„d’edƒZfGd“d”„d”edƒZgGd•d–„d–egƒZhGd—d˜„d˜ehƒZiGd™dš„dšehƒZjGd›dœ„dœehƒZkGddž„džehƒZlGdŸd „d egƒZmGd¡d¢„d¢egƒZnGd£d¤„d¤edƒZoGd¥d¦„d¦eoƒZpGd§d¨„d¨eoƒZqGd©dª„dªeoƒZrGd«d¬„d¬eoƒZsGd­d®„d®eoƒZtGd¯d°„d°egƒZuGd±d²„d²egƒZvGd³d´„d´egƒZwGdµd¶„d¶egƒZxGd·d¸„d¸egƒZyGd¹dº„dºegƒZzGd»d¼„d¼edƒZ{Gd½d¾„d¾egƒZ|Gd¿dÀ„dÀegƒZ}GdÁd„dÂedƒZ~GdÃdĄdÄe~ƒZGdÅdƄdÆe~ƒZ€GdÇdȄdÈedƒZGdÉdʄdÊedƒZ‚GdËd̄dÌe6ƒZƒGdÍd΄dÎedƒZ„GdÏdЄdÐedƒZ…GdÑd҄dÒedƒZ†GdÓdԄdÔe†ƒZ‡GdÕdքdÖe†ƒZˆGd×d؄dØe†ƒZ‰GdÙdڄdÚe†ƒZŠGdÛd܄dÜe7ƒZ‹GdÝdބdÞedƒZŒGdßdà„dàedƒZGdád„dedƒZŽGdâd„dedƒZGdãdä„däedƒZGdåd „d edƒZ‘Gdæd„dedƒZ’Gdçd„dedƒZ“Gdèd„dedƒZ”Gdéd„dedƒZ•Gdêdë„dëe6ƒZ–Gdìdí„díƒZ—Gdîdï„dïƒZ˜Gdðdñ„dñƒZ™Gdòdó„dóe8ƒZšefdôœdõdö„Z›Gd÷dø„døe"e–ƒZœGdùdú„dúeœƒZeKdûe)düƒd4dd5deJde)dƒd6ddeIde)d	ƒd
d7deId
e)dƒd
d8dgZžGdd„deœƒZŸGdd„deœƒZ Gdd„deœƒZ¡Gdd„deœƒZ¢Gdd„deœƒZ£Gdd„deœƒZ¤Gdd„deœƒZ¥Gdd„deMƒZ¦Gd d!„d!eMƒZ§Gd"d#„d#eMƒZ¨Gd$d%„d%ejƒZ©Gd&d'„d'e/ƒZªGd(d)„d)e"ƒZ«Gd*d+„d+e-ƒZ¬Gd,d-„d-e,ƒZ­Gd.d/„d/e$ƒZ®eee¯efd0œd1d2„Z°dS(9zThe C language domain.éN)ÚAnyÚCallableÚDictÚ	GeneratorÚIteratorÚListÚOptionalÚTupleÚTypeVarÚUnionÚcast)Únodes)ÚElementÚNodeÚTextElementÚsystem_message)Ú
directives)Úaddnodes)Úpending_xref)ÚSphinx)ÚBuilder)ÚRemovedInSphinx50Warning)ÚObjectDescription)ÚDomainÚObjType)ÚBuildEnvironment)Ú_Ú__)Ú
SphinxRoleÚXRefRole)ÚSphinxTransform)ÚReferencesResolver)Úlogging)ÚASTAttributeÚASTBaseBaseÚASTBaseParenExprListÚ
BaseParserÚDefinitionErrorÚNoOldIdErrorÚStringifyTransformÚ$UnsupportedMultiCharacterCharLiteralÚanon_identifier_reÚbinary_literal_reÚchar_literal_reÚfloat_literal_reÚfloat_literal_suffix_reÚhex_literal_reÚ
identifier_reÚinteger_literal_reÚintegers_literal_suffix_reÚoctal_literal_reÚverify_description_mode)ÚFieldÚGroupedFieldÚ
TypedField)ÚSphinxDirective)Úmake_refnode)Ú
OptionSpecÚTÚ	ASTStructÚASTUnionÚASTEnumÚ
ASTEnumeratorÚASTTypeÚASTTypeWithInitÚASTMacroÚautoÚbreakZcaseÚcharÚconstÚcontinueÚdefaultZdoÚdoubleÚelseÚenumÚexternÚfloatÚforÚgotoÚifÚinlineÚintÚlongÚregisterÚrestrictÚreturnÚshortÚsignedÚsizeofÚstaticÚstructÚswitchÚtypedefÚunionZunsignedÚvoidÚvolatileÚwhileZ_AlignasZ_AlignofZ_AtomicZ_BoolZ_ComplexZ
_Decimal32Z
_Decimal64Z_Decimal128Z_GenericZ
_ImaginaryZ	_NoreturnZ_Static_assertÚ
_Thread_localZalignasÚalignofÚboolÚcomplexÚ	imaginaryZnoreturnZ
static_assertÚthread_localz||Úorz&&Úandú|Zbitorú^Úxorú&Zbitandz==z!=Znot_eqz<=z>=ú<ú>z<<z>>ú+ú-Ú*ú/ú%z.*z->*z++z--ú!Únotú~Zcomplú=z*=z/=z%=z+=z-=z>>=z<<=z&=Zand_eqz^=Zxor_eqz|=Zor_eqézc.zCv2.z>[LuU8]?('([^'\\]*(?:\\.[^'\\]*)*)'|"([^"\\]*(?:\\.[^"\\]*)*)")an(?x)
    \b(
    void|_Bool
    |signed|unsigned
    |short|long
    |char
    |int
    |__uint128|__int128
    |__int(8|16|32|64|128)  # extension
    |float|double
    |_Decimal(32|64|128)
    |_Complex|_Imaginary
    |__float80|_Float64x|__float128|_Float128|__ibm128  # extension
    |__fp16  # extension
    |_Sat|_Fract|fract|_Accum|accum  # extension
    )\b
c@s,eZdZddddœdd„Zedœdd	„ZdS)
Ú_DuplicateSymbolErrorÚSymbolÚASTDeclarationN)ÚsymbolÚdeclarationrWcCs |st‚|st‚||_||_dS)N)ÚAssertionErrorr~r)Úselfr~r©r‚ú2/tmp/pip-build-gk9425m9/sphinx/sphinx/domains/c.pyÚ__init__lsz_DuplicateSymbolError.__init__)rWcCsd|jjdƒS)Nz%Internal C duplicate symbol error:
%sr)r~Údump)rr‚r‚rƒÚ__str__rsz_DuplicateSymbolError.__str__)Ú__name__Ú
__module__Ú__qualname__r„Ústrr†r‚r‚r‚rƒr{ksr{c@s"eZdZeeddddœdd„ZdS)ÚASTBaserr|N)ÚsignodeÚmodeÚenvr~rWcCstt|ƒƒ‚dS)N)ÚNotImplementedErrorÚrepr)rrŒrrŽr~r‚r‚rƒÚdescribe_signaturewszASTBase.describe_signature)r‡rˆr‰rrŠr‘r‚r‚r‚rƒr‹vsr‹c@sneZdZeddœdd„Zeedœdd„Zedœd	d
„Zedœdd„Z	edœd
d„Z
eededddœdd„ZdS)Ú
ASTIdentifierN)Ú
identifierrWcCs&|dk	st‚t|ƒdkst‚||_dS)Nr)r€Úlenr“)rr“r‚r‚rƒr„€szASTIdentifier.__init__)ÚotherrWcCst|ƒtko|j|jkS)N)Útyper’r“)rr•r‚r‚rƒÚ__eq__…szASTIdentifier.__eq__)rWcCs|jddkS)Nrú@)r“)rr‚r‚rƒÚis_anonˆszASTIdentifier.is_anoncCs|jS)N)r“)rr‚r‚rƒr†szASTIdentifier.__str__cCs|jƒrdS|jS)Nz[anonymous])r™r“)rr‚r‚rƒÚget_display_stringsz ASTIdentifier.get_display_stringrr|)rŒrrŽÚprefixr~rWc
Cs¸t|ƒ|jƒrtjdd}ntj|j|jƒ}|dkrt||j}tjddd|ddd}|jƒ|d<||7}||7}n@|d	kr–tjƒ}	|	|7}	||	7}n|d
kr¨||7}ntd|ƒ‚dS)Nz[anonymous])ÚtextÚmarkTypeÚÚcr“)Z	refdomainZreftypeZ	reftargetÚmodnameÚ	classnamezc:parent_keyÚ
lastIsNameÚ
noneIsNamezUnknown description mode: %s)	r5r™rÚ
desc_sig_namer“rÚget_lookup_keyÚ	desc_nameÚ	Exception)
rrŒrrŽr›r~ÚnodeZ
targetTextÚpnodeZnameNoder‚r‚rƒr‘“s(



z ASTIdentifier.describe_signature)
r‡rˆr‰rŠr„rrer—r™r†ršrr‘r‚r‚r‚rƒr’sr’c@sjeZdZeeeddœdd„Zeddœdd„ƒZe	e
dœd	d
„Zee
dœdd
„Z
ee
ddddœdd„ZdS)Ú
ASTNestedNameN)ÚnamesÚrootedrWcCs t|ƒdkst‚||_||_dS)Nr)r”r€r«r¬)rr«r¬r‚r‚rƒr„¯szASTNestedName.__init__)rWcCs|S)Nr‚)rr‚r‚rƒÚname´szASTNestedName.name)ÚversionrWcCsdjdd„|jDƒƒS)NÚ.css|]}t|ƒVqdS)N)rŠ)Ú.0Únr‚r‚rƒú	<genexpr>¹sz'ASTNestedName.get_id.<locals>.<genexpr>)Újoinr«)rr®r‚r‚rƒÚget_id¸szASTNestedName.get_id)Ú	transformrWcs0dj‡fdd„|jDƒƒ}|jr(d|S|SdS)Nr¯c3s|]}ˆ|ƒVqdS)Nr‚)r°r±)rµr‚rƒr²¼sz+ASTNestedName._stringify.<locals>.<genexpr>)r³r«r¬)rrµÚresr‚)rµrƒÚ
_stringify»szASTNestedName._stringifyrr|)rŒrrŽr~rWc
Cs.t|ƒ|dkrŠ|jr0ds"tdƒ‚|tjdƒ7}xTtt|jƒƒD]B}|dkrfdsXtdƒ‚|tjdƒ7}|j|}|j|||d|ƒq@Wn |dkrÔ|js¦tt	|ƒƒ‚t|jƒdks¸t‚|jdj|d|d|ƒnV|dkrd}d}|d
krþ|jdd…n|j}	|}
|d
krt
jƒ}
|jrd|d7}|d
krTt|	ƒdkrT|t
jddƒ7}n|
t
jddƒ7}
xltt|	ƒƒD]\}|	|}|sœ|
t
jddƒ7}
|d7}d}t	|ƒ}|dkrÄ|j|
d	|||ƒ||7}qrW|d
kr*t|jƒdkr|
t
jddƒ7}
||
7}|jdj|||d|ƒnt
d
|ƒ‚dS)Nr£FzCan this happen?r¯rržÚparamrzrr¢ÚmarkNameTzUnknown description mode: %s)rr¢r¹éÿÿÿÿrº)r5r¬r€r
ZTextÚranger”r«r‘rŠrZdesc_addnameÚdesc_sig_punctuationr§)
rrŒrrŽr~Úir±r›Úfirstr«ÚdestÚidentZ	txt_identr‚r‚rƒr‘ÂsV




z ASTNestedName.describe_signature)r‡rˆr‰rr’rer„Úpropertyr­rSrŠr´r)r·rr‘r‚r‚r‚rƒrª®srªc@seZdZdS)Ú
ASTExpressionN)r‡rˆr‰r‚r‚r‚rƒrÂÿsrÂc@seZdZdS)Ú
ASTLiteralN)r‡rˆr‰r‚r‚r‚rƒrÃsrÃc@sBeZdZeddœdd„Zeedœdd„Zeedd	dd
œdd„Z	dS)
ÚASTBooleanLiteralN)ÚvaluerWcCs
||_dS)N)rÅ)rrÅr‚r‚rƒr„szASTBooleanLiteral.__init__)rµrWcCs|jr
dSdSdS)NÚtrueÚfalse)rÅ)rrµr‚r‚rƒr·szASTBooleanLiteral._stringifyrr|)rŒrrŽr~rWcCst|ƒ}|tj||ƒ7}dS)N)rŠrÚdesc_sig_keyword)rrŒrrŽr~Útxtr‚r‚rƒr‘sz$ASTBooleanLiteral.describe_signature)
r‡rˆr‰rer„r)rŠr·rr‘r‚r‚r‚rƒrÄ
srÄc@sBeZdZeddœdd„Zeedœdd„Zeedd	dd
œdd„ZdS)
ÚASTNumberLiteralN)ÚdatarWcCs
||_dS)N)rË)rrËr‚r‚rƒr„szASTNumberLiteral.__init__)rµrWcCs|jS)N)rË)rrµr‚r‚rƒr·szASTNumberLiteral._stringifyrr|)rŒrrŽr~rWcCst|ƒ}|tj||ƒ7}dS)N)rŠrZdesc_sig_literal_number)rrŒrrŽr~rÉr‚r‚rƒr‘!sz#ASTNumberLiteral.describe_signature)	r‡rˆr‰rŠr„r)r·rr‘r‚r‚r‚rƒrÊsrÊc@sDeZdZeeddœdd„Zeedœdd„Zeedd	dd
œdd„ZdS)
ÚASTCharLiteralN)r›rËrWcCs>||_||_|jƒjdƒ}t|ƒdkr2t|ƒ|_nt|ƒ‚dS)Nzunicode-escaperz)r›rËÚencodeÚdecoder”ÚordrÅr*)rr›rËÚdecodedr‚r‚rƒr„(szASTCharLiteral.__init__)rµrWcCs0|jdkrd|jdS|jd|jdSdS)Nú')r›rË)rrµr‚r‚rƒr·1s
zASTCharLiteral._stringifyrr|)rŒrrŽr~rWcCst|ƒ}|tj||ƒ7}dS)N)rŠrZdesc_sig_literal_char)rrŒrrŽr~rÉr‚r‚rƒr‘7sz!ASTCharLiteral.describe_signature)	r‡rˆr‰rŠr„r)r·rr‘r‚r‚r‚rƒrÌ's	rÌc@sBeZdZeddœdd„Zeedœdd„Zeedd	dd
œdd„ZdS)
ÚASTStringLiteralN)rËrWcCs
||_dS)N)rË)rrËr‚r‚rƒr„>szASTStringLiteral.__init__)rµrWcCs|jS)N)rË)rrµr‚r‚rƒr·AszASTStringLiteral._stringifyrr|)rŒrrŽr~rWcCst|ƒ}|tj||ƒ7}dS)N)rŠrZdesc_sig_literal_string)rrŒrrŽr~rÉr‚r‚rƒr‘Dsz#ASTStringLiteral.describe_signature)	r‡rˆr‰rŠr„r)r·rr‘r‚r‚r‚rƒrÒ=srÒc@sPeZdZedœdd„Zeedœdd„Zeedœdd	„Z	e
ed
ddd
œdd„ZdS)ÚASTIdExpression)r­cCs
||_dS)N)r­)rr­r‚r‚rƒr„KszASTIdExpression.__init__)rµrWcCs
||jƒS)N)r­)rrµr‚r‚rƒr·OszASTIdExpression._stringify)r®rWcCs|jj|ƒS)N)r­r´)rr®r‚r‚rƒr´RszASTIdExpression.get_idrr|N)rŒrrŽr~rWcCs|jj||||ƒdS)N)r­r‘)rrŒrrŽr~r‚r‚rƒr‘Usz"ASTIdExpression.describe_signature)r‡rˆr‰rªr„r)rŠr·rSr´rr‘r‚r‚r‚rƒrÓJs
rÓc@sJeZdZdd„Zeedœdd„Zeedœdd„Ze	ed	d
ddœd
d„Z
dS)ÚASTParenExprcCs
||_dS)N)Úexpr)rrÕr‚r‚rƒr„[szASTParenExpr.__init__)rµrWcCsd||jƒdS)Nú(ú))rÕ)rrµr‚r‚rƒr·^szASTParenExpr._stringify)r®rWcCs|jj|ƒS)N)rÕr´)rr®r‚r‚rƒr´aszASTParenExpr.get_idrr|N)rŒrrŽr~rWcCs6|tjddƒ7}|jj||||ƒ|tjddƒ7}dS)NrÖr×)rr¼rÕr‘)rrŒrrŽr~r‚r‚rƒr‘dszASTParenExpr.describe_signature)r‡rˆr‰r„r)rŠr·rSr´rr‘r‚r‚r‚rƒrÔZs
rÔc@seZdZdS)ÚASTPostfixOpN)r‡rˆr‰r‚r‚r‚rƒrØnsrØc@sFeZdZedddœdd„Zeedœdd	„Zeed
dddœd
d„Z	dS)ÚASTPostfixCallExprÚASTParenExprListÚASTBracedInitListN)ÚlstrWcCs
||_dS)N)rÜ)rrÜr‚r‚rƒr„sszASTPostfixCallExpr.__init__)rµrWcCs
||jƒS)N)rÜ)rrµr‚r‚rƒr·vszASTPostfixCallExpr._stringifyrr|)rŒrrŽr~rWcCs|jj||||ƒdS)N)rÜr‘)rrŒrrŽr~r‚r‚rƒr‘ysz%ASTPostfixCallExpr.describe_signature)rÚrÛ)
r‡rˆr‰rr„r)rŠr·rr‘r‚r‚r‚rƒrÙrsrÙc@sBeZdZeddœdd„Zeedœdd„Zeedd	dd
œdd„Z	dS)
ÚASTPostfixArrayN)rÕrWcCs
||_dS)N)rÕ)rrÕr‚r‚rƒr„szASTPostfixArray.__init__)rµrWcCsd||jƒdS)Nú[ú])rÕ)rrµr‚r‚rƒr·‚szASTPostfixArray._stringifyrr|)rŒrrŽr~rWcCs6|tjddƒ7}|jj||||ƒ|tjddƒ7}dS)NrÞrß)rr¼rÕr‘)rrŒrrŽr~r‚r‚rƒr‘…sz"ASTPostfixArray.describe_signature)
r‡rˆr‰rÂr„r)rŠr·rr‘r‚r‚r‚rƒrÝ~srÝc@s2eZdZeedœdd„Zeeddddœdd	„ZdS)
Ú
ASTPostfixInc)rµrWcCsdS)Nz++r‚)rrµr‚r‚rƒr·szASTPostfixInc._stringifyrr|N)rŒrrŽr~rWcCs|tjddƒ7}dS)Nz++)rÚdesc_sig_operator)rrŒrrŽr~r‚r‚rƒr‘sz ASTPostfixInc.describe_signature)r‡rˆr‰r)rŠr·rr‘r‚r‚r‚rƒràŒsràc@s2eZdZeedœdd„Zeeddddœdd	„ZdS)
Ú
ASTPostfixDec)rµrWcCsdS)Nz--r‚)rrµr‚r‚rƒr·–szASTPostfixDec._stringifyrr|N)rŒrrŽr~rWcCs|tjddƒ7}dS)Nz--)rrá)rrŒrrŽr~r‚r‚rƒr‘™sz ASTPostfixDec.describe_signature)r‡rˆr‰r)rŠr·rr‘r‚r‚r‚rƒrâ•srâc@s:eZdZdd„Zeedœdd„Zeedddd	œd
d„ZdS)ÚASTPostfixMemberOfPointercCs
||_dS)N)r­)rr­r‚r‚rƒr„Ÿsz"ASTPostfixMemberOfPointer.__init__)rµrWcCsd||jƒS)Nz->)r­)rrµr‚r‚rƒr·¢sz$ASTPostfixMemberOfPointer._stringifyrr|N)rŒrrŽr~rWcCs&|tjddƒ7}|jj|d||ƒdS)Nz->r£)rrár­r‘)rrŒrrŽr~r‚r‚rƒr‘¥sz,ASTPostfixMemberOfPointer.describe_signature)	r‡rˆr‰r„r)rŠr·rr‘r‚r‚r‚rƒrãžsrãc@sFeZdZeeedœdd„Zeedœdd„Z	e
eddd	d
œdd„Zd	S)
ÚASTPostfixExpr)r›Ú	postFixescCs||_||_dS)N)r›rå)rr›rår‚r‚rƒr„¬szASTPostfixExpr.__init__)rµrWcCs4||jƒg}x|jD]}|j||ƒƒqWdj|ƒS)Nrž)r›råÚappendr³)rrµr¶Úpr‚r‚rƒr·°szASTPostfixExpr._stringifyrr|N)rŒrrŽr~rWcCs6|jj||||ƒx|jD]}|j||||ƒqWdS)N)r›r‘rå)rrŒrrŽr~rçr‚r‚rƒr‘¶sz!ASTPostfixExpr.describe_signature)r‡rˆr‰rÂrrØr„r)rŠr·rr‘r‚r‚r‚rƒrä«sräc@sBeZdZeedœdd„Zeedœdd„Zeeddd	d
œdd„Z	d	S)
ÚASTUnaryOpExpr)ÚoprÕcCs||_||_dS)N)rérÕ)rrérÕr‚r‚rƒr„ÁszASTUnaryOpExpr.__init__)rµrWcCs6|jddkr"|jd||jƒS|j||jƒSdS)NrÚcnú )rérÕ)rrµr‚r‚rƒr·ÅszASTUnaryOpExpr._stringifyrr|N)rŒrrŽr~rWcCsZ|jddkr0|tj|j|jƒ7}|tjƒ7}n|tj|j|jƒ7}|jj||||ƒdS)Nrrê)rérrÈÚdesc_sig_spacerárÕr‘)rrŒrrŽr~r‚r‚rƒr‘Ës
z!ASTUnaryOpExpr.describe_signature)
r‡rˆr‰rŠrÂr„r)r·rr‘r‚r‚r‚rƒrèÀsrèc@s:eZdZdd„Zeedœdd„Zeedddd	œd
d„ZdS)Ú
ASTSizeofTypecCs
||_dS)N)Útyp)rrîr‚r‚rƒr„ÖszASTSizeofType.__init__)rµrWcCsd||jƒdS)Nzsizeof(r×)rî)rrµr‚r‚rƒr·ÙszASTSizeofType._stringifyrr|N)rŒrrŽr~rWcCsF|tjddƒ7}|tjddƒ7}|jj||||ƒ|tjddƒ7}dS)NrZrÖr×)rrÈr¼rîr‘)rrŒrrŽr~r‚r‚rƒr‘Üsz ASTSizeofType.describe_signature)	r‡rˆr‰r„r)rŠr·rr‘r‚r‚r‚rƒríÕsríc@s@eZdZedœdd„Zeedœdd„Zeeddd	d
œdd„Z	d	S)
Ú
ASTSizeofExpr)rÕcCs
||_dS)N)rÕ)rrÕr‚r‚rƒr„åszASTSizeofExpr.__init__)rµrWcCsd||jƒS)Nzsizeof )rÕ)rrµr‚r‚rƒr·èszASTSizeofExpr._stringifyrr|N)rŒrrŽr~rWcCs2|tjddƒ7}|tjƒ7}|jj||||ƒdS)NrZ)rrÈrìrÕr‘)rrŒrrŽr~r‚r‚rƒr‘ësz ASTSizeofExpr.describe_signature)
r‡rˆr‰rÂr„r)rŠr·rr‘r‚r‚r‚rƒrïäsrïc@s@eZdZddœdd„Zeedœdd„Zeedd	d
dœdd
„Zd
S)ÚASTAlignofExprrA)rîcCs
||_dS)N)rî)rrîr‚r‚rƒr„ószASTAlignofExpr.__init__)rµrWcCsd||jƒdS)Nzalignof(r×)rî)rrµr‚r‚rƒr·öszASTAlignofExpr._stringifyrr|N)rŒrrŽr~rWcCsF|tjddƒ7}|tjddƒ7}|jj||||ƒ|tjddƒ7}dS)NrdrÖr×)rrÈr¼rîr‘)rrŒrrŽr~r‚r‚rƒr‘ùsz!ASTAlignofExpr.describe_signature)	r‡rˆr‰r„r)rŠr·rr‘r‚r‚r‚rƒrðòsrðc@sBeZdZdedœdd„Zeedœdd„Zeedd	d
dœdd
„Z	d
S)ÚASTCastExprrA)rîrÕcCs||_||_dS)N)rîrÕ)rrîrÕr‚r‚rƒr„szASTCastExpr.__init__)rµrWcCs:dg}|j||jƒƒ|jdƒ|j||jƒƒdj|ƒS)NrÖr×rž)rærîrÕr³)rrµr¶r‚r‚rƒr·	s

zASTCastExpr._stringifyrr|N)rŒrrŽr~rWcCsH|tjddƒ7}|jj||||ƒ|tjddƒ7}|jj||||ƒdS)NrÖr×)rr¼rîr‘rÕ)rrŒrrŽr~r‚r‚rƒr‘szASTCastExpr.describe_signature)
r‡rˆr‰rÂr„r)rŠr·rr‘r‚r‚r‚rƒrñsrñc@sJeZdZeeeedœdd„Zeedœdd„Ze	eddd	d
œdd„Z
d	S)
ÚASTBinOpExpr)ÚexprsÚopscCs8t|ƒdkst‚t|ƒt|ƒdks(t‚||_||_dS)Nrrz)r”r€rórô)rrórôr‚r‚rƒr„szASTBinOpExpr.__init__)rµrWcCsxg}|j||jdƒƒxTtdt|jƒƒD]@}|jdƒ|j|j|dƒ|jdƒ|j||j|ƒƒq*Wdj|ƒS)Nrrzrërž)rærór»r”rôr³)rrµr¶r½r‚r‚rƒr·s

zASTBinOpExpr._stringifyrr|N)rŒrrŽr~rWcCsº|jdj||||ƒxžtdt|jƒƒD]Š}|tjƒ7}|j|d}t|dƒtdƒkr€t|dƒtdƒkr€|tj||ƒ7}n|tj	||ƒ7}|tjƒ7}|j|j||||ƒq(WdS)NrrzÚaÚz)
rór‘r»r”rrìrôrÏrÈrá)rrŒrrŽr~r½rér‚r‚rƒr‘)s(zASTBinOpExpr.describe_signature)r‡rˆr‰rrÂrŠr„r)r·rr‘r‚r‚r‚rƒròs
ròc@sJeZdZeeeedœdd„Zeedœdd„Ze	eddd	d
œdd„Z
d	S)
ÚASTAssignmentExpr)rórôcCs8t|ƒdkst‚t|ƒt|ƒdks(t‚||_||_dS)Nrrz)r”r€rórô)rrórôr‚r‚rƒr„8szASTAssignmentExpr.__init__)rµrWcCsxg}|j||jdƒƒxTtdt|jƒƒD]@}|jdƒ|j|j|dƒ|jdƒ|j||j|ƒƒq*Wdj|ƒS)Nrrzrërž)rærór»r”rôr³)rrµr¶r½r‚r‚rƒr·>s

zASTAssignmentExpr._stringifyrr|N)rŒrrŽr~rWcCsº|jdj||||ƒxžtdt|jƒƒD]Š}|tjƒ7}|j|d}t|dƒtdƒkr€t|dƒtdƒkr€|tj||ƒ7}n|tj	||ƒ7}|tjƒ7}|j|j||||ƒq(WdS)Nrrzrõrö)
rór‘r»r”rrìrôrÏrÈrá)rrŒrrŽr~r½rér‚r‚rƒr‘Hs(z$ASTAssignmentExpr.describe_signature)r‡rˆr‰rrÂrŠr„r)r·rr‘r‚r‚r‚rƒr÷7s
r÷c@sPeZdZedœdd„Zeedœdd„Zeedœdd	„Ze	ed
ddd
œdd„Z
dS)ÚASTFallbackExpr)rÕcCs
||_dS)N)rÕ)rrÕr‚r‚rƒr„WszASTFallbackExpr.__init__)rµrWcCs|jS)N)rÕ)rrµr‚r‚rƒr·ZszASTFallbackExpr._stringify)r®rWcCs
t|jƒS)N)rŠrÕ)rr®r‚r‚rƒr´]szASTFallbackExpr.get_idrr|N)rŒrrŽr~rWcCs|tj|j|jƒ7}dS)N)r
ÚliteralrÕ)rrŒrrŽr~r‚r‚rƒr‘`sz"ASTFallbackExpr.describe_signature)r‡rˆr‰rŠr„r)r·rSr´rr‘r‚r‚r‚rƒrøVs
røc@seZdZdS)ÚASTTrailingTypeSpecN)r‡rˆr‰r‚r‚r‚rƒrúisrúc@sFeZdZeeddœdd„Zeedœdd„Zeedd	dd
œdd„Z	dS)
ÚASTTrailingTypeSpecFundamentalN)r«rWcCst|ƒdkst‚||_dS)Nr)r”r€r«)rr«r‚r‚rƒr„nsz'ASTTrailingTypeSpecFundamental.__init__)rµrWcCsdj|jƒS)Nrë)r³r«)rrµr‚r‚rƒr·rsz)ASTTrailingTypeSpecFundamental._stringifyrr|)rŒrrŽr~rWcCs>d}x4|jD]*}|s"|tjƒ7}nd}|tj||ƒ7}qWdS)NTF)r«rrìZdesc_sig_keyword_type)rrŒrrŽr~r¾r±r‚r‚rƒr‘usz1ASTTrailingTypeSpecFundamental.describe_signature)
r‡rˆr‰rrŠr„r)r·rr‘r‚r‚r‚rƒrûmsrûc@sVeZdZeeddœdd„Zeedœdd„ƒZeedœd	d
„Z	e
edddd
œdd„ZdS)ÚASTTrailingTypeSpecNameN)r›Ú
nestedNamerWcCs||_||_dS)N)r›rý)rr›rýr‚r‚rƒr„sz ASTTrailingTypeSpecName.__init__)rWcCs|jS)N)rý)rr‚r‚rƒr­…szASTTrailingTypeSpecName.name)rµrWcCs:g}|jr |j|jƒ|jdƒ|j||jƒƒdj|ƒS)Nrërž)r›rærýr³)rrµr¶r‚r‚rƒr·‰s
z"ASTTrailingTypeSpecName._stringifyrr|)rŒrrŽr~rWcCs>|jr&|tj|j|jƒ7}|tjƒ7}|jj||||ddS)N)r~)r›rrÈrìrýr‘)rrŒrrŽr~r‚r‚rƒr‘‘sz*ASTTrailingTypeSpecName.describe_signature)r‡rˆr‰rŠrªr„rÁr­r)r·rr‘r‚r‚r‚rƒrü€srüc@sZeZdZddeddœdd„Zeededœd	d
„Zeedœdd
„Z	e
eddddœdd„ZdS)ÚASTFunctionParameterFrBN)ÚargÚellipsisrWcCs||_||_dS)N)rÿr)rrÿrr‚r‚rƒr„šszASTFunctionParameter.__init__r|)r®Ú
objectTyper~rWcCs|jjj|ddS)NF)Úprefixed)Úparentrr´)rr®rr~r‚r‚rƒr´žszASTFunctionParameter.get_id)rµrWcCs|jr
dS||jƒSdS)Nz...)rrÿ)rrµr‚r‚rƒr·¢szASTFunctionParameter._stringifyr)rŒrrŽr~rWcCs8t|ƒ|jr |tjddƒ7}n|jj||||ddS)Nz...)r~)r5rrr¼rÿr‘)rrŒrrŽr~r‚r‚rƒr‘¨sz'ASTFunctionParameter.describe_signature)F)r‡rˆr‰rer„rSrŠr´r)r·rr‘r‚r‚r‚rƒrþ™s
rþc@sbeZdZeeeeddœdd„Zeeedœdd„ƒZe	e
dœd	d
„Zee
dddd
œdd„Z
dS)Ú
ASTParametersN)ÚargsÚattrsrWcCs||_||_dS)N)rr)rrrr‚r‚rƒr„²szASTParameters.__init__)rWcCs|jS)N)r)rr‚r‚rƒÚfunction_params¶szASTParameters.function_params)rµrWcCs~g}|jdƒd}x.|jD]$}|s,|jdƒd}|jt|ƒƒqW|jdƒx&|jD]}|jdƒ|j||ƒƒqTWdj|ƒS)NrÖTz, Fr×rërž)rærrŠrr³)rrµr¶r¾rõÚattrr‚r‚rƒr·ºs



zASTParameters._stringifyrr|)rŒrrŽr~rWc
Csðt|ƒ|dkr\tjƒ}x8|jD].}tjdddd}|j|d||d||7}q W||7}nj|tjddƒ7}d}xD|jD]:}|sœ|tjddƒ7}|tjƒ7}d	}|j|d
||dqxW|tjddƒ7}x$|jD]}	|tjƒ7}|	j|ƒqÎWdS)Nr¢ržT)Únoemphr¸)r~rÖú,Frr×)	r5rÚdesc_parameterlistrÚdesc_parameterr‘r¼rìr)
rrŒrrŽr~Ú	paramlistrÿr¸r¾rr‚r‚rƒr‘És(
z ASTParameters.describe_signature)r‡rˆr‰rrþr#r„rÁrr)rŠr·rr‘r‚r‚r‚rƒr±src	@s`eZdZeeeeeeeeddœdd„Zdddœdd„Ze	edœd	d
„Z
eeddœdd
„ZdS)ÚASTDeclSpecsSimpleN)ÚstorageÚthreadLocalrRrVrarGrrWcCs.||_||_||_||_||_||_||_dS)N)rrrRrVrarGr)rrrrRrVrarGrr‚r‚rƒr„åszASTDeclSpecsSimple.__init__)r•rWc	CsT|s|St|jp|j|jp|j|jp(|j|jp2|j|jp<|j|jpF|j|j|jƒS)N)rrrrRrarGrVr)rr•r‚r‚rƒÚ	mergeWithïs




zASTDeclSpecsSimple.mergeWith)rµrWcsŒg}|j‡fdd„|jDƒƒ|jr0|j|jƒ|jrB|j|jƒ|jrR|jdƒ|jrb|jdƒ|jrr|jdƒ|jr‚|jdƒdj	|ƒS)Nc3s|]}ˆ|ƒVqdS)Nr‚)r°r)rµr‚rƒr²üsz0ASTDeclSpecsSimple._stringify.<locals>.<genexpr>rRrVrarGrë)
ÚextendrrrærrRrVrarGr³)rrµr¶r‚)rµrƒr·ús



zASTDeclSpecsSimple._stringify)Ú	modifiersrWcCs¸tttddœdd„}x8|jD].}t|ƒdkr<|jtjƒƒ|j|j|ƒƒqW|j	rb|||j	ƒ|j
rt|||j
ƒ|jr„||dƒ|jr”||dƒ|j
r¤||dƒ|jr´||dƒdS)	N)rrœrWcSs0t|ƒdkr|jtjƒƒ|jtj||ƒƒdS)Nr)r”rærrìrÈ)rrœr‚r‚rƒÚ_addsz3ASTDeclSpecsSimple.describe_signature.<locals>._addrrRrVrarG)rrrŠrr”rærrìr‘rrrRrVrarG)rrrrr‚r‚rƒr‘s"


z%ASTDeclSpecsSimple.describe_signature)
r‡rˆr‰rŠrerrr„rr)r·rr‘r‚r‚r‚rƒräs
	rc@sHeZdZeeeeddœdd„Zeedœdd„Ze	edd	dd
œdd„Z
dS)
ÚASTDeclSpecsN)ÚouterÚ	leftSpecsÚ
rightSpecsÚtrailingrWcCs,||_||_||_|jj|jƒ|_||_dS)N)rrrrZallSpecsÚtrailingTypeSpec)rrrrrr‚r‚rƒr„$s
zASTDeclSpecs.__init__)rµrWcCsg}||jƒ}t|ƒdkr$|j|ƒ|jr†t|ƒdkr@|jdƒ|j||jƒƒt|jƒ}t|ƒdkr†t|ƒdkr||jdƒ|j|ƒdj|ƒS)Nrrërž)rr”rærrŠrr³)rrµr¶ÚlÚrr‚r‚rƒr·0s





zASTDeclSpecs._stringifyrr|)rŒrrŽr~rWcCs¢t|ƒg}|jj|ƒx|D]}||7}qW|jržt|ƒdkrL|tjƒ7}|jj||||dg}|jj|ƒt|ƒdkrˆ|tjƒ7}x|D]}||7}qŽWdS)Nr)r~)r5rr‘rr”rrìr)rrŒrrŽr~rÚmr‚r‚rƒr‘@s 

zASTDeclSpecs.describe_signature)r‡rˆr‰rŠrrúr„r)r·rr‘r‚r‚r‚rƒr#s	rc@sJeZdZeeeeeedœdd„Zeedœdd„Ze	eddd	d
œdd„Z
d	S)
ÚASTArray)r[rGrarVÚvlaÚsizecCsJ||_||_||_||_||_||_|r4|dks4t‚|dk	rF|sFt‚dS)N)r[rGrarVrr r€)rr[rGrarVrr r‚r‚rƒr„ZszASTArray.__init__)rµrWcCs„g}|jr|jdƒ|jr$|jdƒ|jr4|jdƒ|jrD|jdƒ|jr\ddj|ƒdS|jrr|j||jƒƒddj|ƒdS)	Nr[rVrarGrÞrëz*]rß)r[rærVrarGrr³r )rrµÚelr‚r‚rƒr·gs



zASTArray._stringifyrr|N)rŒrrŽr~rWcsÆt|ƒ|tjddƒ7}d‰tttdœ‡fdd„}|jrB||dƒ‰|jrR||dƒ‰|jrb||dƒ‰|j	rr||d	ƒ‰|j
rŠ|tjd
d
ƒ7}n(|jr²ˆr |tjƒ7}|jj
|d||ƒ|tjddƒ7}dS)
NrÞF)rŒrœrWcs$ˆr|tjƒ7}|tj||ƒ7}dS)NT)rrìrÈ)rŒrœ)ÚaddSpacer‚rƒr}sz)ASTArray.describe_signature.<locals>._addr[rVrarGrsrrß)r5rr¼rrŠrer[rVrarGrr rìr‘)rrŒrrŽr~rr‚)r"rƒr‘ws&



zASTArray.describe_signature)r‡rˆr‰rerÂr„r)rŠr·rr‘r‚r‚r‚rƒrYs
rc@sBeZdZeedœdd„ƒZeeedœdd„ƒZe	dœdd„Z
dS)	Ú
ASTDeclarator)rWcCstt|ƒƒ‚dS)N)rr)rr‚r‚rƒr­•szASTDeclarator.namecCstt|ƒƒ‚dS)N)rr)rr‚r‚rƒr™szASTDeclarator.function_paramscCstt|ƒƒ‚dS)N)rr)rr‚r‚rƒÚrequire_space_after_declSpecssz+ASTDeclarator.require_space_after_declSpecsN)r‡rˆr‰rÁrªr­rrþrrer$r‚r‚r‚rƒr#”s
r#c@s€eZdZeeeeddœdd„Zeedœdd„ƒZ	eee
dœdd	„ƒZedœd
d„Z
eedœd
d„Zeeddddœdd„ZdS)ÚASTDeclaratorNameParamN)ÚdeclIdÚarrayOpsr¸rWcCs||_||_||_dS)N)r&r'r¸)rr&r'r¸r‚r‚rƒr„¢szASTDeclaratorNameParam.__init__)rWcCs|jS)N)r&)rr‚r‚rƒr­¨szASTDeclaratorNameParam.namecCs|jjS)N)r¸r)rr‚r‚rƒr¬sz&ASTDeclaratorNameParam.function_paramscCs
|jdk	S)N)r&)rr‚r‚rƒr$²sz4ASTDeclaratorNameParam.require_space_after_declSpecs)rµrWcCsXg}|jr|j||jƒƒx|jD]}|j||ƒƒq"W|jrN|j||jƒƒdj|ƒS)Nrž)r&rær'r¸r³)rrµr¶rér‚r‚rƒr·µsz!ASTDeclaratorNameParam._stringifyrr|)rŒrrŽr~rWcCs\t|ƒ|jr |jj||||ƒx|jD]}|j||||ƒq(W|jrX|jj||||ƒdS)N)r5r&r‘r'r¸)rrŒrrŽr~rér‚r‚rƒr‘¿sz)ASTDeclaratorNameParam.describe_signature)r‡rˆr‰rªrrrr„rÁr­rþrrer$r)rŠr·rr‘r‚r‚r‚rƒr%¡s
r%c@sbeZdZeedœdd„Zeedœdd„ƒZedœdd„Z	e
ed	œd
d„Ze
edd
ddœdd„ZdS)ÚASTDeclaratorNameBitField)r&r cCs||_||_dS)N)r&r )rr&r r‚r‚rƒr„Ësz"ASTDeclaratorNameBitField.__init__)rWcCs|jS)N)r&)rr‚r‚rƒr­ÏszASTDeclaratorNameBitField.namecCs
|jdk	S)N)r&)rr‚r‚rƒr$Õsz7ASTDeclaratorNameBitField.require_space_after_declSpecs)rµrWcCs>g}|jr|j||jƒƒ|jdƒ|j||jƒƒdj|ƒS)Nz : rž)r&rær r³)rrµr¶r‚r‚rƒr·Øs
z$ASTDeclaratorNameBitField._stringifyrr|N)rŒrrŽr~rWcCs^t|ƒ|jr |jj||||ƒ|tjƒ7}|tjddƒ7}|tjƒ7}|jj||||ƒdS)Nú:)r5r&r‘rrìr¼r )rrŒrrŽr~r‚r‚rƒr‘àsz,ASTDeclaratorNameBitField.describe_signature)r‡rˆr‰rªrÂr„rÁr­rer$r)rŠr·rr‘r‚r‚r‚rƒr(Êsr(c@s€eZdZeeeeeddœdd„Zeedœdd„ƒZ	ee
edœdd	„ƒZedœd
d„Z
eedœd
d„Zeeddddœdd„ZdS)ÚASTDeclaratorPtrN)ÚnextrVrarGrrWcCs*|st‚||_||_||_||_||_dS)N)r€r+rVrarGr)rr+rVrarGrr‚r‚rƒr„ìszASTDeclaratorPtr.__init__)rWcCs|jjS)N)r+r­)rr‚r‚rƒr­õszASTDeclaratorPtr.namecCs|jjS)N)r+r)rr‚r‚rƒrùsz ASTDeclaratorPtr.function_paramscCs*|jp(|jp(|jp(t|jƒdkp(|jjƒS)Nr)rGrarVr”rr+r$)rr‚r‚rƒr$ýsz.ASTDeclaratorPtr.require_space_after_declSpecs)rµrWcCsòdg}x|jD]}|j||ƒƒqWt|jƒdkrN|jsD|jsD|jrN|jdƒ|jr^|jdƒ|jr~|jrt|jdƒ|jdƒ|jr¤|js|jrš|jdƒ|jdƒ|jsÄ|jsÄ|jsÄt|jƒdkrØ|jjƒrØ|jdƒ|j||jƒƒdj|ƒS)NrsrrërVrarGrž)	rrær”rVrarGr+r$r³)rrµr¶rõr‚r‚rƒr·s( 





 

zASTDeclaratorPtr._stringifyrr|)rŒrrŽr~rWcCst|ƒ|tjddƒ7}x|jD]}|j|ƒq Wt|jƒdkr^|jsR|jsR|jr^|tj	ƒ7}t
tddœdd„}|jr€||dƒ|jr¢|jr˜|tj	ƒ7}||dƒ|jrÊ|js´|jrÀ|tj	ƒ7}||dƒ|jsì|jsì|jsìt|jƒdkr|jj
ƒr|tj	ƒ7}|jj||||ƒdS)	Nrsr)rŒrœrWcSs|tj||ƒ7}dS)N)rrÈ)rŒrœr‚r‚rƒÚ	_add_anno!sz6ASTDeclaratorPtr.describe_signature.<locals>._add_annorVrarG)r5rr¼rr‘r”rVrarGrìrrŠr+r$)rrŒrrŽr~rõr,r‚r‚rƒr‘s* 


"z#ASTDeclaratorPtr.describe_signature)r‡rˆr‰r#rerr„rÁrªr­rrþrr$r)rŠr·rr‘r‚r‚r‚rƒr*ësr*c@szeZdZeeddœdd„Zeedœdd„ƒZeee	dœdd	„ƒZ
edœd
d„Ze
edœd
d„Zeeddddœdd„ZdS)ÚASTDeclaratorParenN)Úinnerr+rWcCs |st‚|st‚||_||_dS)N)r€r.r+)rr.r+r‚r‚rƒr„5szASTDeclaratorParen.__init__)rWcCs|jjS)N)r.r­)rr‚r‚rƒr­<szASTDeclaratorParen.namecCs|jjS)N)r.r)rr‚r‚rƒr@sz"ASTDeclaratorParen.function_paramscCsdS)NTr‚)rr‚r‚rƒr$Dsz0ASTDeclaratorParen.require_space_after_declSpecs)rµrWcCs:dg}|j||jƒƒ|jdƒ|j||jƒƒdj|ƒS)NrÖr×rž)rær.r+r³)rrµr¶r‚r‚rƒr·Gs

zASTDeclaratorParen._stringifyrr|)rŒrrŽr~rWcCsPt|ƒ|tjddƒ7}|jj||||ƒ|tjddƒ7}|jj|d||ƒdS)NrÖr×r£)r5rr¼r.r‘r+)rrŒrrŽr~r‚r‚rƒr‘Ns
z%ASTDeclaratorParen.describe_signature)r‡rˆr‰r#r„rÁrªr­rrþrrer$r)rŠr·rr‘r‚r‚r‚rƒr-4sr-c@sFeZdZeeddœdd„Zeedœdd„Ze	edd	dd
œdd„Z
dS)
rÚN)rórWcCs
||_dS)N)ró)rrór‚r‚rƒr„[szASTParenExprList.__init__)rµrWcs"‡fdd„|jDƒ}ddj|ƒS)Ncsg|]}ˆ|ƒ‘qSr‚r‚)r°Úe)rµr‚rƒú
<listcomp>_sz/ASTParenExprList._stringify.<locals>.<listcomp>z(%s)z, )rór³)rrµrór‚)rµrƒr·^szASTParenExprList._stringifyrr|)rŒrrŽr~rWcCsvt|ƒ|tjddƒ7}d}xD|jD]:}|sJ|tjddƒ7}|tjƒ7}nd}|j||||ƒq$W|tjddƒ7}dS)NrÖTr
Fr×)r5rr¼rórìr‘)rrŒrrŽr~r¾r/r‚r‚rƒr‘bsz#ASTParenExprList.describe_signature)r‡rˆr‰rrÂr„r)rŠr·rr‘r‚r‚r‚rƒrÚZsrÚc@sHeZdZeeeddœdd„Zeedœdd„Z	e
edd	dd
œdd„ZdS)
rÛN)róÚ
trailingCommarWcCs||_||_dS)N)rór1)rrór1r‚r‚rƒr„rszASTBracedInitList.__init__)rµrWcs4‡fdd„|jDƒ}|jrdnd}ddj|ƒ|fS)Ncsg|]}ˆ|ƒ‘qSr‚r‚)r°r/)rµr‚rƒr0wsz0ASTBracedInitList._stringify.<locals>.<listcomp>r
ržz{%s%s}z, )rór1r³)rrµrór1r‚)rµrƒr·vszASTBracedInitList._stringifyrr|)rŒrrŽr~rWcCsŒt|ƒ|tjddƒ7}d}xD|jD]:}|sJ|tjddƒ7}|tjƒ7}nd}|j||||ƒq$W|jrx|tjddƒ7}|tjddƒ7}dS)NÚ{Tr
FÚ})r5rr¼rórìr‘r1)rrŒrrŽr~r¾r/r‚r‚rƒr‘{sz$ASTBracedInitList.describe_signature)r‡rˆr‰rrÂrer„r)rŠr·rr‘r‚r‚r‚rƒrÛqsrÛc@sNeZdZdeeefeddœdd„Zee	dœdd„Z
ee	d	d
ddœdd
„ZdS)ÚASTInitializerTN)rÅÚ	hasAssignrWcCs||_||_dS)N)rÅr5)rrÅr5r‚r‚rƒr„szASTInitializer.__init__)rµrWcCs ||jƒ}|jrd|S|SdS)Nz = )rÅr5)rrµÚvalr‚r‚rƒr·’s
zASTInitializer._stringifyrr|)rŒrrŽr~rWcCsLt|ƒ|jr6|tjƒ7}|tjddƒ7}|tjƒ7}|jj|d||ƒdS)Nryr)r5r5rrìr¼rÅr‘)rrŒrrŽr~r‚r‚rƒr‘™sz!ASTInitializer.describe_signature)T)
r‡rˆr‰rrÛrÂrer„r)rŠr·rr‘r‚r‚r‚rƒr4Œsr4c@sŽeZdZeeddœdd„Zeedœdd„ƒZe	e
de
d	œd
d„Zeee
dœdd
„ƒZee
dœdd„Ze
dœdd„Zee
ddddœdd„ZdS)rAN)Ú	declSpecsÚdeclrWcCs |st‚|st‚||_||_dS)N)r€r7r8)rr7r8r‚r‚rƒr„¤szASTType.__init__)rWcCs|jjS)N)r8r­)rr‚r‚rƒr­ªszASTType.namer|)r®rr~rWcCs|jƒj|ƒS)N)Úget_full_nested_namer´)rr®rr~r‚r‚rƒr´®szASTType.get_idcCs|jjS)N)r8r)rr‚r‚rƒr±szASTType.function_params)rµrWcCsRg}||jƒ}|j|ƒ|jjƒr8t|ƒdkr8|jdƒ|j||jƒƒdj|ƒS)Nrrërž)r7rær8r$r”r³)rrµr¶r7r‚r‚rƒr·µs


zASTType._stringifycCs|jjrdSdSdS)Nr^r–)r7r)rr‚r‚rƒÚget_type_declaration_prefix¾sz#ASTType.get_type_declaration_prefixr)rŒrrŽr~rWcCsdt|ƒ|jj|d||ƒ|jjƒrBtt|jƒƒdkrB|tjƒ7}|dkrNd}|jj||||ƒdS)Nrrr£)	r5r7r‘r8r$r”rŠrrì)rrŒrrŽr~r‚r‚rƒr‘Äs
zASTType.describe_signature)r‡rˆr‰rr#r„rÁrªr­rSrŠr´rrþrr)r·r:rr‘r‚r‚r‚rƒrA£s	c@sjeZdZeeddœdd„Zeedœdd„ƒZe	e
de
d	œd
d„Zee
dœd
d„Z
ee
ddddœdd„ZdS)rBN)r–ÚinitrWcCs||_||_dS)N)r–r;)rr–r;r‚r‚rƒr„ÓszASTTypeWithInit.__init__)rWcCs|jjS)N)r–r­)rr‚r‚rƒr­×szASTTypeWithInit.namer|)r®rr~rWcCs|jj|||ƒS)N)r–r´)rr®rr~r‚r‚rƒr´ÛszASTTypeWithInit.get_id)rµrWcCs4g}|j||jƒƒ|jr*|j||jƒƒdj|ƒS)Nrž)rær–r;r³)rrµr¶r‚r‚rƒr·Þs
zASTTypeWithInit._stringifyr)rŒrrŽr~rWcCs6t|ƒ|jj||||ƒ|jr2|jj||||ƒdS)N)r5r–r‘r;)rrŒrrŽr~r‚r‚rƒr‘åsz"ASTTypeWithInit.describe_signature)r‡rˆr‰rAr4r„rÁrªr­rSrŠr´r)r·rr‘r‚r‚r‚rƒrBÒsc@sHeZdZdeeeddœdd„Zeedœdd„Ze	ed	d
ddœdd
„Z
dS)ÚASTMacroParameterFN)rÿrÚvariadicrWcCs||_||_||_dS)N)rÿrr=)rrÿrr=r‚r‚rƒr„îszASTMacroParameter.__init__)rµrWcCs,|jr
dS|jr||jƒdS||jƒSdS)Nz...)rr=rÿ)rrµr‚r‚rƒr·ôs
zASTMacroParameter._stringifyrr|)rŒrrŽr~rWcCsXt|ƒ|jr |tjddƒ7}n4|jr@t|ƒ}|tj||ƒ7}n|jj||||ddS)Nz...)r~)	r5rrr¼r=rŠr¤rÿr‘)rrŒrrŽr~r­r‚r‚rƒr‘üsz$ASTMacroParameter.describe_signature)FF)r‡rˆr‰rªrer„r)rŠr·rr‘r‚r‚r‚rƒr<ís
r<c@sneZdZeeeddœdd„Zeedœdd„ƒZe	e
de
d	œd
d„Zee
dœd
d„Z
ee
ddddœdd„ZdS)rCN)rÀrrWcCs||_||_dS)N)rÀr)rrÀrr‚r‚rƒr„	szASTMacro.__init__)rWcCs|jS)N)rÀ)rr‚r‚rƒr­
sz
ASTMacro.namer|)r®rr~rWcCs|jƒj|ƒS)N)r9r´)rr®rr~r‚r‚rƒr´szASTMacro.get_id)rµrWcCspg}|j||jƒƒ|jdk	rf|jdƒd}x.|jD]$}|sF|jdƒd}|j||ƒƒq4W|jdƒdj|ƒS)NrÖTz, Fr×rž)rærÀrr³)rrµr¶r¾rÿr‚r‚rƒr·s



zASTMacro._stringifyr)rŒrrŽr~rWcCsvt|ƒ|jj||||ƒ|jdkr(dStjƒ}x8|jD].}tjdddd}|j|d||d||7}q8W||7}dS)NržT)r	r¸)r~)r5rÀr‘rrrr)rrŒrrŽr~r
rÿr¸r‚r‚rƒr‘"s
zASTMacro.describe_signature)r‡rˆr‰rªrr<r„rÁr­rSrŠr´r)r·rr‘r‚r‚r‚rƒrCsc@sVeZdZeddœdd„Zeededœdd„Zeed	œd
d„Z	e
edddd
œdd„ZdS)r=N)r­rWcCs
||_dS)N)r­)rr­r‚r‚rƒr„1szASTStruct.__init__r|)r®rr~rWcCs|jƒj|ƒS)N)r9r´)rr®rr~r‚r‚rƒr´4szASTStruct.get_id)rµrWcCs
||jƒS)N)r­)rrµr‚r‚rƒr·7szASTStruct._stringifyr)rŒrrŽr~rWcCs t|ƒ|jj||||ddS)N)r~)r5r­r‘)rrŒrrŽr~r‚r‚rƒr‘:szASTStruct.describe_signature)r‡rˆr‰rªr„rSrŠr´r)r·rr‘r‚r‚r‚rƒr=0s
c@sVeZdZeddœdd„Zeededœdd„Zeed	œd
d„Z	e
edddd
œdd„ZdS)r>N)r­rWcCs
||_dS)N)r­)rr­r‚r‚rƒr„AszASTUnion.__init__r|)r®rr~rWcCs|jƒj|ƒS)N)r9r´)rr®rr~r‚r‚rƒr´DszASTUnion.get_id)rµrWcCs
||jƒS)N)r­)rrµr‚r‚rƒr·GszASTUnion._stringifyr)rŒrrŽr~rWcCs t|ƒ|jj||||ddS)N)r~)r5r­r‘)rrŒrrŽr~r‚r‚rƒr‘JszASTUnion.describe_signature)r‡rˆr‰rªr„rSrŠr´r)r·rr‘r‚r‚r‚rƒr>@s
c@sVeZdZeddœdd„Zeededœdd„Zeed	œd
d„Z	e
edddd
œdd„ZdS)r?N)r­rWcCs
||_dS)N)r­)rr­r‚r‚rƒr„QszASTEnum.__init__r|)r®rr~rWcCs|jƒj|ƒS)N)r9r´)rr®rr~r‚r‚rƒr´TszASTEnum.get_id)rµrWcCs
||jƒS)N)r­)rrµr‚r‚rƒr·WszASTEnum._stringifyr)rŒrrŽr~rWcCs t|ƒ|jj||||ddS)N)r~)r5r­r‘)rrŒrrŽr~r‚r‚rƒr‘ZszASTEnum.describe_signature)r‡rˆr‰rªr„rSrŠr´r)r·rr‘r‚r‚r‚rƒr?Ps
c@sXeZdZeeddœdd„Zeededœdd„Ze	ed	œd
d„Z
eedddd
œdd„ZdS)r@N)r­r;rWcCs||_||_dS)N)r­r;)rr­r;r‚r‚rƒr„aszASTEnumerator.__init__r|)r®rr~rWcCs|jƒj|ƒS)N)r9r´)rr®rr~r‚r‚rƒr´eszASTEnumerator.get_id)rµrWcCs4g}|j||jƒƒ|jr*|j||jƒƒdj|ƒS)Nrž)rær­r;r³)rrµr¶r‚r‚rƒr·hs
zASTEnumerator._stringifyr)rŒrrŽr~rWcCs6t|ƒ|jj||||ƒ|jr2|jj|d||ƒdS)Nr)r5r­r‘r;)rrŒrrŽr~r‚r‚rƒr‘osz ASTEnumerator.describe_signature)
r‡rˆr‰rªr4r„rSrŠr´r)r·rr‘r‚r‚r‚rƒr@`s
c@sªeZdZdeeeeefeddœdd„Zddœdd„Z	e
edœd	d
„ƒZe
e
edœdd„ƒZdeeedœdd„Zedœdd„Zeedœdd„Zeededdœdd„ZdS)r}FN)rÚ
directiveTyperÚ	semicolonrWcCs(||_||_||_||_d|_d|_dS)N)rr>rr?r~ÚenumeratorScopedSymbol)rrr>rr?r‚r‚rƒr„xszASTDeclaration.__init__)rWcCst|j|j|jjƒ|jƒS)N)r}rr>rÚcloner?)rr‚r‚rƒrA„s
zASTDeclaration.clonecCstt|jƒ}|jS)N)rÚDeclarationTyperr­)rr8r‚r‚rƒr­ˆszASTDeclaration.namecCs |jdkrdStt|jƒ}|jS)NÚfunction)rrrArr)rr8r‚r‚rƒrs
zASTDeclaration.function_paramsT)r®rrWcCsL|jdkr |jr |jjj||ƒS|jj||j|jƒ}|rDt||S|SdS)NÚ
enumerator)rr@rr´r~Ú
_id_prefix)rr®rÚid_r‚r‚rƒr´”szASTDeclaration.get_idcCs|jtdƒS)NT)r´Ú_max_id)rr‚r‚rƒÚ
get_newest_idszASTDeclaration.get_newest_id)rµrWcCs||jƒ}|jr|d7}|S)Nú;)rr?)rrµr¶r‚r‚rƒr· s
zASTDeclaration._stringifyr)rŒrrŽÚoptionsrWcCs~t|ƒ|jst‚d|d<tjƒ}d|_|jj|d<||7}|jdkrLn|jdkrXnö|jdkrdnê|jdkrŒ|tjddƒ7}|tj	ƒ7}nÂ|jd	kr´|tjd	d	ƒ7}|tj	ƒ7}nš|jd
krÜ|tjd
d
ƒ7}|tj	ƒ7}nr|jdkr|tjddƒ7}|tj	ƒ7}nH|jdkrDt
t|jƒ}|j
ƒ}|tj||ƒ7}|tj	ƒ7}n
d
sNt‚|jj||||jƒ|jrz|tjddƒ7}dS)NTZis_multilineZ
declaratorZ
add_permalinkÚmemberrCÚmacror\r_rLrDr–FrI)r5r~r€rZdesc_signature_lineZsphinx_line_typeÚisRedeclarationrrÈrìrrArr:r‘r?r¼)rrŒrrŽrJZmainDeclNoder8r›r‚r‚rƒr‘¦sD







z!ASTDeclaration.describe_signature)F)T)r‡rˆr‰rŠrrBrþrer„rArÁrªr­rrrSr´rHr)r·rrr‘r‚r‚r‚rƒr}ws 
	r}c@s$eZdZeddeddœdd„ZdS)ÚSymbolLookupResultr|N)ÚsymbolsÚparentSymbolrÀrWcCs||_||_||_dS)N)rOrPrÀ)rrOrPrÀr‚r‚rƒr„ÒszSymbolLookupResult.__init__)r‡rˆr‰rr’r„r‚r‚r‚rƒrNÑsrNc@s6eZdZeeeefddœdd„Zedœdd„ZdS)Ú	LookupKeyN)rËrWcCs
||_dS)N)rË)rrËr‚r‚rƒr„ÚszLookupKey.__init__)rWcCsdjdjdd„|jDƒƒƒS)Nz[{}]z, css|]\}}dj||ƒVqdS)z({}, {})N)Úformat)r°rÀrFr‚r‚rƒr²Þsz$LookupKey.__str__.<locals>.<genexpr>)rRr³rË)rr‚r‚rƒr†ÝszLookupKey.__str__)	r‡rˆr‰rr	r’rŠr„r†r‚r‚r‚rƒrQÙsrQcseZdZdZdZdZdZdd„Zdd„Ze	e
dd	œd
d„ƒZddœd
d„Ze
e
ddœ‡fdd„Zdeee
eddœdd„Zee
eddœdd„Zddœdd„Zddœdd„Ze
ddœdd„Zeddœdd „Zeeddœd!d"„ƒZeeddœd#d$„ƒZd%dœd&d'„Zedœd(d)„Zeeedd*œd+d,„Z eeeeedd-œd.d/„Z!ee"degdfe
eeee#d0œd1d2„Z$eee
edd3œd4d5„Z%de&e
d6dd7œd8d9„Z'edd:œd;d<„Z(ee
eddœd=d>„Z)eeeedd-œd?d@„Z*d%ddAœdBdC„Z+ee
eeddDœdEdF„Z,ee
dGœdHdI„Z-ee
dGœdJdK„Z.‡Z/S)Lr|rz  FcCsdst‚dS)NF)r€)rr‚r‚rƒÚ__copy__èszSymbol.__copy__cCs$|jrds t‚ntdddddƒSdS)NF)rr€r|)rÚmemor‚r‚rƒÚ__deepcopy__ës
zSymbol.__deepcopy__N)rrWcGs ttjtjddt|ŽdS)Nrž)Úend)Úprintr|Údebug_indent_stringÚdebug_indent)rr‚r‚rƒÚdebug_printòszSymbol.debug_print)rWcCs4|js |jst‚|js0t‚n|jr0|js0t‚dS)N)rrr€Údocname)rr‚r‚rƒÚ_assert_invariants÷s
zSymbol._assert_invariants)ÚkeyrÅrWcs$|dkrds t‚ntƒj||ƒSdS)NÚchildrenF)r€ÚsuperÚ__setattr__)rr]rÅ)Ú	__class__r‚rƒr`s
zSymbol.__setattr__)rrÀrr[ÚlinerWcCsr||_d|_d|_||_||_||_||_d|_|jƒg|_	g|_
|jrX|jj	j|ƒ|jrf||j_|j
ƒdS)NF)rÚsiblingAboveÚsiblingBelowrÀrr[rbrMr\Ú	_childrenZ
_anonChildrenrær~Ú_add_function_params)rrrÀrr[rbr‚r‚rƒr„s zSymbol.__init__)rr[rbrWcCs„|jƒ|jdkst‚|jdks$t‚|jdks2t‚|dk	s>t‚|dk	sJt‚|dk	sVt‚||_||j_||_||_|jƒ|jƒdS)N)r\rr€r[rbr~rf)rrr[rbr‚r‚rƒÚ_fill_emptyszSymbol._fill_emptycCsºtjrtjd7_tjdƒ|jdk	r¢|jjdk	r¢xl|jjD]`}|jdkrNq>|jj}|dkr`q>tdd|ƒ}|j	sxt
‚t|jƒdksŠt
‚|j
|||j|jƒq>Wtjr¶tjd8_dS)Nrzz_add_function_params:Ú
functionParam)r|Údebug_lookuprYrZrrrÿr­r}r¬r€r”r«Ú_add_symbolsr[rb)rrçÚnnr8r‚r‚rƒrf/s 

zSymbol._add_function_paramscCs6|jdkrdS||jjkst‚|jjj|ƒd|_dS)N)rrer€Úremove)rr‚r‚rƒrlFs

z
Symbol.remove)r[rWcCstxn|jD]d}|j|ƒ|jr|j|krd|_d|_d|_|jdk	rL|j|j_|jdk	r`|j|j_d|_d|_qWdS)N)reÚ	clear_docrr[rbrcrd)rr[ÚsChildr‚r‚rƒrmMs




zSymbol.clear_docccs(|Vx|jD]}|jƒEdHqWdS)N)reÚget_all_symbols)rrnr‚r‚rƒro[szSymbol.get_all_symbolsccs|jEdHdS)N)re)rr‚r‚rƒr^`szSymbol.childrenccs2x,|jD]"}|V|jjƒsq|jEdHqWdS)N)rerÀr™Úchildren_recurse_anon)rrŸr‚r‚rƒrpds

zSymbol.children_recurse_anonrQcCsxg}|}x|jr"|j|ƒ|j}q
W|jƒg}x>|D]6}|jdk	r\|j|j|jjƒfƒq6|j|jdfƒq6Wt|ƒS)N)rræÚreverserrÀrHrQ)rrOÚsr]r‚r‚rƒr¥ls



zSymbol.get_lookup_keycCsVg}|}x|jr"|j|ƒ|j}q
W|jƒg}x|D]}|j|jƒq6Wt|ddS)NF)r¬)rrærqrÀrª)rrOrrr«r‚r‚rƒr9€s


zSymbol.get_full_nested_name)rÀÚ	matchSelfÚ
recurseInAnonrWcCsDtjrtjdƒ|j|||dd}yt|ƒStk
r>dSXdS)Nz_find_first_named_symbol ->F)ÚsearchInSiblings)r|rirZÚ_find_named_symbolsr+Ú
StopIteration)rrÀrsrtr¶r‚r‚rƒÚ_find_first_named_symbolŒs

zSymbol._find_first_named_symbol)rÀrsrtrurWc#s<tjr~tjd7_tjdƒtjd7_tjdƒtˆjtjdƒddtjd|ƒtjdˆƒtjdˆƒtjd	|ƒtddœ‡‡‡fdd
„}xˆ|ƒD]~}tjrÌtjdƒt|jtjdƒdd|j|kr tjrtjd7_tjdƒtjd8_|Vtjr tjd7_q Wtjr8tjd8_dS)Nrzz_find_named_symbols:zself:rž)rVzident:            zmatchSelf:        zrecurseInAnon:    zsearchInSiblings: r|)rWc3s˜ˆ}tjr,tjdƒt|jtjdƒddxfˆr8|VˆrJ|jEdHn|jEdH|jdkrbP|j}tjr.tjdƒt|jtjdƒddq.WdS)Nzsearching in self:rzrž)rVzsearching in sibling:)	r|rirZrWÚ	to_stringrYrprerc)rr)rsrtrr‚rƒÚ
candidates§s 


z.Symbol._find_named_symbols.<locals>.candidatesz
candidate:Úmatcheséé)r|NN)r|rirYrZrWryrrÀ)rrÀrsrtrurzrrr‚)rsrtrrƒrv˜s2




zSymbol._find_named_symbols)rýÚonMissingQualifiedSymbolÚancestorLookupTypersrtrurWc
CsâtjrŠtjd7_tjdƒtjd7_tjdƒt|jtjdƒddtjd|ƒtjd|ƒtjd|ƒtjd	|ƒtjd
|ƒ|j}|}|jr¬x|jrª|j}qœW|dk	râ|d}	x$|jrà|j	|	|||drØP|j}q¾Wtjrtjd
ƒt|jtjdƒddxf|dd…D]V}
|j
|
||d}|dkrf|||
ƒ}|dkrftjrbtjd8_dSd}|}qWtjržtjdƒt|jtjdƒdd|d}
|j|
|||d}tjrÖt|ƒ}tjd8_t
|||
ƒS)Nrzz_symbol_lookup:zself:rž)rVznestedName:        zancestorLookupType:zmatchSelf:         zrecurseInAnon:     zsearchInSiblings:  r)rsrtruzstarting point:)rsrtr}Fzhandle last name from:rºrº)r|rirYrZrWryr«r¬rÚfind_identifierrxrvÚlistrN)
rrýr~rrsrtrur«rPZ	firstNamerÀr~rOr‚r‚rƒÚ_symbol_lookupÊsf









zSymbol._symbol_lookup)rýrr[rbrWcs’tjrVtjd7_tjdƒtjd7_tjd|ƒtjdˆƒtjdjˆˆƒƒdtddœdd	„}|j||dd
d
d
d‰ˆdk	sŠt‚tˆj	ƒ}t
|ƒdkr*tjrútjd
ƒtjd7_tjdˆjƒtjdˆƒtjdjˆˆƒƒtjd8_tˆjˆjˆˆˆd}tjr&tjd8_|Stjrhtjdƒtjd7_tjdt
|ƒƒtjd8_ˆs–tjrŽtjdƒtjd8_|dSg}g}	g}
xD|D]<}|j
dkrÄ|j|ƒn|jrØ|
j|ƒn
|	j|ƒq¨Wtjr tjdt
|ƒƒtjdt
|	ƒƒtjdt
|
ƒƒddœ‡‡‡‡fdd„}t
|	ƒdkrLd}
n¦|ƒ}
ddddœ‡fdd„}ˆjdkr”t
|	ƒdks†t‚||	d|
ƒˆjƒ}tjr°tjd |ƒx@|	D]8}|j
jƒ}tjrØtjd!|ƒ||kr¶|||
ƒq¶Wt
|ƒdkr<tjr&tjd"|
dk	ƒtjd8_|
dk	r4|
S|ƒSnRtjrbtjd#|
dk	ƒtjd8_|
dk	rt|
jƒ|d}|jˆˆˆƒ|SdS)$Nrzz
_add_symbols:z
nn:       z
decl:     zlocation: {}:{}r|)rPrÀrWcSsXtjrFtjd7_tjdƒtjd7_tjd|ƒtjd8_t||ddddS)Nrzz'_add_symbols, onMissingQualifiedSymbol:zident: r})rrÀrr[rb)r|rirYrZ)rPrÀr‚r‚rƒr~ s
z5Symbol._add_symbols.<locals>.onMissingQualifiedSymbolF)rrsrtrurz _add_symbols, result, no symbol:z
ident:       z
declaration: zlocation:    {}:{})rrÀrr[rbr}z_add_symbols, result, symbols:znumber symbols:zno declarationz
#noDecl:  z
#withDecl:z
#dupDecl: )rWcs:tjrtjdƒtˆjˆjˆˆˆd}tjr6tjdƒ|S)Nz begin: creating candidate symbol)rrÀrr[rbz end:   creating candidate symbol)r|rirZrPrÀ)r~)rr[rbÚlookupResultr‚rƒÚmakeCandSymbolgs


z+Symbol._add_symbols.<locals>.makeCandSymbol)r~Ú
candSymbolrWcsNtjr:tjd7_tjdƒtjd8_tjd8_d|_t|ˆƒ‚dS)NrzZ
redeclarationr}T)r|rirYrZrMr{)r~r…)rr‚rƒÚhandleDuplicateDeclarationws
z7Symbol._add_symbols.<locals>.handleDuplicateDeclarationrCzcandId:zoldId: z,no match, no empty, candSybmol is not None?:zAno match, but fill an empty declaration, candSybmol is not None?:)r|rirYrZrRr’r‚r€rrOr”rÀrPrrærMrrHrlrg)rrýrr[rbr~rOr~ZnoDeclZwithDeclZdupDeclrrr„r…r†ZcandIdZoldIdr‚)rr[rbrƒrƒrjs°















zSymbol._add_symbolsr)r•ÚdocnamesrŽrWcCstjrtjd7_tjdƒ|dk	s*t‚xÌ|jD]Â}|j|jddd}|dkrl|jj|ƒ||_	|j
ƒq2|jræ|j|kræ|js˜|j
|j|j|jƒnN|j|jkræt|jƒ}tdƒ}||j|j|jj|f}tj||j|jfdn|j|||ƒq2Wtjrtjd8_dS)Nrzzmerge_with:F)rÀrsrtzNDuplicate C declaration, also defined at %s:%s.
Declaration is '.. c:%s:: %s'.)Úlocation)r|rirYrZr€rerxrÀrærr\rr[rgrbrŠrr>ÚloggerÚwarningÚ
merge_with)rr•r‡rŽZ
otherChildZourChildr­Úmsgr‚r‚rƒr‹²s4


zSymbol.merge_with)rýrWcCsHtjrtjd7_tjdƒ|j|dddd}tjrDtjd8_|S)Nrzz	add_name:)rr[rb)r|rirYrZrj)rrýr¶r‚r‚rƒÚadd_nameÖs
zSymbol.add_namecCsptjrtjd7_tjdƒ|dk	s*t‚|dk	s6t‚|dk	sBt‚|j}|j||||ƒ}tjrltjd8_|S)Nrzzadd_declaration:)r|rirYrZr€r­rj)rrr[rbrýr¶r‚r‚rƒÚadd_declarationßs
zSymbol.add_declarationcCs*tjr‚tjd7_tjdƒtjd7_tjd|ƒtjd|ƒtjd|ƒtjd|ƒt|jtjdƒddtjd	8_|}xž|dk	r$tjrÖtjd	7_tjd
ƒt|jtjdƒddtjd	8_|rè|j|krè|S|rò|jn|j}x|D]}|j|krþ|SqþW|sP|j	}qˆWdS)Nrzzfind_identifier:zident:           zmatchSelf:       zrecurseInAnon:   zsearchInSiblings:rž)rVr}ztrying:)
r|rirYrZrWryrÀrprerc)rrÀrsrtruÚcurrentr^rrr‚r‚rƒr€ís6




zSymbol.find_identifier)r]rWcCsîtjr,tjd7_tjdƒtjd7_|}x¤|jD]š\}}d}x|jD]}|j|krL|}PqLW|}tjr²tjd|ƒtjd|ƒ|dk	r¨t|jtjdƒddn
tjdƒ|dkr8tjrÎtjd8_dSq8Wtjrêtjd8_|S)	Nrzzdirect_lookup:zname:          zid:            rž)rVz	not foundr})	r|rirYrZrËrerÀrWry)rr]rrr­rFr¶Zcandr‚r‚rƒÚ
direct_lookups2


zSymbol.direct_lookup)rýrîrsrtrWcCsˆtjrtjd7_tjdƒdtddœdd„}|j|||||dd}tjrZtjd8_|dkrfdSt|jƒ}t|ƒd	kr€dS|d	S)
Nrzzfind_declaration:r|)rPrÀrWcSsdS)Nr‚)rPrÀr‚r‚rƒr~/sz9Symbol.find_declaration.<locals>.onMissingQualifiedSymbolF)rrsrtrur)	r|rirYrZr’r‚rrOr”)rrýrîrsrtr~rƒrOr‚r‚rƒÚfind_declaration(s&

zSymbol.find_declaration)ÚindentrWcCs°tj|g}|js|jdƒnX|jr6|jt|jƒƒn|jt|jƒƒ|jrv|jdƒ|jrf|jdƒ|jt|jƒƒ|jrœ|jdƒ|j|jƒ|jdƒ|jdƒdj	|ƒS)Nz::z: z!!duplicate!! z	(r×Ú
rž)
r|rXrrærÀrŠrrMr[r³)rr’r¶r‚r‚rƒryCs"




zSymbol.to_stringcCs:|j|ƒg}x"|jD]}|j|j|dƒƒqWdj|ƒS)Nrzrž)ryrerær…r³)rr’r¶rŸr‚r‚rƒr…XszSymbol.dump)0r‡rˆr‰rYrXriÚdebug_show_treerSrUÚstaticmethodrrZr\rŠr`r’r}rSr„rgrfrlrmrrorÁr^rpr¥rªr9rerxrvrrNr‚rjrr‹rrŽr€rr‘ryr…Ú
__classcell__r‚r‚)rarƒr|âs`	0E #	
r|c@sÌeZdZeedœdd„ƒZedd„ƒZedd„ƒZedœdd	„Ze	dœd
d„Z
edœdd
„Zedœdd„Z
eeeeeeefdœdd„Zedœdd„Zedœdd„Zedœdd„Zedœdd„Zedœdd„Zedœdd„Zeedœd d!„Zedœd"d#„Zedœd$d%„Zedœd&d'„Zd_eee gefeed)œd*d+„Z!e"dœd,d-„Z#e$edœd.d/„Z%e&dœd0d1„Z'e(dœd2d3„Z)ee*d4œd5d6„Z+eee,d7œd8d9„Z-d`eee.d7œd:d;„Z/e0eefeee1d<œd=d>„Z2dae0eefeee1d<œd?d@„Z3dbeee4dBœdCdD„Z5dce0eefee6dEœdFdG„Z7e0eefee8dEœdHdI„Z9e:dœdJdK„Z;e<dœdLdM„Z=e>dœdNdO„Z?e@dœdPdQ„ZAeBdœdRdS„ZCeDdœdTdU„ZEeeeDdVœdWdX„ZFe"dœdYdZ„ZGe"dœd[d\„ZHe0ee6fdœd]d^„ZIdAS)dÚDefinitionParser)rWcCsdS)NÚCr‚)rr‚r‚rƒÚlanguage`szDefinitionParser.languagecCs|jjS)N)ÚconfigÚc_id_attributes)rr‚r‚rƒÚ
id_attributesdszDefinitionParser.id_attributescCs|jjS)N)ršÚc_paren_attributes)rr‚r‚rƒÚparen_attributeshsz!DefinitionParser.paren_attributescCs’|jdkrdS|j}|jd7_d}xZ|jr:|jdƒn6|jdkr\|r\|jd7_Pn|jdkrld}nd}|jd7_q(W|j||j…S)Nú"rzFz$Unexpected end during inside string.ú\T)Úcurrent_charÚposÚeofÚfailÚ
definition)rÚstartPosÚescaper‚r‚rƒÚ
_parse_stringls 

zDefinitionParser._parse_stringcCs4|jƒ|jdƒrtdƒS|jdƒr,tdƒS|j}|jtƒrZ|jtƒt|j||j…ƒSx<t	t
ttgD],}|j|ƒrh|jt
ƒt|j||j…ƒSqhW|jƒ}|dk	r°t|ƒS|jtƒr0|jjdƒ}|jjdƒ}y
t||ƒStk
r}z|jd|ƒWYdd}~Xn tk
r.|jdƒYnXdS)	NrÆTrÇFrzr}z8Can not handle character literal. Internal error was: %szJCan not handle character literal resulting in multiple decoded characters.)Úskip_wsÚ	skip_wordrÄr¢Úmatchr.r/rÊr¥r,r0r2r4r3r¨rÒr-Z
last_matchÚgrouprÌÚUnicodeDecodeErrorr¤r*)rr¢ÚregexÚstringr›rËr/r‚r‚rƒÚ_parse_literals6






zDefinitionParser._parse_literalcCsH|jdkrdS|jd7_|jƒ}|jƒ|jdƒs@|jdƒt|ƒS)NrÖrzr×z0Expected ')' in end of parenthesized expression.)r¡r¢Ú_parse_expressionr©Úskip_stringr¤rÔ)rr¶r‚r‚rƒÚ_parse_paren_expression¥s


z(DefinitionParser._parse_paren_expressioncCsL|jƒ|jƒ}|dk	r|S|jƒ}|dk	r0|S|jƒ}|dk	rHt|ƒSdS)N)r©r°r³Ú_parse_nested_namerÓ)rr¶rkr‚r‚rƒÚ_parse_primary_expression°sz*DefinitionParser._parse_primary_expression)r­ÚopenÚcloserWcCs¶|jƒ|j|ƒsdS|j|ƒr(gdfSg}d}x||jƒ|jƒ}|jƒ|j|ƒ|jƒ|j|ƒrhP|jdƒs„|jd||fƒ|j|kr2|dkr2|jd7_d}Pq2W||fS)NFr
z"Error in %s, expected ',' or '%s'.r3rzT)NN)r©Úskip_string_and_wsr²r±rær¤r¡r¢)rr­r¶r·rór1rÕr‚r‚rƒÚ_parse_initializer_listÀs,




z(DefinitionParser._parse_initializer_listcCs&|jdddƒ\}}|dkrdSt|ƒS)Nzparenthesized expression-listrÖr×)r¹rÚ)rrór1r‚r‚rƒÚ_parse_paren_expression_listÞs
z-DefinitionParser._parse_paren_expression_listcCs(|jdddƒ\}}|dkrdSt||ƒS)Nzbraced-init-listr2r3)r¹rÛ)rrór1r‚r‚rƒÚ_parse_braced_init_listësz(DefinitionParser._parse_braced_init_listcCsð|jƒ}g}xØ|jƒ|jdƒrT|jƒ}|jƒ|jdƒsD|jdƒ|jt|ƒƒq|jdƒr|jdƒrx|jd8_n|j	ƒ}|jt
|ƒƒq|jdƒr¨|jtƒƒq|jdƒrÀ|jtƒƒq|j
ƒ}|dk	rà|jt|ƒƒqPqWt||ƒS)	NrÞrßz*Expected ']' in end of postfix expression.z->rsr|z++z--)rµr©r¸r±r²r¤rærÝr¢r´rãràrârºrÙrä)rr›rårÕr­rÜr‚r‚rƒÚ_parse_postfix_expressionós:







z*DefinitionParser._parse_postfix_expressioncCsø|jƒxDtD]<}|ddkr*|j|ƒ}n
|j|ƒ}|r|jƒ}t||ƒSqW|jdƒr¢|jdƒr’|jdd}|jƒ|jdƒsŠ|j	dƒt
|ƒS|jƒ}t|ƒS|jd	ƒrð|jdƒsÀ|j	d
ƒ|jdd}|jƒ|jdƒsè|j	dƒt
|ƒS|jƒS)NrrêrZrÖF)Únamedr×zExpecting ')' to end 'sizeof'.rdzExpecting '(' after 'alignof'.zExpecting ')' to end 'alignof'.)r©Ú_expression_unary_opsrªr²Ú_parse_cast_expressionrèÚskip_word_and_wsr¸Ú_parse_typer¤ríÚ_parse_unary_expressionrïrðr¼)rrér¶rÕrîr‚r‚rƒrÂ	s4	










z(DefinitionParser._parse_unary_expressioncCsÚ|j}|jƒ|jdƒrÎy0|jdƒ}|jdƒs8|jdƒ|jƒ}t||ƒStk
rÊ}zf||_y|jƒStk
r¸}z4g}|j	|dfƒ|j	|dfƒ|j
|dƒ|‚WYdd}~XnXWYdd}~XqÖXn|jƒSdS)NrÖFr×z Expected ')' in cast expression.zIf type cast expressionzIf unary expressionzError in cast expression.)r¢r©r²rÁr¤r¿rñr'rÂræÚ_make_multi_error)rr¢rîrÕZexCastZexUnaryÚerrsr‚r‚rƒr¿E	s(




.z'DefinitionParser._parse_cast_expressioncs‡fdd„‰ˆ|dƒS)Nc	sˆdttƒkr$tdœ‡fdd„}ntdœ‡‡‡fdd„}g}g}|j|ƒƒx¶ˆjƒˆj}d}x˜tˆD]Œ}|ddkrŠˆj|ƒs–qlnˆj|ƒs–ql|d	kr¸ˆjd	kr¸ˆjd8_Py$|ƒ}|j|ƒ|j|ƒd
}PWqlt	k
rö|ˆ_YqlXqlW|sPPqPWt
||ƒS)Nrz)rWcsˆjƒS)N)r¿r‚)rr‚rƒÚparserk	szYDefinitionParser._parse_logical_or_expression.<locals>._parse_bin_op_expr.<locals>.parsercsˆˆˆdƒS)Nrzr‚r‚)Ú_parse_bin_op_exprÚopIdrr‚rƒrÅn	sFrÚabcnoxrnT)r”Ú_expression_bin_opsrÂrær©r¢rªr²r¡r'rò)	rrÇrÅrórôr¢ÚoneMorerérÕ)rÆ)rÇrrƒrÆi	s<



zIDefinitionParser._parse_logical_or_expression.<locals>._parse_bin_op_exprrr‚)rr‚)rÆrƒÚ_parse_logical_or_expression]	s%z-DefinitionParser._parse_logical_or_expression)Ú
orExprHeadrWcCsdS)Nr‚)rrÌr‚r‚rƒÚ"_parse_conditional_expression_tail	sz3DefinitionParser._parse_conditional_expression_tailcCsg}g}|jƒ}|j|ƒxjd}|jƒxRtD]J}|ddkrL|j|ƒsXq.n|j|ƒsXq.|jƒ}|j|ƒ|j|ƒd}q.W|sPqWt||ƒS)NFrrÈT)rËrær©Ú_expression_assignment_opsrªr²r÷)rrórôÚorExprrÊrérÕr‚r‚rƒÚ_parse_assignment_expression”	s(





z-DefinitionParser._parse_assignment_expressioncCs|jƒ}|S)N)rË)rrÏr‚r‚rƒÚ_parse_constant_expression²	sz+DefinitionParser._parse_constant_expressioncCs|jƒS)N)rÐ)rr‚r‚rƒr±¸	sz"DefinitionParser._parse_expressionT)rVrÅÚallowrWc
CsJ|j}y|ƒStk
rR}z*|s,|jr.‚|jd|ƒ||_WYdd}~XnX|dk	s`t‚|jƒ|j}|jtƒr€|j}n¾ddddœ}g}	xt|j	st
|	ƒdkr²|j|kr²P|j|jƒkrÒ|	j
||jƒn"t
|	ƒdkrô|j|	d	krô|	jƒ|jd7_q’Wt
|ƒdkr*|j	r*|jd|ƒ|j||j…jƒ}t|jƒƒS)
NzBParsing of expression failed. Using fallback parser. Error was:
%sr×r3rß)rÖr2rÞrrzz0Could not find end of expression starting at %d.rº)r¢r'ZallowFallbackExpressionParsingÚwarnr€r©r«Ú
_string_reÚmatched_textr£r”r¡ÚkeysræÚpopr¤r¥Ústriprø)
rrVrÅrÒZprevPosr/r¦rÅZbracketsrOr‚r‚rƒÚ_parse_expression_fallback¾	s:

z+DefinitionParser._parse_expression_fallbackcCsºg}|jƒd}|jdƒrd}x|jƒ|jtƒs<|jdƒ|j}|tkrX|jd|ƒ|j|jjkr†d
}|j||jt	|jjƒfƒt
|ƒ}|j|ƒ|jƒ|jdƒs Pq Wt||ƒS)NFr¯Tz#Expected identifier in nested name.z3Expected identifier in nested name, got keyword: %sz2Expected identifier, got user-defined keyword: %s.z< Remove it from c_extra_keywords to allow it as identifier.
z!Currently c_extra_keywords is %s.znExpected identifier, got user-defined keyword: %s. Remove it from c_extra_keywords to allow it as identifier.
zExpected identifier, got user-defined keyword: %s. Remove it from c_extra_keywords to allow it as identifier.
Currently c_extra_keywords is %s.)
r©r²r«r1r¤rÕÚ	_keywordsršÚc_extra_keywordsrŠr’rærª)rr«r¬r“rŒrÀr‚r‚rƒr´é	s.





z#DefinitionParser._parse_nested_namecCs<|jtƒr|jSx&dD]}||jjkr|j|ƒr|SqWdS)Nrerfrg)rerfrg)r«Ú_simple_type_specifiers_rerÕršrÛrª)rÚtr‚r‚rƒÚ_parse_simple_type_specifier
s


z-DefinitionParser._parse_simple_type_specifiercCsNg}|jƒx(|jƒ}|dkr P|j|ƒ|jƒqWt|ƒdkrFdSt|ƒS)Nr)r©rÞrær”rû)rr«rÝr‚r‚rƒÚ_parse_simple_type_specifiers
s
z.DefinitionParser._parse_simple_type_specifierscCsX|jƒ|jƒ}|dk	r|Sd}|jƒxdD]}|j|ƒr.|}Pq.W|jƒ}t||ƒS)Nr\rLr_)r\rLr_)r©rßrÀr´rü)rr¶r›Úkrýr‚r‚rƒÚ_parse_trailing_type_spec
s

z*DefinitionParser._parse_trailing_type_spec)Ú	paramModerWcCs|jƒ|jdƒs*|dkr&|jdƒndSg}|jƒ|jdƒsÖx”|jƒ|jdƒr‚|jtddƒƒ|jƒ|jdƒs€|jdƒP|jddd	}|jt|ƒƒ|jƒ|jd
ƒr´qBqB|jdƒrÂPqB|jd|jƒqBWg}x |jƒ}|dkrîP|j|ƒqÜWt||ƒS)NrÖrCzExpecting "(" in parameters.r×z...Tz'Expected ")" after "..." in parameters.Úsingle)rr½r
z-Expecting "," or ")" in parameters, got "%s".)	r©r²r¤rærþÚ_parse_type_with_initr¡Ú_parse_attributer)rrârrÿrrr‚r‚rƒÚ_parse_parameters1
sB






z"DefinitionParser._parse_parameters)rÚtypedrWcCsTd}d}d}d}d}d}g}	x |jƒ|s||dkrT|jdƒrDd}q |jdƒrTd}q |dkr||jdƒrld}q |jdƒr|d}q |dkrª|rª|jdƒršd}q |jd	ƒrªd	}q |dkrÈ|rÈ|jd
ƒ}|rÈq |râ|râ|jdƒ}|râq |oê|r|jdƒ}|rq |r |r |jd
ƒ}|r q |jƒ}
|
r:|	j|
ƒq Pq Wt|||||||	ƒS)zJust parse the simple ones.NrKrDrUrCr[rMrhrcrRrVrarG)rKrC)r©rªrårær)rrrçrrrRrVrarGrrr‚r‚rƒÚ_parse_decl_specs_simple]
sl











z)DefinitionParser._parse_decl_specs_simplecCsT|r|dkrtd|ƒ‚|j||ƒ}d}|rB|jƒ}|j||ƒ}nd}t||||ƒS)Nr–rKrCz#Internal error, unknown outer "%s".)r–rKrC)r§rèrár)rrrçrrrr‚r‚rƒÚ_parse_decl_specs—
sz"DefinitionParser._parse_decl_specs)r½rârçrWcsB|dkst‚|dkr†ˆjtƒr€ˆjtkr8ˆjdˆjƒˆjˆjjkrfd}ˆj|ˆjtˆjjƒfƒt	ˆjƒ}t
|gdd}q˜d}n|r”ˆjƒ}nd}g}x4ˆjƒ|o´ˆj
d	ƒrΈjƒd}d}	d}
d}xb|sæˆjd
ƒræd}qÒ|	sþˆjdƒrþd}	qÒ|
sˆjdƒrd}
qÒ|s.ˆjd
ƒr.d}qÒPqÒW|r>dnˆjdƒ}|rjˆj
dƒsdˆjdƒd}
nJˆj
dƒr|d}
n8‡fdd„}ˆjdg|ƒ}
ˆjƒˆj
dƒs´ˆjdƒ|jt||	|
|||
ƒƒq Pq Wˆj|ƒ}|dkr4t|ƒdkr4|r4|dkr4|r4ˆjƒˆj
dƒr4ˆjƒ}
t||
dSt|||dS)NTFrãz$Expected identifier, got keyword: %sz2Expected identifier, got user-defined keyword: %s.z< Remove it from c_extra_keywords to allow it as identifier.
z!Currently c_extra_keywords is %s.)r¬rÞr[rGrarVrsrßz&Expected ']' in end of array operator.csˆjƒS)N)r±r‚)rr‚rƒrÅâ
sz>DefinitionParser._parse_declarator_name_suffix.<locals>.parserrr–r))r&r )r&r'r¸)TFrãznExpected identifier, got user-defined keyword: %s. Remove it from c_extra_keywords to allow it as identifier.
zExpected identifier, got user-defined keyword: %s. Remove it from c_extra_keywords to allow it as identifier.
Currently c_extra_keywords is %s.)r€r«r1rÕrÚr¤ršrÛrŠr’rªr´r©r²rÀr¸rÙrærrær”rÑr(r%)rr½rârçrŒr“r&r'r[rGrarVrr rÅr¸r‚)rrƒÚ_parse_declarator_name_suffix¥
s„









z.DefinitionParser._parse_declarator_name_suffixc*Cs^|dkrtd|ƒ‚g}|jƒ|rÆ|jdƒrÆ|jƒd}d}d}g}x^|s\|jdƒ}|r\qH|sp|jdƒ}|rpqH|s„|jdƒ}|r„qH|jƒ}	|	dk	r |j|	ƒqHPqHW|j|||ƒ}
t|
||||d	S|oÒ|jd
krú|j	}y|j
|||ƒ}|Stk
rø}
zìd}|dkr|d7}|j|
|fƒ||_	yZ|jd
ks>t‚|jd
ƒ|j|||ƒ}|jd
ƒsl|j
dƒ|jdd|d}
t||
dStk
ræ}zB||_	d}|dkr¶|d7}|j||fƒd}|j||ƒ|‚WYdd}~XnXWYdd}
~
XnX|j	}y|j
|||ƒStk
rX}z,||_	|j|dfƒd}|j||ƒ|‚WYdd}~XnXdS)Nr–rCz'Internal error, unknown paramMode '%s'.rsFrVrarG)r+rVrarGrrÖz If declarator-id with parametersz (e.g., 'void f(int arg)')r×z$Expected ')' in "( ptr-declarator )")r½rârç)r.r+z"If parenthesis in noptr-declaratorz% (e.g., 'void (*f(int arg))(double)')zError in declaratorzIf declarator-idz!Error in declarator or parameters)r–rC)r§r©r²rÀråræÚ_parse_declaratorr*r¡r¢rêr'r€r¤r-rÃ)rr½rârçÚ
prevErrorsrVrarGrrr+r¢r¶ZexParamQualrŒr.ZexNoPtrParenÚheaderr/r‚r‚rƒrëö
sŽ








2z"DefinitionParser._parse_declaratorN)rÚ
allowFallbackrWcs¨ˆjƒ|dkr0dr0ˆjƒ}|dk	r0t|ddSˆjdƒs>dSˆjƒ}|dk	rVt|ƒS|dkrdg}n |dkrvddg}nˆjd|ƒ‡fdd	„}ˆj|||d
}t|ƒS)NrKF)r5ryr
r×z;Internal error, initializer for outer '%s' not implemented.csˆjƒS)N)rÐr‚)rr‚rƒrÅ^sz3DefinitionParser._parse_initializer.<locals>.parser)rÒ)r©r»r4r²r¤rÙ)rrrîZ
bracedInitZfallbackEndrÅrÅr‚)rrƒÚ_parse_initializerGs&

z#DefinitionParser._parse_initializer)r½rrWcCst|r |dkrtd|ƒ‚|s t‚|dkrg}|j}y.|j|dd}|jd|dd}|jdd	Wn²tk
r}z”d
}|j||fƒ||_y|j|d}|jd|d}WnVtk
r}	z8||_d
}|j|	|fƒd}
|
d7}
|j||
ƒ|	‚WYdd}	~	XnXWYdd}~XnXnR|dkr>|j|d}|jd|d}n,d}|dkrPd}|j|d}|j||d}t	||ƒS)z¤
        named=False|'single'|True: 'single' is e.g., for function objects which
        doesn't need to name the arguments, but otherwise is a single name
        r–rKrCz#Internal error, unknown outer "%s".F)rrçT)r½rârç)ZallowSemicolonzIf just a name)r)r½râzIf typedef-like declarationz%Type must be either just a name or a ztypedef-like declaration.N)r–rKrC)
r§r€r¢rérëÚ
assert_endr'rærÃrA)rr½rrìr¦r7r8Z	exUntypedÚdescZexTypedrírâr‚r‚rƒrÁdsF
4

zDefinitionParser._parse_typecCs4|r|dkst‚|j||d}|j|d}t||ƒS)Nr–rKrC)rr½)r)r–rKrC)r€rÁrïrB)rr½rr–r;r‚r‚rƒräŸs
z&DefinitionParser._parse_type_with_initcCsL|jƒ|jƒ}|dkr"|jdƒ|jƒ|jdƒs>t|dƒS|jdƒrRt|gƒSg}xê|jƒ|jdƒr˜|jtddƒƒ|jƒ|jdƒs–|jdƒP|jt	ƒs¬|jdƒt
t|jƒgdd	}|jƒ|jdƒr|jt|ddƒƒ|jƒ|jdƒs|jdƒP|jt|ƒƒ|jd
ƒr$qXqX|jdƒr4PqX|jdƒqXWt||ƒS)Nz(Expected identifier in macro definition.rÖr×z...Tz-Expected ")" after "..." in macro parameters.z(Expected identifier in macro parameters.F)r¬r
z9Expected identifier, ')', or ',' in macro parameter list.)
r©r´r¤r¸rCr²rær<r«r1rªr’rÕ)rrÀrrkr‚r‚rƒÚ_parse_macro¦sF










zDefinitionParser._parse_macrocCs|jƒ}t|ƒS)N)r´r=)rr­r‚r‚rƒÚ
_parse_structÎszDefinitionParser._parse_structcCs|jƒ}t|ƒS)N)r´r>)rr­r‚r‚rƒÚ_parse_unionÒszDefinitionParser._parse_unioncCs|jƒ}t|ƒS)N)r´r?)rr­r‚r‚rƒÚ_parse_enumÖszDefinitionParser._parse_enumcsVˆjƒ}ˆjƒd}ˆjdƒrLˆjƒtdœ‡fdd„}ˆjg|ƒ}t|ƒ}t||ƒS)Nry)rWcsˆjƒS)N)rÑr‚)rr‚rƒrÅász2DefinitionParser._parse_enumerator.<locals>.parser)r´r©r²rÂrÙr4r@)rr­r;rÅZinitValr‚)rrƒÚ_parse_enumeratorÚs
z"DefinitionParser._parse_enumeratorcCsl|jƒd}|jdƒr$d}|jƒ}n:|jdƒr<d}|jƒ}n"|jdƒrTd}|jƒ}n
|jdƒt|||dƒS)Nr\r_rLzTCould not parse pre-v3 type directive. Must start with 'struct', 'union', or 'enum'.F)r©rªrórôrõr¤r})rrrîr‚r‚rƒÚparse_pre_v3_type_definitionès






z-DefinitionParser.parse_pre_v3_type_definition)rr>rWc
Cs|dkrtd	|ƒ‚|dkr(td|ƒ‚d}|dkrD|jddd
}n’|dkr\|jddd
}nz|dkrn|jƒ}nh|dkr€|jƒ}nV|dkr’|jƒ}nD|dkr¤|jƒ}n2|dkr¶|jƒ}n |dkrÎ|jddd
}ndsÖt‚|dkrô|j	ƒ|j
dƒ}nd}t||||ƒS)NrCrKrLr\r_rLrDr–z(Internal error, unknown objectType "%s".Úvarz+Internal error, unknown directiveType "%s".T)r½rFrI)rCrKrLr\r_rLrDr–)	rCrKrørLr\r_rLrDr–)r§rärÁròrórôrõrör€r©r²r})rrr>rr?r‚r‚rƒÚparse_declarationùs:





z"DefinitionParser.parse_declarationcCs|jƒS)N)r´)rr‚r‚rƒÚparse_namespace_objectsz'DefinitionParser.parse_namespace_objectcCs&|jƒ}|jƒ|jdƒ|jƒ|S)Nz())r´r©r²rð)rr­r‚r‚rƒÚparse_xref_objects

z"DefinitionParser.parse_xref_objectcCsÈ|j}d}y|jƒ}|jƒ|jƒWnœtk
rÂ}z€||_y|jdƒ}|jƒ|jƒWnTtk
r°}z8d}g}|j|dfƒ|j|dfƒ|j||ƒ|‚WYdd}~XnXWYdd}~XnX|S)NFz%Error when parsing (type) expression.z
If expressionzIf type)r¢r±r©rðr'rÁrærÃ)rr¢r¶ZexExprZexTyperírÄr‚r‚rƒÚparse_expression&s&
2z!DefinitionParser.parse_expression)T)T)T)NT)N)Jr‡rˆr‰rÁrŠr™rœržr¨rÃr°rÂr³rµr	rrer¹rÚrºrÛr»rär¼rÂr¿rËrrÍrÐrÑr±rrÙrªr´rrÞrûrßrúrárrærrèrrérr#rêrër4rïrArÁrBrärCròr=rór>rôr?rõr@rör}r÷rùrúrûrür‚r‚r‚rƒr—_sZ&
,&3	"(	,:PP;("r—)rWcCsttdƒgddS)NZPhonyNameDueToErrorF)r¬)rªr’r‚r‚r‚rƒÚ_make_phony_error_name<srýcseZdZUdZdejiZeeddœdd„Z	ee
eddœdd	„Ze
e
d
œdd„ƒZe
e
d
œd
d„ƒZe
e
dœdd„Zeedœdd„Zeedœdd„Zeeeddœdd„Zeed
œ‡fdd„Ze
eedœdd„Zdd
œdd „Zdd
œd!d"„Ze
e
dœd#d$„Z‡ZS)%ÚCObjectz-
    Description of a C language object.
    ÚnoindexentryN)ÚastrWcCsÎ|jdkst‚|j}|st‚|jdk	s*t‚|j}|s8t‚|jdkrFdS|j}|dkrXdS|jdkrfdS|jdkrtdS|j}|j|jdddd}|dk	ršdS|jjƒ}||_	t
||j||jj|j
ƒdddS)NrDrLFT)rsrtrurz)rrÀrr[rb)rr€r~rÀrrr>r€rAr@r|rŽr[Úget_source_info)rrr~rPZ
parentDeclZtargetSymbolrrZ	declCloner‚r‚rƒÚ_add_enumerator_to_parentIs2



z!CObject._add_enumerator_to_parent)rÚsigrŒrWc
Cs&g}xRtdtdƒD]@}y|j|d}|j|ƒWqtk
rR|tksNt‚YqXqWtt|ƒƒ}|d}|stt‚|jj	ƒj
ƒjdƒ}||jj
jkrò|sžt‚|dj|ƒx6|dd…D]&}|sÄqº||jj
jkrº|dj|ƒqºW|jj
j|ƒd|jkr"|j|ƒ}	|jdjd|	|d	dfƒdS)
Nrz)r®rr¯ÚidsrÿÚentriesrãrž)r»rGr´rær(r€rÚreversedr~r9ršÚlstripÚstateÚdocumentrZnote_explicit_targetrJÚget_index_textZ	indexnode)
rrrrŒrr½ÚidÚnewestIdr­Z	indexTextr‚r‚rƒÚadd_target_and_indexns.
zCObject.add_target_and_index)rWcCs
tƒ‚dS)N)r)rr‚r‚rƒÚobject_typeŽszCObject.object_typecCs|jS)N)r)rr‚r‚rƒÚdisplay_object_type’szCObject.display_object_type)r­rWcCstdƒ||jfS)Nz	%s (C %s))rr)rr­r‚r‚rƒr
–szCObject.get_index_text)rÅrWcCs|j|j|jƒS)N)rùrÚobjtype)rrÅr‚r‚rƒÚparse_definition™szCObject.parse_definitioncCs|jƒS)N)r÷)rrÅr‚r‚rƒr÷œsz$CObject.parse_pre_v3_type_definition)rŒrrJrWcCs|j|d|j|ƒdS)Nr¢)r‘rŽ)rrŒrrJr‚r‚rƒr‘ŸszCObject.describe_signaturecsP|jjjj}d|jkr<|jdd}||jd<|jƒ|jd<d|jd<tƒj	ƒS)Nzc:parent_symbolrŸÚroot_symbolzc:parent_keyz
c:last_symbol)
rr	ÚsettingsrŽÚ	temp_dataÚ
domaindatar¥Úref_contextr_Úrun)rrŽÚroot)rar‚rƒr£s


zCObject.run)rrŒrWc,CsN|jjd}t|||jjd}yÄy|j|ƒ}|jƒWn¨tk
rÞ}zŒ|jjdsV‚|jdkrb‚y|j|ƒ}|jƒWntk
r|‚YnX|j	|_
|jjdrÎd}|jtj
||j	||ƒ}tj||dWYdd}~XnXWnTtk
r6}z6tj||dtƒ}	|j|	ƒ}
|
|jjd<t|‚WYdd}~XnXy€|j||jj|jƒd	d
}
|
jdksft‚|
jdksvt‚|jjd|
_|
jdk	rª|
jjdks¢t‚|
|
j_|
|jjd<Wnbtk
r}zD|j|jjd<tdƒ}||jj|jj|j|f}tj||dWYdd}~XnX|j	dkr2|j|ƒt|j ƒ}|j!|||ƒ|S)
Nzc:parent_symbol)rˆršÚc_allow_pre_v3r–Úc_warn_on_allowed_pre_v3zl{}: Pre-v3 C type directive '.. c:type:: {}' converted to '.. c:{}:: {}'.
The original parsing error was:
{})rˆz
c:last_symbolrz)r[rbzNDuplicate C declaration, also defined at %s:%s.
Declaration is '.. c:%s:: %s'.rD)"rŽrr—ršrrðr'rr÷rrrRrr‡r‰rŠrýrÚ
ValueErrorrŽr[rrcr€rdr{r~rrbrrÚdictrJr‘)rrrŒrPrÅrÚeOrigrŒr/r­r~rJr‚r‚rƒÚhandle_signature°s`



$
 

zCObject.handle_signaturecCsP|jjd}|st‚|jjd|_|jjd|_||jjd<|jƒ|jjd<dS)Nz
c:last_symbolzc:parent_symbolzc:parent_key)rŽrr€ÚoldParentSymbolrÚoldParentKeyr¥)rZ
lastSymbolr‚r‚rƒÚbefore_contentðszCObject.before_contentcCs |j|jjd<|j|jjd<dS)Nzc:parent_symbolzc:parent_key)rrŽrr r)rr‚r‚rƒÚ
after_contentøszCObject.after_contentcCsd|S)zªGenerate old styled node_id for C objects.

        .. note:: Old Styled node_id was used until Sphinx-3.0.
                  This will be removed in Sphinx-5.0.
        zc.r‚)rr­r‚r‚rƒÚmake_old_idüszCObject.make_old_id)r‡rˆr‰Ú__doc__rÚflagÚoption_specr;r}rrŠrr
rÁrrr
r—rr÷rr‘rrrrr!r"r#r–r‚r‚)rarƒrþ@s&
%
@rþc@s"eZdZdZeedœdd„ƒZdS)Ú
CMemberObjectrK)rWcCs|jdkst‚|jS)NrKrø)rKrø)rr€)rr‚r‚rƒr
sz!CMemberObject.display_object_typeN)r‡rˆr‰rrÁrŠrr‚r‚r‚rƒr'
sr'Ú	parameterZ
Parametersr¸rÿÚargumentrÕr–)Úlabelr«ZtyperolenameZ	typenamesÚretvalz
Return valuesÚretvalsT)r*r«Zcan_collapseZreturnvalueZReturnsFÚreturns)r*Úhas_argr«Z
returntypezReturn typeÚrtypec@seZdZdZejƒZdS)ÚCFunctionObjectrCN)r‡rˆr‰rÚ_function_doc_field_typesÚcopyÚdoc_field_typesr‚r‚r‚rƒr0
sr0c@seZdZdZejƒZdS)ÚCMacroObjectrLN)r‡rˆr‰rr1r2r3r‚r‚r‚rƒr4#
sr4c@seZdZdZdS)Ú
CStructObjectr\N)r‡rˆr‰rr‚r‚r‚rƒr5)
sr5c@seZdZdZdS)ÚCUnionObjectr_N)r‡rˆr‰rr‚r‚r‚rƒr6-
sr6c@seZdZdZdS)ÚCEnumObjectrLN)r‡rˆr‰rr‚r‚r‚rƒr71
sr7c@seZdZdZdS)ÚCEnumeratorObjectrDN)r‡rˆr‰rr‚r‚r‚rƒr85
sr8c@seZdZdZdS)ÚCTypeObjectr–N)r‡rˆr‰rr‚r‚r‚rƒr99
sr9c@s<eZdZUdZdZdZdZdZiZe	e
edœdd„Zd	S)
ÚCNamespaceObjectzb
    This directive is just to tell Sphinx that we're documenting stuff in
    namespace foo.
    FrzrT)rWcCsÔ|jjdd}|jdjƒdkr,|}g}n|t|jd|jƒ|jjd}y|jƒ}|jƒWn:t	k
r–}zt
j||jƒdtƒ}WYdd}~XnX|j
|ƒ}|g}||jjd	<||jjd
<|jƒ|jjd<gS)
NrŸrrÚNULLÚ0Únullptr)rˆrš)rˆzc:parent_symbolzc:namespace_stackzc:parent_key)r;r<r=)rŽrÚ	argumentsrØr—Úget_locationršrúrðr'r‰rŠrýrrr¥r)rÚ
rootSymbolr~ÚstackrÅr­r/r‚r‚rƒrI
s&

zCNamespaceObject.runN)
r‡rˆr‰r$Úhas_contentÚrequired_argumentsÚoptional_argumentsÚfinal_argument_whitespacer&r;rrrr‚r‚r‚rƒr:=
s
r:c@s8eZdZUdZdZdZdZiZee	e
dœdd„ZdS)	ÚCNamespacePushObjectFrzrT)rWcCsö|jdjƒdkrgSt|jd|jƒ|jjd}y|jƒ}|jƒWn:tk
r€}zt	j
||jƒdtƒ}WYdd}~XnX|jjj
ddƒ}|s¦|jjdd	}|j|ƒ}|jjj
d
gƒ}|j|ƒ||jjd<||jjd
<|jƒ|jjd<gS)
Nrr;r<r=)rˆrš)rˆzc:parent_symbolrŸrzc:namespace_stackzc:parent_key)r;r<r=)r>rØr—r?rŽršrúrðr'r‰rŠrýrÚgetrrrær¥r)rrÅr­r/Z	oldParentr~rAr‚r‚rƒrg
s*


zCNamespacePushObject.runN)r‡rˆr‰rBrCrDrEr&r;rrrr‚r‚r‚rƒrF`
s
rFc@s8eZdZUdZdZdZdZiZee	e
dœdd„ZdS)ÚCNamespacePopObjectFrT)rWcCs”|jjjddƒ}|s"t|ƒdkr:tjd|jƒdg}n|jƒt|ƒdkrX|d
}n|jjdd}||jjd<||jjd<|j	ƒ|jj
d	<gS)Nzc:namespace_stackrz;C namespace pop on empty stack. Defaulting to global scope.)rˆrzrŸrzc:parent_symbolz
cp:parent_keyrº)rŽrrGr”r‰rŠr?r×rr¥r)rrAr~r‚r‚rƒr†
s
zCNamespacePopObject.runN)r‡rˆr‰rBrCrDrEr&r;rrrr‚r‚r‚rƒrH
s
rHcs<eZdZd	eeededdœ‡fdd„
Zddœdd„Z‡Z	S)
Ú	AliasNodeNr)rÚaliasOptionsr	rŽÚ	parentKeyrWcsxtƒjƒ||_||_||_|dk	rbd|jkrT|jdd}||jd<|jƒ|jd<|jd|_	n|dk	snt
‚||_	dS)Nzc:parent_symbolrŸrzc:parent_key)r_r„rrJr	rrr¥rrKr€)rrrJr	rŽrKr)rar‚rƒr„™
s


zAliasNode.__init__)rWcCs|j|j|j|jd|jdS)N)rŽrK)rarrJr	rK)rr‚r‚rƒr2ª
szAliasNode.copy)NN)
r‡rˆr‰rŠrrrQr„r2r–r‚r‚)rarƒrI˜
srIc@sDeZdZejdZeeeeee	e
edœdd„Ze	ddœdd„Z
dS)	ÚAliasTransformrz)rrÚmaxdepthÚskipThisrJÚ
renderOptionsr	rWc	Cs|dkrd}n|dkrd}n|d8}d}g}|sZtjddƒ}	|j|	ƒ|jj|	d|j|ƒ|r
|rj|}
nDtjƒ}tjƒ}|j|ƒ||_d|d<d	|d
<|d<d|d<|}
x:|j	D]0}
|
jdkrÆq¶|j
|
|d|||d
}|
j|ƒq¶W|oüt|j	ƒdkr
|j|ƒ|S)NrTrzFržr¹rŸÚdomainÚaliasrÚdesctypeÚnoindex)rMrNrJrOr	)
rÚdesc_signaturerærr‘rŽZdesc_contentrñr	r^Ú_render_symbolrr”)rrrrMrNrJrOr	Zrecurser
rŒZchildContainerÚcontentrñrnÚ
childNodesr‚r‚rƒrU²
sB



zAliasTransform._render_symbolN)ÚkwargsrWc
Ksx|jjtƒD]ò}tt|ƒ}|j}|j}yt|||jjd}|j	ƒ}Wn4t
k
r~}ztj||dd}WYdd}~XnX|dkr¸t
j|dƒ}|jƒ|t
j||ƒ7}|j|ƒq|jjdjd}	|	j|ƒ}
|
sútd|ƒtd|ƒt|	jdƒƒ|
st‚|
j|d	d
d
d}|dkrlt
j|dƒ}|j|ƒ|jƒ|t
j||ƒ7}tjd||d|j|ƒq|jd
rÒ|jdkrÒt
j|dƒ}|j|ƒ|jƒ|t
j||ƒ7}tjd||d|j|ƒq|j||jd|jd
|jtƒ|jd}|j|ƒqWdS)N)rˆrš)rˆržrŸrzTarget: zParentKey: rzÚanyT)rsrtz,Could not find C declaration for alias '%s'.ÚnorootzACan not render C declaration for alias '%s'. No such declaration.rM)rMrNrJrOr	)r	ÚfindallrIrrrKr—rŽršrûr'r‰rŠrrTÚclearr¦Zreplace_selfÚdomainsrËrrWr…r€r‘rærJrrUr)
rrXr¨rrKrÅr­r/rŒr@rPrrr
r‚r‚rƒÚapplyÞ
sf












zAliasTransform.apply)r‡rˆr‰r!Zdefault_priorityr|rSrerrrrrUr^r‚r‚r‚rƒrL¯
s

*rLc@s2eZdZUejejdœZeee	dœdd„Z
dS)ÚCAliasObject)rMrZ)rWcCsâd|jkr"|jjddƒ\|_|_nd|j|_|_tjƒ}|jj|_|j|d<|j|d<|d<d|d<g|_|j	j
d	dƒd
|j	kdœ}|d
r®|d	dkr®tjd|j
ƒd
x,|jƒD] }|jt|||jj|jdƒq¸W|gS)zú
        On purpose this doesn't call the ObjectDescription version, but is based on it.
        Each alias signature may expand into multiple real signatures if 'noroot'.
        The code is therefore based on the ObjectDescription version.
        r)rzržrPrrRTrSrMrZ)rMrZz”Error in C alias declaration. Requested 'noroot' but 'maxdepth' 1. When skipping the root declaration, need 'maxdepth' 0 for infinite or at least 2.)rˆ)rŽ)r­ÚsplitrPrrrñrr	r«rJrGr‰rŠr?Zget_signaturesrærIrŽ)rr¨rJrr‚r‚rƒr$s"


 zCAliasObject.runN)r‡rˆr‰rZnonnegative_intr%r&r;rrrr‚r‚r‚rƒr_s
r_csReZdZeeeeeeeefdœdd„Zee	e
e	efdœ‡fdd„Z‡Z
S)Ú	CXRefRole)rŽÚrefnodeÚhas_explicit_titleÚtitleÚtargetrWcCsv|jj|jƒ|s"tjdt|ƒƒ}|sn|jdƒ}|dd…dkrn|dd…}|jdƒ}|dkrn||dd…}||fS)Nz[anonymous]rxrrzr¯rº)Ú
attributesÚupdaterr+ÚsubrŠrÚrfind)rrŽrbrcrdreÚdotr‚r‚rƒÚprocess_linkGs

zCXRefRole.process_link)rWc	s6|jjdstƒjƒS|jjddƒ}t||jƒ|jjd}y|jƒtƒjƒSt	k
r0}zÆd|_
y|jƒ}Wnt	k
rŒtƒjƒSXdddg}|jjj
d	dƒ}|dkrÀ|jjdd
}tj|d}|j|d|j|ƒ|jjd
rd}|d7}|jtj|||ƒ}tj||jƒd|ggfSd}~XnXdS)Nrr“rë)rˆršrZxrefrŸzc-texprzcpp:parent_symbolr)ÚclassesrrzB{}: Pre-v3 C type role ':c:type:`{}`' converted to ':c:expr:`{}`'.z#
The original parsing error was:
{})rˆ)rŽršr_rrœÚreplacer—r?rûr'r¢rürrGrr
rRr‘rRrr‡r‰rŠ)	rrœrÅrrrlrPrŒrŒ)rar‚rƒr[s4



z
CXRefRole.run)r‡rˆr‰rrrerŠr	rkrrrrr–r‚r‚)rarƒraFsracsBeZdZeddœ‡fdd„Zeeeeefdœdd„Z	‡Z
S)Ú	CExprRoleN)ÚasCoderWcs tƒjƒ|rd|_nd|_dS)Nzc-exprzc-texpr)r_r„Ú
class_type)rro)rar‚rƒr„~s
zCExprRole.__init__)rWcCsÖ|jjddƒ}t||jƒ|jjd}y|jƒ}WnNtk
r~}z2tj	d|||jƒdt
jd|||jgdggfSd}~XnX|jj
jddƒ}|dkr¨|jjdd	}t
jd|jgd}|j|d
|j|ƒ|ggfS)Nr“rë)rˆršzUnparseable C expression: %r
%s)rˆrŸ)rlzc:parent_symbolrr)rœrmr—r?rŽršrür'r‰rŠrZdesc_inlinerprrGrr‘)rrœrÅrÚexrPrŒr‚r‚rƒr‡s

(z
CExprRole.run)r‡rˆr‰rer„r	rrrrr–r‚r‚)rarƒrn}s	rnc@s>eZdZUdZdZdZeedƒddddƒeedƒddddƒeed	ƒd
ddƒeedƒddƒeed
ƒd
ddƒeedƒdddƒeedƒdddƒeedƒddƒeedƒddƒeedƒddddƒdœ
Ze	e	e
eee
eeeeeeedœ
ZeƒeƒeƒeddeƒeƒeƒeƒeƒeƒeddedddœZedddddƒidœZeeeeeeeeeeffffeddœdd„Ze ee!j"ddœdd „Z#e$dd!œd"d#„Z%e&eedd$œd%d&„Z'e ee(eee$e)ee*e)e*efd'œd(d)„Z+e ee(eee$e)e*e)d'œd*d+„Z,e ee(ee$e)e&eee)fd,œd-d.„Z-e.eeeeeee/fd/œd0d1„Z0dS)2ÚCDomainzC language domain.rŸr˜rKrørËr“ÚvariablerCÚfuncr–rLr\r_rLrDzfunction parameter)
rKrørCrLr\r_rLrDr–rh)
rKrørCrLr\r_rLrDr–Ú	namespaceznamespace-pushz
namespace-poprQT)Z
fix_parens)roF)rKrËrørtrLr\r_rLrDr–rÕZtexprN)rÚobjects)r[rWcCs€tjr4td|ƒtdƒt|jdjdƒƒtdƒ|jd}|j|ƒtjr|tdƒt|jdjdƒƒtdƒtd|ƒdS)	Nz
clear_doc:z	before:rrzz	before endz	after:z
	after endzclear_doc end:)r|r”rWrËr…rm)rr[r@r‚r‚rƒrmÔs


zCDomain.clear_doc)rŽr[r	rWcCs2tjr.td|ƒt|jdjdƒƒtd|ƒdS)Nzprocess_doc:rrzprocess_doc end:)r|r”rWrËr…)rrŽr[r	r‚r‚rƒÚprocess_docäs
zCDomain.process_doc)r©rWcCs|jj|jjƒdS)N)rfrgrŽr)rr©r‚r‚rƒÚprocess_field_xrefëszCDomain.process_field_xref)r‡Ú	otherdatarWcCsÂtjr\tdƒtdƒt|jdjdƒƒtdƒtdƒt|djdƒƒtdƒtdƒ|jdj|d||jƒ|jd	}x<|d	jƒD],\}\}}}||krŽ||krŽ|||f||<qŽWdS)
Nzmerge_domaindata:z	self:rrzz		self endz	other:z
	other endzmerge_domaindata endrv)r|r”rWrËr…r‹rŽÚitems)rr‡ryZ
ourObjectsÚfullnameÚfnrFrr‚r‚rƒÚmerge_domaindataîs 

zCDomain.merge_domaindata)rŽÚfromdocnameÚbuilderrîrer¨ÚcontnoderWcCst|||jd}y|jƒ}	Wn2tk
rN}
ztjd||
|ddSd}
~
XnX|jddƒ}|jd}|r¤|j|ƒ}
|
sšt	d|ƒt	d|ƒt	|j
dƒƒ|
s¨t‚n|}
|
j|	|d	d	d
}|dksÌ|j
dkrÐdS|j
}|	jƒ}|j}|sìt‚t||||jƒ||ƒ|jfS)
N)rˆršz$Unparseable C cross-reference: %r
%s)rˆzc:parent_keyrzTarget: zParentKey: rzT)rsrt)NN)NN)r—ršrûr'r‰rŠrGrËrrWr…r€r‘rršr[r:rHr)rrŽr~rrîrer¨r€rÅr­r/rKr@rPrrrZdisplayNamer[r‚r‚rƒÚ_resolve_xref_inners8






zCDomain._resolve_xref_innercCs|j|||||||ƒdS)Nr)r)rrŽr~rrîrer¨r€r‚r‚rƒÚresolve_xref'szCDomain.resolve_xref)rŽr~rrer¨r€rWc	CsJtjƒ |j|||d|||ƒ\}}WdQRX|rFd|j|ƒ|fgSgS)NrYzc:)r"Zsuppress_loggingrZrole_for_objtype)	rrŽr~rrer¨r€Zretnoderr‚r‚rƒÚresolve_any_xref-s

zCDomain.resolve_any_xref)rWc	cs„|jd}xt|jƒD]h}|jdkr$q|js.t‚|jƒ}t|ƒjdƒ}|jƒjdƒ}|jj	}|j}|jj
ƒ}|||||dfVqWdS)Nrr¯rz)rËrorr[r€r9rŠrršrrH)	rr@r~ZfullNestedNamer­Zdispnamerr[rr‚r‚rƒÚget_objects7s



zCDomain.get_objects)1r‡rˆr‰r$r­r*rrZobject_typesr'r0r4r5r6r7r8r9r:rFrHr_rrarnZrolesr|Zinitial_datarrŠrr	rmrr
r	rwrrxrr}rrrrr‚rƒrrSr„r‚r‚r‚rƒrrsn
. #rr)ÚapprWcCsh|jtƒ|jdgdƒ|jdgdƒ|jdtdƒ|jtƒ|jdddƒ|jdddƒd	d
dddœS)Nr›rŽrrÛrFrTÚbuiltinr})r®Zenv_versionZparallel_read_safeZparallel_write_safe)Z
add_domainrrZadd_config_valueÚ_macroKeywordsZadd_post_transformrL)r…r‚r‚rƒÚsetupFs

rˆ)r=r>r?r@rArBrC)r¸r(rÿr))r–)r,r+)r-rW)r/)±r$ÚreÚtypingrrrrrrrr	r
rrZdocutilsr
Zdocutils.nodesrrrrZdocutils.parsers.rstrZsphinxrZsphinx.addnodesrZsphinx.applicationrZsphinx.buildersrZsphinx.deprecationrZsphinx.directivesrZsphinx.domainsrrZsphinx.environmentrZ
sphinx.localerrZsphinx.rolesrrZsphinx.transformsr Z!sphinx.transforms.post_transformsr!Zsphinx.utilr"Zsphinx.util.cfamilyr#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5Zsphinx.util.docfieldsr6r7r8Zsphinx.util.docutilsr9Zsphinx.util.nodesr:Zsphinx.util.typingr;Ú	getLoggerr‡r‰r<rBrÚr‡rÉr¾rÎrGrEÚcompileÚSrÔrÜr§r{r‹r’rªrÂrÃrÄrÊrÌrÒrÓrÔrØrÙrÝràrârãrärèrírïrðrñròr÷rørúrûrürþrrrrr#r%r(r*r-rÚrÛr4rArBr<rCr=r>r?r@r}rNrQr|r—rýrþr'r1r0r4r5r6r7r8r9r:rFrHrIrLr_rarnrrrŠrˆr‚r‚r‚rƒÚ<module>s:4T




	/Q

		
3?6;
)!I&/(Z	dF


#o(7 *