Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 10315
0.00% covered (danger)
0.00%
0 / 377
CRAP
0.00% covered (danger)
0.00%
0 / 2
TracingGrammarCacheEntry
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 1
2
TracingGrammar
0.00% covered (danger)
0.00%
0 / 10311
0.00% covered (danger)
0.00%
0 / 376
7254942
0.00% covered (danger)
0.00%
0 / 1
 initialize
0.00% covered (danger)
0.00%
0 / 13
0.00% covered (danger)
0.00%
0 / 1
2
 resetState
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
2
 assert
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
6
 unreachable
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 startOffset
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 endOffset
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 tsrOffsets
0.00% covered (danger)
0.00%
0 / 5
0.00% covered (danger)
0.00%
0 / 1
20
 emitChunk
0.00% covered (danger)
0.00%
0 / 9
0.00% covered (danger)
0.00%
0 / 1
12
 isXMLTag
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
6
 a0
0.00% covered (danger)
0.00%
0 / 5
0.00% covered (danger)
0.00%
0 / 1
6
 a1
0.00% covered (danger)
0.00%
0 / 5
0.00% covered (danger)
0.00%
0 / 1
6
 a2
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a3
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a4
0.00% covered (danger)
0.00%
0 / 7
0.00% covered (danger)
0.00%
0 / 1
12
 a5
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a6
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a7
0.00% covered (danger)
0.00%
0 / 12
0.00% covered (danger)
0.00%
0 / 1
20
 a8
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a9
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a10
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a11
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
6
 a12
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a13
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a14
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a15
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a16
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a17
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a18
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
6
 a19
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a20
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a21
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a22
0.00% covered (danger)
0.00%
0 / 16
0.00% covered (danger)
0.00%
0 / 1
2
 a23
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a24
0.00% covered (danger)
0.00%
0 / 9
0.00% covered (danger)
0.00%
0 / 1
30
 a25
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a26
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a27
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a28
0.00% covered (danger)
0.00%
0 / 16
0.00% covered (danger)
0.00%
0 / 1
2
 a29
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 1
6
 a30
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a31
0.00% covered (danger)
0.00%
0 / 13
0.00% covered (danger)
0.00%
0 / 1
6
 a32
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a33
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a34
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a35
0.00% covered (danger)
0.00%
0 / 11
0.00% covered (danger)
0.00%
0 / 1
20
 a36
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
6
 a37
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a38
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a39
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a40
0.00% covered (danger)
0.00%
0 / 11
0.00% covered (danger)
0.00%
0 / 1
20
 a41
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a42
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a43
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a44
0.00% covered (danger)
0.00%
0 / 23
0.00% covered (danger)
0.00%
0 / 1
20
 a45
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 1
2
 a46
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 1
6
 a47
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a48
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
6
 a49
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a50
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a51
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a52
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
6
 a53
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a54
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
6
 a55
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
 a56
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a57
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a58
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a59
0.00% covered (danger)
0.00%
0 / 7
0.00% covered (danger)
0.00%
0 / 1
6
 a60
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
 a61
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a62
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a63
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a64
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a65
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a66
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a67
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
6
 a68
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
6
 a69
0.00% covered (danger)
0.00%
0 / 14
0.00% covered (danger)
0.00%
0 / 1
12
 a70
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a71
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a72
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
6
 a73
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
 a74
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
 a75
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a76
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a77
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a78
0.00% covered (danger)
0.00%
0 / 9
0.00% covered (danger)
0.00%
0 / 1
6
 a79
0.00% covered (danger)
0.00%
0 / 20
0.00% covered (danger)
0.00%
0 / 1
56
 a80
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a81
0.00% covered (danger)
0.00%
0 / 72
0.00% covered (danger)
0.00%
0 / 1
306
 a82
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a83
0.00% covered (danger)
0.00%
0 / 22
0.00% covered (danger)
0.00%
0 / 1
56
 a84
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
6
 a85
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
6
 a86
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
6
 a87
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a88
0.00% covered (danger)
0.00%
0 / 39
0.00% covered (danger)
0.00%
0 / 1
72
 a89
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a90
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a91
0.00% covered (danger)
0.00%
0 / 7
0.00% covered (danger)
0.00%
0 / 1
12
 a92
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a93
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
6
 a94
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a95
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
2
 a96
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a97
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a98
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a99
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a100
0.00% covered (danger)
0.00%
0 / 12
0.00% covered (danger)
0.00%
0 / 1
12
 a101
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a102
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a103
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
 a104
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a105
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 1
2
 a106
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a107
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a108
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a109
0.00% covered (danger)
0.00%
0 / 30
0.00% covered (danger)
0.00%
0 / 1
156
 a110
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a111
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a112
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a113
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a114
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
12
 a115
0.00% covered (danger)
0.00%
0 / 13
0.00% covered (danger)
0.00%
0 / 1
56
 a116
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
12
 a117
0.00% covered (danger)
0.00%
0 / 12
0.00% covered (danger)
0.00%
0 / 1
30
 a118
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a119
0.00% covered (danger)
0.00%
0 / 5
0.00% covered (danger)
0.00%
0 / 1
2
 a120
0.00% covered (danger)
0.00%
0 / 22
0.00% covered (danger)
0.00%
0 / 1
2
 a121
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a122
0.00% covered (danger)
0.00%
0 / 5
0.00% covered (danger)
0.00%
0 / 1
12
 a123
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
12
 a124
0.00% covered (danger)
0.00%
0 / 18
0.00% covered (danger)
0.00%
0 / 1
2
 a125
0.00% covered (danger)
0.00%
0 / 51
0.00% covered (danger)
0.00%
0 / 1
132
 a126
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
 a127
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
6
 a128
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 1
2
 a129
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
 a130
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 1
6
 a131
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 1
12
 a132
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a133
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a134
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a135
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 1
6
 a136
0.00% covered (danger)
0.00%
0 / 16
0.00% covered (danger)
0.00%
0 / 1
6
 a137
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
 a138
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a139
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a140
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 1
2
 a141
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a142
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a143
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a144
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a145
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a146
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
6
 a147
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
6
 a148
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a149
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a150
0.00% covered (danger)
0.00%
0 / 5
0.00% covered (danger)
0.00%
0 / 1
20
 a151
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a152
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a153
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a154
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a155
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a156
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a157
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a158
0.00% covered (danger)
0.00%
0 / 31
0.00% covered (danger)
0.00%
0 / 1
56
 a159
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
 a160
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a161
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a162
0.00% covered (danger)
0.00%
0 / 8
0.00% covered (danger)
0.00%
0 / 1
12
 a163
0.00% covered (danger)
0.00%
0 / 7
0.00% covered (danger)
0.00%
0 / 1
6
 a164
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a165
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 1
2
 a166
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a167
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 1
12
 a168
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a169
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a170
0.00% covered (danger)
0.00%
0 / 49
0.00% covered (danger)
0.00%
0 / 1
420
 a171
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 1
2
 a172
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a173
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 1
12
 a174
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a175
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 1
2
 a176
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a177
0.00% covered (danger)
0.00%
0 / 5
0.00% covered (danger)
0.00%
0 / 1
2
 a178
0.00% covered (danger)
0.00%
0 / 9
0.00% covered (danger)
0.00%
0 / 1
30
 a179
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a180
0.00% covered (danger)
0.00%
0 / 5
0.00% covered (danger)
0.00%
0 / 1
12
 a181
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a182
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 1
2
 a183
0.00% covered (danger)
0.00%
0 / 7
0.00% covered (danger)
0.00%
0 / 1
2
 a184
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
12
 a185
0.00% covered (danger)
0.00%
0 / 5
0.00% covered (danger)
0.00%
0 / 1
2
 a186
0.00% covered (danger)
0.00%
0 / 9
0.00% covered (danger)
0.00%
0 / 1
30
 a187
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a188
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a189
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a190
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a191
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 1
2
 a192
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 a193
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
 a194
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
 streamstart_async
0.00% covered (danger)
0.00%
0 / 48
0.00% covered (danger)
0.00%
0 / 1
132
 parsestart
0.00% covered (danger)
0.00%
0 / 34
0.00% covered (danger)
0.00%
0 / 1
110
 parsetable_start_tag
0.00% covered (danger)
0.00%
0 / 62
0.00% covered (danger)
0.00%
0 / 1
272
 parseurl
0.00% covered (danger)
0.00%
0 / 173
0.00% covered (danger)
0.00%
0 / 1
1560
 parserow_syntax_table_args
0.00% covered (danger)
0.00%
0 / 48
0.00% covered (danger)
0.00%
0 / 1
132
 parsetable_attributes
0.00% covered (danger)
0.00%
0 / 41
0.00% covered (danger)
0.00%
0 / 1
156
 parsegeneric_newline_attributes
0.00% covered (danger)
0.00%
0 / 24
0.00% covered (danger)
0.00%
0 / 1
72
 parsetplarg_or_template_or_bust
0.00% covered (danger)
0.00%
0 / 35
0.00% covered (danger)
0.00%
0 / 1
132
 parseextlink
0.00% covered (danger)
0.00%
0 / 144
0.00% covered (danger)
0.00%
0 / 1
870
 parselist_item
0.00% covered (danger)
0.00%
0 / 26
0.00% covered (danger)
0.00%
0 / 1
72
 parsetlb
0.00% covered (danger)
0.00%
0 / 37
0.00% covered (danger)
0.00%
0 / 1
72
 parsenewlineToken
0.00% covered (danger)
0.00%
0 / 20
0.00% covered (danger)
0.00%
0 / 1
12
 parsepipe
0.00% covered (danger)
0.00%
0 / 26
0.00% covered (danger)
0.00%
0 / 1
56
 parsespace
0.00% covered (danger)
0.00%
0 / 20
0.00% covered (danger)
0.00%
0 / 1
30
 parseurl_protocol
0.00% covered (danger)
0.00%
0 / 75
0.00% covered (danger)
0.00%
0 / 1
380
 parseipv6urladdr
0.00% covered (danger)
0.00%
0 / 48
0.00% covered (danger)
0.00%
0 / 1
132
 discardinline_breaks
0.00% covered (danger)
0.00%
0 / 43
0.00% covered (danger)
0.00%
0 / 1
90
 parseno_punctuation_char
0.00% covered (danger)
0.00%
0 / 20
0.00% covered (danger)
0.00%
0 / 1
20
 parsecomment
0.00% covered (danger)
0.00%
0 / 72
0.00% covered (danger)
0.00%
0 / 1
342
 parsetplarg_or_template
0.00% covered (danger)
0.00%
0 / 39
0.00% covered (danger)
0.00%
0 / 1
110
 parsehtmlentity
0.00% covered (danger)
0.00%
0 / 21
0.00% covered (danger)
0.00%
0 / 1
12
 parseoptional_spaces
0.00% covered (danger)
0.00%
0 / 26
0.00% covered (danger)
0.00%
0 / 1
56
 discardpipe
0.00% covered (danger)
0.00%
0 / 26
0.00% covered (danger)
0.00%
0 / 1
56
 parsetable_attribute
0.00% covered (danger)
0.00%
0 / 72
0.00% covered (danger)
0.00%
0 / 1
272
 discardoptionalSpaceToken
0.00% covered (danger)
0.00%
0 / 21
0.00% covered (danger)
0.00%
0 / 1
12
 parsebroken_table_attribute_name_char
0.00% covered (danger)
0.00%
0 / 24
0.00% covered (danger)
0.00%
0 / 1
30
 parsegeneric_newline_attribute
0.00% covered (danger)
0.00%
0 / 78
0.00% covered (danger)
0.00%
0 / 1
420
 parseextlink_nonipv6url
0.00% covered (danger)
0.00%
0 / 20
0.00% covered (danger)
0.00%
0 / 1
42
 discardspace
0.00% covered (danger)
0.00%
0 / 20
0.00% covered (danger)
0.00%
0 / 1
30
 discardunispace
0.00% covered (danger)
0.00%
0 / 20
0.00% covered (danger)
0.00%
0 / 1
20
 parseinlineline
0.00% covered (danger)
0.00%
0 / 75
0.00% covered (danger)
0.00%
0 / 1
380
 parsedtdd
0.00% covered (danger)
0.00%
0 / 87
0.00% covered (danger)
0.00%
0 / 1
380
 parsehacky_dl_uses
0.00% covered (danger)
0.00%
0 / 57
0.00% covered (danger)
0.00%
0 / 1
272
 parseli
0.00% covered (danger)
0.00%
0 / 49
0.00% covered (danger)
0.00%
0 / 1
210
 discardeof
0.00% covered (danger)
0.00%
0 / 20
0.00% covered (danger)
0.00%
0 / 1
12
 parseblock
0.00% covered (danger)
0.00%
0 / 95
0.00% covered (danger)
0.00%
0 / 1
506
 discardnewline
0.00% covered (danger)
0.00%
0 / 26
0.00% covered (danger)
0.00%
0 / 1
56
 parsetplarg_or_template_guarded
0.00% covered (danger)
0.00%
0 / 193
0.00% covered (danger)
0.00%
0 / 1
1806
 parseraw_htmlentity
0.00% covered (danger)
0.00%
0 / 53
0.00% covered (danger)
0.00%
0 / 1
156
 parseoptionalSpaceToken
0.00% covered (danger)
0.00%
0 / 21
0.00% covered (danger)
0.00%
0 / 1
12
 parsetable_attribute_name
0.00% covered (danger)
0.00%
0 / 133
0.00% covered (danger)
0.00%
0 / 1
992
 parsetable_att_value
0.00% covered (danger)
0.00%
0 / 178
0.00% covered (danger)
0.00%
0 / 1
2256
 discardspace_or_newline_or_solidus
0.00% covered (danger)
0.00%
0 / 43
0.00% covered (danger)
0.00%
0 / 1
72
 parsegeneric_attribute_name
0.00% covered (danger)
0.00%
0 / 106
0.00% covered (danger)
0.00%
0 / 1
756
 discardspace_or_newline
0.00% covered (danger)
0.00%
0 / 19
0.00% covered (danger)
0.00%
0 / 1
20
 parsegeneric_att_value
0.00% covered (danger)
0.00%
0 / 195
0.00% covered (danger)
0.00%
0 / 1
1980
 parseextlink_nonipv6url_parameterized
0.00% covered (danger)
0.00%
0 / 94
0.00% covered (danger)
0.00%
0 / 1
650
 parseurltext
0.00% covered (danger)
0.00%
0 / 101
0.00% covered (danger)
0.00%
0 / 1
462
 parseinline_element
0.00% covered (danger)
0.00%
0 / 154
0.00% covered (danger)
0.00%
0 / 1
930
 discardlist_char
0.00% covered (danger)
0.00%
0 / 19
0.00% covered (danger)
0.00%
0 / 1
20
 parselist_char
0.00% covered (danger)
0.00%
0 / 19
0.00% covered (danger)
0.00%
0 / 1
20
 parsedtdd_colon
0.00% covered (danger)
0.00%
0 / 39
0.00% covered (danger)
0.00%
0 / 1
110
 discardeolf
0.00% covered (danger)
0.00%
0 / 19
0.00% covered (danger)
0.00%
0 / 1
12
 parsespace_or_comment
0.00% covered (danger)
0.00%
0 / 19
0.00% covered (danger)
0.00%
0 / 1
12
 discardsof
0.00% covered (danger)
0.00%
0 / 20
0.00% covered (danger)
0.00%
0 / 1
12
 parseredirect
0.00% covered (danger)
0.00%
0 / 74
0.00% covered (danger)
0.00%
0 / 1
380
 parsesol_transparent
0.00% covered (danger)
0.00%
0 / 29
0.00% covered (danger)
0.00%
0 / 1
90
 parseblock_line
0.00% covered (danger)
0.00%
0 / 47
0.00% covered (danger)
0.00%
0 / 1
156
 parseblock_lines
0.00% covered (danger)
0.00%
0 / 50
0.00% covered (danger)
0.00%
0 / 1
156
 parsesol
0.00% covered (danger)
0.00%
0 / 37
0.00% covered (danger)
0.00%
0 / 1
132
 discardtplarg
0.00% covered (danger)
0.00%
0 / 18
0.00% covered (danger)
0.00%
0 / 1
20
 parsetemplate
0.00% covered (danger)
0.00%
0 / 18
0.00% covered (danger)
0.00%
0 / 1
20
 parsebroken_template
0.00% covered (danger)
0.00%
0 / 31
0.00% covered (danger)
0.00%
0 / 1
72
 parsetplarg
0.00% covered (danger)
0.00%
0 / 18
0.00% covered (danger)
0.00%
0 / 1
20
 discardwikilink
0.00% covered (danger)
0.00%
0 / 23
0.00% covered (danger)
0.00%
0 / 1
56
 parsedirective
0.00% covered (danger)
0.00%
0 / 74
0.00% covered (danger)
0.00%
0 / 1
306
 parsehtml_tag
0.00% covered (danger)
0.00%
0 / 20
0.00% covered (danger)
0.00%
0 / 1
42
 parsetable_attribute_preprocessor_text_single
0.00% covered (danger)
0.00%
0 / 65
0.00% covered (danger)
0.00%
0 / 1
380
 parsetable_attribute_preprocessor_text_double
0.00% covered (danger)
0.00%
0 / 65
0.00% covered (danger)
0.00%
0 / 1
380
 parsetable_attribute_preprocessor_text
0.00% covered (danger)
0.00%
0 / 67
0.00% covered (danger)
0.00%
0 / 1
420
 parseless_than
0.00% covered (danger)
0.00%
0 / 34
0.00% covered (danger)
0.00%
0 / 1
42
 parseattribute_preprocessor_text_single
0.00% covered (danger)
0.00%
0 / 80
0.00% covered (danger)
0.00%
0 / 1
552
 parseattribute_preprocessor_text_double
0.00% covered (danger)
0.00%
0 / 80
0.00% covered (danger)
0.00%
0 / 1
552
 parseattribute_preprocessor_text
0.00% covered (danger)
0.00%
0 / 82
0.00% covered (danger)
0.00%
0 / 1
600
 parseautolink
0.00% covered (danger)
0.00%
0 / 49
0.00% covered (danger)
0.00%
0 / 1
156
 parsebehavior_switch
0.00% covered (danger)
0.00%
0 / 46
0.00% covered (danger)
0.00%
0 / 1
132
 parsetext_char
0.00% covered (danger)
0.00%
0 / 19
0.00% covered (danger)
0.00%
0 / 1
20
 parseangle_bracket_markup
0.00% covered (danger)
0.00%
0 / 32
0.00% covered (danger)
0.00%
0 / 1
110
 parselang_variant_or_tpl
0.00% covered (danger)
0.00%
0 / 223
0.00% covered (danger)
0.00%
0 / 1
2450
 parsewikilink
0.00% covered (danger)
0.00%
0 / 23
0.00% covered (danger)
0.00%
0 / 1
56
 parsequote
0.00% covered (danger)
0.00%
0 / 44
0.00% covered (danger)
0.00%
0 / 1
132
 parseinlineline_break_on_colon
0.00% covered (danger)
0.00%
0 / 20
0.00% covered (danger)
0.00%
0 / 1
42
 parseredirect_word
0.00% covered (danger)
0.00%
0 / 52
0.00% covered (danger)
0.00%
0 / 1
156
 parseinclude_limits
0.00% covered (danger)
0.00%
0 / 37
0.00% covered (danger)
0.00%
0 / 1
90
 parseannotation_tag
0.00% covered (danger)
0.00%
0 / 57
0.00% covered (danger)
0.00%
0 / 1
182
 parseheading
0.00% covered (danger)
0.00%
0 / 118
0.00% covered (danger)
0.00%
0 / 1
702
 parsehr
0.00% covered (danger)
0.00%
0 / 69
0.00% covered (danger)
0.00%
0 / 1
342
 parsetable_line
0.00% covered (danger)
0.00%
0 / 50
0.00% covered (danger)
0.00%
0 / 1
182
 parsesol_prefix
0.00% covered (danger)
0.00%
0 / 26
0.00% covered (danger)
0.00%
0 / 1
20
 parseempty_lines_with_comments
0.00% covered (danger)
0.00%
0 / 60
0.00% covered (danger)
0.00%
0 / 1
210
 discardtplarg_preproc
0.00% covered (danger)
0.00%
0 / 144
0.00% covered (danger)
0.00%
0 / 1
1560
 parsetemplate_preproc
0.00% covered (danger)
0.00%
0 / 171
0.00% covered (danger)
0.00%
0 / 1
2450
 parsetplarg_preproc
0.00% covered (danger)
0.00%
0 / 144
0.00% covered (danger)
0.00%
0 / 1
1560
 discardwikilink_preproc
0.00% covered (danger)
0.00%
0 / 85
0.00% covered (danger)
0.00%
0 / 1
462
 discardbroken_wikilink
0.00% covered (danger)
0.00%
0 / 67
0.00% covered (danger)
0.00%
0 / 1
306
 parsewellformed_extension_tag
0.00% covered (danger)
0.00%
0 / 37
0.00% covered (danger)
0.00%
0 / 1
90
 parsexmlish_tag
0.00% covered (danger)
0.00%
0 / 73
0.00% covered (danger)
0.00%
0 / 1
420
 parseautourl
0.00% covered (danger)
0.00%
0 / 184
0.00% covered (danger)
0.00%
0 / 1
1560
 parseautoref
0.00% covered (danger)
0.00%
0 / 59
0.00% covered (danger)
0.00%
0 / 1
210
 parseisbn
0.00% covered (danger)
0.00%
0 / 127
0.00% covered (danger)
0.00%
0 / 1
992
 discardbehavior_text
0.00% covered (danger)
0.00%
0 / 48
0.00% covered (danger)
0.00%
0 / 1
156
 parsemaybe_extension_tag
0.00% covered (danger)
0.00%
0 / 37
0.00% covered (danger)
0.00%
0 / 1
90
 parselang_variant
0.00% covered (danger)
0.00%
0 / 23
0.00% covered (danger)
0.00%
0 / 1
56
 parsewikilink_preproc
0.00% covered (danger)
0.00%
0 / 85
0.00% covered (danger)
0.00%
0 / 1
462
 parsebroken_wikilink
0.00% covered (danger)
0.00%
0 / 67
0.00% covered (danger)
0.00%
0 / 1
306
 discardinclude_check
0.00% covered (danger)
0.00%
0 / 35
0.00% covered (danger)
0.00%
0 / 1
30
 parsetvar_old_syntax_closing_HACK
0.00% covered (danger)
0.00%
0 / 42
0.00% covered (danger)
0.00%
0 / 1
72
 discardannotation_check
0.00% covered (danger)
0.00%
0 / 35
0.00% covered (danger)
0.00%
0 / 1
30
 discardsol
0.00% covered (danger)
0.00%
0 / 37
0.00% covered (danger)
0.00%
0 / 1
132
 parsetable_content_line
0.00% covered (danger)
0.00%
0 / 29
0.00% covered (danger)
0.00%
0 / 1
90
 parsetable_end_tag
0.00% covered (danger)
0.00%
0 / 33
0.00% covered (danger)
0.00%
0 / 1
42
 parsenewline
0.00% covered (danger)
0.00%
0 / 26
0.00% covered (danger)
0.00%
0 / 1
56
 discardnl_comment_space
0.00% covered (danger)
0.00%
0 / 19
0.00% covered (danger)
0.00%
0 / 1
12
 parseinlineline_in_tpls
0.00% covered (danger)
0.00%
0 / 34
0.00% covered (danger)
0.00%
0 / 1
132
 parsenl_comment_space
0.00% covered (danger)
0.00%
0 / 19
0.00% covered (danger)
0.00%
0 / 1
12
 parsetemplate_param_value
0.00% covered (danger)
0.00%
0 / 25
0.00% covered (danger)
0.00%
0 / 1
56
 parseparsoid_fragment_marker
0.00% covered (danger)
0.00%
0 / 40
0.00% covered (danger)
0.00%
0 / 1
110
 parsetemplate_param
0.00% covered (danger)
0.00%
0 / 78
0.00% covered (danger)
0.00%
0 / 1
306
 parsewikilink_preprocessor_text
0.00% covered (danger)
0.00%
0 / 102
0.00% covered (danger)
0.00%
0 / 1
812
 parsewikilink_content
0.00% covered (danger)
0.00%
0 / 43
0.00% covered (danger)
0.00%
0 / 1
132
 parsexmlish_start
0.00% covered (danger)
0.00%
0 / 39
0.00% covered (danger)
0.00%
0 / 1
72
 parseRFC
0.00% covered (danger)
0.00%
0 / 36
0.00% covered (danger)
0.00%
0 / 1
56
 parsePMID
0.00% covered (danger)
0.00%
0 / 36
0.00% covered (danger)
0.00%
0 / 1
56
 parsespace_or_nbsp
0.00% covered (danger)
0.00%
0 / 49
0.00% covered (danger)
0.00%
0 / 1
72
 discardend_of_word
0.00% covered (danger)
0.00%
0 / 27
0.00% covered (danger)
0.00%
0 / 1
30
 parsespace_or_nbsp_or_dash
0.00% covered (danger)
0.00%
0 / 23
0.00% covered (danger)
0.00%
0 / 1
30
 discardtext_char
0.00% covered (danger)
0.00%
0 / 19
0.00% covered (danger)
0.00%
0 / 1
20
 discardextension_check
0.00% covered (danger)
0.00%
0 / 35
0.00% covered (danger)
0.00%
0 / 1
30
 parselang_variant_preproc
0.00% covered (danger)
0.00%
0 / 128
0.00% covered (danger)
0.00%
0 / 1
756
 parsebroken_lang_variant
0.00% covered (danger)
0.00%
0 / 30
0.00% covered (danger)
0.00%
0 / 1
72
 parsetable_heading_tags
0.00% covered (danger)
0.00%
0 / 18
0.00% covered (danger)
0.00%
0 / 1
20
 parsetable_row_tag
0.00% covered (danger)
0.00%
0 / 75
0.00% covered (danger)
0.00%
0 / 1
380
 parsetable_data_tags
0.00% covered (danger)
0.00%
0 / 57
0.00% covered (danger)
0.00%
0 / 1
210
 parsetable_caption_tag
0.00% covered (danger)
0.00%
0 / 59
0.00% covered (danger)
0.00%
0 / 1
240
 discardnewlineToken
0.00% covered (danger)
0.00%
0 / 20
0.00% covered (danger)
0.00%
0 / 1
12
 discardspace_or_comment
0.00% covered (danger)
0.00%
0 / 19
0.00% covered (danger)
0.00%
0 / 1
12
 parsenested_inlineline
0.00% covered (danger)
0.00%
0 / 38
0.00% covered (danger)
0.00%
0 / 1
90
 parsetemplate_param_text
0.00% covered (danger)
0.00%
0 / 34
0.00% covered (danger)
0.00%
0 / 1
132
 parsetemplate_param_name
0.00% covered (danger)
0.00%
0 / 32
0.00% covered (danger)
0.00%
0 / 1
72
 parselink_text
0.00% covered (danger)
0.00%
0 / 20
0.00% covered (danger)
0.00%
0 / 1
42
 parsetag_name
0.00% covered (danger)
0.00%
0 / 26
0.00% covered (danger)
0.00%
0 / 1
42
 parseunispace
0.00% covered (danger)
0.00%
0 / 20
0.00% covered (danger)
0.00%
0 / 1
20
 parseopt_lang_variant_flags
0.00% covered (danger)
0.00%
0 / 43
0.00% covered (danger)
0.00%
0 / 1
132
 parselang_variant_text
0.00% covered (danger)
0.00%
0 / 36
0.00% covered (danger)
0.00%
0 / 1
156
 parselang_variant_option_list
0.00% covered (danger)
0.00%
0 / 78
0.00% covered (danger)
0.00%
0 / 1
380
 parsetable_heading_tags_parameterized
0.00% covered (danger)
0.00%
0 / 42
0.00% covered (danger)
0.00%
0 / 1
132
 parsetable_data_tag
0.00% covered (danger)
0.00%
0 / 52
0.00% covered (danger)
0.00%
0 / 1
182
 parsetds
0.00% covered (danger)
0.00%
0 / 37
0.00% covered (danger)
0.00%
0 / 1
110
 parsenested_block_in_table
0.00% covered (danger)
0.00%
0 / 78
0.00% covered (danger)
0.00%
0 / 1
462
 discardcomment
0.00% covered (danger)
0.00%
0 / 72
0.00% covered (danger)
0.00%
0 / 1
342
 parsenested_block
0.00% covered (danger)
0.00%
0 / 38
0.00% covered (danger)
0.00%
0 / 1
90
 parselink_text_parameterized
0.00% covered (danger)
0.00%
0 / 131
0.00% covered (danger)
0.00%
0 / 1
1332
 parselang_variant_flags
0.00% covered (danger)
0.00%
0 / 79
0.00% covered (danger)
0.00%
0 / 1
506
 parselang_variant_option
0.00% covered (danger)
0.00%
0 / 165
0.00% covered (danger)
0.00%
0 / 1
1980
 discardbogus_lang_variant_option
0.00% covered (danger)
0.00%
0 / 22
0.00% covered (danger)
0.00%
0 / 1
56
 parsetable_heading_tag
0.00% covered (danger)
0.00%
0 / 50
0.00% covered (danger)
0.00%
0 / 1
156
 parseths
0.00% covered (danger)
0.00%
0 / 43
0.00% covered (danger)
0.00%
0 / 1
182
 parsepipe_pipe
0.00% covered (danger)
0.00%
0 / 26
0.00% covered (danger)
0.00%
0 / 1
72
 parsefull_table_in_link_caption
0.00% covered (danger)
0.00%
0 / 38
0.00% covered (danger)
0.00%
0 / 1
90
 parselang_variant_flag
0.00% covered (danger)
0.00%
0 / 76
0.00% covered (danger)
0.00%
0 / 1
342
 parselang_variant_name
0.00% covered (danger)
0.00%
0 / 46
0.00% covered (danger)
0.00%
0 / 1
182
 parselang_variant_nowiki
0.00% covered (danger)
0.00%
0 / 40
0.00% covered (danger)
0.00%
0 / 1
132
 parselang_variant_text_no_semi
0.00% covered (danger)
0.00%
0 / 20
0.00% covered (danger)
0.00%
0 / 1
42
 parselang_variant_text_no_semi_or_arrow
0.00% covered (danger)
0.00%
0 / 20
0.00% covered (danger)
0.00%
0 / 1
42
 discardlang_variant_text
0.00% covered (danger)
0.00%
0 / 36
0.00% covered (danger)
0.00%
0 / 1
156
 parseembedded_full_table
0.00% covered (danger)
0.00%
0 / 83
0.00% covered (danger)
0.00%
0 / 1
702
 discardnowiki
0.00% covered (danger)
0.00%
0 / 37
0.00% covered (danger)
0.00%
0 / 1
90
 parsenowiki_text
0.00% covered (danger)
0.00%
0 / 25
0.00% covered (danger)
0.00%
0 / 1
56
 parseembedded_full_table_line_prefix
0.00% covered (danger)
0.00%
0 / 30
0.00% covered (danger)
0.00%
0 / 1
90
 discardnowiki_check
0.00% covered (danger)
0.00%
0 / 35
0.00% covered (danger)
0.00%
0 / 1
30
 parsenowiki
0.00% covered (danger)
0.00%
0 / 37
0.00% covered (danger)
0.00%
0 / 1
90
 parse
0.00% covered (danger)
0.00%
0 / 44
0.00% covered (danger)
0.00%
0 / 1
420
1<?php
2/*
3 * DO NOT EDIT MANUALLY.
4 * Generated by the Parsoid bin/inspectTokenizer.js file.
5 */
6
7
8namespace Wikimedia\Parsoid\Wt2Html;
9
10
11    use Wikimedia\Assert\UnreachableException;
12    use Wikimedia\JsonCodec\JsonCodec;
13    use Wikimedia\Parsoid\Config\Env;
14    use Wikimedia\Parsoid\Config\SiteConfig;
15    use Wikimedia\Parsoid\Core\DomSourceRange;
16    use Wikimedia\Parsoid\NodeData\DataMw;
17    use Wikimedia\Parsoid\NodeData\DataParsoid;
18    use Wikimedia\Parsoid\NodeData\TempData;
19    use Wikimedia\Parsoid\Tokens\CommentTk;
20    use Wikimedia\Parsoid\Tokens\EOFTk;
21    use Wikimedia\Parsoid\Tokens\EmptyLineTk;
22    use Wikimedia\Parsoid\Tokens\EndTagTk;
23    use Wikimedia\Parsoid\Tokens\KV;
24    use Wikimedia\Parsoid\Tokens\KVSourceRange;
25    use Wikimedia\Parsoid\Tokens\NlTk;
26    use Wikimedia\Parsoid\Tokens\SelfclosingTagTk;
27    use Wikimedia\Parsoid\Tokens\SourceRange;
28    use Wikimedia\Parsoid\Tokens\TagTk;
29    use Wikimedia\Parsoid\Tokens\Token;
30    use Wikimedia\Parsoid\Utils\DOMDataUtils;
31    use Wikimedia\Parsoid\Utils\PHPUtils;
32    use Wikimedia\Parsoid\Utils\TokenUtils;
33    use Wikimedia\Parsoid\Utils\Utils;
34    use Wikimedia\Parsoid\Utils\WTUtils;
35    use Wikimedia\Parsoid\Wikitext\Consts;
36
37
38
39class TracingGrammarCacheEntry {
40    public $nextPos;
41    public $result;
42    public $preproc;
43    public $th;
44
45
46    public function __construct( $nextPos, $result, $preproc, $th ) {
47        $this->nextPos = $nextPos;
48        $this->result = $result;
49        $this->preproc = $preproc;
50        $this->th = $th;
51
52    }
53}
54
55
56class TracingGrammar extends \Wikimedia\WikiPEG\PEGParserBase {
57    // initializer
58    
59    private Env $env;
60    private SiteConfig $siteConfig;
61    private array $pipelineOpts;
62    private int $pipelineOffset;
63    private array $extTags;
64    /** @var int|float */
65    private $startTime;
66    private string $reUrltextLookahead;
67    private string $urltextPlainSegment = '';
68    private bool $urltextFoundAutolink = false;
69    private bool $annotationsEnabledOnWiki = false;
70
71    protected function initialize() {
72        $this->env = $this->options['env'];
73        $this->siteConfig = $this->env->getSiteConfig();
74
75        $tokenizer = $this->options['pegTokenizer'];
76        $this->pipelineOpts = $tokenizer->getOptions();
77        // FIXME: inTemplate option may not always be set in
78        // standalone tokenizers user by some pipelines handlers.
79        $this->pipelineOffset = $this->options['pipelineOffset'] ?? 0;
80        $this->extTags = $this->siteConfig->getExtensionTagNameMap();
81        $this->annotationsEnabledOnWiki = count( $this->siteConfig->getAnnotationTags() ) > 0;
82
83        // Non-greedy text_char sequence: stop at ampersand, double-underscore,
84         // magic link prefix or protocol
85        $this->reUrltextLookahead = '!(?:' .
86            '([^-\'<[{\n\r:;\]}|\!=&]*?)' .
87            '(?:__|$|[-\'<[{\n\r:;\]}|\!=&]|(RFC|PMID|ISBN|' .
88            '(?i)' . $this->siteConfig->getProtocolsRegex( true ) .
89            ')))!A';
90
91        // Flag should always be an actual boolean (not falsy or undefined)
92        $this->assert( is_bool( $this->options['sol'] ), 'sol should be boolean' );
93    }
94
95    private $prevOffset = 0;
96    private $headingIndex = 0;
97    private $hasSOLTransparentAtStart = false;
98
99    public function resetState() {
100        $this->prevOffset = 0;
101        $this->headingIndex = 0;
102        $this->hasSOLTransparentAtStart = false;
103    }
104
105    private function assert( $condition, $text ) {
106        if ( !$condition ) {
107            throw new \RuntimeException( "Grammar.pegphp assertion failure: $text" );
108        }
109    }
110
111    private function unreachable() {
112        throw new UnreachableException( "Grammar.pegphp: this should be unreachable" );
113    }
114
115    // Some shorthands for legibility
116    private function startOffset() {
117        return $this->savedPos;
118    }
119
120    private function endOffset() {
121        return $this->currPos;
122    }
123
124    private function tsrOffsets( $flag = 'default' ): SourceRange {
125        switch ( $flag ) {
126            case 'start':
127                return new SourceRange( $this->savedPos, $this->savedPos );
128            case 'end':
129                return new SourceRange( $this->currPos, $this->currPos );
130            default:
131                return new SourceRange( $this->savedPos, $this->currPos );
132        }
133    }
134
135    /*
136     * Emit a chunk of tokens to our consumers.  Once this has been done, the
137     * current expression can return an empty list (true).
138     */
139    private function emitChunk( $tokens ) {
140        // FIXME: We don't expect nulls here, but looks like
141        // hack from I1c695ab6cdd3655e98877c175ddbabdee9dc44b7
142        // introduces them. Work around it for now!
143        if ( !$tokens ) {
144            return [];
145        }
146
147        // Shift tsr of all tokens by the pipeline offset
148        TokenUtils::shiftTokenTSR( $tokens, $this->pipelineOffset );
149        $this->env->trace( 'peg', $this->options['pipelineId'] ?? '0', '---->   ', $tokens );
150
151        $i = null;
152        $n = count( $tokens );
153
154        // Enforce parsing resource limits
155        for ( $i = 0;  $i < $n;  $i++ ) {
156            TokenizerUtils::enforceParserResourceLimits( $this->env, $tokens[ $i ] );
157        }
158
159        return $tokens;
160    }
161
162    /* ------------------------------------------------------------------------
163     * Extension tags should be parsed with higher priority than anything else.
164     *
165     * The trick we use is to strip out the content inside a matching tag-pair
166     * and not tokenize it. The content, if it needs to parsed (for example,
167     * for <ref>, <*include*> tags), is parsed in a fresh tokenizer context
168     * which means any error correction that needs to happen is restricted to
169     * the scope of the extension content and doesn't spill over to the higher
170     * level.  Ex: <math><!--foo</math>.
171     *
172     * IGNORE: {{ this just balances the blocks in this comment for pegjs
173     *
174     * This trick also lets us prevent extension content (that don't accept WT)
175     * from being parsed as wikitext (Ex: <math>\frac{foo\frac{bar}}</math>)
176     * We don't want the "}}" being treated as a template closing tag and
177     * closing outer templates.
178     * --------------------------------------------------------------------- */
179
180    private function isXMLTag( string $name ): bool {
181        $lName = mb_strtolower( $name );
182        return isset( Consts::$HTML['HTML5Tags'][$lName] ) ||
183            isset( Consts::$HTML['OlderHTMLTags'][$lName] );
184    }
185
186
187
188    // cache init
189      protected $cache = [];
190
191    // expectations
192    protected $expectations = [
193        0 => ["type" => "end", "description" => "end of input"],
1941 => ["type" => "other", "description" => "start"],
1952 => ["type" => "other", "description" => "table_start_tag"],
1963 => ["type" => "class", "value" => "['{]", "description" => "['{]"],
1974 => ["type" => "literal", "value" => "&", "description" => "\"&\""],
1985 => ["type" => "other", "description" => "table_attributes"],
1996 => ["type" => "other", "description" => "generic_newline_attributes"],
2007 => ["type" => "any", "description" => "any character"],
2018 => ["type" => "other", "description" => "extlink"],
2029 => ["type" => "other", "description" => "tlb"],
20310 => ["type" => "literal", "value" => "|", "description" => "\"|\""],
20411 => ["type" => "literal", "value" => "{{!}}", "description" => "\"{{!}}\""],
20512 => ["type" => "class", "value" => "[ \\t]", "description" => "[ \\t]"],
20613 => ["type" => "literal", "value" => "//", "description" => "\"//\""],
20714 => ["type" => "class", "value" => "[A-Za-z]", "description" => "[A-Za-z]"],
20815 => ["type" => "class", "value" => "[-A-Za-z0-9+.]", "description" => "[-A-Za-z0-9+.]"],
20916 => ["type" => "literal", "value" => ":", "description" => "\":\""],
21017 => ["type" => "literal", "value" => "[", "description" => "\"[\""],
21118 => ["type" => "class", "value" => "[0-9A-Fa-f:.]", "description" => "[0-9A-Fa-f:.]"],
21219 => ["type" => "literal", "value" => "]", "description" => "\"]\""],
21320 => ["type" => "class", "value" => "[^ \\]\\[\\r\\n\"'<>\\x00-\\x20\\x7f&\\u00A0\\u1680\\u180E\\u2000-\\u200A\\u202F\\u205F\\u3000{]", "description" => "[^ \\]\\[\\r\\n\"'<>\\x00-\\x20\\x7f&\\u00A0\\u1680\\u180E\\u2000-\\u200A\\u202F\\u205F\\u3000{]"],
21421 => ["type" => "literal", "value" => "<!--", "description" => "\"<!--\""],
21522 => ["type" => "literal", "value" => "-->", "description" => "\"-->\""],
21623 => ["type" => "literal", "value" => "=", "description" => "\"=\""],
21724 => ["type" => "class", "value" => "[\\0/=>]", "description" => "[\\0/=>]"],
21825 => ["type" => "class", "value" => "[ \\u00A0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]", "description" => "[ \\u00A0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]"],
21926 => ["type" => "literal", "value" => ";", "description" => "\";\""],
22027 => ["type" => "literal", "value" => "\x0a", "description" => "\"\\n\""],
22128 => ["type" => "literal", "value" => "\x0d\x0a", "description" => "\"\\r\\n\""],
22229 => ["type" => "literal", "value" => "{", "description" => "\"{\""],
22330 => ["type" => "class", "value" => "[#0-9a-zA-Z\u{5e8}\u{5dc}\u{5de}\u{631}\u{644}\u{645}]", "description" => "[#0-9a-zA-Z\u{5e8}\u{5dc}\u{5de}\u{631}\u{644}\u{645}]"],
22431 => ["type" => "class", "value" => "[\"'=]", "description" => "[\"'=]"],
22532 => ["type" => "class", "value" => "[^ \\t\\r\\n\\0/=><&{}\\-!|\\[]", "description" => "[^ \\t\\r\\n\\0/=><&{}\\-!|\\[]"],
22633 => ["type" => "literal", "value" => "'", "description" => "\"'\""],
22734 => ["type" => "literal", "value" => "\"", "description" => "\"\\\"\""],
22835 => ["type" => "literal", "value" => "/", "description" => "\"/\""],
22936 => ["type" => "class", "value" => "[^ \\t\\r\\n\\0/=><&{}\\-!|]", "description" => "[^ \\t\\r\\n\\0/=><&{}\\-!|]"],
23037 => ["type" => "class", "value" => "[ \\t\\n\\r\\x0c]", "description" => "[ \\t\\n\\r\\x0c]"],
23138 => ["type" => "class", "value" => "[^<[{\\n\\r|!\\]}\\-\\t&=\"' \\u00A0\\u1680\\u180E\\u2000-\\u200A\\u202F\\u205F\\u3000]", "description" => "[^<[{\\n\\r|!\\]}\\-\\t&=\"' \\u00A0\\u1680\\u180E\\u2000-\\u200A\\u202F\\u205F\\u3000]"],
23239 => ["type" => "class", "value" => "[&|{\\-!}=]", "description" => "[&|{\\-!}=]"],
23340 => ["type" => "class", "value" => "[']", "description" => "[']"],
23441 => ["type" => "literal", "value" => "[[", "description" => "\"[[\""],
23542 => ["type" => "class", "value" => "[*#:;]", "description" => "[*#:;]"],
23643 => ["type" => "literal", "value" => "{{", "description" => "\"{{\""],
23744 => ["type" => "class", "value" => "[^{}&<\\-!\\['\\r\\n|]", "description" => "[^{}&<\\-!\\['\\r\\n|]"],
23845 => ["type" => "class", "value" => "[{}&<\\-!\\[]", "description" => "[{}&<\\-!\\[]"],
23946 => ["type" => "class", "value" => "[^{}&<\\-!\\[\"\\r\\n|]", "description" => "[^{}&<\\-!\\[\"\\r\\n|]"],
24047 => ["type" => "class", "value" => "[^{}&<\\-!\\[ \\t\\n\\r\\x0c|]", "description" => "[^{}&<\\-!\\[ \\t\\n\\r\\x0c|]"],
24148 => ["type" => "literal", "value" => "<", "description" => "\"<\""],
24249 => ["type" => "class", "value" => "[^{}&<\\-|/'>]", "description" => "[^{}&<\\-|/'>]"],
24350 => ["type" => "class", "value" => "[{}&\\-|/]", "description" => "[{}&\\-|/]"],
24451 => ["type" => "class", "value" => "[^{}&<\\-|/\">]", "description" => "[^{}&<\\-|/\">]"],
24552 => ["type" => "class", "value" => "[^{}&<\\-|/ \\t\\n\\r\\x0c>]", "description" => "[^{}&<\\-|/ \\t\\n\\r\\x0c>]"],
24653 => ["type" => "literal", "value" => "__", "description" => "\"__\""],
24754 => ["type" => "class", "value" => "[^-'<[{\\n\\r:;\\]}|!=]", "description" => "[^-'<[{\\n\\r:;\\]}|!=]"],
24855 => ["type" => "literal", "value" => "-", "description" => "\"-\""],
24956 => ["type" => "literal", "value" => "''", "description" => "\"''\""],
25057 => ["type" => "class", "value" => "[ \\t\\n\\r\\0\\x0b]", "description" => "[ \\t\\n\\r\\0\\x0b]"],
25158 => ["type" => "class", "value" => "[^ \\t\\n\\r\\x0c:\\[]", "description" => "[^ \\t\\n\\r\\x0c:\\[]"],
25259 => ["type" => "literal", "value" => "----", "description" => "\"----\""],
25360 => ["type" => "literal", "value" => "{{{", "description" => "\"{{{\""],
25461 => ["type" => "literal", "value" => "}}}", "description" => "\"}}}\""],
25562 => ["type" => "literal", "value" => "}}", "description" => "\"}}\""],
25663 => ["type" => "literal", "value" => "]]", "description" => "\"]]\""],
25764 => ["type" => "literal", "value" => ">", "description" => "\">\""],
25865 => ["type" => "class", "value" => "[0-9]", "description" => "[0-9]"],
25966 => ["type" => "literal", "value" => "ISBN", "description" => "\"ISBN\""],
26067 => ["type" => "class", "value" => "[xX]", "description" => "[xX]"],
26168 => ["type" => "literal", "value" => "</>", "description" => "\"</>\""],
26269 => ["type" => "literal", "value" => "}", "description" => "\"}\""],
26370 => ["type" => "literal", "value" => "#parsoid\x00fragment:", "description" => "\"#parsoid\\u0000fragment:\""],
26471 => ["type" => "class", "value" => "[^<[{\\n\\r\\t|!\\]}{ &\\-]", "description" => "[^<[{\\n\\r\\t|!\\]}{ &\\-]"],
26572 => ["type" => "class", "value" => "[!<\\-\\}\\]\\n\\r]", "description" => "[!<\\-\\}\\]\\n\\r]"],
26673 => ["type" => "literal", "value" => "RFC", "description" => "\"RFC\""],
26774 => ["type" => "literal", "value" => "PMID", "description" => "\"PMID\""],
26875 => ["type" => "literal", "value" => "-{", "description" => "\"-{\""],
26976 => ["type" => "literal", "value" => "}-", "description" => "\"}-\""],
27077 => ["type" => "literal", "value" => "+", "description" => "\"+\""],
27178 => ["type" => "class", "value" => "[^\\t\\n\\v />\\0]", "description" => "[^\\t\\n\\v />\\0]"],
27279 => ["type" => "literal", "value" => "!", "description" => "\"!\""],
27380 => ["type" => "literal", "value" => "=>", "description" => "\"=>\""],
27481 => ["type" => "literal", "value" => "!!", "description" => "\"!!\""],
27582 => ["type" => "literal", "value" => "||", "description" => "\"||\""],
27683 => ["type" => "literal", "value" => "{{!}}{{!}}", "description" => "\"{{!}}{{!}}\""],
27784 => ["type" => "class", "value" => "[-+A-Z]", "description" => "[-+A-Z]"],
27885 => ["type" => "class", "value" => "[^{}|;]", "description" => "[^{}|;]"],
27986 => ["type" => "class", "value" => "[a-z]", "description" => "[a-z]"],
28087 => ["type" => "class", "value" => "[-a-zA-Z]", "description" => "[-a-zA-Z]"],
281    ];
282
283    // actions
284    private function a0() {
285
286                $this->startTime = null;
287                if ( $this->env->profiling() ) {
288                    $profile = $this->env->getCurrentProfile();
289                    $this->startTime = hrtime( true );
290                }
291                return true;
292            
293}
294private function a1($t) {
295
296                if ( $this->env->profiling() ) {
297                    $profile = $this->env->getCurrentProfile();
298                    $profile->bumpTimeUse(
299                        'PEG', hrtime( true ) - $this->startTime, 'PEG' );
300                }
301                return true;
302            
303}
304private function a2($t) {
305 return $t; 
306}
307private function a3() {
308
309            // "tlb" matches "block" matches "sol" matches "newlineToken"
310            // But, "tlb" is prefixed with a !eof clause, so, we should only
311            // get here on eof. So, safe to unconditionally terminate the
312            // generator loop here.
313            return false;
314        
315}
316private function a4($t, $n) {
317
318        if ( count( $t ) ) {
319            $ret = TokenizerUtils::flattenIfArray( $t );
320        } else {
321            $ret = [];
322        }
323        if ( count( $n ) ) {
324            PHPUtils::pushArray($ret, $n);
325        }
326        $ret[] = new EOFTk();
327        return $ret;
328    
329}
330private function a5($b, $p) {
331 $this->unreachable(); 
332}
333private function a6($b, $p, $ta) {
334 return $this->endOffset(); 
335}
336private function a7($b, $p, $ta, $tsEndPos, $s2) {
337
338        $coms = TokenizerUtils::popComments( $ta );
339        if ( $coms ) {
340            $tsEndPos = $coms['commentStartPos'];
341        }
342
343        $dp = new DataParsoid;
344        $dp->tsr = new SourceRange( $this->startOffset(), $tsEndPos );
345        if ( $p !== '|' ) {
346            // Variation from default
347            $dp->startTagSrc = $b . $p;
348        }
349
350        return array_merge(
351            [ new TagTk( 'table', $ta, $dp ) ],
352            $coms ? $coms['buf'] : [],
353            $s2
354        );
355    
356}
357private function a8($proto, $addr, $he) {
358 return $he; 
359}
360private function a9($proto, $addr, $r) {
361 return $r; 
362}
363private function a10($proto, $addr, $c) {
364 return $c; 
365}
366private function a11($proto, $addr, $path) {
367 return $addr !== '' || count( $path ) > 0; 
368}
369private function a12($proto, $addr, $path) {
370
371        return TokenizerUtils::flattenString( array_merge( [ $proto, $addr ], $path ) );
372    
373}
374private function a13($as, $s, $p) {
375
376        return [ $as, $s, $p ];
377    
378}
379private function a14($b) {
380 return $b; 
381}
382private function a15($r) {
383 return TokenizerUtils::flattenIfArray( $r ); 
384}
385private function a16() {
386 return $this->endOffset(); 
387}
388private function a17($p0, $addr, $target) {
389 return TokenizerUtils::flattenString( [ $addr, $target ] ); 
390}
391private function a18($p0, $flat) {
392
393            // Protocol must be valid and there ought to be at least one
394            // post-protocol character.  So strip last char off target
395            // before testing protocol.
396            if ( is_array( $flat ) ) {
397                // There are templates present, alas.
398                return count( $flat ) > 0;
399            }
400            return Utils::isProtocolValid( substr( $flat, 0, -1 ), $this->env );
401        
402}
403private function a19($p0, $flat) {
404 return $this->endOffset(); 
405}
406private function a20($p0, $flat, $p1, $sp) {
407 return $this->endOffset(); 
408}
409private function a21($p0, $flat, $p1, $sp, $p2, $content) {
410 return $this->endOffset(); 
411}
412private function a22($p0, $flat, $p1, $sp, $p2, $content, $p3) {
413
414            $tsr1 = new SourceRange( $p0, $p1 );
415            $tsr2 = new SourceRange( $p2, $p3 );
416            $dp = new DataParsoid;
417            $dp->tsr = $this->tsrOffsets();
418            $dp->getTemp()->extLinkContentOffsets = $tsr2;
419            return [
420                new SelfclosingTagTk(
421                    'extlink',
422                    [
423                        new KV( 'href', $flat, $tsr1->expandTsrV() ),
424                        new KV( 'mw:content', $content ?? '', $tsr2->expandTsrV() ),
425                        new KV( 'spaces', $sp )
426                    ],
427                    $dp
428                )
429            ]; 
430}
431private function a23($r) {
432 return $r; 
433}
434private function a24($b) {
435
436        // Clear the tokenizer's backtracking cache after matching each
437        // toplevelblock. There won't be any backtracking as a document is just a
438        // sequence of toplevelblocks, so the cache for previous toplevelblocks
439        // will never be needed.
440        $end = $this->startOffset();
441        for ( ;  $this->prevOffset < $end;  $this->prevOffset++ ) {
442            unset( $this->cache[$this->prevOffset] );
443        }
444
445        $tokens = null;
446        if ( is_array( $b ) && count( $b ) ) {
447            $tokens = TokenizerUtils::flattenIfArray( $b );
448        } elseif ( is_string( $b ) ) {
449            $tokens = [ $b ];
450        }
451
452        // Emit tokens for this toplevelblock. This feeds a chunk to the parser pipeline.
453        return $this->emitChunk( $tokens );
454    
455}
456private function a25() {
457 return [ new NlTk( $this->tsrOffsets() ) ]; 
458}
459private function a26($p) {
460 return Utils::isProtocolValid( $p, $this->env ); 
461}
462private function a27($p) {
463 return $p; 
464}
465private function a28($annOrExtTag, $h, $extlink, $intemplate, &$preproc, $equal, $table, $templateArg, $tableCellArg, $semicolon, $arrow, $linkdesc, $colon, &$th) {
466
467            return TokenizerUtils::inlineBreaks( $this->input, $this->endOffset(), [
468                'annOrExtTag' => $annOrExtTag,
469                'h' => $h,
470                'extlink' => $extlink,
471                'intemplate' => $intemplate,
472                'preproc' => $preproc,
473                'equal' => $equal,
474                'table' => $table,
475                'templateArg' => $templateArg,
476                'tableCellArg' => $tableCellArg,
477                'semicolon' => $semicolon,
478                'arrow' => $arrow,
479                'linkdesc' => $linkdesc,
480                'colon' => $colon,
481                'th' => $th
482            ], $this->env );
483        
484}
485private function a29($c, $cEnd) {
486
487        $data = WTUtils::encodeComment( $c );
488        $dp = new DataParsoid;
489        $dp->tsr = $this->tsrOffsets();
490        if ( $cEnd !== '-->' ) {
491            $dp->unclosedComment = true;
492        }
493        return [ new CommentTk( $data, $dp ) ];
494    
495}
496private function a30($t) {
497
498        return $t;
499    
500}
501private function a31($cc) {
502
503        // if this is an invalid entity, don't tag it with 'mw:Entity'
504        // note that some entities (like &acE;) decode to 2 codepoints!
505        if ( mb_strlen( $cc ) > 2 /* decoded entity would be 1-2 codepoints */ ) {
506            return $cc;
507        }
508        $dpStart = new DataParsoid;
509        $dpStart->src = $this->text();
510        $dpStart->srcContent = $cc;
511        $dpStart->tsr = $this->tsrOffsets( 'start' );
512        $dpEnd = new DataParsoid;
513        $dpEnd->tsr = $this->tsrOffsets( 'end' );
514        return [
515            // If this changes, the nowiki extension's toDOM will need to follow suit
516            new TagTk( 'span', [ new KV( 'typeof', 'mw:Entity' ) ], $dpStart ),
517            $cc,
518            new EndTagTk( 'span', [], $dpEnd )
519        ];
520    
521}
522private function a32($s) {
523 return $this->endOffset(); 
524}
525private function a33($s, $namePos0, $name) {
526 return $this->endOffset(); 
527}
528private function a34($s, $namePos0, $name, $namePos1, $v) {
529 return $v; 
530}
531private function a35($s, $namePos0, $name, $namePos1, $vd) {
532
533    // NB: Keep in sync w/ generic_newline_attribute
534    $res = null;
535    // Encapsulate protected attributes.
536    if ( gettype( $name ) === 'string' ) {
537        $name = TokenizerUtils::protectAttrs( $name );
538    }
539    $nameSO = new SourceRange( $namePos0, $namePos1 );
540    if ( $vd !== null ) {
541        $res = new KV( $name, $vd['value'], $nameSO->join( $vd['srcOffsets'] ) );
542        $res->vsrc = $vd['srcOffsets']->substr( $this->input );
543    } else {
544        $res = new KV( $name, '', $nameSO->expandTsrK() );
545    }
546    if ( is_array( $name ) ) {
547        $res->ksrc = $nameSO->substr( $this->input );
548    }
549    return $res;
550
551}
552private function a36($s) {
553
554        if ( $s !== '' ) {
555            return [ $s ];
556        } else {
557            return [];
558        }
559    
560}
561private function a37($c) {
562 return new KV( $c, '' ); 
563}
564private function a38($namePos0, $name) {
565 return $this->endOffset(); 
566}
567private function a39($namePos0, $name, $namePos1, $v) {
568 return $v; 
569}
570private function a40($namePos0, $name, $namePos1, $vd) {
571
572    // NB: Keep in sync w/ table_attibute
573    $res = null;
574    // Encapsulate protected attributes.
575    if ( is_string( $name ) ) {
576        $name = TokenizerUtils::protectAttrs( $name );
577    }
578    $nameSO = new SourceRange( $namePos0, $namePos1 );
579    if ( $vd !== null ) {
580        $res = new KV( $name, $vd['value'], $nameSO->join( $vd['srcOffsets'] ) );
581        $res->vsrc = $vd['srcOffsets']->substr( $this->input );
582    } else {
583        $res = new KV( $name, '', $nameSO->expandTsrK() );
584    }
585    if ( is_array( $name ) ) {
586        $res->ksrc = $nameSO->substr( $this->input );
587    }
588    return $res;
589
590}
591private function a41($s) {
592 return $s; 
593}
594private function a42($c) {
595
596        return TokenizerUtils::flattenStringlist( $c );
597    
598}
599private function a43($lc) {
600 return $lc; 
601}
602private function a44($bullets, $colons, $d) {
603
604        $bulletToks = [];
605        // Leave bullets as an array -- list handler expects this
606        // TSR: +1 for the leading ";"
607        $numBullets = count( $bullets ) + 1;
608        $tsr = $this->tsrOffsets( 'start' );
609        $tsr->end += $numBullets;
610        $li1Bullets = $bullets;
611        $li1Bullets[] = ';';
612        $dp = new DataParsoid;
613        $dp->tsr = $tsr;
614        $bulletToks[] = new TagTk( 'listItem', [ new KV( 'bullets', $li1Bullets, $tsr->expandTsrV() ) ], $dp );
615        foreach ( $colons as $colon) {
616            if ( $colon[0] ) { // can be null because of "?" in dtdd_colon
617                $bulletToks[] = $colon[0];
618            }
619            $cpos = $colon[1];
620            // TSR: -1 for the intermediate ":"
621            $li2Bullets = $bullets;
622            $li2Bullets[] = ':';
623            $tsr2 = new SourceRange( $cpos - 1, $cpos );
624            $dp2 = new DataParsoid;
625            $dp2->tsr = $tsr2;
626            $dp2->stx = 'row';
627            $bulletToks[] = new TagTk( 'listItem', [ new KV( 'bullets', $li2Bullets, $tsr2->expandTsrV() ) ], $dp2 );
628        }
629
630        if ( $d ) {
631            $bulletToks = array_merge( $bulletToks, $d );
632        }
633        return $bulletToks;
634    
635}
636private function a45($bullets, $sc, $tbl) {
637
638    // Leave bullets as an array -- list handler expects this
639    $tsr = $this->tsrOffsets( 'start' );
640    $tsr->end += count( $bullets );
641    $dp = new DataParsoid;
642    $dp->tsr = $tsr;
643    $li = new TagTk( 'listItem', [ new KV( 'bullets', $bullets, $tsr->expandTsrV() ) ], $dp );
644    return array_merge( [ $li ], $sc, $tbl );
645
646}
647private function a46($bullets, $c) {
648
649        // Leave bullets as an array -- list handler expects this
650        $tsr = $this->tsrOffsets( 'start' );
651        $tsr->end += count( $bullets );
652        $dp = new DataParsoid;
653        $dp->tsr = $tsr;
654        $li = new TagTk( 'listItem', [ new KV( 'bullets', $bullets, $tsr->expandTsrV() ) ], $dp );
655        return array_merge( [ $li ], $c ?: [] );
656    
657}
658private function a47() {
659 return $this->endOffset() === $this->inputLength; 
660}
661private function a48($r, $cil, $bl) {
662
663        $this->hasSOLTransparentAtStart = true;
664        return array_merge( [ $r ], $cil, $bl ?: [] );
665    
666}
667private function a49($a) {
668 return $a; 
669}
670private function a50($a, $b) {
671 return [ $a, $b ]; 
672}
673private function a51($m) {
674
675        return Utils::decodeWtEntities( $m );
676    
677}
678private function a52($q, $x, $ill) {
679 return array_merge( [$x], $ill ?: [] ); 
680}
681private function a53($q, $t) {
682 return $t; 
683}
684private function a54($q, $r) {
685 return count( $r ) > 0 || $q !== ''; 
686}
687private function a55($q, $r) {
688
689        array_unshift( $r, $q );
690        return TokenizerUtils::flattenString( $r );
691    
692}
693private function a56($s, $t, $q) {
694
695        return TokenizerUtils::getAttrVal( $t, $this->startOffset() + strlen( $s ), $this->endOffset() - strlen( $q ) );
696    
697}
698private function a57($s, $t) {
699
700        return TokenizerUtils::getAttrVal( $t, $this->startOffset() + strlen( $s ), $this->endOffset() );
701    
702}
703private function a58($r) {
704
705        return TokenizerUtils::flattenString( $r );
706    
707}
708private function a59() {
709
710            if ( preg_match( $this->reUrltextLookahead, $this->input, $m, 0, $this->currPos ) ) {
711                $plain = $m[1];
712                $this->urltextPlainSegment = $plain;
713                $this->urltextFoundAutolink = ( $m[2] ?? '' ) !== '';
714                return (bool)strlen( $plain );
715            } else {
716                $this->urltextFoundAutolink = false;
717                return false;
718            }
719        
720}
721private function a60() {
722
723            $this->currPos += strlen( $this->urltextPlainSegment );
724            return $this->urltextPlainSegment;
725        
726}
727private function a61() {
728 return $this->urltextFoundAutolink; 
729}
730private function a62($al) {
731 return $al; 
732}
733private function a63($he) {
734 return $he; 
735}
736private function a64($bs) {
737 return $bs; 
738}
739private function a65($c) {
740 return $this->endOffset(); 
741}
742private function a66($c, $cpos) {
743
744    return [ $c, $cpos ];
745
746}
747private function a67() {
748 return $this->endOffset() === 0 && !$this->pipelineOffset; 
749}
750private function a68($rw, $sp, $c, $wl) {
751
752        return count( $wl ) === 1 && $wl[0] instanceof Token;
753    
754}
755private function a69($rw, $sp, $c, $wl) {
756
757        $link = $wl[0];
758        if ( $sp ) {
759            $rw .= $sp;
760        }
761        if ( $c ) {
762            $rw .= $c;
763        }
764        // Build a redirect token
765        $dp = new DataParsoid;
766        $dp->src = $rw;
767        $dp->tsr = $this->tsrOffsets();
768        $dp->linkTk = $link;
769        $redirect = new SelfclosingTagTk( 'mw:redirect',
770            // Put 'href' into attributes so it gets template-expanded
771            [ $link->getAttributeKV( 'href' ) ],
772            $dp
773        );
774        return $redirect;
775    
776}
777private function a70($tl) {
778 return $tl; 
779}
780private function a71($s, $os, $so) {
781 return array_merge( $os, $so ); 
782}
783private function a72($s, $s2, $bl) {
784
785        return array_merge( $s, $s2 ?: [], $bl );
786    
787}
788private function a73($sp, $elc, $st) {
789
790    $this->hasSOLTransparentAtStart = ( count( $st ) > 0 );
791    return [ $sp, $elc ?? [], $st ];
792
793}
794private function a74(&$preproc, $t) {
795
796        $preproc = null;
797        return $t;
798    
799}
800private function a75($v) {
801 return $v; 
802}
803private function a76($e) {
804 return $e; 
805}
806private function a77() {
807 return Utils::isUniWord(Utils::lastUniChar( $this->input, $this->endOffset() ) ); 
808}
809private function a78($bs) {
810
811        if ( $this->siteConfig->isBehaviorSwitch( $bs ) ) {
812            $dp = new DataParsoid;
813            $dp->tsr = $this->tsrOffsets();
814            $dp->src = $bs;
815            $dp->magicSrc = $bs;
816            return [
817                new SelfclosingTagTk( 'behavior-switch', [ new KV( 'word', $bs ) ], $dp )
818            ];
819        } else {
820            return [ $bs ];
821        }
822    
823}
824private function a79($quotes) {
825
826        // sequences of four or more than five quotes are assumed to start
827        // with some number of plain-text apostrophes.
828        $plainticks = 0;
829        $result = [];
830        if ( strlen( $quotes ) === 4 ) {
831            $plainticks = 1;
832        } elseif ( strlen( $quotes ) > 5 ) {
833            $plainticks = strlen( $quotes ) - 5;
834        }
835        if ( $plainticks > 0 ) {
836            $result[] = substr( $quotes, 0, $plainticks );
837        }
838        // mw-quote token will be consumed in token transforms
839        $tsr = $this->tsrOffsets();
840        $tsr->start += $plainticks;
841        $dp = new DataParsoid;
842        $dp->tsr = $tsr;
843        $mwq = new SelfclosingTagTk( 'mw-quote',
844            [ new KV( 'value', substr( $quotes, $plainticks ) ) ],
845            $dp );
846        if ( strlen( $quotes ) > 2 ) {
847            $mwq->addAttribute( 'isSpace_1', $tsr->start > 0 && substr( $this->input, $tsr->start - 1, 1 ) === ' ');
848            $mwq->addAttribute( 'isSpace_2', $tsr->start > 1 && substr( $this->input, $tsr->start - 2, 1 ) === ' ');
849        }
850        $result[] = $mwq;
851        return $result;
852    
853}
854private function a80($rw) {
855
856            return preg_match( $this->env->getSiteConfig()->getMagicWordMatcher( 'redirect' ), $rw );
857        
858}
859private function a81($t) {
860
861        $tagName = mb_strtolower( $t->getName() );
862        switch ( $tagName ) {
863            case 'includeonly':
864                $typeOf = 'mw:Includes/IncludeOnly';
865                break;
866            case 'noinclude':
867                $typeOf = 'mw:Includes/NoInclude';
868                break;
869            case 'onlyinclude':
870                $typeOf = 'mw:Includes/OnlyInclude';
871                break;
872            default:
873                $this->unreachable();
874        }
875
876        $isEnd = ( $t instanceof EndTagTk );
877        if ( $isEnd ) {
878            $typeOf .= '/End';
879        }
880
881        $dp = new DataParsoid;
882        $dp->tsr = $t->dataParsoid->tsr;
883        $dp->src = $dp->tsr->substr( $this->input );
884
885        $meta = new SelfclosingTagTk(
886            'meta', [ new KV( 'typeof', $typeOf ) ], $dp
887        );
888
889        $startTagWithContent = false;
890        if ( $t instanceof TagTk ) {
891            $endTagRE = '~.*?(</' . preg_quote( $tagName, '~' ) . '\s*>)~iusA';
892            $startTagWithContent = preg_match(
893                $endTagRE, $this->input, $content, 0, $dp->tsr->start
894            );
895        }
896
897        if ( !empty( $this->pipelineOpts['inTemplate'] ) ) {
898            switch ( $tagName ) {
899                case 'includeonly':
900                    // Drop the tag
901                    return [];
902                case 'noinclude':
903                    if ( $startTagWithContent ) {
904                        // Skip the content
905                        $this->currPos = $dp->tsr->start + strlen( $content[0] );
906                    }
907                    // Drop it all
908                    return [];
909                case 'onlyinclude':
910                    if ( $startTagWithContent ) {
911                        // Parse the content, strip eof, and shift tsr
912                        $contentSrc = $content[0];
913                        $endOffset = $dp->tsr->start + strlen( $contentSrc );
914                        $endTagWidth = strlen( $content[1] );
915                        $tagOffsets = new DomSourceRange(
916                            $dp->tsr->start, $endOffset,
917                            $dp->tsr->length(), $endTagWidth
918                        );
919                        $this->currPos = $tagOffsets->innerEnd();
920                        $justContent = $tagOffsets->stripTags( $contentSrc );
921                        // FIXME: What about the pipelineOpts of the current pipeline?
922                        $tokenizer = new PegTokenizer( $this->env );
923                        $tokenizer->setSourceOffsets( $tagOffsets->innerRange() );
924                        $contentToks = $tokenizer->tokenizeSync(
925                            $justContent, [ 'sol' => true ]
926                        );
927                        TokenUtils::stripEOFTkFromTokens( $contentToks );
928                        array_unshift( $contentToks, $t );
929                        return $contentToks;
930                    } else {
931                        return [$t];
932                    }
933            }
934        } else {
935            $tokens = [ $meta ];
936            if ( $tagName === 'includeonly' ) {
937                if ( $startTagWithContent ) {
938                    // Add the content / end tag to the meta for roundtripping
939                    $dp->tsr->end = $dp->tsr->start + strlen( $content[0] );
940                    $dp->src = $dp->tsr->substr( $this->input );
941                    $meta->dataMw = new DataMw( [ 'src' => $dp->src ] );
942                    $this->currPos = $dp->tsr->end;
943                    // FIXME: We shouldn't bother with this because SelfclosingTk
944                    // was never balanced to begin with
945                    if ( strlen( $content[1] ) ) {
946                        $eDp = new DataParsoid;
947                        $eDp->tsr = new SourceRange( $dp->tsr->end, $dp->tsr->end );
948                        $eDp->src = $eDp->tsr->substr( $this->input );
949                        $tokens[] = new SelfclosingTagTk( 'meta', [
950                            new KV( 'typeof', 'mw:Includes/IncludeOnly/End' )
951                        ], $eDp );
952                    }
953                } elseif ( !( $t instanceof EndTagTk ) ) {
954                    $meta->dataMw = new DataMw( [ 'src' => $dp->src ] );
955                } else {
956                    // Compatibility with the legacy parser which leaves these in
957                    // as strings, which the sanitizer will do for us
958                    array_pop( $tokens );
959                    $tokens[] = $t;
960                }
961            }
962            return $tokens;
963        }
964    
965}
966private function a82() {
967 return $this->annotationsEnabledOnWiki; /* short-circuit! */ 
968}
969private function a83($t) {
970
971            $end = ( $t instanceof EndTagTk );
972            $attribs = $t->attribs;
973            $tagName = mb_strtolower( $t->getName() );
974            $tsr = $t->dataParsoid->tsr;
975
976            // We already applied this logic in WTUtils::isAnnotationTag
977            // to get here so we can make some assumptions.
978            if ( !$this->siteConfig->isAnnotationTag( $tagName ) ) {
979                $pipepos = strpos( $tagName, '|' );
980                $strBeforePipe = substr( $tagName, 0, $pipepos );
981                $newName = substr( $tagName, $pipepos + 1, strlen( $tagName ) - $pipepos - 1 );
982                $attribs = [ new KV( "name", $newName ) ];
983                $tagName = $strBeforePipe;
984            }
985
986            $metaAttrs = [ new KV( 'typeof', 'mw:Annotation/' . $tagName . ( $end ? '/End' : '' ) ) ];
987            $datamw = null;
988            if ( count( $attribs ) > 0 ) {
989                $datamw = new DataMw();
990                foreach ( $attribs as $attr ) {
991                    // If the key or the value is not a string,
992                    // we replace it by the thing that generated it and
993                    // consider that wikitext as a raw string instead.
994                    $k = is_string( $attr->k ) ? $attr->k : $attr->ksrc;
995                    $v = is_string( $attr->v ) ? $attr->v : $attr->vsrc;
996                    // Possible follow-up in T295168 for attribute sanitation
997                    $datamw->setExtAttrib( $k, $v );
998                }
999            }
1000            $dp = new DataParsoid();
1001            $dp->tsr = $tsr;
1002            $this->env->hasAnnotations = true;
1003
1004            return new SelfclosingTagTk ( 'meta', $metaAttrs, $dp, $datamw );
1005        
1006}
1007private function a84($tag) {
1008
1009        // FIXME: Suppress annotation meta tokens from template pipelines
1010        // since they may not have TSR values and won't get recognized as
1011        // annotation ranges. Without TSR, they might end up stuck in
1012        // fosterable positions and cause havoc on edits by breaking selser.
1013        if ( empty( $this->pipelineOpts['inTemplate'] ) ) {
1014            return $tag;
1015        } else {
1016            return '';
1017        }
1018    
1019}
1020private function a85($s, $ill) {
1021 return $ill ?: []; 
1022}
1023private function a86($s, $ce) {
1024 return $ce || strlen( $s ) > 2; 
1025}
1026private function a87($s, $ce) {
1027 return $this->endOffset(); 
1028}
1029private function a88($s, $ce, $endTPos, $spc) {
1030
1031            $c = null;
1032            $e = null;
1033            $level = null;
1034            if ( $ce ) {
1035                $c = $ce[0];
1036                $e = $ce[1];
1037                $level = min( strlen( $s ), strlen( $e ) );
1038            } else {
1039                // split up equal signs into two equal parts, with at least
1040                // one character in the middle.
1041                $level = (int)floor( ( strlen( $s ) - 1 ) / 2 );
1042                $c = [ str_repeat( '=', strlen( $s ) - 2 * $level ) ];
1043                $s = $e = str_repeat( '=', $level );
1044            }
1045            $level = min( 6, $level );
1046            // convert surplus equals into text
1047            if ( strlen( $s ) > $level ) {
1048                $extras1 = substr( $s, 0, strlen( $s ) - $level );
1049                if ( is_string( $c[0] ) ) {
1050                    $c[0] = $extras1 . $c[0];
1051                } else {
1052                    array_unshift( $c, $extras1 );
1053                }
1054            }
1055            if ( strlen( $e ) > $level ) {
1056                $extras2 = substr( $e, 0, strlen( $e ) - $level );
1057                $lastElem = PHPUtils::lastItem( $c );
1058                if ( is_string( $lastElem ) ) {
1059                    $c[count( $c ) - 1] .= $extras2;
1060                } else {
1061                    $c[] = $extras2;
1062                }
1063            }
1064
1065            $tagDP = new DataParsoid;
1066            $tagDP->tsr = $this->tsrOffsets( 'start' );
1067            $tagDP->tsr->end += $level;
1068
1069            // Match the old parser's behavior by
1070            // (a) making headingIndex part of tokenizer state
1071            //   (don't reuse pipeline! see $this->resetState above)
1072            // (b) assigning the index when ==*== is tokenized,
1073            //   even if we're inside a template argument
1074            //   or other context which won't end up putting the heading
1075            //   on the output page.  T213468/T214538
1076
1077            // Unlike hasSOLTransparentAtStart, trailing whitespace and comments
1078            // are allowed
1079            $hasSOLTransparentAtEnd = !preg_match(
1080                Utils::COMMENT_OR_WS_REGEXP,
1081                substr( $this->input, $endTPos, $this->endOffset() - $endTPos )
1082            );
1083
1084            // If either of these are true, the legacy preprocessor won't tokenize
1085            // a heading and therefore won't assign them a heading index.  They
1086            // will however parse as headings in the legacy parser's second pass,
1087            // once sol transparent tokens have been stripped.
1088            if ( !$this->hasSOLTransparentAtStart && !$hasSOLTransparentAtEnd ) {
1089                $this->headingIndex++;
1090                $tagDP->getTemp()->headingIndex = $this->headingIndex;
1091            }
1092
1093            $res = [ new TagTk( 'h' . $level, [], $tagDP ) ];
1094            PHPUtils::pushArray( $res, $c );
1095            $endTagDP = new DataParsoid;
1096            $endTagDP->tsr = new SourceRange( $endTPos - $level, $endTPos );
1097            $res[] = new EndTagTk( 'h' . $level, [], $endTagDP );
1098            PHPUtils::pushArray( $res, $spc );
1099            return $res;
1100        
1101}
1102private function a89($d) {
1103 return null; 
1104}
1105private function a90($d) {
1106 return true; 
1107}
1108private function a91($d, $lineContent) {
1109
1110        $dataParsoid = new DataParsoid;
1111        $dataParsoid->tsr = $this->tsrOffsets();
1112        if ( $lineContent !== null ) {
1113            $dataParsoid->lineContent = $lineContent;
1114        }
1115        if ( strlen( $d ) > 0 ) {
1116            $dataParsoid->extra_dashes = strlen( $d );
1117        }
1118        return [new SelfclosingTagTk( 'hr', [], $dataParsoid )];
1119    
1120}
1121private function a92($sc, $tl) {
1122
1123        return array_merge($sc, $tl);
1124    
1125}
1126private function a93() {
1127
1128        // Use the sol flag only at the start of the input
1129        return $this->endOffset() === 0 && $this->options['sol'];
1130    
1131}
1132private function a94() {
1133
1134        return [];
1135    
1136}
1137private function a95($p, $c) {
1138
1139        $dp = new DataParsoid;
1140        $dp->tsr = new SourceRange( $p, $this->endOffset() );
1141        return [ new EmptyLineTk( TokenizerUtils::flattenIfArray( $c ), $dp ) ];
1142    
1143}
1144private function a96($p, $target) {
1145 return $this->endOffset(); 
1146}
1147private function a97($p, $target, $p0, $v) {
1148 return $this->endOffset(); 
1149}
1150private function a98($p, $target, $p0, $v, $p1) {
1151
1152                // empty argument
1153                return [ 'tokens' => $v, 'srcOffsets' => new SourceRange( $p0, $p1 ) ];
1154            
1155}
1156private function a99($p, $target, $r) {
1157 return $r; 
1158}
1159private function a100($p, $target, $params) {
1160
1161        $kvs = [];
1162
1163        if ( $target === null ) {
1164            $target = [ 'tokens' => '', 'srcOffsets' => new SourceRange( $p, $p ) ];
1165        }
1166        // Insert target as first positional attribute, so that it can be
1167        // generically expanded. The TemplateHandler then needs to shift it out
1168        // again.
1169        $kvs[] = new KV( TokenizerUtils::flattenIfArray( $target['tokens'] ), '', $target['srcOffsets']->expandTsrK() );
1170
1171        foreach ( $params as $o ) {
1172            $s = $o['srcOffsets'];
1173            $kvs[] = new KV( '', TokenizerUtils::flattenIfArray( $o['tokens'] ), $s->expandTsrV() );
1174        }
1175
1176        $dp = new DataParsoid;
1177        $dp->tsr = $this->tsrOffsets();
1178        $dp->src = $this->text();
1179        $obj = new SelfclosingTagTk( 'templatearg', $kvs, $dp );
1180        return $obj;
1181    
1182}
1183private function a101($target) {
1184 return $this->endOffset(); 
1185}
1186private function a102($target, $p0, $v) {
1187 return $this->endOffset(); 
1188}
1189private function a103($target, $p0, $v, $p1) {
1190
1191                // empty argument
1192                $tsr0 = new SourceRange( $p0, $p1 );
1193                return new KV( '', TokenizerUtils::flattenIfArray( $v ), $tsr0->expandTsrV() );
1194            
1195}
1196private function a104($target, $r) {
1197 return $r; 
1198}
1199private function a105($target, $params) {
1200
1201        // Insert target as first positional attribute, so that it can be
1202        // generically expanded. The TemplateHandler then needs to shift it out
1203        // again.
1204        array_unshift( $params, new KV( TokenizerUtils::flattenIfArray( $target['tokens'] ), '', $target['srcOffsets']->expandTsrK() ) );
1205        $dp = new DataParsoid;
1206        $dp->tsr = $this->tsrOffsets();
1207        $dp->src = $this->text();
1208        $obj = new SelfclosingTagTk( 'template', $params, $dp );
1209        return $obj;
1210    
1211}
1212private function a106($spos, $target) {
1213 return $this->endOffset(); 
1214}
1215private function a107($spos, $target, $tpos, $l) {
1216 return [$l,null]; 
1217}
1218private function a108($spos, $target, $tpos, $l) {
1219 return [null,$l]; 
1220}
1221private function a109($spos, $target, $tpos, $lcs) {
1222
1223        [$lcs, $not_wikilink] = $lcs;
1224        $pipeTrick = $lcs && count( $lcs ) === 1 && count( $lcs[0][1]->v ) === 0;
1225        if ( $target === null || $pipeTrick || $not_wikilink) {
1226            $textTokens = [];
1227            $textTokens[] = '[[';
1228            if ( $target ) {
1229                $textTokens[] = $target;
1230            }
1231            foreach ( $lcs ?? [] as $a ) {
1232                // $a[0] is a pipe
1233                // FIXME: Account for variation, emit a template tag
1234                $textTokens[] = '|';
1235                // $a[1] is a mw:maybeContent attribute
1236                if ( count( $a[1]->v ) > 0 ) {
1237                    $textTokens[] = $a[1]->v;
1238                }
1239            }
1240            if ( $not_wikilink ) {
1241               $textTokens[] = $not_wikilink;
1242            }
1243            $textTokens[] = ']]';
1244            return $textTokens;
1245        }
1246        $tsr = new SourceRange( $spos, $tpos );
1247        $hrefKV = new KV(
1248            'href', $target, $tsr->expandTsrV(), null,
1249            $tsr->substr( $this->input )
1250        );
1251        $obj = new SelfclosingTagTk( 'wikilink' );
1252        $attribs = array_map( static fn ( $lc ) => $lc[1], $lcs );
1253        $obj->attribs = array_merge( [$hrefKV], $attribs );
1254        $dp = new DataParsoid;
1255        $dp->tsr = $this->tsrOffsets();
1256        $dp->src = $this->text();
1257        // Capture a variation in the separator between target
1258        // and contents.  Note that target might have other templates
1259        // that emit pipes, so this might not actually be the first
1260        // separator, but the WikiLinkHandler doesn't support that
1261        // yet, see onWikiLink.
1262        if ( $lcs && $lcs[0][0] !== '|' ) {
1263            $dp->firstPipeSrc = $lcs[0][0];
1264        }
1265        $obj->dataParsoid = $dp;
1266        return [ $obj ];
1267    
1268}
1269private function a110(&$preproc) {
1270 $preproc = null; return true; 
1271}
1272private function a111(&$preproc, $a) {
1273
1274        return $a;
1275    
1276}
1277private function a112($extToken) {
1278 return $extToken->getName() === 'extension'; 
1279}
1280private function a113($extToken) {
1281 return $extToken; 
1282}
1283private function a114($annOrExtTag, $start) {
1284
1285        // Only enforce ascii alpha first char for non-extension tags.
1286        // See tag_name above for the details.
1287        list(,$name) = $start;
1288        return $annOrExtTag ||
1289            ( preg_match( '/^[A-Za-z]/', $name ) && $this->isXMLTag( $name ) );
1290    
1291}
1292private function a115($annOrExtTag, $start, $attribs, $selfclose) {
1293
1294        list($end, $name) = $start;
1295        $lcName = mb_strtolower( $name );
1296
1297        // Extension tags don't necessarily have the same semantics as html tags,
1298        // so don't treat them as void elements.
1299        $isVoidElt = Utils::isVoidElement( $lcName ) && !$annOrExtTag;
1300
1301        // Support </br>
1302        if ( $lcName === 'br' && $end ) {
1303            $end = null;
1304        }
1305
1306        $tsr = $this->tsrOffsets();
1307        $res = TokenizerUtils::buildXMLTag(
1308            $name, $lcName, $attribs, $end, !!$selfclose || $isVoidElt, $tsr
1309        );
1310
1311        // change up data-attribs in one scenario
1312        // void-elts that aren't self-closed ==> useful for accurate RT-ing
1313        if ( !$selfclose && $isVoidElt ) {
1314            unset( $res->dataParsoid->selfClose );
1315            $res->dataParsoid->noClose = true;
1316        }
1317
1318        return $res;
1319    
1320}
1321private function a116($proto, $addr, $rhe) {
1322 return $rhe === '<' || $rhe === '>' || $rhe === "\u{A0}"; 
1323}
1324private function a117($proto, $addr, $path) {
1325
1326            // as in Parser.php::makeFreeExternalLink, we're going to
1327            // yank trailing punctuation out of this match.
1328            $url = TokenizerUtils::flattenStringlist( array_merge( [ $proto, $addr ], $path ) );
1329            // only need to look at last element; HTML entities are strip-proof.
1330            $last = PHPUtils::lastItem( $url );
1331            $trim = 0;
1332            if ( is_string( $last ) ) {
1333                $strip = TokenizerUtils::getAutoUrlTerminatingChars( in_array( '(', $path, true ) );
1334                $trim = strspn( strrev( $last ), $strip );
1335                $url[ count( $url ) - 1 ] = substr( $last, 0, strlen( $last ) - $trim );
1336            }
1337            $url = TokenizerUtils::flattenStringlist( $url );
1338            if ( count( $url ) === 1 && is_string( $url[0] ) && strlen( $url[0] ) <= strlen( $proto ) ) {
1339                return null; // ensure we haven't stripped everything: T106945
1340            }
1341            $this->currPos -= $trim;
1342            return $url;
1343        
1344}
1345private function a118($r) {
1346 return $r !== null; 
1347}
1348private function a119($r) {
1349
1350        $tsr = $this->tsrOffsets();
1351        $dp = new DataParsoid;
1352        $dp->tsr = $tsr;
1353        $res = [ new SelfclosingTagTk( 'urllink', [ new KV( 'href', $r, $tsr->expandTsrV() ) ], $dp ) ];
1354        return $res;
1355    
1356}
1357private function a120($ref, $sp, $identifier) {
1358
1359        $base_urls = [
1360            'RFC' => 'https://datatracker.ietf.org/doc/html/rfc%s',
1361            'PMID' => '//www.ncbi.nlm.nih.gov/pubmed/%s?dopt=Abstract'
1362        ];
1363        $tsr = $this->tsrOffsets();
1364        $dp = new DataParsoid;
1365        $dp->tsr = $tsr;
1366        $dp->stx = 'magiclink';
1367        $this->env->getDataAccess()->addTrackingCategory(
1368            $this->env->getPageConfig(),
1369            $this->env->getMetadata(),
1370            'magiclink-tracking-' . strtolower($ref)
1371        );
1372        return [
1373            new SelfclosingTagTk( 'extlink', [
1374                    new KV( 'href', sprintf( $base_urls[$ref], $identifier ) ),
1375                    new KV( 'mw:content', TokenizerUtils::flattenString( [ $ref, $sp, $identifier ] ), $tsr->expandTsrV() ),
1376                    new KV( 'typeof', 'mw:ExtLink/' . $ref )
1377                ],
1378                $dp
1379            )
1380        ];
1381    
1382}
1383private function a121() {
1384 return $this->siteConfig->magicLinkEnabled("ISBN"); 
1385}
1386private function a122($sp, $isbn) {
1387
1388            // Convert isbn token-and-entity array to stripped string.
1389            $stripped = '';
1390            foreach ( TokenizerUtils::flattenStringlist( $isbn ) as $part ) {
1391                if ( is_string( $part ) ) {
1392                    $stripped .= $part;
1393                }
1394            }
1395            return strtoupper( preg_replace( '/[^\dX]/i', '', $stripped ) );
1396        
1397}
1398private function a123($sp, $isbn, $isbncode) {
1399
1400        // ISBNs can only be 10 or 13 digits long (with a specific format)
1401        return strlen( $isbncode ) === 10
1402            || ( strlen( $isbncode ) === 13 && preg_match( '/^97[89]/', $isbncode ) );
1403    
1404}
1405private function a124($sp, $isbn, $isbncode) {
1406
1407        $tsr = $this->tsrOffsets();
1408        $dp = new DataParsoid;
1409        $dp->stx = 'magiclink';
1410        $dp->tsr = $tsr;
1411        $this->env->getDataAccess()->addTrackingCategory(
1412            $this->env->getPageConfig(),
1413            $this->env->getMetadata(),
1414            'magiclink-tracking-isbn'
1415        );
1416        return [
1417            new SelfclosingTagTk( 'extlink', [
1418                    new KV( 'href', 'Special:BookSources/' . $isbncode ),
1419                    new KV( 'mw:content', TokenizerUtils::flattenString( [ 'ISBN', $sp, $isbn ] ), $tsr->expandTsrV() ),
1420                    new KV( 'typeof', 'mw:WikiLink/ISBN' )
1421                ],
1422                $dp
1423            )
1424        ];
1425    
1426}
1427private function a125($t) {
1428
1429        $tagName = mb_strtolower( $t->getName() );
1430        $dp = $t->dataParsoid;
1431        $endTagRE = '~.*?(</' . preg_quote( $tagName, '~' ) . '\s*>)~iusA';
1432
1433        switch ( get_class( $t ) ) {
1434            case EndTagTk::class:
1435                // Similar to TagTk, we rely on the sanitizer to convert to text
1436                // where necessary and emit tokens to ease the wikitext escaping
1437                // code.  However, extension tags that shadow html tags will see
1438                // their unmatched end tags dropped while tree building, since
1439                // the sanitizer will let them through.
1440                return $t; // not text()
1441
1442            case SelfclosingTagTk::class:
1443                $dp->src = $dp->tsr->substr( $this->input );
1444                $dp->extTagOffsets = new DomSourceRange(
1445                    $dp->tsr->start, $dp->tsr->end,
1446                    $dp->tsr->length(), 0
1447                );
1448                break;
1449
1450            case TagTk::class:
1451                $tagContentFound = preg_match( $endTagRE, $this->input, $tagContent, 0, $dp->tsr->start );
1452                if ( !$tagContentFound ) {
1453                    // This is undefined behaviour.  The old parser currently
1454                    // returns text here (see core commit 674e8388cba),
1455                    // whereas this results in unclosed
1456                    // extension tags that shadow html tags falling back to
1457                    // their html equivalent.  The sanitizer will take care
1458                    // of converting to text where necessary.  We do this to
1459                    // simplify `hasWikitextTokens` when escaping wikitext,
1460                    // which wants these as tokens because it's otherwise
1461                    // lacking in context.
1462                    return $t; // not text()
1463                }
1464
1465                $extSrc = $tagContent[0];
1466                $extEndOffset = $dp->tsr->start + strlen( $extSrc );
1467                $extEndTagWidth = strlen( $tagContent[1] );
1468
1469                if ( !empty( $this->pipelineOpts['inTemplate'] ) ) {
1470                    // Support nesting in extensions tags while tokenizing in templates
1471                    // to support the #tag parser function.
1472                    //
1473                    // It's necessary to permit this broadly in templates because
1474                    // there's no way to distinguish whether the nesting happened
1475                    // while expanding the #tag parser function, or just a general
1476                    // syntax errors.  In other words,
1477                    //
1478                    //   hi<ref>ho<ref>hi</ref>ho</ref>
1479                    //
1480                    // and
1481                    //
1482                    //   hi{{#tag:ref|ho<ref>hi</ref>ho}}
1483                    //
1484                    // found in template are returned indistinguishably after a
1485                    // preprocessing request, though the old parser renders them
1486                    // differently.  #tag in template is probably a common enough
1487                    // use case that we want to accept these false positives,
1488                    // though another approach could be to drop this code here, and
1489                    // invoke a native #tag handler and forgo those in templates.
1490                    //
1491                    // Expand `extSrc` as long as there is a <tagName> found in the
1492                    // extension source body.
1493                    $startTagRE = '~<' . preg_quote( $tagName, '~' ) . '(?:[^/>]|/(?!>))*>~i';
1494                    $s = substr( $extSrc, $dp->tsr->end - $dp->tsr->start );
1495                    $openTags = 0;
1496                    while ( true ) {
1497                        if ( preg_match_all( $startTagRE, $s, $matches ) ) {
1498                            $openTags += count( $matches[0] );
1499                        }
1500                        if ( !$openTags ) {
1501                            break;
1502                        }
1503                        if ( !preg_match( $endTagRE, $this->input, $tagContent, 0, $extEndOffset ) ) {
1504                            break;
1505                        }
1506                        $openTags -= 1;
1507                        $s = $tagContent[0];
1508                        $extEndOffset += strlen( $s );
1509                        $extEndTagWidth = strlen( $tagContent[1] );
1510                        $extSrc .= $s;
1511                    }
1512                }
1513
1514                // Extension content source
1515                $dp->src = $extSrc;
1516                $dp->extTagOffsets = new DomSourceRange(
1517                    $dp->tsr->start, $extEndOffset,
1518                    $dp->tsr->length(), $extEndTagWidth
1519                );
1520
1521                $this->currPos = $dp->extTagOffsets->end;
1522
1523                // update tsr->end to span the start and end tags.
1524                $dp->tsr->end = $this->endOffset(); // was just modified above
1525                break;
1526
1527            default:
1528                $this->unreachable();
1529        }
1530
1531        return new SelfclosingTagTk( 'extension', [
1532            new KV( 'typeof', 'mw:Extension' ),
1533            new KV( 'name', $tagName ),
1534            new KV( 'source', $dp->src ),
1535            new KV( 'options', $t->attribs )
1536        ], $dp );
1537    
1538}
1539private function a126($start) {
1540
1541        list(,$name) = $start;
1542        return WTUtils::isIncludeTag( mb_strtolower( $name ) );
1543    
1544}
1545private function a127() {
1546 return $this->env->hasAnnotations && $this->siteConfig->isAnnotationTag( 'tvar' ); 
1547}
1548private function a128() {
1549
1550        $metaAttrs = [ new KV( 'typeof', 'mw:Annotation/tvar/End' ) ];
1551        $dp = new DataParsoid();
1552        $dp->tsr = $this->tsrOffsets();
1553        return new SelfclosingTagTk ( 'meta', $metaAttrs, $dp );
1554    
1555}
1556private function a129($start) {
1557
1558        list(,$name) = $start;
1559        return WTUtils::isAnnotationTag( $this->env, $name );
1560    
1561}
1562private function a130($p, $b) {
1563
1564        $dp = new DataParsoid;
1565        $dp->tsr = new SourceRange( $this->startOffset(), $this->endOffset() );
1566        $tblEnd = new EndTagTk( 'table', [], $dp );
1567        if ( $p !== '|' ) {
1568            // p+"<brace-char>" is triggering some bug in pegJS
1569            // I cannot even use that expression in the comment!
1570            $tblEnd->dataParsoid->endTagSrc = $p . $b;
1571        }
1572        return [ $tblEnd ];
1573    
1574}
1575private function a131($il) {
1576
1577        // il is guaranteed to be an array -- so, tu.flattenIfArray will
1578        // always return an array
1579        $r = TokenizerUtils::flattenIfArray( $il );
1580        if ( count( $r ) === 1 && is_string( $r[0] ) ) {
1581            $r = $r[0];
1582        }
1583        return [ 'tokens' => $r, 'srcOffsets' => $this->tsrOffsets() ];
1584    
1585}
1586private function a132($tpt) {
1587
1588        return [ 'tokens' => $tpt, 'srcOffsets' => $this->tsrOffsets() ];
1589    
1590}
1591private function a133($name) {
1592 return $this->endOffset(); 
1593}
1594private function a134($name, $kEndPos) {
1595 return $this->endOffset(); 
1596}
1597private function a135($name, $kEndPos, $vStartPos, $optSp, $tpv) {
1598
1599            return [
1600                'kEndPos' => $kEndPos,
1601                'vStartPos' => $vStartPos,
1602                'value' => ( $tpv === null ) ? '' :
1603                    TokenizerUtils::flattenString( [ $optSp, $tpv['tokens'] ] ),
1604            ];
1605        
1606}
1607private function a136($name, $val) {
1608
1609        if ( $val !== null ) {
1610            $so = new KVSourceRange(
1611                $this->startOffset(), $val['kEndPos'],
1612                $val['vStartPos'], $this->endOffset()
1613            );
1614            return new KV(
1615                $name,
1616                TokenizerUtils::flattenIfArray( $val['value'] ),
1617                $so
1618            );
1619        } else {
1620            $so = new SourceRange( $this->startOffset(), $this->endOffset() );
1621            return new KV(
1622                '',
1623                TokenizerUtils::flattenIfArray( $name ),
1624                $so->expandTsrV()
1625            );
1626        }
1627    
1628}
1629private function a137() {
1630
1631        $so = new SourceRange( $this->startOffset(), $this->endOffset() );
1632        return new KV( '', '', $so->expandTsrV() );
1633    
1634}
1635private function a138($t, $wr) {
1636 return $wr; 
1637}
1638private function a139($p) {
1639 return $this->endOffset(); 
1640}
1641private function a140($p, $startPos, $lt) {
1642
1643            $tsr = new SourceRange( $startPos, $this->endOffset() );
1644            $maybeContent = new KV( 'mw:maybeContent', $lt ?? [], $tsr->expandTsrV() );
1645            $maybeContent->vsrc = substr( $this->input, $startPos, $this->endOffset() - $startPos );
1646            return [$p, $maybeContent];
1647        
1648}
1649private function a141($end, $name) {
1650 return [ $end, $name ]; 
1651}
1652private function a142() {
1653 return $this->siteConfig->magicLinkEnabled("RFC"); 
1654}
1655private function a143() {
1656
1657    return 'RFC';
1658
1659}
1660private function a144() {
1661 return $this->siteConfig->magicLinkEnabled("PMID"); 
1662}
1663private function a145() {
1664
1665    return 'PMID';
1666
1667}
1668private function a146($he) {
1669 return is_array( $he ) && $he[ 1 ] === "\u{A0}"; 
1670}
1671private function a147($start) {
1672
1673        list(,$name) = $start;
1674        return isset( $this->extTags[mb_strtolower( $name )] ) &&
1675            // NOTE: This check is redundant with the precedence of the current
1676            // rules ( annotation_tag / *_extension_tag ) but kept as a precaution
1677            // since annotation tags are in extTags and we want them handled
1678            // elsewhere.
1679            !WTUtils::isAnnotationTag( $this->env, $name );
1680    
1681}
1682private function a148() {
1683 return $this->startOffset(); 
1684}
1685private function a149($lv0) {
1686 return $this->env->langConverterEnabled(); 
1687}
1688private function a150($lv0, $ff) {
1689
1690            // if flags contains 'R', then don't treat ; or : specially inside.
1691            if ( isset( $ff['flags'] ) ) {
1692                $ff['raw'] = isset( $ff['flags']['R'] ) || isset( $ff['flags']['N'] );
1693            } elseif ( isset( $ff['variants'] ) ) {
1694                $ff['raw'] = true;
1695            }
1696            return $ff;
1697        
1698}
1699private function a151($lv0) {
1700 return !$this->env->langConverterEnabled(); 
1701}
1702private function a152($lv0) {
1703
1704            // if language converter not enabled, don't try to parse inside.
1705            return [ 'raw' => true ];
1706        
1707}
1708private function a153($lv0, $f) {
1709 return $f['raw']; 
1710}
1711private function a154($lv0, $f, $lv) {
1712 return [ [ 'text' => $lv ] ]; 
1713}
1714private function a155($lv0, $f) {
1715 return !$f['raw']; 
1716}
1717private function a156($lv0, $f, $lv) {
1718 return $lv; 
1719}
1720private function a157($lv0, $f, $ts) {
1721 return $this->endOffset(); 
1722}
1723private function a158($lv0, $f, $ts, $lv1) {
1724
1725        if ( !$this->env->langConverterEnabled() ) {
1726            return [ '-{', $ts[0]['text']['tokens'], '}-' ];
1727        }
1728        $lvsrc = substr( $this->input, $lv0, $lv1 - $lv0 );
1729        $attribs = [];
1730
1731        foreach ( $ts as &$t ) {
1732            // move token strings into KV attributes so that they are
1733            // properly expanded by early stages of the token pipeline
1734            foreach ( [ 'text', 'from', 'to' ] as $fld ) {
1735                if ( !isset( $t[$fld] ) ) {
1736                    continue;
1737                }
1738                $name = 'mw:lv' . count( $attribs );
1739                // Note that AttributeExpander will expect the tokens array to be
1740                // flattened.  We do that in lang_variant_text / lang_variant_nowiki
1741                $attribs[] = new KV( $name, $t[$fld]['tokens'], $t[$fld]['srcOffsets']->expandTsrV() );
1742                $t[$fld] = $name;
1743            }
1744        }
1745        unset( $t );
1746
1747        $flags = isset( $f['flags'] ) ? array_keys( $f['flags'] ) : [];
1748        sort( $flags );
1749        $variants = isset( $f['variants'] ) ? array_keys( $f['variants'] ) : [];
1750        sort( $variants );
1751
1752        $dp = new DataParsoid;
1753        $dp->tsr = new SourceRange( $lv0, $lv1 );
1754        $dp->src = $lvsrc;
1755        $dp->flags = $flags;
1756        $dp->variants = $variants;
1757        $dp->original = $f['original'];
1758        $dp->flagSp = $f['sp'];
1759        $dp->texts = $ts;
1760
1761        return [
1762            new SelfclosingTagTk(
1763                'language-variant',
1764                $attribs,
1765                $dp
1766            )
1767        ];
1768    
1769}
1770private function a159($r, &$preproc) {
1771
1772        $preproc = null;
1773        return $r;
1774    
1775}
1776private function a160($p, $dashes) {
1777 $this->unreachable(); 
1778}
1779private function a161($p, $dashes, $a) {
1780 return $this->endOffset(); 
1781}
1782private function a162($p, $dashes, $a, $tagEndPos, $s2) {
1783
1784        $coms = TokenizerUtils::popComments( $a );
1785        if ( $coms ) {
1786            $tagEndPos = $coms['commentStartPos'];
1787        }
1788
1789        $da = new DataParsoid;
1790        $da->tsr = new SourceRange( $this->startOffset(), $tagEndPos );
1791        $da->startTagSrc = $p . $dashes;
1792
1793        // We rely on our tree builder to close the row as needed. This is
1794        // needed to support building tables from fragment templates with
1795        // individual cells or rows.
1796        $trToken = new TagTk( 'tr', $a, $da );
1797
1798        return array_merge( [ $trToken ], $coms ? $coms['buf'] : [], $s2 );
1799    
1800}
1801private function a163($p, $td, $tds) {
1802
1803        // Avoid modifying a cached result
1804        $td[0] = clone $td[0];
1805        $da = $td[0]->dataParsoid = clone $td[0]->dataParsoid;
1806        $da->tsr = clone $da->tsr;
1807        $da->tsr->start -= strlen( $p ); // include "|"
1808        if ( $p !== '|' ) {
1809            // Variation from default
1810            $da->startTagSrc = $p;
1811        }
1812        return array_merge( $td, $tds );
1813    
1814}
1815private function a164($p, $args) {
1816 return $this->endOffset(); 
1817}
1818private function a165($p, $args, $tagEndPos, $c) {
1819
1820        $tsr = new SourceRange( $this->startOffset(), $tagEndPos );
1821        return TokenizerUtils::buildTableTokens(
1822            $this->input, 'caption', '|+', $args, $tsr, $this->endOffset(), $c, true
1823        );
1824    
1825}
1826private function a166($i) {
1827 return $i; 
1828}
1829private function a167($il) {
1830
1831        // il is guaranteed to be an array -- so, tu.flattenIfArray will
1832        // always return an array
1833        $r = TokenizerUtils::flattenIfArray( $il );
1834        if ( count( $r ) === 1 && is_string( $r[0] ) ) {
1835            $r = $r[0];
1836        }
1837        return $r;
1838    
1839}
1840private function a168() {
1841 return ''; 
1842}
1843private function a169($ff) {
1844 return $ff; 
1845}
1846private function a170($f) {
1847
1848        // Collect & separate flags and variants into a hashtable (by key) and ordered list
1849        $flags = [];
1850        $variants = [];
1851        $flagList = [];
1852        $flagSpace = [];
1853        $variantList = [];
1854        $variantSpace = [];
1855        $useVariants = false;
1856        if ( $f !== null ) {
1857            // lang_variant_flags returns arrays in reverse order.
1858            $spPtr = count( $f['sp'] ) - 1;
1859            for ( $i = count( $f['flags'] ) - 1; $i >= 0; $i--) {
1860                $item = $f['flags'][$i];
1861                if ( isset( $item['flag'] ) ) {
1862                    $flagSpace[] = $f['sp'][$spPtr--];
1863                    $flags[$item['flag']] = true;
1864                    $flagList[] = $item['flag'];
1865                    $flagSpace[] = $f['sp'][$spPtr--];
1866                }
1867                if ( isset( $item['variant'] ) ) {
1868                    $variantSpace[] = $f['sp'][$spPtr--];
1869                    $variants[$item['variant']] = true;
1870                    $variantList[] = $item['variant'];
1871                    $variantSpace[] = $f['sp'][$spPtr--];
1872                }
1873            }
1874            if ( $spPtr >= 0 ) {
1875                // handle space after a trailing semicolon
1876                $flagSpace[] = $f['sp'][$spPtr];
1877                $variantSpace[] = $f['sp'][$spPtr];
1878            }
1879        }
1880        // Parse flags (this logic is from core/languages/ConverterRule.php
1881        // in the parseFlags() function)
1882        if ( count( $flags ) === 0 && count( $variants ) === 0 ) {
1883            $flags['$S'] = true;
1884        } elseif ( isset( $flags['R'] ) ) {
1885            $flags = [ 'R' => true ]; // remove other flags
1886        } elseif ( isset( $flags['N'] ) ) {
1887            $flags = [ 'N' => true ]; // remove other flags
1888        } elseif ( isset( $flags['-'] ) ) {
1889            $flags = [ '-' => true ]; // remove other flags
1890        } elseif ( isset( $flags['T'] ) && count( $flags ) === 1 ) {
1891            $flags['H'] = true;
1892        } elseif ( isset( $flags['H'] ) ) {
1893            // Replace A flag, and remove other flags except T and D
1894            $nf = [ '$+' => true, 'H' => true ];
1895            if ( isset( $flags['T'] ) ) { $nf['T'] = true; }
1896            if ( isset( $flags['D'] ) ) { $nf['D'] = true; }
1897            $flags = $nf;
1898        } elseif ( count( $variants ) > 0 ) {
1899            $useVariants = true;
1900        } else {
1901            if ( isset( $flags['A'] ) ) {
1902                $flags['$+'] = true;
1903                $flags['$S'] = true;
1904            }
1905            if ( isset( $flags['D'] ) ) {
1906                unset( $flags['$S'] );
1907            }
1908        }
1909        if ( $useVariants ) {
1910            return [ 'variants' => $variants, 'original' => $variantList, 'sp' => $variantSpace ];
1911        } else {
1912            return [ 'flags' => $flags, 'original' => $flagList, 'sp' => $flagSpace ];
1913        }
1914    
1915}
1916private function a171($tokens) {
1917
1918        return [
1919            'tokens' => TokenizerUtils::flattenStringlist( $tokens ),
1920            'srcOffsets' => $this->tsrOffsets(),
1921        ];
1922    
1923}
1924private function a172($o, $oo) {
1925 return $oo; 
1926}
1927private function a173($o, $rest, $tr) {
1928
1929        array_unshift( $rest, $o );
1930        // if the last bogus option is just spaces, keep them; otherwise
1931        // drop all this bogus stuff on the ground
1932        if ( count($tr) > 0 ) {
1933            $last = $tr[count($tr)-1];
1934            if (preg_match('/^\s*$/Du', $last[1])) {
1935                $rest[] = [ 'semi' => true, 'sp' => $last[1] ];
1936            }
1937        }
1938        return $rest;
1939    
1940}
1941private function a174($lvtext) {
1942 return [ [ 'text' => $lvtext ] ]; 
1943}
1944private function a175($thTag, $thTags) {
1945
1946        // Avoid modifying a cached result
1947        $thTag[0] = clone $thTag[0];
1948        $da = $thTag[0]->dataParsoid = clone $thTag[0]->dataParsoid;
1949        $da->tsr = clone $da->tsr;
1950        $da->tsr->start--; // include "!"
1951        array_unshift( $thTags, $thTag );
1952        return $thTags;
1953    
1954}
1955private function a176($arg) {
1956 return $this->endOffset(); 
1957}
1958private function a177($arg, $tagEndPos, $td) {
1959
1960        $tagStart = $this->startOffset();
1961        $tsr = new SourceRange( $tagStart, $tagEndPos );
1962        return TokenizerUtils::buildTableTokens(
1963            $this->input, 'td', '|', $arg, $tsr, $this->endOffset(), $td
1964        );
1965    
1966}
1967private function a178($pp, $tdt) {
1968
1969            // Avoid modifying cached dataParsoid object
1970            $tdt[0] = clone $tdt[0];
1971            $da = $tdt[0]->dataParsoid = clone $tdt[0]->dataParsoid;
1972            $da->tsr = clone $da->tsr;
1973            $da->stx = 'row';
1974            $da->setTempFlag( TempData::NON_MERGEABLE_TABLE_CELL );
1975            $da->tsr->start -= strlen( $pp ); // include "||"
1976            if ( $pp !== '||' || ( isset( $da->startTagSrc ) && $da->startTagSrc !== $pp ) ) {
1977                // Variation from default
1978                $da->startTagSrc = $pp . ( isset( $da->startTagSrc ) ? substr( $da->startTagSrc, 1 ) : '' );
1979            }
1980            return $tdt;
1981        
1982}
1983private function a179($b) {
1984
1985        return $b;
1986    
1987}
1988private function a180($sp1, $f, $sp2, $more) {
1989
1990        $r = ( $more && $more[1] ) ? $more[1] : [ 'sp' => [], 'flags' => [] ];
1991        // Note that sp and flags are in reverse order, since we're using
1992        // right recursion and want to push instead of unshift.
1993        $r['sp'][] = $sp2;
1994        $r['sp'][] = $sp1;
1995        $r['flags'][] = $f;
1996        return $r;
1997    
1998}
1999private function a181($sp) {
2000
2001        return [ 'sp' => [ $sp ], 'flags' => [] ];
2002    
2003}
2004private function a182($sp1, $lang, $sp2, $sp3, $lvtext) {
2005
2006        return [
2007            'twoway' => true,
2008            'lang' => $lang,
2009            'text' => $lvtext,
2010            'sp' => [ $sp1, $sp2, $sp3 ]
2011        ];
2012    
2013}
2014private function a183($sp1, $from, $sp2, $lang, $sp3, $sp4, $to) {
2015
2016        return [
2017            'oneway' => true,
2018            'from' => $from,
2019            'lang' => $lang,
2020            'to' => $to,
2021            'sp' => [ $sp1, $sp2, $sp3, $sp4 ]
2022        ];
2023    
2024}
2025private function a184($arg, $tagEndPos, &$th, $d) {
2026
2027            // Ignore newlines found in transclusions!
2028            // This is not perfect (since {{..}} may not always tokenize to transclusions).
2029            if ( $th !== false && strpos( preg_replace( "/{{[\s\S]+?}}/", "", $this->text() ), "\n" ) !== false ) {
2030                // There's been a newline. Remove the break and continue
2031                // tokenizing nested_block_in_tables.
2032                $th = false;
2033            }
2034            return $d;
2035        
2036}
2037private function a185($arg, $tagEndPos, $c) {
2038
2039        $tagStart = $this->startOffset();
2040        $tsr = new SourceRange( $tagStart, $tagEndPos );
2041        return TokenizerUtils::buildTableTokens(
2042            $this->input, 'th', '!', $arg, $tsr, $this->endOffset(), $c
2043        );
2044    
2045}
2046private function a186($pp, $tht) {
2047
2048            // Avoid modifying cached dataParsoid object
2049            $tht[0] = clone $tht[0];
2050            $da = $tht[0]->dataParsoid = clone $tht[0]->dataParsoid;
2051            $da->tsr = clone $da->tsr;
2052            $da->stx = 'row';
2053            $da->setTempFlag( TempData::NON_MERGEABLE_TABLE_CELL );
2054            $da->tsr->start -= strlen( $pp ); // include "!!" or "||"
2055            if ( $pp !== '!!' || ( isset( $da->startTagSrc ) && $da->startTagSrc !== $pp ) ) {
2056                // Variation from default
2057                $da->startTagSrc = $pp . ( isset( $da->startTagSrc ) ? substr( $da->startTagSrc, 1 ) : '' );
2058            }
2059            return $tht;
2060        
2061}
2062private function a187($r) {
2063
2064        return $r;
2065    
2066}
2067private function a188($f) {
2068 return [ 'flag' => $f ]; 
2069}
2070private function a189($v) {
2071 return [ 'variant' => $v ]; 
2072}
2073private function a190($b) {
2074 return [ 'bogus' => $b ]; /* bad flag */
2075}
2076private function a191($n, $sp) {
2077
2078        $tsr = $this->tsrOffsets();
2079        $tsr->end -= strlen( $sp );
2080        return [
2081            'tokens' => [ $n ],
2082            'srcOffsets' => $tsr,
2083        ];
2084    
2085}
2086private function a192($ext) {
2087 return $ext; 
2088}
2089private function a193($extToken) {
2090
2091        $txt = Utils::extractExtBody( $extToken );
2092        return Utils::decodeWtEntities( $txt );
2093    
2094}
2095private function a194($start) {
2096
2097        list(,$name) = $start;
2098        return ( mb_strtolower( $name ) === 'nowiki' );
2099    
2100}
2101
2102    // generated
2103    private function streamstart_async($silence, &$param_preproc) {
2104  for (;;) {
2105    // start choice_1
2106    $p2 = $this->currPos;
2107    // start seq_1
2108    $p3 = $this->currPos;
2109    $this->savedPos = $this->currPos;
2110    $r4 = $this->a0();
2111    if ($r4) {
2112      $r4 = false;
2113    } else {
2114      $r4 = self::$FAILED;
2115      $r1 = self::$FAILED;
2116      goto seq_1;
2117    }
2118    $r5 = $this->parsetlb($silence, $param_preproc);
2119    // t <- $r5
2120    if ($r5===self::$FAILED) {
2121      $this->currPos = $p3;
2122      $r1 = self::$FAILED;
2123      goto seq_1;
2124    }
2125    $this->savedPos = $this->currPos;
2126    $r6 = $this->a1($r5);
2127    if ($r6) {
2128      $r6 = false;
2129    } else {
2130      $r6 = self::$FAILED;
2131      $this->currPos = $p3;
2132      $r1 = self::$FAILED;
2133      goto seq_1;
2134    }
2135    $r1 = true;
2136    seq_1:
2137    if ($r1!==self::$FAILED) {
2138      $this->savedPos = $p2;
2139      $r1 = $this->a2($r5);
2140      goto choice_1;
2141    }
2142    // free $p3
2143    // start seq_2
2144    $p3 = $this->currPos;
2145    $r7 = [];
2146    for (;;) {
2147      $r8 = $this->parsenewlineToken($silence);
2148      if ($r8!==self::$FAILED) {
2149        $r7[] = $r8;
2150      } else {
2151        break;
2152      }
2153    }
2154    // free $r8
2155    $this->savedPos = $this->currPos;
2156    $r8 = $this->a3();
2157    if ($r8) {
2158      $r8 = false;
2159    } else {
2160      $r8 = self::$FAILED;
2161      $this->currPos = $p3;
2162      $r1 = self::$FAILED;
2163      goto seq_2;
2164    }
2165    $r1 = [$r7,$r8];
2166    seq_2:
2167    // free $p3
2168    choice_1:
2169    if ($r1!==self::$FAILED) {
2170      yield $r1;
2171    } else {
2172      if ($this->currPos < $this->inputLength) {
2173        $this->fail(0);
2174        throw $this->buildParseException();
2175      }
2176      break;
2177    }
2178  }
2179}
2180private function parsestart($silence, &$param_preproc) {
2181return $this->traceCall(function($silence, &$param_preproc) {
2182  $key = json_encode([306, $param_preproc]);
2183  $bucket = $this->currPos;
2184  $cached = $this->cache[$bucket][$key] ?? null;
2185  if ($cached) {
2186    $this->currPos = $cached->nextPos;
2187    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
2188    return $cached->result;
2189  }
2190  $saved_preproc=$param_preproc;
2191  $p2 = $this->currPos;
2192  // start seq_1
2193  $p3 = $this->currPos;
2194  $r4 = [];
2195  for (;;) {
2196    $r5 = $this->parsetlb(true, $param_preproc);
2197    if ($r5!==self::$FAILED) {
2198      $r4[] = $r5;
2199    } else {
2200      break;
2201    }
2202  }
2203  // t <- $r4
2204  // free $r5
2205  $r5 = [];
2206  for (;;) {
2207    $r6 = $this->parsenewlineToken(true);
2208    if ($r6!==self::$FAILED) {
2209      $r5[] = $r6;
2210    } else {
2211      break;
2212    }
2213  }
2214  // n <- $r5
2215  // free $r6
2216  $r1 = true;
2217  seq_1:
2218  if ($r1!==self::$FAILED) {
2219    $this->savedPos = $p2;
2220    $r1 = $this->a4($r4, $r5);
2221  } else {
2222    if (!$silence) {$this->fail(1);}
2223  }
2224  // free $p3
2225  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
2226    $this->currPos,
2227    $r1,
2228    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
2229    self::$UNDEFINED
2230  );
2231  return $r1;
2232}, "start", ["\$silence", "&\$param_preproc"], [$silence, &$param_preproc]);
2233
2234}
2235private function parsetable_start_tag($silence, $boolParams, &$param_preproc, &$param_th) {
2236return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
2237  $key = json_encode([512, $boolParams & 0x7fbf, $param_preproc, $param_th]);
2238  $bucket = $this->currPos;
2239  $cached = $this->cache[$bucket][$key] ?? null;
2240  if ($cached) {
2241    $this->currPos = $cached->nextPos;
2242    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
2243    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
2244    return $cached->result;
2245  }
2246  $saved_preproc=$param_preproc;
2247  $saved_th=$param_th;
2248  $p2 = $this->currPos;
2249  // start seq_1
2250  $p3 = $this->currPos;
2251  // b <- $r4
2252  if (($this->input[$this->currPos] ?? null) === "{") {
2253    $this->currPos++;
2254    $r4 = "{";
2255  } else {
2256    $r4 = self::$FAILED;
2257    $r1 = self::$FAILED;
2258    goto seq_1;
2259  }
2260  $r5 = $this->parsepipe(true);
2261  // p <- $r5
2262  if ($r5===self::$FAILED) {
2263    $this->currPos = $p3;
2264    $r1 = self::$FAILED;
2265    goto seq_1;
2266  }
2267  // start choice_1
2268  $r6 = $this->parsetable_attributes(true, $boolParams & ~0x40, $param_preproc, $param_th);
2269  if ($r6!==self::$FAILED) {
2270    goto choice_1;
2271  }
2272  $this->savedPos = $this->currPos;
2273  $r6 = $this->a5($r4, $r5);
2274  if ($r6) {
2275    $r6 = false;
2276  } else {
2277    $r6 = self::$FAILED;
2278  }
2279  choice_1:
2280  // ta <- $r6
2281  if ($r6===self::$FAILED) {
2282    $this->currPos = $p3;
2283    $r1 = self::$FAILED;
2284    goto seq_1;
2285  }
2286  $p8 = $this->currPos;
2287  $r7 = '';
2288  // tsEndPos <- $r7
2289  if ($r7!==self::$FAILED) {
2290    $this->savedPos = $p8;
2291    $r7 = $this->a6($r4, $r5, $r6);
2292  } else {
2293    $this->currPos = $p3;
2294    $r1 = self::$FAILED;
2295    goto seq_1;
2296  }
2297  $r9 = [];
2298  for (;;) {
2299    $r10 = $this->parsespace(true);
2300    if ($r10!==self::$FAILED) {
2301      $r9[] = $r10;
2302    } else {
2303      break;
2304    }
2305  }
2306  // s2 <- $r9
2307  // free $r10
2308  $r1 = true;
2309  seq_1:
2310  if ($r1!==self::$FAILED) {
2311    $this->savedPos = $p2;
2312    $r1 = $this->a7($r4, $r5, $r6, $r7, $r9);
2313  } else {
2314    if (!$silence) {$this->fail(2);}
2315  }
2316  // free $p3
2317  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
2318    $this->currPos,
2319    $r1,
2320    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
2321    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
2322  );
2323  return $r1;
2324}, "table_start_tag", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
2325
2326}
2327private function parseurl($silence, &$param_preproc) {
2328return $this->traceCall(function($silence, &$param_preproc) {
2329  $key = json_encode([368, $param_preproc]);
2330  $bucket = $this->currPos;
2331  $cached = $this->cache[$bucket][$key] ?? null;
2332  if ($cached) {
2333    $this->currPos = $cached->nextPos;
2334    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
2335    return $cached->result;
2336  }
2337  $saved_preproc=$param_preproc;
2338  $p2 = $this->currPos;
2339  // start seq_1
2340  $p3 = $this->currPos;
2341  $r4 = $this->parseurl_protocol($silence);
2342  // proto <- $r4
2343  if ($r4===self::$FAILED) {
2344    $r1 = self::$FAILED;
2345    goto seq_1;
2346  }
2347  // start choice_1
2348  $r5 = $this->parseipv6urladdr($silence);
2349  if ($r5!==self::$FAILED) {
2350    goto choice_1;
2351  }
2352  $r5 = '';
2353  choice_1:
2354  // addr <- $r5
2355  if ($r5===self::$FAILED) {
2356    $this->currPos = $p3;
2357    $r1 = self::$FAILED;
2358    goto seq_1;
2359  }
2360  $r6 = [];
2361  for (;;) {
2362    $p8 = $this->currPos;
2363    // start seq_2
2364    $p9 = $this->currPos;
2365    $p10 = $this->currPos;
2366    $r11 = $this->discardinline_breaks(true, 0x0, $param_preproc, self::newRef(null));
2367    if ($r11 === self::$FAILED) {
2368      $r11 = false;
2369    } else {
2370      $r11 = self::$FAILED;
2371      $this->currPos = $p10;
2372      $r7 = self::$FAILED;
2373      goto seq_2;
2374    }
2375    // free $p10
2376    // start choice_2
2377    $r12 = $this->parseno_punctuation_char($silence);
2378    if ($r12!==self::$FAILED) {
2379      goto choice_2;
2380    }
2381    $r12 = $this->parsecomment($silence);
2382    if ($r12!==self::$FAILED) {
2383      goto choice_2;
2384    }
2385    $r12 = $this->parsetplarg_or_template($silence, 0x0, self::newRef(null), $param_preproc);
2386    if ($r12!==self::$FAILED) {
2387      goto choice_2;
2388    }
2389    $r12 = $this->input[$this->currPos] ?? '';
2390    if ($r12 === "'" || $r12 === "{") {
2391      $this->currPos++;
2392      goto choice_2;
2393    } else {
2394      $r12 = self::$FAILED;
2395      if (!$silence) {$this->fail(3);}
2396    }
2397    $p10 = $this->currPos;
2398    // start seq_3
2399    $p13 = $this->currPos;
2400    $p14 = $this->currPos;
2401    // start seq_4
2402    $p16 = $this->currPos;
2403    if (($this->input[$this->currPos] ?? null) === "&") {
2404      $this->currPos++;
2405      $r17 = "&";
2406    } else {
2407      $r17 = self::$FAILED;
2408      $r15 = self::$FAILED;
2409      goto seq_4;
2410    }
2411    // start choice_3
2412    // start seq_5
2413    $p19 = $this->currPos;
2414    $r20 = $this->input[$this->currPos] ?? '';
2415    if ($r20 === "l" || $r20 === "L") {
2416      $this->currPos++;
2417    } else {
2418      $r20 = self::$FAILED;
2419      $r18 = self::$FAILED;
2420      goto seq_5;
2421    }
2422    $r21 = $this->input[$this->currPos] ?? '';
2423    if ($r21 === "t" || $r21 === "T") {
2424      $this->currPos++;
2425    } else {
2426      $r21 = self::$FAILED;
2427      $this->currPos = $p19;
2428      $r18 = self::$FAILED;
2429      goto seq_5;
2430    }
2431    $r18 = true;
2432    seq_5:
2433    if ($r18!==self::$FAILED) {
2434      goto choice_3;
2435    }
2436    // free $p19
2437    // start seq_6
2438    $p19 = $this->currPos;
2439    $r22 = $this->input[$this->currPos] ?? '';
2440    if ($r22 === "g" || $r22 === "G") {
2441      $this->currPos++;
2442    } else {
2443      $r22 = self::$FAILED;
2444      $r18 = self::$FAILED;
2445      goto seq_6;
2446    }
2447    $r23 = $this->input[$this->currPos] ?? '';
2448    if ($r23 === "t" || $r23 === "T") {
2449      $this->currPos++;
2450    } else {
2451      $r23 = self::$FAILED;
2452      $this->currPos = $p19;
2453      $r18 = self::$FAILED;
2454      goto seq_6;
2455    }
2456    $r18 = true;
2457    seq_6:
2458    // free $p19
2459    choice_3:
2460    if ($r18===self::$FAILED) {
2461      $this->currPos = $p16;
2462      $r15 = self::$FAILED;
2463      goto seq_4;
2464    }
2465    if (($this->input[$this->currPos] ?? null) === ";") {
2466      $this->currPos++;
2467      $r24 = ";";
2468    } else {
2469      $r24 = self::$FAILED;
2470      $this->currPos = $p16;
2471      $r15 = self::$FAILED;
2472      goto seq_4;
2473    }
2474    $r15 = true;
2475    seq_4:
2476    // free $p16
2477    if ($r15 === self::$FAILED) {
2478      $r15 = false;
2479    } else {
2480      $r15 = self::$FAILED;
2481      $this->currPos = $p14;
2482      $r12 = self::$FAILED;
2483      goto seq_3;
2484    }
2485    // free $p14
2486    // start choice_4
2487    $p14 = $this->currPos;
2488    // start seq_7
2489    $p16 = $this->currPos;
2490    $p19 = $this->currPos;
2491    if (($this->input[$this->currPos] ?? null) === "&") {
2492      $this->currPos++;
2493      $r26 = "&";
2494      $r26 = false;
2495      $this->currPos = $p19;
2496    } else {
2497      $r26 = self::$FAILED;
2498      $r25 = self::$FAILED;
2499      goto seq_7;
2500    }
2501    // free $p19
2502    $r27 = $this->parsehtmlentity($silence);
2503    // he <- $r27
2504    if ($r27===self::$FAILED) {
2505      $this->currPos = $p16;
2506      $r25 = self::$FAILED;
2507      goto seq_7;
2508    }
2509    $r25 = true;
2510    seq_7:
2511    if ($r25!==self::$FAILED) {
2512      $this->savedPos = $p14;
2513      $r25 = $this->a8($r4, $r5, $r27);
2514      goto choice_4;
2515    }
2516    // free $p16
2517    if (($this->input[$this->currPos] ?? null) === "&") {
2518      $this->currPos++;
2519      $r25 = "&";
2520    } else {
2521      if (!$silence) {$this->fail(4);}
2522      $r25 = self::$FAILED;
2523    }
2524    choice_4:
2525    // r <- $r25
2526    if ($r25===self::$FAILED) {
2527      $this->currPos = $p13;
2528      $r12 = self::$FAILED;
2529      goto seq_3;
2530    }
2531    $r12 = true;
2532    seq_3:
2533    if ($r12!==self::$FAILED) {
2534      $this->savedPos = $p10;
2535      $r12 = $this->a9($r4, $r5, $r25);
2536    }
2537    // free $p13
2538    choice_2:
2539    // c <- $r12
2540    if ($r12===self::$FAILED) {
2541      $this->currPos = $p9;
2542      $r7 = self::$FAILED;
2543      goto seq_2;
2544    }
2545    $r7 = true;
2546    seq_2:
2547    if ($r7!==self::$FAILED) {
2548      $this->savedPos = $p8;
2549      $r7 = $this->a10($r4, $r5, $r12);
2550      $r6[] = $r7;
2551    } else {
2552      break;
2553    }
2554    // free $p9
2555  }
2556  // path <- $r6
2557  // free $r7
2558  $this->savedPos = $this->currPos;
2559  $r7 = $this->a11($r4, $r5, $r6);
2560  if ($r7) {
2561    $r7 = false;
2562  } else {
2563    $r7 = self::$FAILED;
2564    $this->currPos = $p3;
2565    $r1 = self::$FAILED;
2566    goto seq_1;
2567  }
2568  $r1 = true;
2569  seq_1:
2570  if ($r1!==self::$FAILED) {
2571    $this->savedPos = $p2;
2572    $r1 = $this->a12($r4, $r5, $r6);
2573  }
2574  // free $p3
2575  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
2576    $this->currPos,
2577    $r1,
2578    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
2579    self::$UNDEFINED
2580  );
2581  return $r1;
2582}, "url", ["\$silence", "&\$param_preproc"], [$silence, &$param_preproc]);
2583
2584}
2585private function parserow_syntax_table_args($silence, $boolParams, &$param_preproc, &$param_th) {
2586return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
2587  $key = json_encode([534, $boolParams & 0x7eff, $param_preproc, $param_th]);
2588  $bucket = $this->currPos;
2589  $cached = $this->cache[$bucket][$key] ?? null;
2590  if ($cached) {
2591    $this->currPos = $cached->nextPos;
2592    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
2593    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
2594    return $cached->result;
2595  }
2596  $saved_preproc=$param_preproc;
2597  $saved_th=$param_th;
2598  $p2 = $this->currPos;
2599  // start seq_1
2600  $p3 = $this->currPos;
2601  $r4 = $this->parsetable_attributes($silence, $boolParams | 0x100, $param_preproc, $param_th);
2602  // as <- $r4
2603  if ($r4===self::$FAILED) {
2604    $r1 = self::$FAILED;
2605    goto seq_1;
2606  }
2607  $r5 = $this->parseoptional_spaces($silence);
2608  // s <- $r5
2609  if ($r5===self::$FAILED) {
2610    $this->currPos = $p3;
2611    $r1 = self::$FAILED;
2612    goto seq_1;
2613  }
2614  $r6 = $this->parsepipe($silence);
2615  // p <- $r6
2616  if ($r6===self::$FAILED) {
2617    $this->currPos = $p3;
2618    $r1 = self::$FAILED;
2619    goto seq_1;
2620  }
2621  $p7 = $this->currPos;
2622  $r8 = $this->discardpipe(true);
2623  if ($r8 === self::$FAILED) {
2624    $r8 = false;
2625  } else {
2626    $r8 = self::$FAILED;
2627    $this->currPos = $p7;
2628    $this->currPos = $p3;
2629    $r1 = self::$FAILED;
2630    goto seq_1;
2631  }
2632  // free $p7
2633  $r1 = true;
2634  seq_1:
2635  if ($r1!==self::$FAILED) {
2636    $this->savedPos = $p2;
2637    $r1 = $this->a13($r4, $r5, $r6);
2638  }
2639  // free $p3
2640  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
2641    $this->currPos,
2642    $r1,
2643    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
2644    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
2645  );
2646  return $r1;
2647}, "row_syntax_table_args", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
2648
2649}
2650private function parsetable_attributes($silence, $boolParams, &$param_preproc, &$param_th) {
2651return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
2652  $key = json_encode([310, $boolParams & 0x7fff, $param_preproc, $param_th]);
2653  $bucket = $this->currPos;
2654  $cached = $this->cache[$bucket][$key] ?? null;
2655  if ($cached) {
2656    $this->currPos = $cached->nextPos;
2657    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
2658    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
2659    return $cached->result;
2660  }
2661  $saved_preproc=$param_preproc;
2662  $saved_th=$param_th;
2663  $r1 = [];
2664  for (;;) {
2665    // start choice_1
2666    $r2 = $this->parsetable_attribute(true, $boolParams, $param_preproc, $param_th);
2667    if ($r2!==self::$FAILED) {
2668      goto choice_1;
2669    }
2670    $p3 = $this->currPos;
2671    // start seq_1
2672    $p4 = $this->currPos;
2673    $r5 = $this->discardoptionalSpaceToken(true);
2674    if ($r5===self::$FAILED) {
2675      $r2 = self::$FAILED;
2676      goto seq_1;
2677    }
2678    $r6 = $this->parsebroken_table_attribute_name_char(true);
2679    // b <- $r6
2680    if ($r6===self::$FAILED) {
2681      $this->currPos = $p4;
2682      $r2 = self::$FAILED;
2683      goto seq_1;
2684    }
2685    $r2 = true;
2686    seq_1:
2687    if ($r2!==self::$FAILED) {
2688      $this->savedPos = $p3;
2689      $r2 = $this->a14($r6);
2690    }
2691    // free $p4
2692    choice_1:
2693    if ($r2!==self::$FAILED) {
2694      $r1[] = $r2;
2695    } else {
2696      break;
2697    }
2698  }
2699  // free $r2
2700  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
2701    $this->currPos,
2702    $r1,
2703    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
2704    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
2705  );
2706  return $r1;
2707}, "table_attributes", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
2708
2709}
2710private function parsegeneric_newline_attributes($silence, $boolParams, &$param_preproc, &$param_th) {
2711return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
2712  $key = json_encode([308, $boolParams & 0x7fff, $param_preproc, $param_th]);
2713  $bucket = $this->currPos;
2714  $cached = $this->cache[$bucket][$key] ?? null;
2715  if ($cached) {
2716    $this->currPos = $cached->nextPos;
2717    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
2718    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
2719    return $cached->result;
2720  }
2721  $saved_preproc=$param_preproc;
2722  $saved_th=$param_th;
2723  $r1 = [];
2724  for (;;) {
2725    $r2 = $this->parsegeneric_newline_attribute(true, $boolParams, $param_preproc, $param_th);
2726    if ($r2!==self::$FAILED) {
2727      $r1[] = $r2;
2728    } else {
2729      break;
2730    }
2731  }
2732  // free $r2
2733  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
2734    $this->currPos,
2735    $r1,
2736    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
2737    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
2738  );
2739  return $r1;
2740}, "generic_newline_attributes", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
2741
2742}
2743private function parsetplarg_or_template_or_bust($silence, &$param_preproc) {
2744return $this->traceCall(function($silence, &$param_preproc) {
2745  $key = json_encode([378, $param_preproc]);
2746  $bucket = $this->currPos;
2747  $cached = $this->cache[$bucket][$key] ?? null;
2748  if ($cached) {
2749    $this->currPos = $cached->nextPos;
2750    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
2751    return $cached->result;
2752  }
2753  $saved_preproc=$param_preproc;
2754  $p2 = $this->currPos;
2755  $r3 = [];
2756  for (;;) {
2757    // start choice_1
2758    $r4 = $this->parsetplarg_or_template($silence, 0x0, self::newRef(null), $param_preproc);
2759    if ($r4!==self::$FAILED) {
2760      goto choice_1;
2761    }
2762    if ($this->currPos < $this->inputLength) {
2763      $r4 = self::consumeChar($this->input, $this->currPos);;
2764    } else {
2765      $r4 = self::$FAILED;
2766      if (!$silence) {$this->fail(7);}
2767    }
2768    choice_1:
2769    if ($r4!==self::$FAILED) {
2770      $r3[] = $r4;
2771    } else {
2772      break;
2773    }
2774  }
2775  if (count($r3) === 0) {
2776    $r3 = self::$FAILED;
2777  }
2778  // r <- $r3
2779  // free $r4
2780  $r1 = $r3;
2781  if ($r1!==self::$FAILED) {
2782    $this->savedPos = $p2;
2783    $r1 = $this->a15($r3);
2784  }
2785  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
2786    $this->currPos,
2787    $r1,
2788    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
2789    self::$UNDEFINED
2790  );
2791  return $r1;
2792}, "tplarg_or_template_or_bust", ["\$silence", "&\$param_preproc"], [$silence, &$param_preproc]);
2793
2794}
2795private function parseextlink($silence, $boolParams, &$param_preproc, &$param_th) {
2796return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
2797  $key = json_encode([354, $boolParams & 0x7fff, $param_preproc, $param_th]);
2798  $bucket = $this->currPos;
2799  $cached = $this->cache[$bucket][$key] ?? null;
2800  if ($cached) {
2801    $this->currPos = $cached->nextPos;
2802    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
2803    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
2804    return $cached->result;
2805  }
2806  $saved_preproc=$param_preproc;
2807  $saved_th=$param_th;
2808  $p2 = $this->currPos;
2809  // start seq_1
2810  $p3 = $this->currPos;
2811  if (!(/*extlink*/($boolParams & 0x8) !== 0)) {
2812    $r4 = false;
2813  } else {
2814    $r4 = self::$FAILED;
2815    $r1 = self::$FAILED;
2816    goto seq_1;
2817  }
2818  $p6 = $this->currPos;
2819  // start seq_2
2820  $p7 = $this->currPos;
2821  if (($this->input[$this->currPos] ?? null) === "[") {
2822    $this->currPos++;
2823    $r8 = "[";
2824  } else {
2825    $r8 = self::$FAILED;
2826    $r5 = self::$FAILED;
2827    goto seq_2;
2828  }
2829  $p10 = $this->currPos;
2830  $r9 = '';
2831  // p0 <- $r9
2832  if ($r9!==self::$FAILED) {
2833    $this->savedPos = $p10;
2834    $r9 = $this->a16();
2835  } else {
2836    $this->currPos = $p7;
2837    $r5 = self::$FAILED;
2838    goto seq_2;
2839  }
2840  $p12 = $this->currPos;
2841  // start seq_3
2842  $p13 = $this->currPos;
2843  // start choice_1
2844  // start seq_4
2845  $p15 = $this->currPos;
2846  $r16 = $this->parseurl_protocol(true);
2847  if ($r16===self::$FAILED) {
2848    $r14 = self::$FAILED;
2849    goto seq_4;
2850  }
2851  $r17 = $this->parseipv6urladdr(true);
2852  if ($r17===self::$FAILED) {
2853    $this->currPos = $p15;
2854    $r14 = self::$FAILED;
2855    goto seq_4;
2856  }
2857  $r14 = [$r16,$r17];
2858  seq_4:
2859  if ($r14!==self::$FAILED) {
2860    goto choice_1;
2861  }
2862  // free $p15
2863  $r14 = '';
2864  choice_1:
2865  // addr <- $r14
2866  if ($r14===self::$FAILED) {
2867    $r11 = self::$FAILED;
2868    goto seq_3;
2869  }
2870  // start choice_2
2871  $r18 = $this->parseextlink_nonipv6url(true, $boolParams | 0x8, $param_preproc, $param_th);
2872  if ($r18!==self::$FAILED) {
2873    goto choice_2;
2874  }
2875  $r18 = '';
2876  choice_2:
2877  // target <- $r18
2878  if ($r18===self::$FAILED) {
2879    $this->currPos = $p13;
2880    $r11 = self::$FAILED;
2881    goto seq_3;
2882  }
2883  $r11 = true;
2884  seq_3:
2885  // flat <- $r11
2886  if ($r11!==self::$FAILED) {
2887    $this->savedPos = $p12;
2888    $r11 = $this->a17($r9, $r14, $r18);
2889  } else {
2890    $this->currPos = $p7;
2891    $r5 = self::$FAILED;
2892    goto seq_2;
2893  }
2894  // free $p13
2895  $this->savedPos = $this->currPos;
2896  $r19 = $this->a18($r9, $r11);
2897  if ($r19) {
2898    $r19 = false;
2899  } else {
2900    $r19 = self::$FAILED;
2901    $this->currPos = $p7;
2902    $r5 = self::$FAILED;
2903    goto seq_2;
2904  }
2905  $p13 = $this->currPos;
2906  $r20 = '';
2907  // p1 <- $r20
2908  if ($r20!==self::$FAILED) {
2909    $this->savedPos = $p13;
2910    $r20 = $this->a19($r9, $r11);
2911  } else {
2912    $this->currPos = $p7;
2913    $r5 = self::$FAILED;
2914    goto seq_2;
2915  }
2916  $p15 = $this->currPos;
2917  for (;;) {
2918    // start choice_3
2919    $r22 = $this->discardspace(true);
2920    if ($r22!==self::$FAILED) {
2921      goto choice_3;
2922    }
2923    $r22 = $this->discardunispace(true);
2924    choice_3:
2925    if ($r22===self::$FAILED) {
2926      break;
2927    }
2928  }
2929  // free $r22
2930  $r21 = true;
2931  // sp <- $r21
2932  if ($r21!==self::$FAILED) {
2933    $r21 = substr($this->input, $p15, $this->currPos - $p15);
2934  } else {
2935    $r21 = self::$FAILED;
2936    $this->currPos = $p7;
2937    $r5 = self::$FAILED;
2938    goto seq_2;
2939  }
2940  // free $p15
2941  $p15 = $this->currPos;
2942  $r22 = '';
2943  // p2 <- $r22
2944  if ($r22!==self::$FAILED) {
2945    $this->savedPos = $p15;
2946    $r22 = $this->a20($r9, $r11, $r20, $r21);
2947  } else {
2948    $this->currPos = $p7;
2949    $r5 = self::$FAILED;
2950    goto seq_2;
2951  }
2952  $r23 = $this->parseinlineline(true, $boolParams | 0x8, $param_preproc, $param_th);
2953  if ($r23===self::$FAILED) {
2954    $r23 = null;
2955  }
2956  // content <- $r23
2957  $p25 = $this->currPos;
2958  $r24 = '';
2959  // p3 <- $r24
2960  if ($r24!==self::$FAILED) {
2961    $this->savedPos = $p25;
2962    $r24 = $this->a21($r9, $r11, $r20, $r21, $r22, $r23);
2963  } else {
2964    $this->currPos = $p7;
2965    $r5 = self::$FAILED;
2966    goto seq_2;
2967  }
2968  if (($this->input[$this->currPos] ?? null) === "]") {
2969    $this->currPos++;
2970    $r26 = "]";
2971  } else {
2972    $r26 = self::$FAILED;
2973    $this->currPos = $p7;
2974    $r5 = self::$FAILED;
2975    goto seq_2;
2976  }
2977  $r5 = true;
2978  seq_2:
2979  // r <- $r5
2980  if ($r5!==self::$FAILED) {
2981    $this->savedPos = $p6;
2982    $r5 = $this->a22($r9, $r11, $r20, $r21, $r22, $r23, $r24);
2983  } else {
2984    $this->currPos = $p3;
2985    $r1 = self::$FAILED;
2986    goto seq_1;
2987  }
2988  // free $p7
2989  $r1 = true;
2990  seq_1:
2991  if ($r1!==self::$FAILED) {
2992    $this->savedPos = $p2;
2993    $r1 = $this->a23($r5);
2994  } else {
2995    if (!$silence) {$this->fail(8);}
2996  }
2997  // free $p3
2998  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
2999    $this->currPos,
3000    $r1,
3001    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
3002    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
3003  );
3004  return $r1;
3005}, "extlink", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
3006
3007}
3008private function parselist_item($silence, $boolParams, &$param_preproc, &$param_th) {
3009return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
3010  $key = json_encode([488, $boolParams & 0x7fff, $param_preproc, $param_th]);
3011  $bucket = $this->currPos;
3012  $cached = $this->cache[$bucket][$key] ?? null;
3013  if ($cached) {
3014    $this->currPos = $cached->nextPos;
3015    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
3016    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
3017    return $cached->result;
3018  }
3019  $saved_preproc=$param_preproc;
3020  $saved_th=$param_th;
3021  // start choice_1
3022  $r1 = $this->parsedtdd($silence, $boolParams, $param_preproc, $param_th);
3023  if ($r1!==self::$FAILED) {
3024    goto choice_1;
3025  }
3026  $r1 = $this->parsehacky_dl_uses($silence, $boolParams, $param_preproc, $param_th);
3027  if ($r1!==self::$FAILED) {
3028    goto choice_1;
3029  }
3030  $r1 = $this->parseli($silence, $boolParams, $param_preproc, $param_th);
3031  choice_1:
3032  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
3033    $this->currPos,
3034    $r1,
3035    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
3036    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
3037  );
3038  return $r1;
3039}, "list_item", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
3040
3041}
3042private function parsetlb($silence, &$param_preproc) {
3043return $this->traceCall(function($silence, &$param_preproc) {
3044  $key = json_encode([314, $param_preproc]);
3045  $bucket = $this->currPos;
3046  $cached = $this->cache[$bucket][$key] ?? null;
3047  if ($cached) {
3048    $this->currPos = $cached->nextPos;
3049    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
3050    return $cached->result;
3051  }
3052  $saved_preproc=$param_preproc;
3053  $p2 = $this->currPos;
3054  // start seq_1
3055  $p3 = $this->currPos;
3056  $p4 = $this->currPos;
3057  $r5 = $this->discardeof(true);
3058  if ($r5 === self::$FAILED) {
3059    $r5 = false;
3060  } else {
3061    $r5 = self::$FAILED;
3062    $this->currPos = $p4;
3063    $r1 = self::$FAILED;
3064    goto seq_1;
3065  }
3066  // free $p4
3067  $r6 = $this->parseblock(true, 0x0, self::newRef(null), $param_preproc);
3068  // b <- $r6
3069  if ($r6===self::$FAILED) {
3070    $this->currPos = $p3;
3071    $r1 = self::$FAILED;
3072    goto seq_1;
3073  }
3074  $r1 = true;
3075  seq_1:
3076  if ($r1!==self::$FAILED) {
3077    $this->savedPos = $p2;
3078    $r1 = $this->a24($r6);
3079  } else {
3080    if (!$silence) {$this->fail(9);}
3081  }
3082  // free $p3
3083  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
3084    $this->currPos,
3085    $r1,
3086    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
3087    self::$UNDEFINED
3088  );
3089  return $r1;
3090}, "tlb", ["\$silence", "&\$param_preproc"], [$silence, &$param_preproc]);
3091
3092}
3093private function parsenewlineToken($silence) {
3094return $this->traceCall(function($silence) {
3095  $key = 582;
3096  $bucket = $this->currPos;
3097  $cached = $this->cache[$bucket][$key] ?? null;
3098  if ($cached) {
3099    $this->currPos = $cached->nextPos;
3100
3101    return $cached->result;
3102  }
3103
3104  $p2 = $this->currPos;
3105  $r1 = $this->discardnewline($silence);
3106  if ($r1!==self::$FAILED) {
3107    $this->savedPos = $p2;
3108    $r1 = $this->a25();
3109  }
3110  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
3111    $this->currPos,
3112    $r1,
3113    self::$UNDEFINED,
3114    self::$UNDEFINED
3115  );
3116  return $r1;
3117}, "newlineToken", ["\$silence"], [$silence]);
3118
3119}
3120private function parsepipe($silence) {
3121return $this->traceCall(function($silence) {
3122  $key = 568;
3123  $bucket = $this->currPos;
3124  $cached = $this->cache[$bucket][$key] ?? null;
3125  if ($cached) {
3126    $this->currPos = $cached->nextPos;
3127
3128    return $cached->result;
3129  }
3130
3131  // start choice_1
3132  if (($this->input[$this->currPos] ?? null) === "|") {
3133    $this->currPos++;
3134    $r1 = "|";
3135    goto choice_1;
3136  } else {
3137    if (!$silence) {$this->fail(10);}
3138    $r1 = self::$FAILED;
3139  }
3140  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "{{!}}", $this->currPos, 5, false) === 0) {
3141    $r1 = "{{!}}";
3142    $this->currPos += 5;
3143  } else {
3144    if (!$silence) {$this->fail(11);}
3145    $r1 = self::$FAILED;
3146  }
3147  choice_1:
3148  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
3149    $this->currPos,
3150    $r1,
3151    self::$UNDEFINED,
3152    self::$UNDEFINED
3153  );
3154  return $r1;
3155}, "pipe", ["\$silence"], [$silence]);
3156
3157}
3158private function parsespace($silence) {
3159return $this->traceCall(function($silence) {
3160  $key = 572;
3161  $bucket = $this->currPos;
3162  $cached = $this->cache[$bucket][$key] ?? null;
3163  if ($cached) {
3164    $this->currPos = $cached->nextPos;
3165
3166    return $cached->result;
3167  }
3168
3169  $r1 = $this->input[$this->currPos] ?? '';
3170  if ($r1 === " " || $r1 === "\x09") {
3171    $this->currPos++;
3172  } else {
3173    $r1 = self::$FAILED;
3174    if (!$silence) {$this->fail(12);}
3175  }
3176  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
3177    $this->currPos,
3178    $r1,
3179    self::$UNDEFINED,
3180    self::$UNDEFINED
3181  );
3182  return $r1;
3183}, "space", ["\$silence"], [$silence]);
3184
3185}
3186private function parseurl_protocol($silence) {
3187return $this->traceCall(function($silence) {
3188  $key = 364;
3189  $bucket = $this->currPos;
3190  $cached = $this->cache[$bucket][$key] ?? null;
3191  if ($cached) {
3192    $this->currPos = $cached->nextPos;
3193
3194    return $cached->result;
3195  }
3196
3197  $p2 = $this->currPos;
3198  // start seq_1
3199  $p3 = $this->currPos;
3200  $p5 = $this->currPos;
3201  // start choice_1
3202  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "//", $this->currPos, 2, false) === 0) {
3203    $r4 = "//";
3204    $this->currPos += 2;
3205    goto choice_1;
3206  } else {
3207    if (!$silence) {$this->fail(13);}
3208    $r4 = self::$FAILED;
3209  }
3210  // start seq_2
3211  $p6 = $this->currPos;
3212  $r7 = $this->input[$this->currPos] ?? '';
3213  if (preg_match("/^[A-Za-z]/", $r7)) {
3214    $this->currPos++;
3215  } else {
3216    $r7 = self::$FAILED;
3217    if (!$silence) {$this->fail(14);}
3218    $r4 = self::$FAILED;
3219    goto seq_2;
3220  }
3221  for (;;) {
3222    $r9 = $this->input[$this->currPos] ?? '';
3223    if (preg_match("/^[\\-A-Za-z0-9+.]/", $r9)) {
3224      $this->currPos++;
3225    } else {
3226      $r9 = self::$FAILED;
3227      if (!$silence) {$this->fail(15);}
3228      break;
3229    }
3230  }
3231  // free $r9
3232  $r8 = true;
3233  if ($r8===self::$FAILED) {
3234    $this->currPos = $p6;
3235    $r4 = self::$FAILED;
3236    goto seq_2;
3237  }
3238  // free $r8
3239  if (($this->input[$this->currPos] ?? null) === ":") {
3240    $this->currPos++;
3241    $r8 = ":";
3242  } else {
3243    if (!$silence) {$this->fail(16);}
3244    $r8 = self::$FAILED;
3245    $this->currPos = $p6;
3246    $r4 = self::$FAILED;
3247    goto seq_2;
3248  }
3249  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "//", $this->currPos, 2, false) === 0) {
3250    $r9 = "//";
3251    $this->currPos += 2;
3252  } else {
3253    if (!$silence) {$this->fail(13);}
3254    $r9 = self::$FAILED;
3255    $r9 = null;
3256  }
3257  $r4 = true;
3258  seq_2:
3259  // free $p6
3260  choice_1:
3261  // p <- $r4
3262  if ($r4!==self::$FAILED) {
3263    $r4 = substr($this->input, $p5, $this->currPos - $p5);
3264  } else {
3265    $r4 = self::$FAILED;
3266    $r1 = self::$FAILED;
3267    goto seq_1;
3268  }
3269  // free $p5
3270  $this->savedPos = $this->currPos;
3271  $r10 = $this->a26($r4);
3272  if ($r10) {
3273    $r10 = false;
3274  } else {
3275    $r10 = self::$FAILED;
3276    $this->currPos = $p3;
3277    $r1 = self::$FAILED;
3278    goto seq_1;
3279  }
3280  $r1 = true;
3281  seq_1:
3282  if ($r1!==self::$FAILED) {
3283    $this->savedPos = $p2;
3284    $r1 = $this->a27($r4);
3285  }
3286  // free $p3
3287  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
3288    $this->currPos,
3289    $r1,
3290    self::$UNDEFINED,
3291    self::$UNDEFINED
3292  );
3293  return $r1;
3294}, "url_protocol", ["\$silence"], [$silence]);
3295
3296}
3297private function parseipv6urladdr($silence) {
3298return $this->traceCall(function($silence) {
3299  $key = 372;
3300  $bucket = $this->currPos;
3301  $cached = $this->cache[$bucket][$key] ?? null;
3302  if ($cached) {
3303    $this->currPos = $cached->nextPos;
3304
3305    return $cached->result;
3306  }
3307
3308  $p1 = $this->currPos;
3309  // start seq_1
3310  $p3 = $this->currPos;
3311  if (($this->input[$this->currPos] ?? null) === "[") {
3312    $this->currPos++;
3313    $r4 = "[";
3314  } else {
3315    if (!$silence) {$this->fail(17);}
3316    $r4 = self::$FAILED;
3317    $r2 = self::$FAILED;
3318    goto seq_1;
3319  }
3320  $r5 = self::$FAILED;
3321  for (;;) {
3322    $r6 = $this->input[$this->currPos] ?? '';
3323    if (preg_match("/^[0-9A-Fa-f:.]/", $r6)) {
3324      $this->currPos++;
3325      $r5 = true;
3326    } else {
3327      $r6 = self::$FAILED;
3328      if (!$silence) {$this->fail(18);}
3329      break;
3330    }
3331  }
3332  if ($r5===self::$FAILED) {
3333    $this->currPos = $p3;
3334    $r2 = self::$FAILED;
3335    goto seq_1;
3336  }
3337  // free $r6
3338  if (($this->input[$this->currPos] ?? null) === "]") {
3339    $this->currPos++;
3340    $r6 = "]";
3341  } else {
3342    if (!$silence) {$this->fail(19);}
3343    $r6 = self::$FAILED;
3344    $this->currPos = $p3;
3345    $r2 = self::$FAILED;
3346    goto seq_1;
3347  }
3348  $r2 = true;
3349  seq_1:
3350  if ($r2!==self::$FAILED) {
3351    $r2 = substr($this->input, $p1, $this->currPos - $p1);
3352  } else {
3353    $r2 = self::$FAILED;
3354  }
3355  // free $p3
3356  // free $p1
3357  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
3358    $this->currPos,
3359    $r2,
3360    self::$UNDEFINED,
3361    self::$UNDEFINED
3362  );
3363  return $r2;
3364}, "ipv6urladdr", ["\$silence"], [$silence]);
3365
3366}
3367private function discardinline_breaks($silence, $boolParams, &$param_preproc, &$param_th) {
3368return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
3369  $key = json_encode([337, $boolParams & 0x1ffe, $param_preproc, $param_th]);
3370  $bucket = $this->currPos;
3371  $cached = $this->cache[$bucket][$key] ?? null;
3372  if ($cached) {
3373    $this->currPos = $cached->nextPos;
3374    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
3375    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
3376    return $cached->result;
3377  }
3378  $saved_preproc=$param_preproc;
3379  $saved_th=$param_th;
3380  // start seq_1
3381  $p1 = $this->currPos;
3382  $p3 = $this->currPos;
3383  if (strspn($this->input, "=|!{}:;\x0d\x0a[]-", $this->currPos, 1) !== 0) {
3384    $r4 = $this->input[$this->currPos++];
3385    $r4 = false;
3386    $this->currPos = $p3;
3387  } else {
3388    $r4 = self::$FAILED;
3389    $r2 = self::$FAILED;
3390    goto seq_1;
3391  }
3392  // free $p3
3393  // start seq_2
3394  $p3 = $this->currPos;
3395  $this->savedPos = $this->currPos;
3396  $r6 = $this->a28(/*annOrExtTag*/($boolParams & 0x2) !== 0, /*h*/($boolParams & 0x4) !== 0, /*extlink*/($boolParams & 0x8) !== 0, /*intemplate*/($boolParams & 0x10) !== 0, $param_preproc, /*equal*/($boolParams & 0x20) !== 0, /*table*/($boolParams & 0x40) !== 0, /*templateArg*/($boolParams & 0x80) !== 0, /*tableCellArg*/($boolParams & 0x100) !== 0, /*semicolon*/($boolParams & 0x200) !== 0, /*arrow*/($boolParams & 0x400) !== 0, /*linkdesc*/($boolParams & 0x800) !== 0, /*colon*/($boolParams & 0x1000) !== 0, $param_th);
3397  if ($r6) {
3398    $r6 = false;
3399  } else {
3400    $r6 = self::$FAILED;
3401    $this->currPos = $p3;
3402    $r5 = self::$FAILED;
3403    goto seq_2;
3404  }
3405  $r5 = true;
3406  seq_2:
3407  if ($r5===self::$FAILED) {
3408    $this->currPos = $p1;
3409    $r2 = self::$FAILED;
3410    goto seq_1;
3411  }
3412  // free $r5,$p3
3413  $r2 = true;
3414  seq_1:
3415  // free $r2,$p1
3416  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
3417    $this->currPos,
3418    $r2,
3419    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
3420    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
3421  );
3422  return $r2;
3423}, "inline_breaks", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
3424
3425}
3426private function parseno_punctuation_char($silence) {
3427return $this->traceCall(function($silence) {
3428  $key = 366;
3429  $bucket = $this->currPos;
3430  $cached = $this->cache[$bucket][$key] ?? null;
3431  if ($cached) {
3432    $this->currPos = $cached->nextPos;
3433
3434    return $cached->result;
3435  }
3436
3437  $r1 = self::charAt($this->input, $this->currPos);
3438  if (preg_match("/^[^ \\]\\[\\x0d\\x0a\"'<>\\x00- \\x7f&\\x{a0}\\x{1680}\\x{180e}\\x{2000}-\\x{200a}\\x{202f}\\x{205f}\\x{3000}{]/u", $r1)) {
3439    $this->currPos += strlen($r1);
3440  } else {
3441    $r1 = self::$FAILED;
3442    if (!$silence) {$this->fail(20);}
3443  }
3444  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
3445    $this->currPos,
3446    $r1,
3447    self::$UNDEFINED,
3448    self::$UNDEFINED
3449  );
3450  return $r1;
3451}, "no_punctuation_char", ["\$silence"], [$silence]);
3452
3453}
3454private function parsecomment($silence) {
3455return $this->traceCall(function($silence) {
3456  $key = 586;
3457  $bucket = $this->currPos;
3458  $cached = $this->cache[$bucket][$key] ?? null;
3459  if ($cached) {
3460    $this->currPos = $cached->nextPos;
3461
3462    return $cached->result;
3463  }
3464
3465  $p2 = $this->currPos;
3466  // start seq_1
3467  $p3 = $this->currPos;
3468  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "<!--", $this->currPos, 4, false) === 0) {
3469    $r4 = "<!--";
3470    $this->currPos += 4;
3471  } else {
3472    if (!$silence) {$this->fail(21);}
3473    $r4 = self::$FAILED;
3474    $r1 = self::$FAILED;
3475    goto seq_1;
3476  }
3477  $p6 = $this->currPos;
3478  for (;;) {
3479    // start seq_2
3480    $p8 = $this->currPos;
3481    $p9 = $this->currPos;
3482    if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "-->", $this->currPos, 3, false) === 0) {
3483      $r10 = "-->";
3484      $this->currPos += 3;
3485    } else {
3486      $r10 = self::$FAILED;
3487    }
3488    if ($r10 === self::$FAILED) {
3489      $r10 = false;
3490    } else {
3491      $r10 = self::$FAILED;
3492      $this->currPos = $p9;
3493      $r7 = self::$FAILED;
3494      goto seq_2;
3495    }
3496    // free $p9
3497    if ($this->currPos < $this->inputLength) {
3498      $r11 = self::consumeChar($this->input, $this->currPos);;
3499    } else {
3500      $r11 = self::$FAILED;
3501      if (!$silence) {$this->fail(7);}
3502      $this->currPos = $p8;
3503      $r7 = self::$FAILED;
3504      goto seq_2;
3505    }
3506    $r7 = true;
3507    seq_2:
3508    if ($r7===self::$FAILED) {
3509      break;
3510    }
3511    // free $p8
3512  }
3513  // free $r7
3514  $r5 = true;
3515  // c <- $r5
3516  if ($r5!==self::$FAILED) {
3517    $r5 = substr($this->input, $p6, $this->currPos - $p6);
3518  } else {
3519    $r5 = self::$FAILED;
3520    $this->currPos = $p3;
3521    $r1 = self::$FAILED;
3522    goto seq_1;
3523  }
3524  // free $p6
3525  $p6 = $this->currPos;
3526  // start choice_1
3527  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "-->", $this->currPos, 3, false) === 0) {
3528    $r7 = "-->";
3529    $this->currPos += 3;
3530    goto choice_1;
3531  } else {
3532    if (!$silence) {$this->fail(22);}
3533    $r7 = self::$FAILED;
3534  }
3535  $r7 = $this->discardeof($silence);
3536  choice_1:
3537  // cEnd <- $r7
3538  if ($r7!==self::$FAILED) {
3539    $r7 = substr($this->input, $p6, $this->currPos - $p6);
3540  } else {
3541    $r7 = self::$FAILED;
3542    $this->currPos = $p3;
3543    $r1 = self::$FAILED;
3544    goto seq_1;
3545  }
3546  // free $p6
3547  $r1 = true;
3548  seq_1:
3549  if ($r1!==self::$FAILED) {
3550    $this->savedPos = $p2;
3551    $r1 = $this->a29($r5, $r7);
3552  }
3553  // free $p3
3554  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
3555    $this->currPos,
3556    $r1,
3557    self::$UNDEFINED,
3558    self::$UNDEFINED
3559  );
3560  return $r1;
3561}, "comment", ["\$silence"], [$silence]);
3562
3563}
3564private function parsetplarg_or_template($silence, $boolParams, &$param_th, &$param_preproc) {
3565return $this->traceCall(function($silence, $boolParams, &$param_th, &$param_preproc) {
3566  $key = json_encode([374, $boolParams & 0x7fef, $param_th, $param_preproc]);
3567  $bucket = $this->currPos;
3568  $cached = $this->cache[$bucket][$key] ?? null;
3569  if ($cached) {
3570    $this->currPos = $cached->nextPos;
3571    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
3572    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
3573    return $cached->result;
3574  }
3575  $saved_th=$param_th;
3576  $saved_preproc=$param_preproc;
3577  $p2 = $this->currPos;
3578  // start seq_1
3579  $p3 = $this->currPos;
3580  $p4 = $this->currPos;
3581  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "{{", $this->currPos, 2, false) === 0) {
3582    $r5 = "{{";
3583    $this->currPos += 2;
3584    $r5 = false;
3585    $this->currPos = $p4;
3586  } else {
3587    $r5 = self::$FAILED;
3588    $r1 = self::$FAILED;
3589    goto seq_1;
3590  }
3591  // free $p4
3592  $r6 = $this->parsetplarg_or_template_guarded($silence, $boolParams | 0x10, $param_th, $param_preproc);
3593  // t <- $r6
3594  if ($r6===self::$FAILED) {
3595    $this->currPos = $p3;
3596    $r1 = self::$FAILED;
3597    goto seq_1;
3598  }
3599  $r1 = true;
3600  seq_1:
3601  if ($r1!==self::$FAILED) {
3602    $this->savedPos = $p2;
3603    $r1 = $this->a30($r6);
3604  }
3605  // free $p3
3606  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
3607    $this->currPos,
3608    $r1,
3609    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
3610    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
3611  );
3612  return $r1;
3613}, "tplarg_or_template", ["\$silence", "\$boolParams", "&\$param_th", "&\$param_preproc"], [$silence, $boolParams, &$param_th, &$param_preproc]);
3614
3615}
3616private function parsehtmlentity($silence) {
3617return $this->traceCall(function($silence) {
3618  $key = 542;
3619  $bucket = $this->currPos;
3620  $cached = $this->cache[$bucket][$key] ?? null;
3621  if ($cached) {
3622    $this->currPos = $cached->nextPos;
3623
3624    return $cached->result;
3625  }
3626
3627  $p2 = $this->currPos;
3628  $r3 = $this->parseraw_htmlentity($silence);
3629  // cc <- $r3
3630  $r1 = $r3;
3631  if ($r1!==self::$FAILED) {
3632    $this->savedPos = $p2;
3633    $r1 = $this->a31($r3);
3634  }
3635  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
3636    $this->currPos,
3637    $r1,
3638    self::$UNDEFINED,
3639    self::$UNDEFINED
3640  );
3641  return $r1;
3642}, "htmlentity", ["\$silence"], [$silence]);
3643
3644}
3645private function parseoptional_spaces($silence) {
3646return $this->traceCall(function($silence) {
3647  $key = 574;
3648  $bucket = $this->currPos;
3649  $cached = $this->cache[$bucket][$key] ?? null;
3650  if ($cached) {
3651    $this->currPos = $cached->nextPos;
3652
3653    return $cached->result;
3654  }
3655
3656  $p1 = $this->currPos;
3657  for (;;) {
3658    $r3 = $this->input[$this->currPos] ?? '';
3659    if ($r3 === " " || $r3 === "\x09") {
3660      $this->currPos++;
3661    } else {
3662      $r3 = self::$FAILED;
3663      if (!$silence) {$this->fail(12);}
3664      break;
3665    }
3666  }
3667  // free $r3
3668  $r2 = true;
3669  if ($r2!==self::$FAILED) {
3670    $r2 = substr($this->input, $p1, $this->currPos - $p1);
3671  } else {
3672    $r2 = self::$FAILED;
3673  }
3674  // free $p1
3675  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
3676    $this->currPos,
3677    $r2,
3678    self::$UNDEFINED,
3679    self::$UNDEFINED
3680  );
3681  return $r2;
3682}, "optional_spaces", ["\$silence"], [$silence]);
3683
3684}
3685private function discardpipe($silence) {
3686return $this->traceCall(function($silence) {
3687  $key = 569;
3688  $bucket = $this->currPos;
3689  $cached = $this->cache[$bucket][$key] ?? null;
3690  if ($cached) {
3691    $this->currPos = $cached->nextPos;
3692
3693    return $cached->result;
3694  }
3695
3696  // start choice_1
3697  if (($this->input[$this->currPos] ?? null) === "|") {
3698    $this->currPos++;
3699    $r1 = "|";
3700    goto choice_1;
3701  } else {
3702    if (!$silence) {$this->fail(10);}
3703    $r1 = self::$FAILED;
3704  }
3705  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "{{!}}", $this->currPos, 5, false) === 0) {
3706    $r1 = "{{!}}";
3707    $this->currPos += 5;
3708  } else {
3709    if (!$silence) {$this->fail(11);}
3710    $r1 = self::$FAILED;
3711  }
3712  choice_1:
3713  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
3714    $this->currPos,
3715    $r1,
3716    self::$UNDEFINED,
3717    self::$UNDEFINED
3718  );
3719  return $r1;
3720}, "pipe", ["\$silence"], [$silence]);
3721
3722}
3723private function parsetable_attribute($silence, $boolParams, &$param_preproc, &$param_th) {
3724return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
3725  $key = json_encode([474, $boolParams & 0x7fff, $param_preproc, $param_th]);
3726  $bucket = $this->currPos;
3727  $cached = $this->cache[$bucket][$key] ?? null;
3728  if ($cached) {
3729    $this->currPos = $cached->nextPos;
3730    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
3731    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
3732    return $cached->result;
3733  }
3734  $saved_preproc=$param_preproc;
3735  $saved_th=$param_th;
3736  $p2 = $this->currPos;
3737  // start seq_1
3738  $p3 = $this->currPos;
3739  $r4 = $this->parseoptionalSpaceToken($silence);
3740  // s <- $r4
3741  if ($r4===self::$FAILED) {
3742    $r1 = self::$FAILED;
3743    goto seq_1;
3744  }
3745  $p6 = $this->currPos;
3746  $r5 = '';
3747  // namePos0 <- $r5
3748  if ($r5!==self::$FAILED) {
3749    $this->savedPos = $p6;
3750    $r5 = $this->a32($r4);
3751  } else {
3752    $this->currPos = $p3;
3753    $r1 = self::$FAILED;
3754    goto seq_1;
3755  }
3756  $r7 = $this->parsetable_attribute_name($silence, $boolParams, $param_preproc, $param_th);
3757  // name <- $r7
3758  if ($r7===self::$FAILED) {
3759    $this->currPos = $p3;
3760    $r1 = self::$FAILED;
3761    goto seq_1;
3762  }
3763  $p9 = $this->currPos;
3764  $r8 = '';
3765  // namePos1 <- $r8
3766  if ($r8!==self::$FAILED) {
3767    $this->savedPos = $p9;
3768    $r8 = $this->a33($r4, $r5, $r7);
3769  } else {
3770    $this->currPos = $p3;
3771    $r1 = self::$FAILED;
3772    goto seq_1;
3773  }
3774  $p11 = $this->currPos;
3775  // start seq_2
3776  $p12 = $this->currPos;
3777  $r13 = $this->discardoptionalSpaceToken($silence);
3778  if ($r13===self::$FAILED) {
3779    $r10 = self::$FAILED;
3780    goto seq_2;
3781  }
3782  if (($this->input[$this->currPos] ?? null) === "=") {
3783    $this->currPos++;
3784    $r14 = "=";
3785  } else {
3786    if (!$silence) {$this->fail(23);}
3787    $r14 = self::$FAILED;
3788    $this->currPos = $p12;
3789    $r10 = self::$FAILED;
3790    goto seq_2;
3791  }
3792  $r15 = $this->parsetable_att_value($silence, $boolParams, $param_preproc, $param_th);
3793  if ($r15===self::$FAILED) {
3794    $r15 = null;
3795  }
3796  // v <- $r15
3797  $r10 = true;
3798  seq_2:
3799  if ($r10!==self::$FAILED) {
3800    $this->savedPos = $p11;
3801    $r10 = $this->a34($r4, $r5, $r7, $r8, $r15);
3802  } else {
3803    $r10 = null;
3804  }
3805  // free $p12
3806  // vd <- $r10
3807  $r1 = true;
3808  seq_1:
3809  if ($r1!==self::$FAILED) {
3810    $this->savedPos = $p2;
3811    $r1 = $this->a35($r4, $r5, $r7, $r8, $r10);
3812  }
3813  // free $p3
3814  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
3815    $this->currPos,
3816    $r1,
3817    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
3818    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
3819  );
3820  return $r1;
3821}, "table_attribute", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
3822
3823}
3824private function discardoptionalSpaceToken($silence) {
3825return $this->traceCall(function($silence) {
3826  $key = 593;
3827  $bucket = $this->currPos;
3828  $cached = $this->cache[$bucket][$key] ?? null;
3829  if ($cached) {
3830    $this->currPos = $cached->nextPos;
3831
3832    return $cached->result;
3833  }
3834
3835  $p2 = $this->currPos;
3836  $r3 = $this->parseoptional_spaces($silence);
3837  // s <- $r3
3838  $r1 = $r3;
3839  if ($r1!==self::$FAILED) {
3840    $this->savedPos = $p2;
3841    $r1 = $this->a36($r3);
3842  }
3843  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
3844    $this->currPos,
3845    $r1,
3846    self::$UNDEFINED,
3847    self::$UNDEFINED
3848  );
3849  return $r1;
3850}, "optionalSpaceToken", ["\$silence"], [$silence]);
3851
3852}
3853private function parsebroken_table_attribute_name_char($silence) {
3854return $this->traceCall(function($silence) {
3855  $key = 480;
3856  $bucket = $this->currPos;
3857  $cached = $this->cache[$bucket][$key] ?? null;
3858  if ($cached) {
3859    $this->currPos = $cached->nextPos;
3860
3861    return $cached->result;
3862  }
3863
3864  $p2 = $this->currPos;
3865  // c <- $r3
3866  if (strspn($this->input, "\x00/=>", $this->currPos, 1) !== 0) {
3867    $r3 = $this->input[$this->currPos++];
3868  } else {
3869    $r3 = self::$FAILED;
3870    if (!$silence) {$this->fail(24);}
3871  }
3872  $r1 = $r3;
3873  if ($r1!==self::$FAILED) {
3874    $this->savedPos = $p2;
3875    $r1 = $this->a37($r3);
3876  }
3877  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
3878    $this->currPos,
3879    $r1,
3880    self::$UNDEFINED,
3881    self::$UNDEFINED
3882  );
3883  return $r1;
3884}, "broken_table_attribute_name_char", ["\$silence"], [$silence]);
3885
3886}
3887private function parsegeneric_newline_attribute($silence, $boolParams, &$param_preproc, &$param_th) {
3888return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
3889  $key = json_encode([472, $boolParams & 0x7fff, $param_preproc, $param_th]);
3890  $bucket = $this->currPos;
3891  $cached = $this->cache[$bucket][$key] ?? null;
3892  if ($cached) {
3893    $this->currPos = $cached->nextPos;
3894    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
3895    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
3896    return $cached->result;
3897  }
3898  $saved_preproc=$param_preproc;
3899  $saved_th=$param_th;
3900  $p2 = $this->currPos;
3901  // start seq_1
3902  $p3 = $this->currPos;
3903  for (;;) {
3904    $r5 = $this->discardspace_or_newline_or_solidus($silence);
3905    if ($r5===self::$FAILED) {
3906      break;
3907    }
3908  }
3909  // free $r5
3910  $r4 = true;
3911  if ($r4===self::$FAILED) {
3912    $r1 = self::$FAILED;
3913    goto seq_1;
3914  }
3915  // free $r4
3916  $p6 = $this->currPos;
3917  $r4 = '';
3918  // namePos0 <- $r4
3919  if ($r4!==self::$FAILED) {
3920    $this->savedPos = $p6;
3921    $r4 = $this->a16();
3922  } else {
3923    $this->currPos = $p3;
3924    $r1 = self::$FAILED;
3925    goto seq_1;
3926  }
3927  $r5 = $this->parsegeneric_attribute_name($silence, $boolParams, $param_preproc, $param_th);
3928  // name <- $r5
3929  if ($r5===self::$FAILED) {
3930    $this->currPos = $p3;
3931    $r1 = self::$FAILED;
3932    goto seq_1;
3933  }
3934  $p8 = $this->currPos;
3935  $r7 = '';
3936  // namePos1 <- $r7
3937  if ($r7!==self::$FAILED) {
3938    $this->savedPos = $p8;
3939    $r7 = $this->a38($r4, $r5);
3940  } else {
3941    $this->currPos = $p3;
3942    $r1 = self::$FAILED;
3943    goto seq_1;
3944  }
3945  $p10 = $this->currPos;
3946  // start seq_2
3947  $p11 = $this->currPos;
3948  for (;;) {
3949    $r13 = $this->discardspace_or_newline($silence);
3950    if ($r13===self::$FAILED) {
3951      break;
3952    }
3953  }
3954  // free $r13
3955  $r12 = true;
3956  if ($r12===self::$FAILED) {
3957    $r9 = self::$FAILED;
3958    goto seq_2;
3959  }
3960  // free $r12
3961  if (($this->input[$this->currPos] ?? null) === "=") {
3962    $this->currPos++;
3963    $r12 = "=";
3964  } else {
3965    if (!$silence) {$this->fail(23);}
3966    $r12 = self::$FAILED;
3967    $this->currPos = $p11;
3968    $r9 = self::$FAILED;
3969    goto seq_2;
3970  }
3971  $r13 = $this->parsegeneric_att_value($silence, $boolParams, $param_preproc, $param_th);
3972  if ($r13===self::$FAILED) {
3973    $r13 = null;
3974  }
3975  // v <- $r13
3976  $r9 = true;
3977  seq_2:
3978  if ($r9!==self::$FAILED) {
3979    $this->savedPos = $p10;
3980    $r9 = $this->a39($r4, $r5, $r7, $r13);
3981  } else {
3982    $r9 = null;
3983  }
3984  // free $p11
3985  // vd <- $r9
3986  $r1 = true;
3987  seq_1:
3988  if ($r1!==self::$FAILED) {
3989    $this->savedPos = $p2;
3990    $r1 = $this->a40($r4, $r5, $r7, $r9);
3991  }
3992  // free $p3
3993  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
3994    $this->currPos,
3995    $r1,
3996    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
3997    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
3998  );
3999  return $r1;
4000}, "generic_newline_attribute", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
4001
4002}
4003private function parseextlink_nonipv6url($silence, $boolParams, &$param_preproc, &$param_th) {
4004return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
4005  $key = json_encode([552, $boolParams & 0x77ff, $param_preproc, $param_th]);
4006  $bucket = $this->currPos;
4007  $cached = $this->cache[$bucket][$key] ?? null;
4008  if ($cached) {
4009    $this->currPos = $cached->nextPos;
4010    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
4011    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
4012    return $cached->result;
4013  }
4014  $saved_preproc=$param_preproc;
4015  $saved_th=$param_th;
4016  $r1 = $this->parseextlink_nonipv6url_parameterized($silence, $boolParams & ~0x800, $param_preproc, $param_th);
4017  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
4018    $this->currPos,
4019    $r1,
4020    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
4021    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
4022  );
4023  return $r1;
4024}, "extlink_nonipv6url", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
4025
4026}
4027private function discardspace($silence) {
4028return $this->traceCall(function($silence) {
4029  $key = 573;
4030  $bucket = $this->currPos;
4031  $cached = $this->cache[$bucket][$key] ?? null;
4032  if ($cached) {
4033    $this->currPos = $cached->nextPos;
4034
4035    return $cached->result;
4036  }
4037
4038  $r1 = $this->input[$this->currPos] ?? '';
4039  if ($r1 === " " || $r1 === "\x09") {
4040    $this->currPos++;
4041  } else {
4042    $r1 = self::$FAILED;
4043    if (!$silence) {$this->fail(12);}
4044  }
4045  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
4046    $this->currPos,
4047    $r1,
4048    self::$UNDEFINED,
4049    self::$UNDEFINED
4050  );
4051  return $r1;
4052}, "space", ["\$silence"], [$silence]);
4053
4054}
4055private function discardunispace($silence) {
4056return $this->traceCall(function($silence) {
4057  $key = 599;
4058  $bucket = $this->currPos;
4059  $cached = $this->cache[$bucket][$key] ?? null;
4060  if ($cached) {
4061    $this->currPos = $cached->nextPos;
4062
4063    return $cached->result;
4064  }
4065
4066  $r1 = self::charAt($this->input, $this->currPos);
4067  if (preg_match("/^[ \\x{a0}\\x{1680}\\x{2000}-\\x{200a}\\x{202f}\\x{205f}\\x{3000}]/u", $r1)) {
4068    $this->currPos += strlen($r1);
4069  } else {
4070    $r1 = self::$FAILED;
4071    if (!$silence) {$this->fail(25);}
4072  }
4073  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
4074    $this->currPos,
4075    $r1,
4076    self::$UNDEFINED,
4077    self::$UNDEFINED
4078  );
4079  return $r1;
4080}, "unispace", ["\$silence"], [$silence]);
4081
4082}
4083private function parseinlineline($silence, $boolParams, &$param_preproc, &$param_th) {
4084return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
4085  $key = json_encode([338, $boolParams & 0x7fff, $param_preproc, $param_th]);
4086  $bucket = $this->currPos;
4087  $cached = $this->cache[$bucket][$key] ?? null;
4088  if ($cached) {
4089    $this->currPos = $cached->nextPos;
4090    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
4091    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
4092    return $cached->result;
4093  }
4094  $saved_preproc=$param_preproc;
4095  $saved_th=$param_th;
4096  $p2 = $this->currPos;
4097  $r3 = [];
4098  for (;;) {
4099    // start choice_1
4100    $r4 = $this->parseurltext($silence, $boolParams, $param_preproc, $param_th);
4101    if ($r4!==self::$FAILED) {
4102      goto choice_1;
4103    }
4104    $p5 = $this->currPos;
4105    // start seq_1
4106    $p6 = $this->currPos;
4107    $p7 = $this->currPos;
4108    $r8 = $this->discardinline_breaks(true, $boolParams, $param_preproc, $param_th);
4109    if ($r8 === self::$FAILED) {
4110      $r8 = false;
4111    } else {
4112      $r8 = self::$FAILED;
4113      $this->currPos = $p7;
4114      $r4 = self::$FAILED;
4115      goto seq_1;
4116    }
4117    // free $p7
4118    // start choice_2
4119    $r9 = $this->parseinline_element($silence, $boolParams, $param_preproc, $param_th);
4120    if ($r9!==self::$FAILED) {
4121      goto choice_2;
4122    }
4123    $p7 = $this->currPos;
4124    // start seq_2
4125    $p10 = $this->currPos;
4126    $p11 = $this->currPos;
4127    $r12 = $this->discardnewline(true);
4128    if ($r12 === self::$FAILED) {
4129      $r12 = false;
4130    } else {
4131      $r12 = self::$FAILED;
4132      $this->currPos = $p11;
4133      $r9 = self::$FAILED;
4134      goto seq_2;
4135    }
4136    // free $p11
4137    // s <- $r13
4138    if ($this->currPos < $this->inputLength) {
4139      $r13 = self::consumeChar($this->input, $this->currPos);;
4140    } else {
4141      $r13 = self::$FAILED;
4142      if (!$silence) {$this->fail(7);}
4143      $this->currPos = $p10;
4144      $r9 = self::$FAILED;
4145      goto seq_2;
4146    }
4147    $r9 = true;
4148    seq_2:
4149    if ($r9!==self::$FAILED) {
4150      $this->savedPos = $p7;
4151      $r9 = $this->a41($r13);
4152    }
4153    // free $p10
4154    choice_2:
4155    // r <- $r9
4156    if ($r9===self::$FAILED) {
4157      $this->currPos = $p6;
4158      $r4 = self::$FAILED;
4159      goto seq_1;
4160    }
4161    $r4 = true;
4162    seq_1:
4163    if ($r4!==self::$FAILED) {
4164      $this->savedPos = $p5;
4165      $r4 = $this->a23($r9);
4166    }
4167    // free $p6
4168    choice_1:
4169    if ($r4!==self::$FAILED) {
4170      $r3[] = $r4;
4171    } else {
4172      break;
4173    }
4174  }
4175  if (count($r3) === 0) {
4176    $r3 = self::$FAILED;
4177  }
4178  // c <- $r3
4179  // free $r4
4180  $r1 = $r3;
4181  if ($r1!==self::$FAILED) {
4182    $this->savedPos = $p2;
4183    $r1 = $this->a42($r3);
4184  }
4185  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
4186    $this->currPos,
4187    $r1,
4188    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
4189    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
4190  );
4191  return $r1;
4192}, "inlineline", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
4193
4194}
4195private function parsedtdd($silence, $boolParams, &$param_preproc, &$param_th) {
4196return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
4197  $key = json_encode([496, $boolParams & 0x7fff, $param_preproc, $param_th]);
4198  $bucket = $this->currPos;
4199  $cached = $this->cache[$bucket][$key] ?? null;
4200  if ($cached) {
4201    $this->currPos = $cached->nextPos;
4202    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
4203    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
4204    return $cached->result;
4205  }
4206  $saved_preproc=$param_preproc;
4207  $saved_th=$param_th;
4208  $p2 = $this->currPos;
4209  // start seq_1
4210  $p3 = $this->currPos;
4211  $r4 = [];
4212  for (;;) {
4213    $p6 = $this->currPos;
4214    // start seq_2
4215    $p7 = $this->currPos;
4216    $p8 = $this->currPos;
4217    // start seq_3
4218    $p10 = $this->currPos;
4219    if (($this->input[$this->currPos] ?? null) === ";") {
4220      $this->currPos++;
4221      $r11 = ";";
4222    } else {
4223      $r11 = self::$FAILED;
4224      $r9 = self::$FAILED;
4225      goto seq_3;
4226    }
4227    $p12 = $this->currPos;
4228    $r13 = $this->discardlist_char(true);
4229    if ($r13 === self::$FAILED) {
4230      $r13 = false;
4231    } else {
4232      $r13 = self::$FAILED;
4233      $this->currPos = $p12;
4234      $this->currPos = $p10;
4235      $r9 = self::$FAILED;
4236      goto seq_3;
4237    }
4238    // free $p12
4239    $r9 = true;
4240    seq_3:
4241    // free $p10
4242    if ($r9 === self::$FAILED) {
4243      $r9 = false;
4244    } else {
4245      $r9 = self::$FAILED;
4246      $this->currPos = $p8;
4247      $r5 = self::$FAILED;
4248      goto seq_2;
4249    }
4250    // free $p8
4251    $r14 = $this->parselist_char($silence);
4252    // lc <- $r14
4253    if ($r14===self::$FAILED) {
4254      $this->currPos = $p7;
4255      $r5 = self::$FAILED;
4256      goto seq_2;
4257    }
4258    $r5 = true;
4259    seq_2:
4260    if ($r5!==self::$FAILED) {
4261      $this->savedPos = $p6;
4262      $r5 = $this->a43($r14);
4263      $r4[] = $r5;
4264    } else {
4265      break;
4266    }
4267    // free $p7
4268  }
4269  // bullets <- $r4
4270  // free $r5
4271  if (($this->input[$this->currPos] ?? null) === ";") {
4272    $this->currPos++;
4273    $r5 = ";";
4274  } else {
4275    if (!$silence) {$this->fail(26);}
4276    $r5 = self::$FAILED;
4277    $this->currPos = $p3;
4278    $r1 = self::$FAILED;
4279    goto seq_1;
4280  }
4281  $r15 = [];
4282  for (;;) {
4283    $r16 = $this->parsedtdd_colon($silence, $boolParams, $param_preproc, $param_th);
4284    if ($r16!==self::$FAILED) {
4285      $r15[] = $r16;
4286    } else {
4287      break;
4288    }
4289  }
4290  // colons <- $r15
4291  // free $r16
4292  $r16 = $this->parseinlineline($silence, $boolParams, $param_preproc, $param_th);
4293  if ($r16===self::$FAILED) {
4294    $r16 = null;
4295  }
4296  // d <- $r16
4297  $p7 = $this->currPos;
4298  $r17 = $this->discardeolf(true);
4299  if ($r17!==self::$FAILED) {
4300    $r17 = false;
4301    $this->currPos = $p7;
4302  } else {
4303    $this->currPos = $p3;
4304    $r1 = self::$FAILED;
4305    goto seq_1;
4306  }
4307  // free $p7
4308  $r1 = true;
4309  seq_1:
4310  if ($r1!==self::$FAILED) {
4311    $this->savedPos = $p2;
4312    $r1 = $this->a44($r4, $r15, $r16);
4313  }
4314  // free $p3
4315  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
4316    $this->currPos,
4317    $r1,
4318    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
4319    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
4320  );
4321  return $r1;
4322}, "dtdd", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
4323
4324}
4325private function parsehacky_dl_uses($silence, $boolParams, &$param_preproc, &$param_th) {
4326return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
4327  $key = json_encode([492, $boolParams & 0x7fff, $param_preproc, $param_th]);
4328  $bucket = $this->currPos;
4329  $cached = $this->cache[$bucket][$key] ?? null;
4330  if ($cached) {
4331    $this->currPos = $cached->nextPos;
4332    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
4333    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
4334    return $cached->result;
4335  }
4336  $saved_preproc=$param_preproc;
4337  $saved_th=$param_th;
4338  $p2 = $this->currPos;
4339  // start seq_1
4340  $p3 = $this->currPos;
4341  $r4 = [];
4342  for (;;) {
4343    if (($this->input[$this->currPos] ?? null) === ":") {
4344      $this->currPos++;
4345      $r5 = ":";
4346      $r4[] = $r5;
4347    } else {
4348      if (!$silence) {$this->fail(16);}
4349      $r5 = self::$FAILED;
4350      break;
4351    }
4352  }
4353  if (count($r4) === 0) {
4354    $r4 = self::$FAILED;
4355  }
4356  // bullets <- $r4
4357  if ($r4===self::$FAILED) {
4358    $r1 = self::$FAILED;
4359    goto seq_1;
4360  }
4361  // free $r5
4362  $r5 = [];
4363  for (;;) {
4364    $r6 = $this->parsespace_or_comment($silence);
4365    if ($r6!==self::$FAILED) {
4366      $r5[] = $r6;
4367    } else {
4368      break;
4369    }
4370  }
4371  // sc <- $r5
4372  // free $r6
4373  $p7 = $this->currPos;
4374  $r6 = $this->discardinline_breaks(true, $boolParams, $param_preproc, $param_th);
4375  if ($r6 === self::$FAILED) {
4376    $r6 = false;
4377  } else {
4378    $r6 = self::$FAILED;
4379    $this->currPos = $p7;
4380    $this->currPos = $p3;
4381    $r1 = self::$FAILED;
4382    goto seq_1;
4383  }
4384  // free $p7
4385  $r8 = $this->parsetable_start_tag($silence, $boolParams, $param_preproc, $param_th);
4386  // tbl <- $r8
4387  if ($r8===self::$FAILED) {
4388    $this->currPos = $p3;
4389    $r1 = self::$FAILED;
4390    goto seq_1;
4391  }
4392  $r1 = true;
4393  seq_1:
4394  if ($r1!==self::$FAILED) {
4395    $this->savedPos = $p2;
4396    $r1 = $this->a45($r4, $r5, $r8);
4397  }
4398  // free $p3
4399  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
4400    $this->currPos,
4401    $r1,
4402    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
4403    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
4404  );
4405  return $r1;
4406}, "hacky_dl_uses", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
4407
4408}
4409private function parseli($silence, $boolParams, &$param_preproc, &$param_th) {
4410return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
4411  $key = json_encode([490, $boolParams & 0x7fff, $param_preproc, $param_th]);
4412  $bucket = $this->currPos;
4413  $cached = $this->cache[$bucket][$key] ?? null;
4414  if ($cached) {
4415    $this->currPos = $cached->nextPos;
4416    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
4417    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
4418    return $cached->result;
4419  }
4420  $saved_preproc=$param_preproc;
4421  $saved_th=$param_th;
4422  $p2 = $this->currPos;
4423  // start seq_1
4424  $p3 = $this->currPos;
4425  $r4 = [];
4426  for (;;) {
4427    $r5 = $this->parselist_char($silence);
4428    if ($r5!==self::$FAILED) {
4429      $r4[] = $r5;
4430    } else {
4431      break;
4432    }
4433  }
4434  if (count($r4) === 0) {
4435    $r4 = self::$FAILED;
4436  }
4437  // bullets <- $r4
4438  if ($r4===self::$FAILED) {
4439    $r1 = self::$FAILED;
4440    goto seq_1;
4441  }
4442  // free $r5
4443  $r5 = $this->parseinlineline($silence, $boolParams, $param_preproc, $param_th);
4444  if ($r5===self::$FAILED) {
4445    $r5 = null;
4446  }
4447  // c <- $r5
4448  $p6 = $this->currPos;
4449  // start choice_1
4450  $r7 = $this->discardeolf(true);
4451  if ($r7!==self::$FAILED) {
4452    goto choice_1;
4453  }
4454  $r7 = $this->discardinline_breaks(true, $boolParams, $param_preproc, $param_th);
4455  choice_1:
4456  if ($r7!==self::$FAILED) {
4457    $r7 = false;
4458    $this->currPos = $p6;
4459  } else {
4460    $this->currPos = $p3;
4461    $r1 = self::$FAILED;
4462    goto seq_1;
4463  }
4464  // free $p6
4465  $r1 = true;
4466  seq_1:
4467  if ($r1!==self::$FAILED) {
4468    $this->savedPos = $p2;
4469    $r1 = $this->a46($r4, $r5);
4470  }
4471  // free $p3
4472  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
4473    $this->currPos,
4474    $r1,
4475    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
4476    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
4477  );
4478  return $r1;
4479}, "li", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
4480
4481}
4482private function discardeof($silence) {
4483return $this->traceCall(function($silence) {
4484  $key = 579;
4485  $bucket = $this->currPos;
4486  $cached = $this->cache[$bucket][$key] ?? null;
4487  if ($cached) {
4488    $this->currPos = $cached->nextPos;
4489
4490    return $cached->result;
4491  }
4492
4493  $this->savedPos = $this->currPos;
4494  $r1 = $this->a47();
4495  if ($r1) {
4496    $r1 = false;
4497  } else {
4498    $r1 = self::$FAILED;
4499  }
4500  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
4501    $this->currPos,
4502    $r1,
4503    self::$UNDEFINED,
4504    self::$UNDEFINED
4505  );
4506  return $r1;
4507}, "eof", ["\$silence"], [$silence]);
4508
4509}
4510private function parseblock($silence, $boolParams, &$param_th, &$param_preproc) {
4511return $this->traceCall(function($silence, $boolParams, &$param_th, &$param_preproc) {
4512  $key = json_encode([320, $boolParams & 0x7fff, $param_th, $param_preproc]);
4513  $bucket = $this->currPos;
4514  $cached = $this->cache[$bucket][$key] ?? null;
4515  if ($cached) {
4516    $this->currPos = $cached->nextPos;
4517    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
4518    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
4519    return $cached->result;
4520  }
4521  $saved_th=$param_th;
4522  $saved_preproc=$param_preproc;
4523  // start choice_1
4524  $p2 = $this->currPos;
4525  // start seq_1
4526  $p3 = $this->currPos;
4527  $p4 = $this->currPos;
4528  $r5 = $this->discardsof(true);
4529  if ($r5!==self::$FAILED) {
4530    $r5 = false;
4531    $this->currPos = $p4;
4532  } else {
4533    $r1 = self::$FAILED;
4534    goto seq_1;
4535  }
4536  // free $p4
4537  $r6 = $this->parseredirect($silence, $boolParams, $param_th, $param_preproc);
4538  // r <- $r6
4539  if ($r6===self::$FAILED) {
4540    $this->currPos = $p3;
4541    $r1 = self::$FAILED;
4542    goto seq_1;
4543  }
4544  $r7 = [];
4545  for (;;) {
4546    $r8 = $this->parsesol_transparent($silence, $boolParams, $param_preproc, $param_th);
4547    if ($r8!==self::$FAILED) {
4548      $r7[] = $r8;
4549    } else {
4550      break;
4551    }
4552  }
4553  // cil <- $r7
4554  // free $r8
4555  $r8 = $this->parseblock_line($silence, $boolParams, $param_preproc, $param_th);
4556  if ($r8===self::$FAILED) {
4557    $r8 = null;
4558  }
4559  // bl <- $r8
4560  $r1 = true;
4561  seq_1:
4562  if ($r1!==self::$FAILED) {
4563    $this->savedPos = $p2;
4564    $r1 = $this->a48($r6, $r7, $r8);
4565    goto choice_1;
4566  }
4567  // free $p3
4568  $r1 = $this->parseblock_lines($silence, $boolParams, $param_preproc, $param_th);
4569  if ($r1!==self::$FAILED) {
4570    goto choice_1;
4571  }
4572  $r1 = $this->parseinlineline($silence, $boolParams, $param_preproc, $param_th);
4573  if ($r1!==self::$FAILED) {
4574    goto choice_1;
4575  }
4576  $p3 = $this->currPos;
4577  // start seq_2
4578  $p4 = $this->currPos;
4579  // start choice_2
4580  if (/*tableCaption*/($boolParams & 0x4000) !== 0) {
4581    $r9 = false;
4582    goto choice_2;
4583  } else {
4584    $r9 = self::$FAILED;
4585  }
4586  if (/*fullTable*/($boolParams & 0x2000) !== 0) {
4587    $r9 = false;
4588    goto choice_2;
4589  } else {
4590    $r9 = self::$FAILED;
4591  }
4592  if (!(/*tableDataBlock*/($boolParams & 0x1) !== 0)) {
4593    $r9 = false;
4594  } else {
4595    $r9 = self::$FAILED;
4596  }
4597  choice_2:
4598  if ($r9===self::$FAILED) {
4599    $r1 = self::$FAILED;
4600    goto seq_2;
4601  }
4602  $r10 = $this->parsesol($silence, $boolParams, $param_preproc, $param_th);
4603  // s <- $r10
4604  if ($r10===self::$FAILED) {
4605    $this->currPos = $p4;
4606    $r1 = self::$FAILED;
4607    goto seq_2;
4608  }
4609  $p11 = $this->currPos;
4610  $r12 = $this->discardsof(true);
4611  if ($r12 === self::$FAILED) {
4612    $r12 = false;
4613  } else {
4614    $r12 = self::$FAILED;
4615    $this->currPos = $p11;
4616    $this->currPos = $p4;
4617    $r1 = self::$FAILED;
4618    goto seq_2;
4619  }
4620  // free $p11
4621  $p11 = $this->currPos;
4622  $r13 = $this->discardinline_breaks(true, $boolParams, $param_preproc, $param_th);
4623  if ($r13 === self::$FAILED) {
4624    $r13 = false;
4625  } else {
4626    $r13 = self::$FAILED;
4627    $this->currPos = $p11;
4628    $this->currPos = $p4;
4629    $r1 = self::$FAILED;
4630    goto seq_2;
4631  }
4632  // free $p11
4633  $r1 = true;
4634  seq_2:
4635  if ($r1!==self::$FAILED) {
4636    $this->savedPos = $p3;
4637    $r1 = $this->a41($r10);
4638  }
4639  // free $p4
4640  choice_1:
4641  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
4642    $this->currPos,
4643    $r1,
4644    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
4645    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
4646  );
4647  return $r1;
4648}, "block", ["\$silence", "\$boolParams", "&\$param_th", "&\$param_preproc"], [$silence, $boolParams, &$param_th, &$param_preproc]);
4649
4650}
4651private function discardnewline($silence) {
4652return $this->traceCall(function($silence) {
4653  $key = 581;
4654  $bucket = $this->currPos;
4655  $cached = $this->cache[$bucket][$key] ?? null;
4656  if ($cached) {
4657    $this->currPos = $cached->nextPos;
4658
4659    return $cached->result;
4660  }
4661
4662  // start choice_1
4663  if (($this->input[$this->currPos] ?? null) === "\x0a") {
4664    $this->currPos++;
4665    $r1 = "\x0a";
4666    goto choice_1;
4667  } else {
4668    if (!$silence) {$this->fail(27);}
4669    $r1 = self::$FAILED;
4670  }
4671  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "\x0d\x0a", $this->currPos, 2, false) === 0) {
4672    $r1 = "\x0d\x0a";
4673    $this->currPos += 2;
4674  } else {
4675    if (!$silence) {$this->fail(28);}
4676    $r1 = self::$FAILED;
4677  }
4678  choice_1:
4679  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
4680    $this->currPos,
4681    $r1,
4682    self::$UNDEFINED,
4683    self::$UNDEFINED
4684  );
4685  return $r1;
4686}, "newline", ["\$silence"], [$silence]);
4687
4688}
4689private function parsetplarg_or_template_guarded($silence, $boolParams, &$param_th, &$param_preproc) {
4690return $this->traceCall(function($silence, $boolParams, &$param_th, &$param_preproc) {
4691  $key = json_encode([376, $boolParams & 0x7fff, $param_th, $param_preproc]);
4692  $bucket = $this->currPos;
4693  $cached = $this->cache[$bucket][$key] ?? null;
4694  if ($cached) {
4695    $this->currPos = $cached->nextPos;
4696    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
4697    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
4698    return $cached->result;
4699  }
4700  $saved_th=$param_th;
4701  $saved_preproc=$param_preproc;
4702  // start choice_1
4703  $p2 = $this->currPos;
4704  // start seq_1
4705  $p3 = $this->currPos;
4706  $p4 = $this->currPos;
4707  // start seq_2
4708  $p6 = $this->currPos;
4709  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "{{", $this->currPos, 2, false) === 0) {
4710    $r7 = "{{";
4711    $this->currPos += 2;
4712  } else {
4713    $r7 = self::$FAILED;
4714    $r5 = self::$FAILED;
4715    goto seq_2;
4716  }
4717  $p8 = $this->currPos;
4718  // start seq_3
4719  $p10 = $this->currPos;
4720  $r11 = self::$FAILED;
4721  for (;;) {
4722    if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "{{{", $this->currPos, 3, false) === 0) {
4723      $r12 = "{{{";
4724      $this->currPos += 3;
4725      $r11 = true;
4726    } else {
4727      $r12 = self::$FAILED;
4728      break;
4729    }
4730  }
4731  if ($r11===self::$FAILED) {
4732    $r9 = self::$FAILED;
4733    goto seq_3;
4734  }
4735  // free $r12
4736  $p13 = $this->currPos;
4737  if (($this->input[$this->currPos] ?? null) === "{") {
4738    $this->currPos++;
4739    $r12 = "{";
4740  } else {
4741    $r12 = self::$FAILED;
4742  }
4743  if ($r12 === self::$FAILED) {
4744    $r12 = false;
4745  } else {
4746    $r12 = self::$FAILED;
4747    $this->currPos = $p13;
4748    $this->currPos = $p10;
4749    $r9 = self::$FAILED;
4750    goto seq_3;
4751  }
4752  // free $p13
4753  $r9 = true;
4754  seq_3:
4755  if ($r9!==self::$FAILED) {
4756    $r9 = false;
4757    $this->currPos = $p8;
4758  } else {
4759    $this->currPos = $p6;
4760    $r5 = self::$FAILED;
4761    goto seq_2;
4762  }
4763  // free $p10
4764  // free $p8
4765  $r14 = $this->discardtplarg(true, $boolParams, $param_th);
4766  if ($r14===self::$FAILED) {
4767    $this->currPos = $p6;
4768    $r5 = self::$FAILED;
4769    goto seq_2;
4770  }
4771  $r5 = true;
4772  seq_2:
4773  if ($r5!==self::$FAILED) {
4774    $r5 = false;
4775    $this->currPos = $p4;
4776  } else {
4777    $r1 = self::$FAILED;
4778    goto seq_1;
4779  }
4780  // free $p6
4781  // free $p4
4782  // start choice_2
4783  $r15 = $this->parsetemplate($silence, $boolParams, $param_th);
4784  if ($r15!==self::$FAILED) {
4785    goto choice_2;
4786  }
4787  $r15 = $this->parsebroken_template($silence, $param_preproc);
4788  choice_2:
4789  // a <- $r15
4790  if ($r15===self::$FAILED) {
4791    $this->currPos = $p3;
4792    $r1 = self::$FAILED;
4793    goto seq_1;
4794  }
4795  $r1 = true;
4796  seq_1:
4797  if ($r1!==self::$FAILED) {
4798    $this->savedPos = $p2;
4799    $r1 = $this->a49($r15);
4800    goto choice_1;
4801  }
4802  // free $p3
4803  $p3 = $this->currPos;
4804  // start seq_4
4805  $p4 = $this->currPos;
4806  $p6 = $this->currPos;
4807  // start seq_5
4808  $p8 = $this->currPos;
4809  if (($this->input[$this->currPos] ?? null) === "{") {
4810    $this->currPos++;
4811    $r17 = "{";
4812  } else {
4813    if (!$silence) {$this->fail(29);}
4814    $r17 = self::$FAILED;
4815    $r16 = self::$FAILED;
4816    goto seq_5;
4817  }
4818  $p10 = $this->currPos;
4819  // start seq_6
4820  $p13 = $this->currPos;
4821  $r19 = self::$FAILED;
4822  for (;;) {
4823    if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "{{{", $this->currPos, 3, false) === 0) {
4824      $r20 = "{{{";
4825      $this->currPos += 3;
4826      $r19 = true;
4827    } else {
4828      $r20 = self::$FAILED;
4829      break;
4830    }
4831  }
4832  if ($r19===self::$FAILED) {
4833    $r18 = self::$FAILED;
4834    goto seq_6;
4835  }
4836  // free $r20
4837  $p21 = $this->currPos;
4838  if (($this->input[$this->currPos] ?? null) === "{") {
4839    $this->currPos++;
4840    $r20 = "{";
4841  } else {
4842    $r20 = self::$FAILED;
4843  }
4844  if ($r20 === self::$FAILED) {
4845    $r20 = false;
4846  } else {
4847    $r20 = self::$FAILED;
4848    $this->currPos = $p21;
4849    $this->currPos = $p13;
4850    $r18 = self::$FAILED;
4851    goto seq_6;
4852  }
4853  // free $p21
4854  $r18 = true;
4855  seq_6:
4856  if ($r18!==self::$FAILED) {
4857    $r18 = false;
4858    $this->currPos = $p10;
4859  } else {
4860    $this->currPos = $p8;
4861    $r16 = self::$FAILED;
4862    goto seq_5;
4863  }
4864  // free $p13
4865  // free $p10
4866  $r16 = true;
4867  seq_5:
4868  if ($r16===self::$FAILED) {
4869    $r16 = null;
4870  }
4871  // free $p8
4872  // a <- $r16
4873  $r16 = substr($this->input, $p6, $this->currPos - $p6);
4874  // free $p6
4875  $r22 = $this->parsetplarg($silence, $boolParams, $param_th);
4876  // b <- $r22
4877  if ($r22===self::$FAILED) {
4878    $this->currPos = $p4;
4879    $r1 = self::$FAILED;
4880    goto seq_4;
4881  }
4882  $r1 = true;
4883  seq_4:
4884  if ($r1!==self::$FAILED) {
4885    $this->savedPos = $p3;
4886    $r1 = $this->a50($r16, $r22);
4887    goto choice_1;
4888  }
4889  // free $p4
4890  $p4 = $this->currPos;
4891  // start seq_7
4892  $p6 = $this->currPos;
4893  $p8 = $this->currPos;
4894  // start seq_8
4895  $p10 = $this->currPos;
4896  if (($this->input[$this->currPos] ?? null) === "{") {
4897    $this->currPos++;
4898    $r24 = "{";
4899  } else {
4900    if (!$silence) {$this->fail(29);}
4901    $r24 = self::$FAILED;
4902    $r23 = self::$FAILED;
4903    goto seq_8;
4904  }
4905  $p13 = $this->currPos;
4906  // start seq_9
4907  $p21 = $this->currPos;
4908  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "{{", $this->currPos, 2, false) === 0) {
4909    $r26 = "{{";
4910    $this->currPos += 2;
4911  } else {
4912    $r26 = self::$FAILED;
4913    $r25 = self::$FAILED;
4914    goto seq_9;
4915  }
4916  $p27 = $this->currPos;
4917  if (($this->input[$this->currPos] ?? null) === "{") {
4918    $this->currPos++;
4919    $r28 = "{";
4920  } else {
4921    $r28 = self::$FAILED;
4922  }
4923  if ($r28 === self::$FAILED) {
4924    $r28 = false;
4925  } else {
4926    $r28 = self::$FAILED;
4927    $this->currPos = $p27;
4928    $this->currPos = $p21;
4929    $r25 = self::$FAILED;
4930    goto seq_9;
4931  }
4932  // free $p27
4933  $r25 = true;
4934  seq_9:
4935  if ($r25!==self::$FAILED) {
4936    $r25 = false;
4937    $this->currPos = $p13;
4938  } else {
4939    $this->currPos = $p10;
4940    $r23 = self::$FAILED;
4941    goto seq_8;
4942  }
4943  // free $p21
4944  // free $p13
4945  $r23 = true;
4946  seq_8:
4947  if ($r23===self::$FAILED) {
4948    $r23 = null;
4949  }
4950  // free $p10
4951  // a <- $r23
4952  $r23 = substr($this->input, $p8, $this->currPos - $p8);
4953  // free $p8
4954  $r29 = $this->parsetemplate($silence, $boolParams, $param_th);
4955  // b <- $r29
4956  if ($r29===self::$FAILED) {
4957    $this->currPos = $p6;
4958    $r1 = self::$FAILED;
4959    goto seq_7;
4960  }
4961  $r1 = true;
4962  seq_7:
4963  if ($r1!==self::$FAILED) {
4964    $this->savedPos = $p4;
4965    $r1 = $this->a50($r23, $r29);
4966    goto choice_1;
4967  }
4968  // free $p6
4969  $r1 = $this->parsebroken_template($silence, $param_preproc);
4970  choice_1:
4971  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
4972    $this->currPos,
4973    $r1,
4974    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
4975    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
4976  );
4977  return $r1;
4978}, "tplarg_or_template_guarded", ["\$silence", "\$boolParams", "&\$param_th", "&\$param_preproc"], [$silence, $boolParams, &$param_th, &$param_preproc]);
4979
4980}
4981private function parseraw_htmlentity($silence) {
4982return $this->traceCall(function($silence) {
4983  $key = 540;
4984  $bucket = $this->currPos;
4985  $cached = $this->cache[$bucket][$key] ?? null;
4986  if ($cached) {
4987    $this->currPos = $cached->nextPos;
4988
4989    return $cached->result;
4990  }
4991
4992  $p2 = $this->currPos;
4993  $p4 = $this->currPos;
4994  // start seq_1
4995  $p5 = $this->currPos;
4996  if (($this->input[$this->currPos] ?? null) === "&") {
4997    $this->currPos++;
4998    $r6 = "&";
4999  } else {
5000    if (!$silence) {$this->fail(4);}
5001    $r6 = self::$FAILED;
5002    $r3 = self::$FAILED;
5003    goto seq_1;
5004  }
5005  $r7 = self::$FAILED;
5006  for (;;) {
5007    $r8 = self::charAt($this->input, $this->currPos);
5008    if (preg_match("/^[#0-9a-zA-Z\\x{5e8}\\x{5dc}\\x{5de}\\x{631}\\x{644}\\x{645}]/u", $r8)) {
5009      $this->currPos += strlen($r8);
5010      $r7 = true;
5011    } else {
5012      $r8 = self::$FAILED;
5013      if (!$silence) {$this->fail(30);}
5014      break;
5015    }
5016  }
5017  if ($r7===self::$FAILED) {
5018    $this->currPos = $p5;
5019    $r3 = self::$FAILED;
5020    goto seq_1;
5021  }
5022  // free $r8
5023  if (($this->input[$this->currPos] ?? null) === ";") {
5024    $this->currPos++;
5025    $r8 = ";";
5026  } else {
5027    if (!$silence) {$this->fail(26);}
5028    $r8 = self::$FAILED;
5029    $this->currPos = $p5;
5030    $r3 = self::$FAILED;
5031    goto seq_1;
5032  }
5033  $r3 = true;
5034  seq_1:
5035  // m <- $r3
5036  if ($r3!==self::$FAILED) {
5037    $r3 = substr($this->input, $p4, $this->currPos - $p4);
5038  } else {
5039    $r3 = self::$FAILED;
5040  }
5041  // free $p5
5042  // free $p4
5043  $r1 = $r3;
5044  if ($r1!==self::$FAILED) {
5045    $this->savedPos = $p2;
5046    $r1 = $this->a51($r3);
5047  }
5048  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
5049    $this->currPos,
5050    $r1,
5051    self::$UNDEFINED,
5052    self::$UNDEFINED
5053  );
5054  return $r1;
5055}, "raw_htmlentity", ["\$silence"], [$silence]);
5056
5057}
5058private function parseoptionalSpaceToken($silence) {
5059return $this->traceCall(function($silence) {
5060  $key = 592;
5061  $bucket = $this->currPos;
5062  $cached = $this->cache[$bucket][$key] ?? null;
5063  if ($cached) {
5064    $this->currPos = $cached->nextPos;
5065
5066    return $cached->result;
5067  }
5068
5069  $p2 = $this->currPos;
5070  $r3 = $this->parseoptional_spaces($silence);
5071  // s <- $r3
5072  $r1 = $r3;
5073  if ($r1!==self::$FAILED) {
5074    $this->savedPos = $p2;
5075    $r1 = $this->a36($r3);
5076  }
5077  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
5078    $this->currPos,
5079    $r1,
5080    self::$UNDEFINED,
5081    self::$UNDEFINED
5082  );
5083  return $r1;
5084}, "optionalSpaceToken", ["\$silence"], [$silence]);
5085
5086}
5087private function parsetable_attribute_name($silence, $boolParams, &$param_preproc, &$param_th) {
5088return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
5089  $key = json_encode([482, $boolParams & 0x7fff, $param_preproc, $param_th]);
5090  $bucket = $this->currPos;
5091  $cached = $this->cache[$bucket][$key] ?? null;
5092  if ($cached) {
5093    $this->currPos = $cached->nextPos;
5094    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
5095    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
5096    return $cached->result;
5097  }
5098  $saved_preproc=$param_preproc;
5099  $saved_th=$param_th;
5100  $p2 = $this->currPos;
5101  // start seq_1
5102  $p3 = $this->currPos;
5103  $p5 = $this->currPos;
5104  if (strspn($this->input, "\"'=", $this->currPos, 1) !== 0) {
5105    $r4 = $this->input[$this->currPos++];
5106  } else {
5107    $r4 = self::$FAILED;
5108    if (!$silence) {$this->fail(31);}
5109    $r4 = null;
5110  }
5111  // q <- $r4
5112  $r4 = substr($this->input, $p5, $this->currPos - $p5);
5113  // free $p5
5114  $r6 = [];
5115  for (;;) {
5116    // start choice_1
5117    $p5 = $this->currPos;
5118    $r7 = self::$FAILED;
5119    for (;;) {
5120      if (strcspn($this->input, " \x09\x0d\x0a\x00/=><&{}-!|[", $this->currPos, 1) !== 0) {
5121        $r8 = self::consumeChar($this->input, $this->currPos);
5122        $r7 = true;
5123      } else {
5124        $r8 = self::$FAILED;
5125        if (!$silence) {$this->fail(32);}
5126        break;
5127      }
5128    }
5129    if ($r7!==self::$FAILED) {
5130      $r7 = substr($this->input, $p5, $this->currPos - $p5);
5131      goto choice_1;
5132    } else {
5133      $r7 = self::$FAILED;
5134    }
5135    // free $r8
5136    // free $p5
5137    $p5 = $this->currPos;
5138    // start seq_2
5139    $p9 = $this->currPos;
5140    $p10 = $this->currPos;
5141    $r8 = $this->discardinline_breaks(true, $boolParams, $param_preproc, $param_th);
5142    if ($r8 === self::$FAILED) {
5143      $r8 = false;
5144    } else {
5145      $r8 = self::$FAILED;
5146      $this->currPos = $p10;
5147      $r7 = self::$FAILED;
5148      goto seq_2;
5149    }
5150    // free $p10
5151    // start choice_2
5152    $p10 = $this->currPos;
5153    $r11 = $this->discardwikilink($silence, $boolParams, $param_th, $param_preproc);
5154    if ($r11!==self::$FAILED) {
5155      $r11 = substr($this->input, $p10, $this->currPos - $p10);
5156      goto choice_2;
5157    } else {
5158      $r11 = self::$FAILED;
5159    }
5160    // free $p10
5161    $r11 = $this->parsedirective($silence, $boolParams, $param_preproc, $param_th);
5162    if ($r11!==self::$FAILED) {
5163      goto choice_2;
5164    }
5165    $p10 = $this->currPos;
5166    // start seq_3
5167    $p12 = $this->currPos;
5168    $p13 = $this->currPos;
5169    if (($this->input[$this->currPos] ?? null) === "<") {
5170      $this->currPos++;
5171      $r14 = "<";
5172      $r14 = false;
5173      $this->currPos = $p13;
5174    } else {
5175      $r14 = self::$FAILED;
5176      $r11 = self::$FAILED;
5177      goto seq_3;
5178    }
5179    // free $p13
5180    $r15 = $this->parsehtml_tag($silence, $boolParams, $param_preproc, $param_th);
5181    // x <- $r15
5182    if ($r15===self::$FAILED) {
5183      $this->currPos = $p12;
5184      $r11 = self::$FAILED;
5185      goto seq_3;
5186    }
5187    $r16 = $this->parseinlineline($silence, $boolParams, $param_preproc, $param_th);
5188    if ($r16===self::$FAILED) {
5189      $r16 = null;
5190    }
5191    // ill <- $r16
5192    $r11 = true;
5193    seq_3:
5194    if ($r11!==self::$FAILED) {
5195      $this->savedPos = $p10;
5196      $r11 = $this->a52($r4, $r15, $r16);
5197      goto choice_2;
5198    }
5199    // free $p12
5200    $p12 = $this->currPos;
5201    // start seq_4
5202    $p13 = $this->currPos;
5203    $p17 = $this->currPos;
5204    // start choice_3
5205    $r18 = $this->discardspace_or_newline(true);
5206    if ($r18!==self::$FAILED) {
5207      goto choice_3;
5208    }
5209    if (strspn($this->input, "\x00/=>", $this->currPos, 1) !== 0) {
5210      $r18 = $this->input[$this->currPos++];
5211    } else {
5212      $r18 = self::$FAILED;
5213    }
5214    choice_3:
5215    if ($r18 === self::$FAILED) {
5216      $r18 = false;
5217    } else {
5218      $r18 = self::$FAILED;
5219      $this->currPos = $p17;
5220      $r11 = self::$FAILED;
5221      goto seq_4;
5222    }
5223    // free $p17
5224    if ($this->currPos < $this->inputLength) {
5225      $r19 = self::consumeChar($this->input, $this->currPos);;
5226    } else {
5227      $r19 = self::$FAILED;
5228      if (!$silence) {$this->fail(7);}
5229      $this->currPos = $p13;
5230      $r11 = self::$FAILED;
5231      goto seq_4;
5232    }
5233    $r11 = true;
5234    seq_4:
5235    if ($r11!==self::$FAILED) {
5236      $r11 = substr($this->input, $p12, $this->currPos - $p12);
5237    } else {
5238      $r11 = self::$FAILED;
5239    }
5240    // free $p13
5241    // free $p12
5242    choice_2:
5243    // t <- $r11
5244    if ($r11===self::$FAILED) {
5245      $this->currPos = $p9;
5246      $r7 = self::$FAILED;
5247      goto seq_2;
5248    }
5249    $r7 = true;
5250    seq_2:
5251    if ($r7!==self::$FAILED) {
5252      $this->savedPos = $p5;
5253      $r7 = $this->a53($r4, $r11);
5254    }
5255    // free $p9
5256    choice_1:
5257    if ($r7!==self::$FAILED) {
5258      $r6[] = $r7;
5259    } else {
5260      break;
5261    }
5262  }
5263  // r <- $r6
5264  // free $r7
5265  $this->savedPos = $this->currPos;
5266  $r7 = $this->a54($r4, $r6);
5267  if ($r7) {
5268    $r7 = false;
5269  } else {
5270    $r7 = self::$FAILED;
5271    $this->currPos = $p3;
5272    $r1 = self::$FAILED;
5273    goto seq_1;
5274  }
5275  $r1 = true;
5276  seq_1:
5277  if ($r1!==self::$FAILED) {
5278    $this->savedPos = $p2;
5279    $r1 = $this->a55($r4, $r6);
5280  }
5281  // free $p3
5282  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
5283    $this->currPos,
5284    $r1,
5285    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
5286    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
5287  );
5288  return $r1;
5289}, "table_attribute_name", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
5290
5291}
5292private function parsetable_att_value($silence, $boolParams, &$param_preproc, &$param_th) {
5293return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
5294  $key = json_encode([486, $boolParams & 0x7fff, $param_preproc, $param_th]);
5295  $bucket = $this->currPos;
5296  $cached = $this->cache[$bucket][$key] ?? null;
5297  if ($cached) {
5298    $this->currPos = $cached->nextPos;
5299    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
5300    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
5301    return $cached->result;
5302  }
5303  $saved_preproc=$param_preproc;
5304  $saved_th=$param_th;
5305  // start choice_1
5306  $p2 = $this->currPos;
5307  // start seq_1
5308  $p3 = $this->currPos;
5309  $p5 = $this->currPos;
5310  // start seq_2
5311  $p6 = $this->currPos;
5312  for (;;) {
5313    $r8 = $this->discardspace($silence);
5314    if ($r8===self::$FAILED) {
5315      break;
5316    }
5317  }
5318  // free $r8
5319  $r7 = true;
5320  if ($r7===self::$FAILED) {
5321    $r4 = self::$FAILED;
5322    goto seq_2;
5323  }
5324  // free $r7
5325  if (($this->input[$this->currPos] ?? null) === "'") {
5326    $this->currPos++;
5327    $r7 = "'";
5328  } else {
5329    if (!$silence) {$this->fail(33);}
5330    $r7 = self::$FAILED;
5331    $this->currPos = $p6;
5332    $r4 = self::$FAILED;
5333    goto seq_2;
5334  }
5335  $r4 = true;
5336  seq_2:
5337  // s <- $r4
5338  if ($r4!==self::$FAILED) {
5339    $r4 = substr($this->input, $p5, $this->currPos - $p5);
5340  } else {
5341    $r4 = self::$FAILED;
5342    $r1 = self::$FAILED;
5343    goto seq_1;
5344  }
5345  // free $p6
5346  // free $p5
5347  $r8 = $this->parsetable_attribute_preprocessor_text_single($silence, $boolParams, $param_preproc, $param_th);
5348  if ($r8===self::$FAILED) {
5349    $r8 = null;
5350  }
5351  // t <- $r8
5352  $p5 = $this->currPos;
5353  // start choice_2
5354  if (($this->input[$this->currPos] ?? null) === "'") {
5355    $this->currPos++;
5356    $r9 = "'";
5357    goto choice_2;
5358  } else {
5359    if (!$silence) {$this->fail(33);}
5360    $r9 = self::$FAILED;
5361  }
5362  $p6 = $this->currPos;
5363  // start choice_3
5364  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "!!", $this->currPos, 2, false) === 0) {
5365    $r9 = "!!";
5366    $this->currPos += 2;
5367    goto choice_3;
5368  } else {
5369    $r9 = self::$FAILED;
5370  }
5371  if (strspn($this->input, "|\x0d\x0a", $this->currPos, 1) !== 0) {
5372    $r9 = $this->input[$this->currPos++];
5373  } else {
5374    $r9 = self::$FAILED;
5375  }
5376  choice_3:
5377  if ($r9!==self::$FAILED) {
5378    $r9 = false;
5379    $this->currPos = $p6;
5380  }
5381  // free $p6
5382  choice_2:
5383  // q <- $r9
5384  if ($r9!==self::$FAILED) {
5385    $r9 = substr($this->input, $p5, $this->currPos - $p5);
5386  } else {
5387    $r9 = self::$FAILED;
5388    $this->currPos = $p3;
5389    $r1 = self::$FAILED;
5390    goto seq_1;
5391  }
5392  // free $p5
5393  $r1 = true;
5394  seq_1:
5395  if ($r1!==self::$FAILED) {
5396    $this->savedPos = $p2;
5397    $r1 = $this->a56($r4, $r8, $r9);
5398    goto choice_1;
5399  }
5400  // free $p3
5401  $p3 = $this->currPos;
5402  // start seq_3
5403  $p5 = $this->currPos;
5404  $p6 = $this->currPos;
5405  // start seq_4
5406  $p11 = $this->currPos;
5407  for (;;) {
5408    $r13 = $this->discardspace($silence);
5409    if ($r13===self::$FAILED) {
5410      break;
5411    }
5412  }
5413  // free $r13
5414  $r12 = true;
5415  if ($r12===self::$FAILED) {
5416    $r10 = self::$FAILED;
5417    goto seq_4;
5418  }
5419  // free $r12
5420  if (($this->input[$this->currPos] ?? null) === "\"") {
5421    $this->currPos++;
5422    $r12 = "\"";
5423  } else {
5424    if (!$silence) {$this->fail(34);}
5425    $r12 = self::$FAILED;
5426    $this->currPos = $p11;
5427    $r10 = self::$FAILED;
5428    goto seq_4;
5429  }
5430  $r10 = true;
5431  seq_4:
5432  // s <- $r10
5433  if ($r10!==self::$FAILED) {
5434    $r10 = substr($this->input, $p6, $this->currPos - $p6);
5435  } else {
5436    $r10 = self::$FAILED;
5437    $r1 = self::$FAILED;
5438    goto seq_3;
5439  }
5440  // free $p11
5441  // free $p6
5442  $r13 = $this->parsetable_attribute_preprocessor_text_double($silence, $boolParams, $param_preproc, $param_th);
5443  if ($r13===self::$FAILED) {
5444    $r13 = null;
5445  }
5446  // t <- $r13
5447  $p6 = $this->currPos;
5448  // start choice_4
5449  if (($this->input[$this->currPos] ?? null) === "\"") {
5450    $this->currPos++;
5451    $r14 = "\"";
5452    goto choice_4;
5453  } else {
5454    if (!$silence) {$this->fail(34);}
5455    $r14 = self::$FAILED;
5456  }
5457  $p11 = $this->currPos;
5458  // start choice_5
5459  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "!!", $this->currPos, 2, false) === 0) {
5460    $r14 = "!!";
5461    $this->currPos += 2;
5462    goto choice_5;
5463  } else {
5464    $r14 = self::$FAILED;
5465  }
5466  if (strspn($this->input, "|\x0d\x0a", $this->currPos, 1) !== 0) {
5467    $r14 = $this->input[$this->currPos++];
5468  } else {
5469    $r14 = self::$FAILED;
5470  }
5471  choice_5:
5472  if ($r14!==self::$FAILED) {
5473    $r14 = false;
5474    $this->currPos = $p11;
5475  }
5476  // free $p11
5477  choice_4:
5478  // q <- $r14
5479  if ($r14!==self::$FAILED) {
5480    $r14 = substr($this->input, $p6, $this->currPos - $p6);
5481  } else {
5482    $r14 = self::$FAILED;
5483    $this->currPos = $p5;
5484    $r1 = self::$FAILED;
5485    goto seq_3;
5486  }
5487  // free $p6
5488  $r1 = true;
5489  seq_3:
5490  if ($r1!==self::$FAILED) {
5491    $this->savedPos = $p3;
5492    $r1 = $this->a56($r10, $r13, $r14);
5493    goto choice_1;
5494  }
5495  // free $p5
5496  $p5 = $this->currPos;
5497  // start seq_5
5498  $p6 = $this->currPos;
5499  $p11 = $this->currPos;
5500  for (;;) {
5501    $r16 = $this->discardspace($silence);
5502    if ($r16===self::$FAILED) {
5503      break;
5504    }
5505  }
5506  // free $r16
5507  $r15 = true;
5508  // s <- $r15
5509  if ($r15!==self::$FAILED) {
5510    $r15 = substr($this->input, $p11, $this->currPos - $p11);
5511  } else {
5512    $r15 = self::$FAILED;
5513    $r1 = self::$FAILED;
5514    goto seq_5;
5515  }
5516  // free $p11
5517  $r16 = $this->parsetable_attribute_preprocessor_text($silence, $boolParams, $param_preproc, $param_th);
5518  // t <- $r16
5519  if ($r16===self::$FAILED) {
5520    $this->currPos = $p6;
5521    $r1 = self::$FAILED;
5522    goto seq_5;
5523  }
5524  $p11 = $this->currPos;
5525  // start choice_6
5526  $r17 = $this->discardspace_or_newline(true);
5527  if ($r17!==self::$FAILED) {
5528    goto choice_6;
5529  }
5530  $r17 = $this->discardeof(true);
5531  if ($r17!==self::$FAILED) {
5532    goto choice_6;
5533  }
5534  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "!!", $this->currPos, 2, false) === 0) {
5535    $r17 = "!!";
5536    $this->currPos += 2;
5537    goto choice_6;
5538  } else {
5539    $r17 = self::$FAILED;
5540  }
5541  if (($this->input[$this->currPos] ?? null) === "|") {
5542    $this->currPos++;
5543    $r17 = "|";
5544  } else {
5545    $r17 = self::$FAILED;
5546  }
5547  choice_6:
5548  if ($r17!==self::$FAILED) {
5549    $r17 = false;
5550    $this->currPos = $p11;
5551  } else {
5552    $this->currPos = $p6;
5553    $r1 = self::$FAILED;
5554    goto seq_5;
5555  }
5556  // free $p11
5557  $r1 = true;
5558  seq_5:
5559  if ($r1!==self::$FAILED) {
5560    $this->savedPos = $p5;
5561    $r1 = $this->a57($r15, $r16);
5562  }
5563  // free $p6
5564  choice_1:
5565  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
5566    $this->currPos,
5567    $r1,
5568    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
5569    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
5570  );
5571  return $r1;
5572}, "table_att_value", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
5573
5574}
5575private function discardspace_or_newline_or_solidus($silence) {
5576return $this->traceCall(function($silence) {
5577  $key = 467;
5578  $bucket = $this->currPos;
5579  $cached = $this->cache[$bucket][$key] ?? null;
5580  if ($cached) {
5581    $this->currPos = $cached->nextPos;
5582
5583    return $cached->result;
5584  }
5585
5586  // start choice_1
5587  $r1 = $this->discardspace_or_newline($silence);
5588  if ($r1!==self::$FAILED) {
5589    goto choice_1;
5590  }
5591  $p2 = $this->currPos;
5592  // start seq_1
5593  $p3 = $this->currPos;
5594  // s <- $r4
5595  if (($this->input[$this->currPos] ?? null) === "/") {
5596    $this->currPos++;
5597    $r4 = "/";
5598  } else {
5599    if (!$silence) {$this->fail(35);}
5600    $r4 = self::$FAILED;
5601    $r1 = self::$FAILED;
5602    goto seq_1;
5603  }
5604  $p5 = $this->currPos;
5605  if (($this->input[$this->currPos] ?? null) === ">") {
5606    $this->currPos++;
5607    $r6 = ">";
5608  } else {
5609    $r6 = self::$FAILED;
5610  }
5611  if ($r6 === self::$FAILED) {
5612    $r6 = false;
5613  } else {
5614    $r6 = self::$FAILED;
5615    $this->currPos = $p5;
5616    $this->currPos = $p3;
5617    $r1 = self::$FAILED;
5618    goto seq_1;
5619  }
5620  // free $p5
5621  $r1 = true;
5622  seq_1:
5623  if ($r1!==self::$FAILED) {
5624    $this->savedPos = $p2;
5625    $r1 = $this->a41($r4);
5626  }
5627  // free $p3
5628  choice_1:
5629  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
5630    $this->currPos,
5631    $r1,
5632    self::$UNDEFINED,
5633    self::$UNDEFINED
5634  );
5635  return $r1;
5636}, "space_or_newline_or_solidus", ["\$silence"], [$silence]);
5637
5638}
5639private function parsegeneric_attribute_name($silence, $boolParams, &$param_preproc, &$param_th) {
5640return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
5641  $key = json_encode([478, $boolParams & 0x7fff, $param_preproc, $param_th]);
5642  $bucket = $this->currPos;
5643  $cached = $this->cache[$bucket][$key] ?? null;
5644  if ($cached) {
5645    $this->currPos = $cached->nextPos;
5646    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
5647    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
5648    return $cached->result;
5649  }
5650  $saved_preproc=$param_preproc;
5651  $saved_th=$param_th;
5652  $p2 = $this->currPos;
5653  // start seq_1
5654  $p3 = $this->currPos;
5655  $p5 = $this->currPos;
5656  if (strspn($this->input, "\"'=", $this->currPos, 1) !== 0) {
5657    $r4 = $this->input[$this->currPos++];
5658  } else {
5659    $r4 = self::$FAILED;
5660    if (!$silence) {$this->fail(31);}
5661    $r4 = null;
5662  }
5663  // q <- $r4
5664  $r4 = substr($this->input, $p5, $this->currPos - $p5);
5665  // free $p5
5666  $r6 = [];
5667  for (;;) {
5668    // start choice_1
5669    $p5 = $this->currPos;
5670    $r7 = self::$FAILED;
5671    for (;;) {
5672      if (strcspn($this->input, " \x09\x0d\x0a\x00/=><&{}-!|", $this->currPos, 1) !== 0) {
5673        $r8 = self::consumeChar($this->input, $this->currPos);
5674        $r7 = true;
5675      } else {
5676        $r8 = self::$FAILED;
5677        if (!$silence) {$this->fail(36);}
5678        break;
5679      }
5680    }
5681    if ($r7!==self::$FAILED) {
5682      $r7 = substr($this->input, $p5, $this->currPos - $p5);
5683      goto choice_1;
5684    } else {
5685      $r7 = self::$FAILED;
5686    }
5687    // free $r8
5688    // free $p5
5689    $p5 = $this->currPos;
5690    // start seq_2
5691    $p9 = $this->currPos;
5692    $p10 = $this->currPos;
5693    $r8 = $this->discardinline_breaks(true, $boolParams, $param_preproc, $param_th);
5694    if ($r8 === self::$FAILED) {
5695      $r8 = false;
5696    } else {
5697      $r8 = self::$FAILED;
5698      $this->currPos = $p10;
5699      $r7 = self::$FAILED;
5700      goto seq_2;
5701    }
5702    // free $p10
5703    // start choice_2
5704    $r11 = $this->parsedirective($silence, $boolParams, $param_preproc, $param_th);
5705    if ($r11!==self::$FAILED) {
5706      goto choice_2;
5707    }
5708    $r11 = $this->parseless_than($silence, $boolParams);
5709    if ($r11!==self::$FAILED) {
5710      goto choice_2;
5711    }
5712    $p10 = $this->currPos;
5713    // start seq_3
5714    $p12 = $this->currPos;
5715    $p13 = $this->currPos;
5716    // start choice_3
5717    $r14 = $this->discardspace_or_newline(true);
5718    if ($r14!==self::$FAILED) {
5719      goto choice_3;
5720    }
5721    if (strspn($this->input, "\x00/=><", $this->currPos, 1) !== 0) {
5722      $r14 = $this->input[$this->currPos++];
5723    } else {
5724      $r14 = self::$FAILED;
5725    }
5726    choice_3:
5727    if ($r14 === self::$FAILED) {
5728      $r14 = false;
5729    } else {
5730      $r14 = self::$FAILED;
5731      $this->currPos = $p13;
5732      $r11 = self::$FAILED;
5733      goto seq_3;
5734    }
5735    // free $p13
5736    if ($this->currPos < $this->inputLength) {
5737      $r15 = self::consumeChar($this->input, $this->currPos);;
5738    } else {
5739      $r15 = self::$FAILED;
5740      if (!$silence) {$this->fail(7);}
5741      $this->currPos = $p12;
5742      $r11 = self::$FAILED;
5743      goto seq_3;
5744    }
5745    $r11 = true;
5746    seq_3:
5747    if ($r11!==self::$FAILED) {
5748      $r11 = substr($this->input, $p10, $this->currPos - $p10);
5749    } else {
5750      $r11 = self::$FAILED;
5751    }
5752    // free $p12
5753    // free $p10
5754    choice_2:
5755    // t <- $r11
5756    if ($r11===self::$FAILED) {
5757      $this->currPos = $p9;
5758      $r7 = self::$FAILED;
5759      goto seq_2;
5760    }
5761    $r7 = true;
5762    seq_2:
5763    if ($r7!==self::$FAILED) {
5764      $this->savedPos = $p5;
5765      $r7 = $this->a53($r4, $r11);
5766    }
5767    // free $p9
5768    choice_1:
5769    if ($r7!==self::$FAILED) {
5770      $r6[] = $r7;
5771    } else {
5772      break;
5773    }
5774  }
5775  // r <- $r6
5776  // free $r7
5777  $this->savedPos = $this->currPos;
5778  $r7 = $this->a54($r4, $r6);
5779  if ($r7) {
5780    $r7 = false;
5781  } else {
5782    $r7 = self::$FAILED;
5783    $this->currPos = $p3;
5784    $r1 = self::$FAILED;
5785    goto seq_1;
5786  }
5787  $r1 = true;
5788  seq_1:
5789  if ($r1!==self::$FAILED) {
5790    $this->savedPos = $p2;
5791    $r1 = $this->a55($r4, $r6);
5792  }
5793  // free $p3
5794  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
5795    $this->currPos,
5796    $r1,
5797    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
5798    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
5799  );
5800  return $r1;
5801}, "generic_attribute_name", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
5802
5803}
5804private function discardspace_or_newline($silence) {
5805return $this->traceCall(function($silence) {
5806  $key = 595;
5807  $bucket = $this->currPos;
5808  $cached = $this->cache[$bucket][$key] ?? null;
5809  if ($cached) {
5810    $this->currPos = $cached->nextPos;
5811
5812    return $cached->result;
5813  }
5814
5815  if (strspn($this->input, " \x09\x0a\x0d\x0c", $this->currPos, 1) !== 0) {
5816    $r1 = $this->input[$this->currPos++];
5817  } else {
5818    $r1 = self::$FAILED;
5819    if (!$silence) {$this->fail(37);}
5820  }
5821  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
5822    $this->currPos,
5823    $r1,
5824    self::$UNDEFINED,
5825    self::$UNDEFINED
5826  );
5827  return $r1;
5828}, "space_or_newline", ["\$silence"], [$silence]);
5829
5830}
5831private function parsegeneric_att_value($silence, $boolParams, &$param_preproc, &$param_th) {
5832return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
5833  $key = json_encode([484, $boolParams & 0x7fff, $param_preproc, $param_th]);
5834  $bucket = $this->currPos;
5835  $cached = $this->cache[$bucket][$key] ?? null;
5836  if ($cached) {
5837    $this->currPos = $cached->nextPos;
5838    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
5839    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
5840    return $cached->result;
5841  }
5842  $saved_preproc=$param_preproc;
5843  $saved_th=$param_th;
5844  // start choice_1
5845  $p2 = $this->currPos;
5846  // start seq_1
5847  $p3 = $this->currPos;
5848  $p5 = $this->currPos;
5849  // start seq_2
5850  $p6 = $this->currPos;
5851  for (;;) {
5852    $r8 = $this->discardspace_or_newline($silence);
5853    if ($r8===self::$FAILED) {
5854      break;
5855    }
5856  }
5857  // free $r8
5858  $r7 = true;
5859  if ($r7===self::$FAILED) {
5860    $r4 = self::$FAILED;
5861    goto seq_2;
5862  }
5863  // free $r7
5864  if (($this->input[$this->currPos] ?? null) === "'") {
5865    $this->currPos++;
5866    $r7 = "'";
5867  } else {
5868    if (!$silence) {$this->fail(33);}
5869    $r7 = self::$FAILED;
5870    $this->currPos = $p6;
5871    $r4 = self::$FAILED;
5872    goto seq_2;
5873  }
5874  $r4 = true;
5875  seq_2:
5876  // s <- $r4
5877  if ($r4!==self::$FAILED) {
5878    $r4 = substr($this->input, $p5, $this->currPos - $p5);
5879  } else {
5880    $r4 = self::$FAILED;
5881    $r1 = self::$FAILED;
5882    goto seq_1;
5883  }
5884  // free $p6
5885  // free $p5
5886  $r8 = $this->parseattribute_preprocessor_text_single($silence, $boolParams, $param_preproc, $param_th);
5887  if ($r8===self::$FAILED) {
5888    $r8 = null;
5889  }
5890  // t <- $r8
5891  $p5 = $this->currPos;
5892  // start choice_2
5893  if (($this->input[$this->currPos] ?? null) === "'") {
5894    $this->currPos++;
5895    $r9 = "'";
5896    goto choice_2;
5897  } else {
5898    if (!$silence) {$this->fail(33);}
5899    $r9 = self::$FAILED;
5900  }
5901  $p6 = $this->currPos;
5902  // start seq_3
5903  $p10 = $this->currPos;
5904  if (($this->input[$this->currPos] ?? null) === "/") {
5905    $this->currPos++;
5906    $r11 = "/";
5907  } else {
5908    $r11 = self::$FAILED;
5909    $r11 = null;
5910  }
5911  if (($this->input[$this->currPos] ?? null) === ">") {
5912    $this->currPos++;
5913    $r12 = ">";
5914  } else {
5915    $r12 = self::$FAILED;
5916    $this->currPos = $p10;
5917    $r9 = self::$FAILED;
5918    goto seq_3;
5919  }
5920  $r9 = true;
5921  seq_3:
5922  if ($r9!==self::$FAILED) {
5923    $r9 = false;
5924    $this->currPos = $p6;
5925  }
5926  // free $p10
5927  // free $p6
5928  choice_2:
5929  // q <- $r9
5930  if ($r9!==self::$FAILED) {
5931    $r9 = substr($this->input, $p5, $this->currPos - $p5);
5932  } else {
5933    $r9 = self::$FAILED;
5934    $this->currPos = $p3;
5935    $r1 = self::$FAILED;
5936    goto seq_1;
5937  }
5938  // free $p5
5939  $r1 = true;
5940  seq_1:
5941  if ($r1!==self::$FAILED) {
5942    $this->savedPos = $p2;
5943    $r1 = $this->a56($r4, $r8, $r9);
5944    goto choice_1;
5945  }
5946  // free $p3
5947  $p3 = $this->currPos;
5948  // start seq_4
5949  $p5 = $this->currPos;
5950  $p6 = $this->currPos;
5951  // start seq_5
5952  $p10 = $this->currPos;
5953  for (;;) {
5954    $r15 = $this->discardspace_or_newline($silence);
5955    if ($r15===self::$FAILED) {
5956      break;
5957    }
5958  }
5959  // free $r15
5960  $r14 = true;
5961  if ($r14===self::$FAILED) {
5962    $r13 = self::$FAILED;
5963    goto seq_5;
5964  }
5965  // free $r14
5966  if (($this->input[$this->currPos] ?? null) === "\"") {
5967    $this->currPos++;
5968    $r14 = "\"";
5969  } else {
5970    if (!$silence) {$this->fail(34);}
5971    $r14 = self::$FAILED;
5972    $this->currPos = $p10;
5973    $r13 = self::$FAILED;
5974    goto seq_5;
5975  }
5976  $r13 = true;
5977  seq_5:
5978  // s <- $r13
5979  if ($r13!==self::$FAILED) {
5980    $r13 = substr($this->input, $p6, $this->currPos - $p6);
5981  } else {
5982    $r13 = self::$FAILED;
5983    $r1 = self::$FAILED;
5984    goto seq_4;
5985  }
5986  // free $p10
5987  // free $p6
5988  $r15 = $this->parseattribute_preprocessor_text_double($silence, $boolParams, $param_preproc, $param_th);
5989  if ($r15===self::$FAILED) {
5990    $r15 = null;
5991  }
5992  // t <- $r15
5993  $p6 = $this->currPos;
5994  // start choice_3
5995  if (($this->input[$this->currPos] ?? null) === "\"") {
5996    $this->currPos++;
5997    $r16 = "\"";
5998    goto choice_3;
5999  } else {
6000    if (!$silence) {$this->fail(34);}
6001    $r16 = self::$FAILED;
6002  }
6003  $p10 = $this->currPos;
6004  // start seq_6
6005  $p17 = $this->currPos;
6006  if (($this->input[$this->currPos] ?? null) === "/") {
6007    $this->currPos++;
6008    $r18 = "/";
6009  } else {
6010    $r18 = self::$FAILED;
6011    $r18 = null;
6012  }
6013  if (($this->input[$this->currPos] ?? null) === ">") {
6014    $this->currPos++;
6015    $r19 = ">";
6016  } else {
6017    $r19 = self::$FAILED;
6018    $this->currPos = $p17;
6019    $r16 = self::$FAILED;
6020    goto seq_6;
6021  }
6022  $r16 = true;
6023  seq_6:
6024  if ($r16!==self::$FAILED) {
6025    $r16 = false;
6026    $this->currPos = $p10;
6027  }
6028  // free $p17
6029  // free $p10
6030  choice_3:
6031  // q <- $r16
6032  if ($r16!==self::$FAILED) {
6033    $r16 = substr($this->input, $p6, $this->currPos - $p6);
6034  } else {
6035    $r16 = self::$FAILED;
6036    $this->currPos = $p5;
6037    $r1 = self::$FAILED;
6038    goto seq_4;
6039  }
6040  // free $p6
6041  $r1 = true;
6042  seq_4:
6043  if ($r1!==self::$FAILED) {
6044    $this->savedPos = $p3;
6045    $r1 = $this->a56($r13, $r15, $r16);
6046    goto choice_1;
6047  }
6048  // free $p5
6049  $p5 = $this->currPos;
6050  // start seq_7
6051  $p6 = $this->currPos;
6052  $p10 = $this->currPos;
6053  for (;;) {
6054    $r21 = $this->discardspace_or_newline($silence);
6055    if ($r21===self::$FAILED) {
6056      break;
6057    }
6058  }
6059  // free $r21
6060  $r20 = true;
6061  // s <- $r20
6062  if ($r20!==self::$FAILED) {
6063    $r20 = substr($this->input, $p10, $this->currPos - $p10);
6064  } else {
6065    $r20 = self::$FAILED;
6066    $r1 = self::$FAILED;
6067    goto seq_7;
6068  }
6069  // free $p10
6070  $r21 = $this->parseattribute_preprocessor_text($silence, $boolParams, $param_preproc, $param_th);
6071  // t <- $r21
6072  if ($r21===self::$FAILED) {
6073    $this->currPos = $p6;
6074    $r1 = self::$FAILED;
6075    goto seq_7;
6076  }
6077  $p10 = $this->currPos;
6078  // start choice_4
6079  $r22 = $this->discardspace_or_newline(true);
6080  if ($r22!==self::$FAILED) {
6081    goto choice_4;
6082  }
6083  $r22 = $this->discardeof(true);
6084  if ($r22!==self::$FAILED) {
6085    goto choice_4;
6086  }
6087  // start seq_8
6088  $p17 = $this->currPos;
6089  if (($this->input[$this->currPos] ?? null) === "/") {
6090    $this->currPos++;
6091    $r23 = "/";
6092  } else {
6093    $r23 = self::$FAILED;
6094    $r23 = null;
6095  }
6096  if (($this->input[$this->currPos] ?? null) === ">") {
6097    $this->currPos++;
6098    $r24 = ">";
6099  } else {
6100    $r24 = self::$FAILED;
6101    $this->currPos = $p17;
6102    $r22 = self::$FAILED;
6103    goto seq_8;
6104  }
6105  $r22 = true;
6106  seq_8:
6107  // free $p17
6108  choice_4:
6109  if ($r22!==self::$FAILED) {
6110    $r22 = false;
6111    $this->currPos = $p10;
6112  } else {
6113    $this->currPos = $p6;
6114    $r1 = self::$FAILED;
6115    goto seq_7;
6116  }
6117  // free $p10
6118  $r1 = true;
6119  seq_7:
6120  if ($r1!==self::$FAILED) {
6121    $this->savedPos = $p5;
6122    $r1 = $this->a57($r20, $r21);
6123  }
6124  // free $p6
6125  choice_1:
6126  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
6127    $this->currPos,
6128    $r1,
6129    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
6130    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
6131  );
6132  return $r1;
6133}, "generic_att_value", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
6134
6135}
6136private function parseextlink_nonipv6url_parameterized($silence, $boolParams, &$param_preproc, &$param_th) {
6137return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
6138  $key = json_encode([554, $boolParams & 0x7fff, $param_preproc, $param_th]);
6139  $bucket = $this->currPos;
6140  $cached = $this->cache[$bucket][$key] ?? null;
6141  if ($cached) {
6142    $this->currPos = $cached->nextPos;
6143    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
6144    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
6145    return $cached->result;
6146  }
6147  $saved_preproc=$param_preproc;
6148  $saved_th=$param_th;
6149  $p2 = $this->currPos;
6150  $r3 = [];
6151  for (;;) {
6152    // start choice_1
6153    $p5 = $this->currPos;
6154    $r4 = self::$FAILED;
6155    for (;;) {
6156      $r6 = self::charAt($this->input, $this->currPos);
6157      if (preg_match("/^[^<\\[{\\x0a\\x0d|!\\]}\\-\\x09&=\"' \\x{a0}\\x{1680}\\x{180e}\\x{2000}-\\x{200a}\\x{202f}\\x{205f}\\x{3000}]/u", $r6)) {
6158        $this->currPos += strlen($r6);
6159        $r4 = true;
6160      } else {
6161        $r6 = self::$FAILED;
6162        if (!$silence) {$this->fail(38);}
6163        break;
6164      }
6165    }
6166    if ($r4!==self::$FAILED) {
6167      $r4 = substr($this->input, $p5, $this->currPos - $p5);
6168      goto choice_1;
6169    } else {
6170      $r4 = self::$FAILED;
6171    }
6172    // free $r6
6173    // free $p5
6174    $p5 = $this->currPos;
6175    // start seq_1
6176    $p7 = $this->currPos;
6177    $p8 = $this->currPos;
6178    $r6 = $this->discardinline_breaks(true, $boolParams, $param_preproc, $param_th);
6179    if ($r6 === self::$FAILED) {
6180      $r6 = false;
6181    } else {
6182      $r6 = self::$FAILED;
6183      $this->currPos = $p8;
6184      $r4 = self::$FAILED;
6185      goto seq_1;
6186    }
6187    // free $p8
6188    // start choice_2
6189    $r9 = $this->parsedirective($silence, $boolParams, $param_preproc, $param_th);
6190    if ($r9!==self::$FAILED) {
6191      goto choice_2;
6192    }
6193    if (strspn($this->input, "&|{-!}=", $this->currPos, 1) !== 0) {
6194      $r9 = $this->input[$this->currPos++];
6195    } else {
6196      $r9 = self::$FAILED;
6197      if (!$silence) {$this->fail(39);}
6198    }
6199    choice_2:
6200    // s <- $r9
6201    if ($r9===self::$FAILED) {
6202      $this->currPos = $p7;
6203      $r4 = self::$FAILED;
6204      goto seq_1;
6205    }
6206    $r4 = true;
6207    seq_1:
6208    if ($r4!==self::$FAILED) {
6209      $this->savedPos = $p5;
6210      $r4 = $this->a41($r9);
6211      goto choice_1;
6212    }
6213    // free $p7
6214    $p7 = $this->currPos;
6215    // start seq_2
6216    $p8 = $this->currPos;
6217    $r10 = $this->input[$this->currPos] ?? '';
6218    if ($r10 === "'") {
6219      $this->currPos++;
6220    } else {
6221      $r10 = self::$FAILED;
6222      if (!$silence) {$this->fail(40);}
6223      $r4 = self::$FAILED;
6224      goto seq_2;
6225    }
6226    $p11 = $this->currPos;
6227    $r12 = $this->input[$this->currPos] ?? '';
6228    if ($r12 === "'") {
6229      $this->currPos++;
6230    } else {
6231      $r12 = self::$FAILED;
6232    }
6233    if ($r12 === self::$FAILED) {
6234      $r12 = false;
6235    } else {
6236      $r12 = self::$FAILED;
6237      $this->currPos = $p11;
6238      $this->currPos = $p8;
6239      $r4 = self::$FAILED;
6240      goto seq_2;
6241    }
6242    // free $p11
6243    $r4 = true;
6244    seq_2:
6245    if ($r4!==self::$FAILED) {
6246      $r4 = substr($this->input, $p7, $this->currPos - $p7);
6247    } else {
6248      $r4 = self::$FAILED;
6249    }
6250    // free $p8
6251    // free $p7
6252    choice_1:
6253    if ($r4!==self::$FAILED) {
6254      $r3[] = $r4;
6255    } else {
6256      break;
6257    }
6258  }
6259  if (count($r3) === 0) {
6260    $r3 = self::$FAILED;
6261  }
6262  // r <- $r3
6263  // free $r4
6264  $r1 = $r3;
6265  if ($r1!==self::$FAILED) {
6266    $this->savedPos = $p2;
6267    $r1 = $this->a58($r3);
6268  }
6269  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
6270    $this->currPos,
6271    $r1,
6272    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
6273    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
6274  );
6275  return $r1;
6276}, "extlink_nonipv6url_parameterized", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
6277
6278}
6279private function parseurltext($silence, $boolParams, &$param_preproc, &$param_th) {
6280return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
6281  $key = json_encode([538, $boolParams & 0x7fff, $param_preproc, $param_th]);
6282  $bucket = $this->currPos;
6283  $cached = $this->cache[$bucket][$key] ?? null;
6284  if ($cached) {
6285    $this->currPos = $cached->nextPos;
6286    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
6287    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
6288    return $cached->result;
6289  }
6290  $saved_preproc=$param_preproc;
6291  $saved_th=$param_th;
6292  $r1 = [];
6293  for (;;) {
6294    // start choice_1
6295    $p3 = $this->currPos;
6296    // start seq_1
6297    $p4 = $this->currPos;
6298    $this->savedPos = $this->currPos;
6299    $r5 = $this->a59();
6300    if ($r5) {
6301      $r5 = false;
6302    } else {
6303      $r5 = self::$FAILED;
6304      $r2 = self::$FAILED;
6305      goto seq_1;
6306    }
6307    $r2 = true;
6308    seq_1:
6309    if ($r2!==self::$FAILED) {
6310      $this->savedPos = $p3;
6311      $r2 = $this->a60();
6312      goto choice_1;
6313    }
6314    // free $p4
6315    $p4 = $this->currPos;
6316    // start seq_2
6317    $p6 = $this->currPos;
6318    $this->savedPos = $this->currPos;
6319    $r7 = $this->a61();
6320    if ($r7) {
6321      $r7 = false;
6322    } else {
6323      $r7 = self::$FAILED;
6324      $r2 = self::$FAILED;
6325      goto seq_2;
6326    }
6327    $r8 = $this->parseautolink($silence, $boolParams, $param_preproc, $param_th);
6328    // al <- $r8
6329    if ($r8===self::$FAILED) {
6330      $this->currPos = $p6;
6331      $r2 = self::$FAILED;
6332      goto seq_2;
6333    }
6334    $r2 = true;
6335    seq_2:
6336    if ($r2!==self::$FAILED) {
6337      $this->savedPos = $p4;
6338      $r2 = $this->a62($r8);
6339      goto choice_1;
6340    }
6341    // free $p6
6342    $p6 = $this->currPos;
6343    // start seq_3
6344    $p9 = $this->currPos;
6345    $p10 = $this->currPos;
6346    if (($this->input[$this->currPos] ?? null) === "&") {
6347      $this->currPos++;
6348      $r11 = "&";
6349      $r11 = false;
6350      $this->currPos = $p10;
6351    } else {
6352      $r11 = self::$FAILED;
6353      $r2 = self::$FAILED;
6354      goto seq_3;
6355    }
6356    // free $p10
6357    $r12 = $this->parsehtmlentity($silence);
6358    // he <- $r12
6359    if ($r12===self::$FAILED) {
6360      $this->currPos = $p9;
6361      $r2 = self::$FAILED;
6362      goto seq_3;
6363    }
6364    $r2 = true;
6365    seq_3:
6366    if ($r2!==self::$FAILED) {
6367      $this->savedPos = $p6;
6368      $r2 = $this->a63($r12);
6369      goto choice_1;
6370    }
6371    // free $p9
6372    $p9 = $this->currPos;
6373    // start seq_4
6374    $p10 = $this->currPos;
6375    $p13 = $this->currPos;
6376    if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "__", $this->currPos, 2, false) === 0) {
6377      $r14 = "__";
6378      $this->currPos += 2;
6379      $r14 = false;
6380      $this->currPos = $p13;
6381    } else {
6382      $r14 = self::$FAILED;
6383      $r2 = self::$FAILED;
6384      goto seq_4;
6385    }
6386    // free $p13
6387    $r15 = $this->parsebehavior_switch($silence);
6388    // bs <- $r15
6389    if ($r15===self::$FAILED) {
6390      $this->currPos = $p10;
6391      $r2 = self::$FAILED;
6392      goto seq_4;
6393    }
6394    $r2 = true;
6395    seq_4:
6396    if ($r2!==self::$FAILED) {
6397      $this->savedPos = $p9;
6398      $r2 = $this->a64($r15);
6399      goto choice_1;
6400    }
6401    // free $p10
6402    $r2 = $this->parsetext_char($silence);
6403    choice_1:
6404    if ($r2!==self::$FAILED) {
6405      $r1[] = $r2;
6406    } else {
6407      break;
6408    }
6409  }
6410  if (count($r1) === 0) {
6411    $r1 = self::$FAILED;
6412  }
6413  // free $r2
6414  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
6415    $this->currPos,
6416    $r1,
6417    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
6418    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
6419  );
6420  return $r1;
6421}, "urltext", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
6422
6423}
6424private function parseinline_element($silence, $boolParams, &$param_preproc, &$param_th) {
6425return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
6426  $key = json_encode([344, $boolParams & 0x7fff, $param_preproc, $param_th]);
6427  $bucket = $this->currPos;
6428  $cached = $this->cache[$bucket][$key] ?? null;
6429  if ($cached) {
6430    $this->currPos = $cached->nextPos;
6431    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
6432    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
6433    return $cached->result;
6434  }
6435  $saved_preproc=$param_preproc;
6436  $saved_th=$param_th;
6437  // start choice_1
6438  $p2 = $this->currPos;
6439  // start seq_1
6440  $p3 = $this->currPos;
6441  $p4 = $this->currPos;
6442  if (($this->input[$this->currPos] ?? null) === "<") {
6443    $this->currPos++;
6444    $r5 = "<";
6445    $r5 = false;
6446    $this->currPos = $p4;
6447  } else {
6448    $r5 = self::$FAILED;
6449    $r1 = self::$FAILED;
6450    goto seq_1;
6451  }
6452  // free $p4
6453  $r6 = $this->parseangle_bracket_markup($silence, $boolParams, $param_preproc, $param_th);
6454  // r <- $r6
6455  if ($r6===self::$FAILED) {
6456    $this->currPos = $p3;
6457    $r1 = self::$FAILED;
6458    goto seq_1;
6459  }
6460  $r1 = true;
6461  seq_1:
6462  if ($r1!==self::$FAILED) {
6463    $this->savedPos = $p2;
6464    $r1 = $this->a23($r6);
6465    goto choice_1;
6466  }
6467  // free $p3
6468  $p3 = $this->currPos;
6469  // start seq_2
6470  $p4 = $this->currPos;
6471  $p7 = $this->currPos;
6472  if (($this->input[$this->currPos] ?? null) === "{") {
6473    $this->currPos++;
6474    $r8 = "{";
6475    $r8 = false;
6476    $this->currPos = $p7;
6477  } else {
6478    $r8 = self::$FAILED;
6479    $r1 = self::$FAILED;
6480    goto seq_2;
6481  }
6482  // free $p7
6483  $r9 = $this->parsetplarg_or_template($silence, $boolParams, $param_th, $param_preproc);
6484  // r <- $r9
6485  if ($r9===self::$FAILED) {
6486    $this->currPos = $p4;
6487    $r1 = self::$FAILED;
6488    goto seq_2;
6489  }
6490  $r1 = true;
6491  seq_2:
6492  if ($r1!==self::$FAILED) {
6493    $this->savedPos = $p3;
6494    $r1 = $this->a23($r9);
6495    goto choice_1;
6496  }
6497  // free $p4
6498  $p4 = $this->currPos;
6499  // start seq_3
6500  $p7 = $this->currPos;
6501  $p10 = $this->currPos;
6502  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "-{", $this->currPos, 2, false) === 0) {
6503    $r11 = "-{";
6504    $this->currPos += 2;
6505    $r11 = false;
6506    $this->currPos = $p10;
6507  } else {
6508    $r11 = self::$FAILED;
6509    $r1 = self::$FAILED;
6510    goto seq_3;
6511  }
6512  // free $p10
6513  $r12 = $this->parselang_variant_or_tpl($silence, $boolParams, $param_th, $param_preproc);
6514  // r <- $r12
6515  if ($r12===self::$FAILED) {
6516    $this->currPos = $p7;
6517    $r1 = self::$FAILED;
6518    goto seq_3;
6519  }
6520  $r1 = true;
6521  seq_3:
6522  if ($r1!==self::$FAILED) {
6523    $this->savedPos = $p4;
6524    $r1 = $this->a23($r12);
6525    goto choice_1;
6526  }
6527  // free $p7
6528  $p7 = $this->currPos;
6529  $r1 = self::$FAILED;
6530  for (;;) {
6531    // start seq_4
6532    $p10 = $this->currPos;
6533    if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "[[", $this->currPos, 2, false) === 0) {
6534      $r14 = "[[";
6535      $this->currPos += 2;
6536    } else {
6537      if (!$silence) {$this->fail(41);}
6538      $r14 = self::$FAILED;
6539      $r13 = self::$FAILED;
6540      goto seq_4;
6541    }
6542    $p15 = $this->currPos;
6543    if (($this->input[$this->currPos] ?? null) === "[") {
6544      $this->currPos++;
6545      $r16 = "[";
6546      $r16 = false;
6547      $this->currPos = $p15;
6548    } else {
6549      $r16 = self::$FAILED;
6550      $this->currPos = $p10;
6551      $r13 = self::$FAILED;
6552      goto seq_4;
6553    }
6554    // free $p15
6555    $r13 = true;
6556    seq_4:
6557    if ($r13!==self::$FAILED) {
6558      $r1 = true;
6559    } else {
6560      break;
6561    }
6562    // free $p10
6563  }
6564  if ($r1!==self::$FAILED) {
6565    $r1 = substr($this->input, $p7, $this->currPos - $p7);
6566    goto choice_1;
6567  } else {
6568    $r1 = self::$FAILED;
6569  }
6570  // free $r13
6571  // free $p7
6572  $p7 = $this->currPos;
6573  // start seq_5
6574  $p10 = $this->currPos;
6575  $p15 = $this->currPos;
6576  if (($this->input[$this->currPos] ?? null) === "[") {
6577    $this->currPos++;
6578    $r13 = "[";
6579    $r13 = false;
6580    $this->currPos = $p15;
6581  } else {
6582    $r13 = self::$FAILED;
6583    $r1 = self::$FAILED;
6584    goto seq_5;
6585  }
6586  // free $p15
6587  // start choice_2
6588  $r17 = $this->parsewikilink($silence, $boolParams, $param_th, $param_preproc);
6589  if ($r17!==self::$FAILED) {
6590    goto choice_2;
6591  }
6592  $r17 = $this->parseextlink($silence, $boolParams, $param_preproc, $param_th);
6593  choice_2:
6594  // r <- $r17
6595  if ($r17===self::$FAILED) {
6596    $this->currPos = $p10;
6597    $r1 = self::$FAILED;
6598    goto seq_5;
6599  }
6600  $r1 = true;
6601  seq_5:
6602  if ($r1!==self::$FAILED) {
6603    $this->savedPos = $p7;
6604    $r1 = $this->a23($r17);
6605    goto choice_1;
6606  }
6607  // free $p10
6608  $p10 = $this->currPos;
6609  // start seq_6
6610  $p15 = $this->currPos;
6611  $p18 = $this->currPos;
6612  if (($this->input[$this->currPos] ?? null) === "'") {
6613    $this->currPos++;
6614    $r19 = "'";
6615    $r19 = false;
6616    $this->currPos = $p18;
6617  } else {
6618    $r19 = self::$FAILED;
6619    $r1 = self::$FAILED;
6620    goto seq_6;
6621  }
6622  // free $p18
6623  $r20 = $this->parsequote($silence);
6624  // r <- $r20
6625  if ($r20===self::$FAILED) {
6626    $this->currPos = $p15;
6627    $r1 = self::$FAILED;
6628    goto seq_6;
6629  }
6630  $r1 = true;
6631  seq_6:
6632  if ($r1!==self::$FAILED) {
6633    $this->savedPos = $p10;
6634    $r1 = $this->a23($r20);
6635  }
6636  // free $p15
6637  choice_1:
6638  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
6639    $this->currPos,
6640    $r1,
6641    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
6642    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
6643  );
6644  return $r1;
6645}, "inline_element", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
6646
6647}
6648private function discardlist_char($silence) {
6649return $this->traceCall(function($silence) {
6650  $key = 499;
6651  $bucket = $this->currPos;
6652  $cached = $this->cache[$bucket][$key] ?? null;
6653  if ($cached) {
6654    $this->currPos = $cached->nextPos;
6655
6656    return $cached->result;
6657  }
6658
6659  if (strspn($this->input, "*#:;", $this->currPos, 1) !== 0) {
6660    $r1 = $this->input[$this->currPos++];
6661  } else {
6662    $r1 = self::$FAILED;
6663    if (!$silence) {$this->fail(42);}
6664  }
6665  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
6666    $this->currPos,
6667    $r1,
6668    self::$UNDEFINED,
6669    self::$UNDEFINED
6670  );
6671  return $r1;
6672}, "list_char", ["\$silence"], [$silence]);
6673
6674}
6675private function parselist_char($silence) {
6676return $this->traceCall(function($silence) {
6677  $key = 498;
6678  $bucket = $this->currPos;
6679  $cached = $this->cache[$bucket][$key] ?? null;
6680  if ($cached) {
6681    $this->currPos = $cached->nextPos;
6682
6683    return $cached->result;
6684  }
6685
6686  if (strspn($this->input, "*#:;", $this->currPos, 1) !== 0) {
6687    $r1 = $this->input[$this->currPos++];
6688  } else {
6689    $r1 = self::$FAILED;
6690    if (!$silence) {$this->fail(42);}
6691  }
6692  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
6693    $this->currPos,
6694    $r1,
6695    self::$UNDEFINED,
6696    self::$UNDEFINED
6697  );
6698  return $r1;
6699}, "list_char", ["\$silence"], [$silence]);
6700
6701}
6702private function parsedtdd_colon($silence, $boolParams, &$param_preproc, &$param_th) {
6703return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
6704  $key = json_encode([494, $boolParams & 0x6fff, $param_preproc, $param_th]);
6705  $bucket = $this->currPos;
6706  $cached = $this->cache[$bucket][$key] ?? null;
6707  if ($cached) {
6708    $this->currPos = $cached->nextPos;
6709    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
6710    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
6711    return $cached->result;
6712  }
6713  $saved_preproc=$param_preproc;
6714  $saved_th=$param_th;
6715  $p2 = $this->currPos;
6716  // start seq_1
6717  $p3 = $this->currPos;
6718  $r4 = $this->parseinlineline_break_on_colon($silence, $boolParams, $param_preproc, $param_th);
6719  if ($r4===self::$FAILED) {
6720    $r4 = null;
6721  }
6722  // c <- $r4
6723  $p6 = $this->currPos;
6724  // cpos <- $r5
6725  if (($this->input[$this->currPos] ?? null) === ":") {
6726    $this->currPos++;
6727    $r5 = ":";
6728    $this->savedPos = $p6;
6729    $r5 = $this->a65($r4);
6730  } else {
6731    if (!$silence) {$this->fail(16);}
6732    $r5 = self::$FAILED;
6733    $this->currPos = $p3;
6734    $r1 = self::$FAILED;
6735    goto seq_1;
6736  }
6737  $r1 = true;
6738  seq_1:
6739  if ($r1!==self::$FAILED) {
6740    $this->savedPos = $p2;
6741    $r1 = $this->a66($r4, $r5);
6742  }
6743  // free $p3
6744  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
6745    $this->currPos,
6746    $r1,
6747    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
6748    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
6749  );
6750  return $r1;
6751}, "dtdd_colon", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
6752
6753}
6754private function discardeolf($silence) {
6755return $this->traceCall(function($silence) {
6756  $key = 585;
6757  $bucket = $this->currPos;
6758  $cached = $this->cache[$bucket][$key] ?? null;
6759  if ($cached) {
6760    $this->currPos = $cached->nextPos;
6761
6762    return $cached->result;
6763  }
6764
6765  // start choice_1
6766  $r1 = $this->discardnewline($silence);
6767  if ($r1!==self::$FAILED) {
6768    goto choice_1;
6769  }
6770  $r1 = $this->discardeof($silence);
6771  choice_1:
6772  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
6773    $this->currPos,
6774    $r1,
6775    self::$UNDEFINED,
6776    self::$UNDEFINED
6777  );
6778  return $r1;
6779}, "eolf", ["\$silence"], [$silence]);
6780
6781}
6782private function parsespace_or_comment($silence) {
6783return $this->traceCall(function($silence) {
6784  $key = 588;
6785  $bucket = $this->currPos;
6786  $cached = $this->cache[$bucket][$key] ?? null;
6787  if ($cached) {
6788    $this->currPos = $cached->nextPos;
6789
6790    return $cached->result;
6791  }
6792
6793  // start choice_1
6794  $r1 = $this->parsespace($silence);
6795  if ($r1!==self::$FAILED) {
6796    goto choice_1;
6797  }
6798  $r1 = $this->parsecomment($silence);
6799  choice_1:
6800  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
6801    $this->currPos,
6802    $r1,
6803    self::$UNDEFINED,
6804    self::$UNDEFINED
6805  );
6806  return $r1;
6807}, "space_or_comment", ["\$silence"], [$silence]);
6808
6809}
6810private function discardsof($silence) {
6811return $this->traceCall(function($silence) {
6812  $key = 577;
6813  $bucket = $this->currPos;
6814  $cached = $this->cache[$bucket][$key] ?? null;
6815  if ($cached) {
6816    $this->currPos = $cached->nextPos;
6817
6818    return $cached->result;
6819  }
6820
6821  $this->savedPos = $this->currPos;
6822  $r1 = $this->a67();
6823  if ($r1) {
6824    $r1 = false;
6825  } else {
6826    $r1 = self::$FAILED;
6827  }
6828  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
6829    $this->currPos,
6830    $r1,
6831    self::$UNDEFINED,
6832    self::$UNDEFINED
6833  );
6834  return $r1;
6835}, "sof", ["\$silence"], [$silence]);
6836
6837}
6838private function parseredirect($silence, $boolParams, &$param_th, &$param_preproc) {
6839return $this->traceCall(function($silence, $boolParams, &$param_th, &$param_preproc) {
6840  $key = json_encode([316, $boolParams & 0x7fff, $param_th, $param_preproc]);
6841  $bucket = $this->currPos;
6842  $cached = $this->cache[$bucket][$key] ?? null;
6843  if ($cached) {
6844    $this->currPos = $cached->nextPos;
6845    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
6846    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
6847    return $cached->result;
6848  }
6849  $saved_th=$param_th;
6850  $saved_preproc=$param_preproc;
6851  $p2 = $this->currPos;
6852  // start seq_1
6853  $p3 = $this->currPos;
6854  $r4 = $this->parseredirect_word($silence);
6855  // rw <- $r4
6856  if ($r4===self::$FAILED) {
6857    $r1 = self::$FAILED;
6858    goto seq_1;
6859  }
6860  $p6 = $this->currPos;
6861  for (;;) {
6862    $r7 = $this->discardspace_or_newline($silence);
6863    if ($r7===self::$FAILED) {
6864      break;
6865    }
6866  }
6867  // free $r7
6868  $r5 = true;
6869  // sp <- $r5
6870  if ($r5!==self::$FAILED) {
6871    $r5 = substr($this->input, $p6, $this->currPos - $p6);
6872  } else {
6873    $r5 = self::$FAILED;
6874    $this->currPos = $p3;
6875    $r1 = self::$FAILED;
6876    goto seq_1;
6877  }
6878  // free $p6
6879  $p6 = $this->currPos;
6880  // start seq_2
6881  $p8 = $this->currPos;
6882  if (($this->input[$this->currPos] ?? null) === ":") {
6883    $this->currPos++;
6884    $r9 = ":";
6885  } else {
6886    if (!$silence) {$this->fail(16);}
6887    $r9 = self::$FAILED;
6888    $r7 = self::$FAILED;
6889    goto seq_2;
6890  }
6891  for (;;) {
6892    $r11 = $this->discardspace_or_newline($silence);
6893    if ($r11===self::$FAILED) {
6894      break;
6895    }
6896  }
6897  // free $r11
6898  $r10 = true;
6899  if ($r10===self::$FAILED) {
6900    $this->currPos = $p8;
6901    $r7 = self::$FAILED;
6902    goto seq_2;
6903  }
6904  // free $r10
6905  $r7 = true;
6906  seq_2:
6907  if ($r7===self::$FAILED) {
6908    $r7 = null;
6909  }
6910  // free $p8
6911  // c <- $r7
6912  $r7 = substr($this->input, $p6, $this->currPos - $p6);
6913  // free $p6
6914  $r10 = $this->parsewikilink($silence, $boolParams, $param_th, $param_preproc);
6915  // wl <- $r10
6916  if ($r10===self::$FAILED) {
6917    $this->currPos = $p3;
6918    $r1 = self::$FAILED;
6919    goto seq_1;
6920  }
6921  $this->savedPos = $this->currPos;
6922  $r11 = $this->a68($r4, $r5, $r7, $r10);
6923  if ($r11) {
6924    $r11 = false;
6925  } else {
6926    $r11 = self::$FAILED;
6927    $this->currPos = $p3;
6928    $r1 = self::$FAILED;
6929    goto seq_1;
6930  }
6931  $r1 = true;
6932  seq_1:
6933  if ($r1!==self::$FAILED) {
6934    $this->savedPos = $p2;
6935    $r1 = $this->a69($r4, $r5, $r7, $r10);
6936  }
6937  // free $p3
6938  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
6939    $this->currPos,
6940    $r1,
6941    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
6942    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
6943  );
6944  return $r1;
6945}, "redirect", ["\$silence", "\$boolParams", "&\$param_th", "&\$param_preproc"], [$silence, $boolParams, &$param_th, &$param_preproc]);
6946
6947}
6948private function parsesol_transparent($silence, $boolParams, &$param_preproc, &$param_th) {
6949return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
6950  $key = json_encode([604, $boolParams & 0x7ebf, $param_preproc, $param_th]);
6951  $bucket = $this->currPos;
6952  $cached = $this->cache[$bucket][$key] ?? null;
6953  if ($cached) {
6954    $this->currPos = $cached->nextPos;
6955    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
6956    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
6957    return $cached->result;
6958  }
6959  $saved_preproc=$param_preproc;
6960  $saved_th=$param_th;
6961  // start choice_1
6962  $r1 = $this->parsecomment($silence);
6963  if ($r1!==self::$FAILED) {
6964    goto choice_1;
6965  }
6966  $r1 = $this->parseinclude_limits($silence, $boolParams, $param_preproc, $param_th);
6967  if ($r1!==self::$FAILED) {
6968    goto choice_1;
6969  }
6970  $r1 = $this->parseannotation_tag($silence, $boolParams, $param_preproc, $param_th);
6971  if ($r1!==self::$FAILED) {
6972    goto choice_1;
6973  }
6974  $r1 = $this->parsebehavior_switch($silence);
6975  choice_1:
6976  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
6977    $this->currPos,
6978    $r1,
6979    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
6980    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
6981  );
6982  return $r1;
6983}, "sol_transparent", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
6984
6985}
6986private function parseblock_line($silence, $boolParams, &$param_preproc, &$param_th) {
6987return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
6988  $key = json_encode([332, $boolParams & 0x7fff, $param_preproc, $param_th]);
6989  $bucket = $this->currPos;
6990  $cached = $this->cache[$bucket][$key] ?? null;
6991  if ($cached) {
6992    $this->currPos = $cached->nextPos;
6993    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
6994    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
6995    return $cached->result;
6996  }
6997  $saved_preproc=$param_preproc;
6998  $saved_th=$param_th;
6999  // start choice_1
7000  $r1 = $this->parseheading($silence, $boolParams, $param_preproc, $param_th);
7001  if ($r1!==self::$FAILED) {
7002    goto choice_1;
7003  }
7004  $r1 = $this->parselist_item($silence, $boolParams, $param_preproc, $param_th);
7005  if ($r1!==self::$FAILED) {
7006    goto choice_1;
7007  }
7008  $r1 = $this->parsehr($silence, $boolParams, $param_preproc, $param_th);
7009  if ($r1!==self::$FAILED) {
7010    goto choice_1;
7011  }
7012  $p2 = $this->currPos;
7013  // start seq_1
7014  $p3 = $this->currPos;
7015  $p4 = $this->currPos;
7016  if (strspn($this->input, " \x09<{}|!", $this->currPos, 1) !== 0) {
7017    $r5 = $this->input[$this->currPos++];
7018    $r5 = false;
7019    $this->currPos = $p4;
7020  } else {
7021    $r5 = self::$FAILED;
7022    $r1 = self::$FAILED;
7023    goto seq_1;
7024  }
7025  // free $p4
7026  $r6 = $this->parsetable_line($silence, $boolParams, $param_preproc, $param_th);
7027  // tl <- $r6
7028  if ($r6===self::$FAILED) {
7029    $this->currPos = $p3;
7030    $r1 = self::$FAILED;
7031    goto seq_1;
7032  }
7033  $r1 = true;
7034  seq_1:
7035  if ($r1!==self::$FAILED) {
7036    $this->savedPos = $p2;
7037    $r1 = $this->a70($r6);
7038  }
7039  // free $p3
7040  choice_1:
7041  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
7042    $this->currPos,
7043    $r1,
7044    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
7045    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
7046  );
7047  return $r1;
7048}, "block_line", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
7049
7050}
7051private function parseblock_lines($silence, $boolParams, &$param_preproc, &$param_th) {
7052return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
7053  $key = json_encode([328, $boolParams & 0x7fff, $param_preproc, $param_th]);
7054  $bucket = $this->currPos;
7055  $cached = $this->cache[$bucket][$key] ?? null;
7056  if ($cached) {
7057    $this->currPos = $cached->nextPos;
7058    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
7059    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
7060    return $cached->result;
7061  }
7062  $saved_preproc=$param_preproc;
7063  $saved_th=$param_th;
7064  $p2 = $this->currPos;
7065  // start seq_1
7066  $p3 = $this->currPos;
7067  $r4 = $this->parsesol($silence, $boolParams, $param_preproc, $param_th);
7068  // s <- $r4
7069  if ($r4===self::$FAILED) {
7070    $r1 = self::$FAILED;
7071    goto seq_1;
7072  }
7073  $p6 = $this->currPos;
7074  // start seq_2
7075  $p7 = $this->currPos;
7076  $r8 = $this->parseoptionalSpaceToken($silence);
7077  // os <- $r8
7078  if ($r8===self::$FAILED) {
7079    $r5 = self::$FAILED;
7080    goto seq_2;
7081  }
7082  $r9 = $this->parsesol($silence, $boolParams, $param_preproc, $param_th);
7083  // so <- $r9
7084  if ($r9===self::$FAILED) {
7085    $this->currPos = $p7;
7086    $r5 = self::$FAILED;
7087    goto seq_2;
7088  }
7089  $r5 = true;
7090  seq_2:
7091  if ($r5!==self::$FAILED) {
7092    $this->savedPos = $p6;
7093    $r5 = $this->a71($r4, $r8, $r9);
7094  } else {
7095    $r5 = null;
7096  }
7097  // free $p7
7098  // s2 <- $r5
7099  $r10 = $this->parseblock_line($silence, $boolParams, $param_preproc, $param_th);
7100  // bl <- $r10
7101  if ($r10===self::$FAILED) {
7102    $this->currPos = $p3;
7103    $r1 = self::$FAILED;
7104    goto seq_1;
7105  }
7106  $r1 = true;
7107  seq_1:
7108  if ($r1!==self::$FAILED) {
7109    $this->savedPos = $p2;
7110    $r1 = $this->a72($r4, $r5, $r10);
7111  }
7112  // free $p3
7113  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
7114    $this->currPos,
7115    $r1,
7116    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
7117    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
7118  );
7119  return $r1;
7120}, "block_lines", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
7121
7122}
7123private function parsesol($silence, $boolParams, &$param_preproc, &$param_th) {
7124return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
7125  $key = json_encode([606, $boolParams & 0x7ebf, $param_preproc, $param_th]);
7126  $bucket = $this->currPos;
7127  $cached = $this->cache[$bucket][$key] ?? null;
7128  if ($cached) {
7129    $this->currPos = $cached->nextPos;
7130    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
7131    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
7132    return $cached->result;
7133  }
7134  $saved_preproc=$param_preproc;
7135  $saved_th=$param_th;
7136  $p2 = $this->currPos;
7137  // start seq_1
7138  $p3 = $this->currPos;
7139  $r4 = $this->parsesol_prefix($silence);
7140  // sp <- $r4
7141  if ($r4===self::$FAILED) {
7142    $r1 = self::$FAILED;
7143    goto seq_1;
7144  }
7145  $r5 = $this->parseempty_lines_with_comments($silence);
7146  if ($r5===self::$FAILED) {
7147    $r5 = null;
7148  }
7149  // elc <- $r5
7150  $r6 = [];
7151  for (;;) {
7152    $r7 = $this->parsesol_transparent($silence, $boolParams, $param_preproc, $param_th);
7153    if ($r7!==self::$FAILED) {
7154      $r6[] = $r7;
7155    } else {
7156      break;
7157    }
7158  }
7159  // st <- $r6
7160  // free $r7
7161  $r1 = true;
7162  seq_1:
7163  if ($r1!==self::$FAILED) {
7164    $this->savedPos = $p2;
7165    $r1 = $this->a73($r4, $r5, $r6);
7166  }
7167  // free $p3
7168  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
7169    $this->currPos,
7170    $r1,
7171    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
7172    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
7173  );
7174  return $r1;
7175}, "sol", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
7176
7177}
7178private function discardtplarg($silence, $boolParams, &$param_th) {
7179return $this->traceCall(function($silence, $boolParams, &$param_th) {
7180  $key = json_encode([389, $boolParams & 0x7fff, $param_th]);
7181  $bucket = $this->currPos;
7182  $cached = $this->cache[$bucket][$key] ?? null;
7183  if ($cached) {
7184    $this->currPos = $cached->nextPos;
7185    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
7186    return $cached->result;
7187  }
7188  $saved_th=$param_th;
7189  $r1 = $this->discardtplarg_preproc($silence, $boolParams, self::newRef("}}"), $param_th);
7190  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
7191    $this->currPos,
7192    $r1,
7193    self::$UNDEFINED,
7194    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
7195  );
7196  return $r1;
7197}, "tplarg", ["\$silence", "\$boolParams", "&\$param_th"], [$silence, $boolParams, &$param_th]);
7198
7199}
7200private function parsetemplate($silence, $boolParams, &$param_th) {
7201return $this->traceCall(function($silence, $boolParams, &$param_th) {
7202  $key = json_encode([380, $boolParams & 0x7fff, $param_th]);
7203  $bucket = $this->currPos;
7204  $cached = $this->cache[$bucket][$key] ?? null;
7205  if ($cached) {
7206    $this->currPos = $cached->nextPos;
7207    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
7208    return $cached->result;
7209  }
7210  $saved_th=$param_th;
7211  $r1 = $this->parsetemplate_preproc($silence, $boolParams, self::newRef("}}"), $param_th);
7212  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
7213    $this->currPos,
7214    $r1,
7215    self::$UNDEFINED,
7216    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
7217  );
7218  return $r1;
7219}, "template", ["\$silence", "\$boolParams", "&\$param_th"], [$silence, $boolParams, &$param_th]);
7220
7221}
7222private function parsebroken_template($silence, &$param_preproc) {
7223return $this->traceCall(function($silence, &$param_preproc) {
7224  $key = json_encode([382, $param_preproc]);
7225  $bucket = $this->currPos;
7226  $cached = $this->cache[$bucket][$key] ?? null;
7227  if ($cached) {
7228    $this->currPos = $cached->nextPos;
7229    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
7230    return $cached->result;
7231  }
7232  $saved_preproc=$param_preproc;
7233  $p2 = $this->currPos;
7234  // start seq_1
7235  $p3 = $this->currPos;
7236  // t <- $r4
7237  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "{{", $this->currPos, 2, false) === 0) {
7238    $r4 = "{{";
7239    $this->currPos += 2;
7240  } else {
7241    if (!$silence) {$this->fail(43);}
7242    $r4 = self::$FAILED;
7243    $this->currPos = $p3;
7244    $r1 = self::$FAILED;
7245    goto seq_1;
7246  }
7247  $r1 = true;
7248  seq_1:
7249  if ($r1!==self::$FAILED) {
7250    $this->savedPos = $p2;
7251    $r1 = $this->a74($param_preproc, $r4);
7252  }
7253  // free $p3
7254  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
7255    $this->currPos,
7256    $r1,
7257    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
7258    self::$UNDEFINED
7259  );
7260  return $r1;
7261}, "broken_template", ["\$silence", "&\$param_preproc"], [$silence, &$param_preproc]);
7262
7263}
7264private function parsetplarg($silence, $boolParams, &$param_th) {
7265return $this->traceCall(function($silence, $boolParams, &$param_th) {
7266  $key = json_encode([388, $boolParams & 0x7fff, $param_th]);
7267  $bucket = $this->currPos;
7268  $cached = $this->cache[$bucket][$key] ?? null;
7269  if ($cached) {
7270    $this->currPos = $cached->nextPos;
7271    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
7272    return $cached->result;
7273  }
7274  $saved_th=$param_th;
7275  $r1 = $this->parsetplarg_preproc($silence, $boolParams, self::newRef("}}"), $param_th);
7276  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
7277    $this->currPos,
7278    $r1,
7279    self::$UNDEFINED,
7280    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
7281  );
7282  return $r1;
7283}, "tplarg", ["\$silence", "\$boolParams", "&\$param_th"], [$silence, $boolParams, &$param_th]);
7284
7285}
7286private function discardwikilink($silence, $boolParams, &$param_th, &$param_preproc) {
7287return $this->traceCall(function($silence, $boolParams, &$param_th, &$param_preproc) {
7288  $key = json_encode([435, $boolParams & 0x7fff, $param_th, $param_preproc]);
7289  $bucket = $this->currPos;
7290  $cached = $this->cache[$bucket][$key] ?? null;
7291  if ($cached) {
7292    $this->currPos = $cached->nextPos;
7293    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
7294    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
7295    return $cached->result;
7296  }
7297  $saved_th=$param_th;
7298  $saved_preproc=$param_preproc;
7299  // start choice_1
7300  $r1 = $this->discardwikilink_preproc($silence, $boolParams, self::newRef("]]"), $param_th);
7301  if ($r1!==self::$FAILED) {
7302    goto choice_1;
7303  }
7304  $r1 = $this->discardbroken_wikilink($silence, $boolParams, $param_preproc, $param_th);
7305  choice_1:
7306  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
7307    $this->currPos,
7308    $r1,
7309    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
7310    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
7311  );
7312  return $r1;
7313}, "wikilink", ["\$silence", "\$boolParams", "&\$param_th", "&\$param_preproc"], [$silence, $boolParams, &$param_th, &$param_preproc]);
7314
7315}
7316private function parsedirective($silence, $boolParams, &$param_preproc, &$param_th) {
7317return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
7318  $key = json_encode([548, $boolParams & 0x7fff, $param_preproc, $param_th]);
7319  $bucket = $this->currPos;
7320  $cached = $this->cache[$bucket][$key] ?? null;
7321  if ($cached) {
7322    $this->currPos = $cached->nextPos;
7323    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
7324    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
7325    return $cached->result;
7326  }
7327  $saved_preproc=$param_preproc;
7328  $saved_th=$param_th;
7329  // start choice_1
7330  $r1 = $this->parsecomment($silence);
7331  if ($r1!==self::$FAILED) {
7332    goto choice_1;
7333  }
7334  $r1 = $this->parseannotation_tag($silence, $boolParams, $param_preproc, $param_th);
7335  if ($r1!==self::$FAILED) {
7336    goto choice_1;
7337  }
7338  $r1 = $this->parsewellformed_extension_tag($silence, $boolParams, $param_preproc, $param_th);
7339  if ($r1!==self::$FAILED) {
7340    goto choice_1;
7341  }
7342  $r1 = $this->parsetplarg_or_template($silence, $boolParams, $param_th, $param_preproc);
7343  if ($r1!==self::$FAILED) {
7344    goto choice_1;
7345  }
7346  $p2 = $this->currPos;
7347  // start seq_1
7348  $p3 = $this->currPos;
7349  $p4 = $this->currPos;
7350  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "-{", $this->currPos, 2, false) === 0) {
7351    $r5 = "-{";
7352    $this->currPos += 2;
7353    $r5 = false;
7354    $this->currPos = $p4;
7355  } else {
7356    $r5 = self::$FAILED;
7357    $r1 = self::$FAILED;
7358    goto seq_1;
7359  }
7360  // free $p4
7361  $r6 = $this->parselang_variant_or_tpl($silence, $boolParams, $param_th, $param_preproc);
7362  // v <- $r6
7363  if ($r6===self::$FAILED) {
7364    $this->currPos = $p3;
7365    $r1 = self::$FAILED;
7366    goto seq_1;
7367  }
7368  $r1 = true;
7369  seq_1:
7370  if ($r1!==self::$FAILED) {
7371    $this->savedPos = $p2;
7372    $r1 = $this->a75($r6);
7373    goto choice_1;
7374  }
7375  // free $p3
7376  $p3 = $this->currPos;
7377  // start seq_2
7378  $p4 = $this->currPos;
7379  $p7 = $this->currPos;
7380  if (($this->input[$this->currPos] ?? null) === "&") {
7381    $this->currPos++;
7382    $r8 = "&";
7383    $r8 = false;
7384    $this->currPos = $p7;
7385  } else {
7386    $r8 = self::$FAILED;
7387    $r1 = self::$FAILED;
7388    goto seq_2;
7389  }
7390  // free $p7
7391  $r9 = $this->parsehtmlentity($silence);
7392  // e <- $r9
7393  if ($r9===self::$FAILED) {
7394    $this->currPos = $p4;
7395    $r1 = self::$FAILED;
7396    goto seq_2;
7397  }
7398  $r1 = true;
7399  seq_2:
7400  if ($r1!==self::$FAILED) {
7401    $this->savedPos = $p3;
7402    $r1 = $this->a76($r9);
7403    goto choice_1;
7404  }
7405  // free $p4
7406  $r1 = $this->parseinclude_limits($silence, $boolParams, $param_preproc, $param_th);
7407  choice_1:
7408  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
7409    $this->currPos,
7410    $r1,
7411    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
7412    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
7413  );
7414  return $r1;
7415}, "directive", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
7416
7417}
7418private function parsehtml_tag($silence, $boolParams, &$param_preproc, &$param_th) {
7419return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
7420  $key = json_encode([340, $boolParams & 0x7ebd, $param_preproc, $param_th]);
7421  $bucket = $this->currPos;
7422  $cached = $this->cache[$bucket][$key] ?? null;
7423  if ($cached) {
7424    $this->currPos = $cached->nextPos;
7425    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
7426    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
7427    return $cached->result;
7428  }
7429  $saved_preproc=$param_preproc;
7430  $saved_th=$param_th;
7431  $r1 = $this->parsexmlish_tag($silence, $boolParams & ~0x2, $param_preproc, $param_th);
7432  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
7433    $this->currPos,
7434    $r1,
7435    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
7436    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
7437  );
7438  return $r1;
7439}, "html_tag", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
7440
7441}
7442private function parsetable_attribute_preprocessor_text_single($silence, $boolParams, &$param_preproc, &$param_th) {
7443return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
7444  $key = json_encode([564, $boolParams & 0x7fff, $param_preproc, $param_th]);
7445  $bucket = $this->currPos;
7446  $cached = $this->cache[$bucket][$key] ?? null;
7447  if ($cached) {
7448    $this->currPos = $cached->nextPos;
7449    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
7450    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
7451    return $cached->result;
7452  }
7453  $saved_preproc=$param_preproc;
7454  $saved_th=$param_th;
7455  $p2 = $this->currPos;
7456  $r3 = [];
7457  for (;;) {
7458    // start choice_1
7459    $p5 = $this->currPos;
7460    $r4 = self::$FAILED;
7461    for (;;) {
7462      if (strcspn($this->input, "{}&<-!['\x0d\x0a|", $this->currPos, 1) !== 0) {
7463        $r6 = self::consumeChar($this->input, $this->currPos);
7464        $r4 = true;
7465      } else {
7466        $r6 = self::$FAILED;
7467        if (!$silence) {$this->fail(44);}
7468        break;
7469      }
7470    }
7471    if ($r4!==self::$FAILED) {
7472      $r4 = substr($this->input, $p5, $this->currPos - $p5);
7473      goto choice_1;
7474    } else {
7475      $r4 = self::$FAILED;
7476    }
7477    // free $r6
7478    // free $p5
7479    $p5 = $this->currPos;
7480    // start seq_1
7481    $p7 = $this->currPos;
7482    $p8 = $this->currPos;
7483    $r6 = $this->discardinline_breaks(true, $boolParams, $param_preproc, $param_th);
7484    if ($r6 === self::$FAILED) {
7485      $r6 = false;
7486    } else {
7487      $r6 = self::$FAILED;
7488      $this->currPos = $p8;
7489      $r4 = self::$FAILED;
7490      goto seq_1;
7491    }
7492    // free $p8
7493    // start choice_2
7494    $r9 = $this->parsedirective($silence, $boolParams, $param_preproc, $param_th);
7495    if ($r9!==self::$FAILED) {
7496      goto choice_2;
7497    }
7498    if (strspn($this->input, "{}&<-![", $this->currPos, 1) !== 0) {
7499      $r9 = $this->input[$this->currPos++];
7500    } else {
7501      $r9 = self::$FAILED;
7502      if (!$silence) {$this->fail(45);}
7503    }
7504    choice_2:
7505    // s <- $r9
7506    if ($r9===self::$FAILED) {
7507      $this->currPos = $p7;
7508      $r4 = self::$FAILED;
7509      goto seq_1;
7510    }
7511    $r4 = true;
7512    seq_1:
7513    if ($r4!==self::$FAILED) {
7514      $this->savedPos = $p5;
7515      $r4 = $this->a41($r9);
7516    }
7517    // free $p7
7518    choice_1:
7519    if ($r4!==self::$FAILED) {
7520      $r3[] = $r4;
7521    } else {
7522      break;
7523    }
7524  }
7525  // r <- $r3
7526  // free $r4
7527  $r1 = $r3;
7528  if ($r1!==self::$FAILED) {
7529    $this->savedPos = $p2;
7530    $r1 = $this->a58($r3);
7531  }
7532  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
7533    $this->currPos,
7534    $r1,
7535    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
7536    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
7537  );
7538  return $r1;
7539}, "table_attribute_preprocessor_text_single", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
7540
7541}
7542private function parsetable_attribute_preprocessor_text_double($silence, $boolParams, &$param_preproc, &$param_th) {
7543return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
7544  $key = json_encode([566, $boolParams & 0x7fff, $param_preproc, $param_th]);
7545  $bucket = $this->currPos;
7546  $cached = $this->cache[$bucket][$key] ?? null;
7547  if ($cached) {
7548    $this->currPos = $cached->nextPos;
7549    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
7550    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
7551    return $cached->result;
7552  }
7553  $saved_preproc=$param_preproc;
7554  $saved_th=$param_th;
7555  $p2 = $this->currPos;
7556  $r3 = [];
7557  for (;;) {
7558    // start choice_1
7559    $p5 = $this->currPos;
7560    $r4 = self::$FAILED;
7561    for (;;) {
7562      if (strcspn($this->input, "{}&<-![\"\x0d\x0a|", $this->currPos, 1) !== 0) {
7563        $r6 = self::consumeChar($this->input, $this->currPos);
7564        $r4 = true;
7565      } else {
7566        $r6 = self::$FAILED;
7567        if (!$silence) {$this->fail(46);}
7568        break;
7569      }
7570    }
7571    if ($r4!==self::$FAILED) {
7572      $r4 = substr($this->input, $p5, $this->currPos - $p5);
7573      goto choice_1;
7574    } else {
7575      $r4 = self::$FAILED;
7576    }
7577    // free $r6
7578    // free $p5
7579    $p5 = $this->currPos;
7580    // start seq_1
7581    $p7 = $this->currPos;
7582    $p8 = $this->currPos;
7583    $r6 = $this->discardinline_breaks(true, $boolParams, $param_preproc, $param_th);
7584    if ($r6 === self::$FAILED) {
7585      $r6 = false;
7586    } else {
7587      $r6 = self::$FAILED;
7588      $this->currPos = $p8;
7589      $r4 = self::$FAILED;
7590      goto seq_1;
7591    }
7592    // free $p8
7593    // start choice_2
7594    $r9 = $this->parsedirective($silence, $boolParams, $param_preproc, $param_th);
7595    if ($r9!==self::$FAILED) {
7596      goto choice_2;
7597    }
7598    if (strspn($this->input, "{}&<-![", $this->currPos, 1) !== 0) {
7599      $r9 = $this->input[$this->currPos++];
7600    } else {
7601      $r9 = self::$FAILED;
7602      if (!$silence) {$this->fail(45);}
7603    }
7604    choice_2:
7605    // s <- $r9
7606    if ($r9===self::$FAILED) {
7607      $this->currPos = $p7;
7608      $r4 = self::$FAILED;
7609      goto seq_1;
7610    }
7611    $r4 = true;
7612    seq_1:
7613    if ($r4!==self::$FAILED) {
7614      $this->savedPos = $p5;
7615      $r4 = $this->a41($r9);
7616    }
7617    // free $p7
7618    choice_1:
7619    if ($r4!==self::$FAILED) {
7620      $r3[] = $r4;
7621    } else {
7622      break;
7623    }
7624  }
7625  // r <- $r3
7626  // free $r4
7627  $r1 = $r3;
7628  if ($r1!==self::$FAILED) {
7629    $this->savedPos = $p2;
7630    $r1 = $this->a58($r3);
7631  }
7632  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
7633    $this->currPos,
7634    $r1,
7635    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
7636    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
7637  );
7638  return $r1;
7639}, "table_attribute_preprocessor_text_double", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
7640
7641}
7642private function parsetable_attribute_preprocessor_text($silence, $boolParams, &$param_preproc, &$param_th) {
7643return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
7644  $key = json_encode([562, $boolParams & 0x7fff, $param_preproc, $param_th]);
7645  $bucket = $this->currPos;
7646  $cached = $this->cache[$bucket][$key] ?? null;
7647  if ($cached) {
7648    $this->currPos = $cached->nextPos;
7649    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
7650    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
7651    return $cached->result;
7652  }
7653  $saved_preproc=$param_preproc;
7654  $saved_th=$param_th;
7655  $p2 = $this->currPos;
7656  $r3 = [];
7657  for (;;) {
7658    // start choice_1
7659    $p5 = $this->currPos;
7660    $r4 = self::$FAILED;
7661    for (;;) {
7662      if (strcspn($this->input, "{}&<-![ \x09\x0a\x0d\x0c|", $this->currPos, 1) !== 0) {
7663        $r6 = self::consumeChar($this->input, $this->currPos);
7664        $r4 = true;
7665      } else {
7666        $r6 = self::$FAILED;
7667        if (!$silence) {$this->fail(47);}
7668        break;
7669      }
7670    }
7671    if ($r4!==self::$FAILED) {
7672      $r4 = substr($this->input, $p5, $this->currPos - $p5);
7673      goto choice_1;
7674    } else {
7675      $r4 = self::$FAILED;
7676    }
7677    // free $r6
7678    // free $p5
7679    $p5 = $this->currPos;
7680    // start seq_1
7681    $p7 = $this->currPos;
7682    $p8 = $this->currPos;
7683    $r6 = $this->discardinline_breaks(true, $boolParams, $param_preproc, $param_th);
7684    if ($r6 === self::$FAILED) {
7685      $r6 = false;
7686    } else {
7687      $r6 = self::$FAILED;
7688      $this->currPos = $p8;
7689      $r4 = self::$FAILED;
7690      goto seq_1;
7691    }
7692    // free $p8
7693    // start choice_2
7694    $r9 = $this->parsedirective($silence, $boolParams, $param_preproc, $param_th);
7695    if ($r9!==self::$FAILED) {
7696      goto choice_2;
7697    }
7698    if (strspn($this->input, "{}&<-![", $this->currPos, 1) !== 0) {
7699      $r9 = $this->input[$this->currPos++];
7700    } else {
7701      $r9 = self::$FAILED;
7702      if (!$silence) {$this->fail(45);}
7703    }
7704    choice_2:
7705    // s <- $r9
7706    if ($r9===self::$FAILED) {
7707      $this->currPos = $p7;
7708      $r4 = self::$FAILED;
7709      goto seq_1;
7710    }
7711    $r4 = true;
7712    seq_1:
7713    if ($r4!==self::$FAILED) {
7714      $this->savedPos = $p5;
7715      $r4 = $this->a41($r9);
7716    }
7717    // free $p7
7718    choice_1:
7719    if ($r4!==self::$FAILED) {
7720      $r3[] = $r4;
7721    } else {
7722      break;
7723    }
7724  }
7725  if (count($r3) === 0) {
7726    $r3 = self::$FAILED;
7727  }
7728  // r <- $r3
7729  // free $r4
7730  $r1 = $r3;
7731  if ($r1!==self::$FAILED) {
7732    $this->savedPos = $p2;
7733    $r1 = $this->a58($r3);
7734  }
7735  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
7736    $this->currPos,
7737    $r1,
7738    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
7739    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
7740  );
7741  return $r1;
7742}, "table_attribute_preprocessor_text", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
7743
7744}
7745private function parseless_than($silence, $boolParams) {
7746return $this->traceCall(function($silence, $boolParams) {
7747  $key = json_encode([476, $boolParams & 0x2]);
7748  $bucket = $this->currPos;
7749  $cached = $this->cache[$bucket][$key] ?? null;
7750  if ($cached) {
7751    $this->currPos = $cached->nextPos;
7752
7753    return $cached->result;
7754  }
7755
7756  $p1 = $this->currPos;
7757  // start seq_1
7758  $p3 = $this->currPos;
7759  if (/*annOrExtTag*/($boolParams & 0x2) !== 0) {
7760    $r4 = false;
7761  } else {
7762    $r4 = self::$FAILED;
7763    $r2 = self::$FAILED;
7764    goto seq_1;
7765  }
7766  if (($this->input[$this->currPos] ?? null) === "<") {
7767    $this->currPos++;
7768    $r5 = "<";
7769  } else {
7770    if (!$silence) {$this->fail(48);}
7771    $r5 = self::$FAILED;
7772    $this->currPos = $p3;
7773    $r2 = self::$FAILED;
7774    goto seq_1;
7775  }
7776  $r2 = true;
7777  seq_1:
7778  if ($r2!==self::$FAILED) {
7779    $r2 = substr($this->input, $p1, $this->currPos - $p1);
7780  } else {
7781    $r2 = self::$FAILED;
7782  }
7783  // free $p3
7784  // free $p1
7785  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
7786    $this->currPos,
7787    $r2,
7788    self::$UNDEFINED,
7789    self::$UNDEFINED
7790  );
7791  return $r2;
7792}, "less_than", ["\$silence", "\$boolParams"], [$silence, $boolParams]);
7793
7794}
7795private function parseattribute_preprocessor_text_single($silence, $boolParams, &$param_preproc, &$param_th) {
7796return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
7797  $key = json_encode([558, $boolParams & 0x7fff, $param_preproc, $param_th]);
7798  $bucket = $this->currPos;
7799  $cached = $this->cache[$bucket][$key] ?? null;
7800  if ($cached) {
7801    $this->currPos = $cached->nextPos;
7802    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
7803    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
7804    return $cached->result;
7805  }
7806  $saved_preproc=$param_preproc;
7807  $saved_th=$param_th;
7808  $p2 = $this->currPos;
7809  $r3 = [];
7810  for (;;) {
7811    // start choice_1
7812    $p5 = $this->currPos;
7813    $r4 = self::$FAILED;
7814    for (;;) {
7815      if (strcspn($this->input, "{}&<-|/'>", $this->currPos, 1) !== 0) {
7816        $r6 = self::consumeChar($this->input, $this->currPos);
7817        $r4 = true;
7818      } else {
7819        $r6 = self::$FAILED;
7820        if (!$silence) {$this->fail(49);}
7821        break;
7822      }
7823    }
7824    if ($r4!==self::$FAILED) {
7825      $r4 = substr($this->input, $p5, $this->currPos - $p5);
7826      goto choice_1;
7827    } else {
7828      $r4 = self::$FAILED;
7829    }
7830    // free $r6
7831    // free $p5
7832    $p5 = $this->currPos;
7833    // start seq_1
7834    $p7 = $this->currPos;
7835    $p8 = $this->currPos;
7836    $r6 = $this->discardinline_breaks(true, $boolParams, $param_preproc, $param_th);
7837    if ($r6 === self::$FAILED) {
7838      $r6 = false;
7839    } else {
7840      $r6 = self::$FAILED;
7841      $this->currPos = $p8;
7842      $r4 = self::$FAILED;
7843      goto seq_1;
7844    }
7845    // free $p8
7846    $p8 = $this->currPos;
7847    if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "/>", $this->currPos, 2, false) === 0) {
7848      $r9 = "/>";
7849      $this->currPos += 2;
7850    } else {
7851      $r9 = self::$FAILED;
7852    }
7853    if ($r9 === self::$FAILED) {
7854      $r9 = false;
7855    } else {
7856      $r9 = self::$FAILED;
7857      $this->currPos = $p8;
7858      $this->currPos = $p7;
7859      $r4 = self::$FAILED;
7860      goto seq_1;
7861    }
7862    // free $p8
7863    // start choice_2
7864    $r10 = $this->parsedirective($silence, $boolParams, $param_preproc, $param_th);
7865    if ($r10!==self::$FAILED) {
7866      goto choice_2;
7867    }
7868    $r10 = $this->parseless_than($silence, $boolParams);
7869    if ($r10!==self::$FAILED) {
7870      goto choice_2;
7871    }
7872    if (strspn($this->input, "{}&-|/", $this->currPos, 1) !== 0) {
7873      $r10 = $this->input[$this->currPos++];
7874    } else {
7875      $r10 = self::$FAILED;
7876      if (!$silence) {$this->fail(50);}
7877    }
7878    choice_2:
7879    // s <- $r10
7880    if ($r10===self::$FAILED) {
7881      $this->currPos = $p7;
7882      $r4 = self::$FAILED;
7883      goto seq_1;
7884    }
7885    $r4 = true;
7886    seq_1:
7887    if ($r4!==self::$FAILED) {
7888      $this->savedPos = $p5;
7889      $r4 = $this->a41($r10);
7890    }
7891    // free $p7
7892    choice_1:
7893    if ($r4!==self::$FAILED) {
7894      $r3[] = $r4;
7895    } else {
7896      break;
7897    }
7898  }
7899  // r <- $r3
7900  // free $r4
7901  $r1 = $r3;
7902  if ($r1!==self::$FAILED) {
7903    $this->savedPos = $p2;
7904    $r1 = $this->a58($r3);
7905  }
7906  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
7907    $this->currPos,
7908    $r1,
7909    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
7910    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
7911  );
7912  return $r1;
7913}, "attribute_preprocessor_text_single", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
7914
7915}
7916private function parseattribute_preprocessor_text_double($silence, $boolParams, &$param_preproc, &$param_th) {
7917return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
7918  $key = json_encode([560, $boolParams & 0x7fff, $param_preproc, $param_th]);
7919  $bucket = $this->currPos;
7920  $cached = $this->cache[$bucket][$key] ?? null;
7921  if ($cached) {
7922    $this->currPos = $cached->nextPos;
7923    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
7924    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
7925    return $cached->result;
7926  }
7927  $saved_preproc=$param_preproc;
7928  $saved_th=$param_th;
7929  $p2 = $this->currPos;
7930  $r3 = [];
7931  for (;;) {
7932    // start choice_1
7933    $p5 = $this->currPos;
7934    $r4 = self::$FAILED;
7935    for (;;) {
7936      if (strcspn($this->input, "{}&<-|/\">", $this->currPos, 1) !== 0) {
7937        $r6 = self::consumeChar($this->input, $this->currPos);
7938        $r4 = true;
7939      } else {
7940        $r6 = self::$FAILED;
7941        if (!$silence) {$this->fail(51);}
7942        break;
7943      }
7944    }
7945    if ($r4!==self::$FAILED) {
7946      $r4 = substr($this->input, $p5, $this->currPos - $p5);
7947      goto choice_1;
7948    } else {
7949      $r4 = self::$FAILED;
7950    }
7951    // free $r6
7952    // free $p5
7953    $p5 = $this->currPos;
7954    // start seq_1
7955    $p7 = $this->currPos;
7956    $p8 = $this->currPos;
7957    $r6 = $this->discardinline_breaks(true, $boolParams, $param_preproc, $param_th);
7958    if ($r6 === self::$FAILED) {
7959      $r6 = false;
7960    } else {
7961      $r6 = self::$FAILED;
7962      $this->currPos = $p8;
7963      $r4 = self::$FAILED;
7964      goto seq_1;
7965    }
7966    // free $p8
7967    $p8 = $this->currPos;
7968    if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "/>", $this->currPos, 2, false) === 0) {
7969      $r9 = "/>";
7970      $this->currPos += 2;
7971    } else {
7972      $r9 = self::$FAILED;
7973    }
7974    if ($r9 === self::$FAILED) {
7975      $r9 = false;
7976    } else {
7977      $r9 = self::$FAILED;
7978      $this->currPos = $p8;
7979      $this->currPos = $p7;
7980      $r4 = self::$FAILED;
7981      goto seq_1;
7982    }
7983    // free $p8
7984    // start choice_2
7985    $r10 = $this->parsedirective($silence, $boolParams, $param_preproc, $param_th);
7986    if ($r10!==self::$FAILED) {
7987      goto choice_2;
7988    }
7989    $r10 = $this->parseless_than($silence, $boolParams);
7990    if ($r10!==self::$FAILED) {
7991      goto choice_2;
7992    }
7993    if (strspn($this->input, "{}&-|/", $this->currPos, 1) !== 0) {
7994      $r10 = $this->input[$this->currPos++];
7995    } else {
7996      $r10 = self::$FAILED;
7997      if (!$silence) {$this->fail(50);}
7998    }
7999    choice_2:
8000    // s <- $r10
8001    if ($r10===self::$FAILED) {
8002      $this->currPos = $p7;
8003      $r4 = self::$FAILED;
8004      goto seq_1;
8005    }
8006    $r4 = true;
8007    seq_1:
8008    if ($r4!==self::$FAILED) {
8009      $this->savedPos = $p5;
8010      $r4 = $this->a41($r10);
8011    }
8012    // free $p7
8013    choice_1:
8014    if ($r4!==self::$FAILED) {
8015      $r3[] = $r4;
8016    } else {
8017      break;
8018    }
8019  }
8020  // r <- $r3
8021  // free $r4
8022  $r1 = $r3;
8023  if ($r1!==self::$FAILED) {
8024    $this->savedPos = $p2;
8025    $r1 = $this->a58($r3);
8026  }
8027  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
8028    $this->currPos,
8029    $r1,
8030    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
8031    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
8032  );
8033  return $r1;
8034}, "attribute_preprocessor_text_double", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
8035
8036}
8037private function parseattribute_preprocessor_text($silence, $boolParams, &$param_preproc, &$param_th) {
8038return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
8039  $key = json_encode([556, $boolParams & 0x7fff, $param_preproc, $param_th]);
8040  $bucket = $this->currPos;
8041  $cached = $this->cache[$bucket][$key] ?? null;
8042  if ($cached) {
8043    $this->currPos = $cached->nextPos;
8044    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
8045    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
8046    return $cached->result;
8047  }
8048  $saved_preproc=$param_preproc;
8049  $saved_th=$param_th;
8050  $p2 = $this->currPos;
8051  $r3 = [];
8052  for (;;) {
8053    // start choice_1
8054    $p5 = $this->currPos;
8055    $r4 = self::$FAILED;
8056    for (;;) {
8057      if (strcspn($this->input, "{}&<-|/ \x09\x0a\x0d\x0c>", $this->currPos, 1) !== 0) {
8058        $r6 = self::consumeChar($this->input, $this->currPos);
8059        $r4 = true;
8060      } else {
8061        $r6 = self::$FAILED;
8062        if (!$silence) {$this->fail(52);}
8063        break;
8064      }
8065    }
8066    if ($r4!==self::$FAILED) {
8067      $r4 = substr($this->input, $p5, $this->currPos - $p5);
8068      goto choice_1;
8069    } else {
8070      $r4 = self::$FAILED;
8071    }
8072    // free $r6
8073    // free $p5
8074    $p5 = $this->currPos;
8075    // start seq_1
8076    $p7 = $this->currPos;
8077    $p8 = $this->currPos;
8078    $r6 = $this->discardinline_breaks(true, $boolParams, $param_preproc, $param_th);
8079    if ($r6 === self::$FAILED) {
8080      $r6 = false;
8081    } else {
8082      $r6 = self::$FAILED;
8083      $this->currPos = $p8;
8084      $r4 = self::$FAILED;
8085      goto seq_1;
8086    }
8087    // free $p8
8088    $p8 = $this->currPos;
8089    if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "/>", $this->currPos, 2, false) === 0) {
8090      $r9 = "/>";
8091      $this->currPos += 2;
8092    } else {
8093      $r9 = self::$FAILED;
8094    }
8095    if ($r9 === self::$FAILED) {
8096      $r9 = false;
8097    } else {
8098      $r9 = self::$FAILED;
8099      $this->currPos = $p8;
8100      $this->currPos = $p7;
8101      $r4 = self::$FAILED;
8102      goto seq_1;
8103    }
8104    // free $p8
8105    // start choice_2
8106    $r10 = $this->parsedirective($silence, $boolParams, $param_preproc, $param_th);
8107    if ($r10!==self::$FAILED) {
8108      goto choice_2;
8109    }
8110    $r10 = $this->parseless_than($silence, $boolParams);
8111    if ($r10!==self::$FAILED) {
8112      goto choice_2;
8113    }
8114    if (strspn($this->input, "{}&-|/", $this->currPos, 1) !== 0) {
8115      $r10 = $this->input[$this->currPos++];
8116    } else {
8117      $r10 = self::$FAILED;
8118      if (!$silence) {$this->fail(50);}
8119    }
8120    choice_2:
8121    // s <- $r10
8122    if ($r10===self::$FAILED) {
8123      $this->currPos = $p7;
8124      $r4 = self::$FAILED;
8125      goto seq_1;
8126    }
8127    $r4 = true;
8128    seq_1:
8129    if ($r4!==self::$FAILED) {
8130      $this->savedPos = $p5;
8131      $r4 = $this->a41($r10);
8132    }
8133    // free $p7
8134    choice_1:
8135    if ($r4!==self::$FAILED) {
8136      $r3[] = $r4;
8137    } else {
8138      break;
8139    }
8140  }
8141  if (count($r3) === 0) {
8142    $r3 = self::$FAILED;
8143  }
8144  // r <- $r3
8145  // free $r4
8146  $r1 = $r3;
8147  if ($r1!==self::$FAILED) {
8148    $this->savedPos = $p2;
8149    $r1 = $this->a58($r3);
8150  }
8151  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
8152    $this->currPos,
8153    $r1,
8154    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
8155    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
8156  );
8157  return $r1;
8158}, "attribute_preprocessor_text", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
8159
8160}
8161private function parseautolink($silence, $boolParams, &$param_preproc, &$param_th) {
8162return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
8163  $key = json_encode([352, $boolParams & 0x7fff, $param_preproc, $param_th]);
8164  $bucket = $this->currPos;
8165  $cached = $this->cache[$bucket][$key] ?? null;
8166  if ($cached) {
8167    $this->currPos = $cached->nextPos;
8168    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
8169    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
8170    return $cached->result;
8171  }
8172  $saved_preproc=$param_preproc;
8173  $saved_th=$param_th;
8174  $p2 = $this->currPos;
8175  // start seq_1
8176  $p3 = $this->currPos;
8177  if (!(/*extlink*/($boolParams & 0x8) !== 0)) {
8178    $r4 = false;
8179  } else {
8180    $r4 = self::$FAILED;
8181    $r1 = self::$FAILED;
8182    goto seq_1;
8183  }
8184  $this->savedPos = $this->currPos;
8185  $r5 = $this->a77();
8186  if (!$r5) {
8187    $r5 = false;
8188  } else {
8189    $r5 = self::$FAILED;
8190    $this->currPos = $p3;
8191    $r1 = self::$FAILED;
8192    goto seq_1;
8193  }
8194  // start choice_1
8195  $r6 = $this->parseautourl($silence, $boolParams, $param_preproc, $param_th);
8196  if ($r6!==self::$FAILED) {
8197    goto choice_1;
8198  }
8199  $r6 = $this->parseautoref($silence);
8200  if ($r6!==self::$FAILED) {
8201    goto choice_1;
8202  }
8203  $r6 = $this->parseisbn($silence);
8204  choice_1:
8205  // r <- $r6
8206  if ($r6===self::$FAILED) {
8207    $this->currPos = $p3;
8208    $r1 = self::$FAILED;
8209    goto seq_1;
8210  }
8211  $r1 = true;
8212  seq_1:
8213  if ($r1!==self::$FAILED) {
8214    $this->savedPos = $p2;
8215    $r1 = $this->a23($r6);
8216  }
8217  // free $p3
8218  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
8219    $this->currPos,
8220    $r1,
8221    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
8222    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
8223  );
8224  return $r1;
8225}, "autolink", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
8226
8227}
8228private function parsebehavior_switch($silence) {
8229return $this->traceCall(function($silence) {
8230  $key = 348;
8231  $bucket = $this->currPos;
8232  $cached = $this->cache[$bucket][$key] ?? null;
8233  if ($cached) {
8234    $this->currPos = $cached->nextPos;
8235
8236    return $cached->result;
8237  }
8238
8239  $p2 = $this->currPos;
8240  $p4 = $this->currPos;
8241  // start seq_1
8242  $p5 = $this->currPos;
8243  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "__", $this->currPos, 2, false) === 0) {
8244    $r6 = "__";
8245    $this->currPos += 2;
8246  } else {
8247    if (!$silence) {$this->fail(53);}
8248    $r6 = self::$FAILED;
8249    $r3 = self::$FAILED;
8250    goto seq_1;
8251  }
8252  $r7 = $this->discardbehavior_text($silence);
8253  if ($r7===self::$FAILED) {
8254    $this->currPos = $p5;
8255    $r3 = self::$FAILED;
8256    goto seq_1;
8257  }
8258  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "__", $this->currPos, 2, false) === 0) {
8259    $r8 = "__";
8260    $this->currPos += 2;
8261  } else {
8262    if (!$silence) {$this->fail(53);}
8263    $r8 = self::$FAILED;
8264    $this->currPos = $p5;
8265    $r3 = self::$FAILED;
8266    goto seq_1;
8267  }
8268  $r3 = true;
8269  seq_1:
8270  // bs <- $r3
8271  if ($r3!==self::$FAILED) {
8272    $r3 = substr($this->input, $p4, $this->currPos - $p4);
8273  } else {
8274    $r3 = self::$FAILED;
8275  }
8276  // free $p5
8277  // free $p4
8278  $r1 = $r3;
8279  if ($r1!==self::$FAILED) {
8280    $this->savedPos = $p2;
8281    $r1 = $this->a78($r3);
8282  }
8283  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
8284    $this->currPos,
8285    $r1,
8286    self::$UNDEFINED,
8287    self::$UNDEFINED
8288  );
8289  return $r1;
8290}, "behavior_switch", ["\$silence"], [$silence]);
8291
8292}
8293private function parsetext_char($silence) {
8294return $this->traceCall(function($silence) {
8295  $key = 536;
8296  $bucket = $this->currPos;
8297  $cached = $this->cache[$bucket][$key] ?? null;
8298  if ($cached) {
8299    $this->currPos = $cached->nextPos;
8300
8301    return $cached->result;
8302  }
8303
8304  if (strcspn($this->input, "-'<[{\x0a\x0d:;]}|!=", $this->currPos, 1) !== 0) {
8305    $r1 = self::consumeChar($this->input, $this->currPos);
8306  } else {
8307    $r1 = self::$FAILED;
8308    if (!$silence) {$this->fail(54);}
8309  }
8310  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
8311    $this->currPos,
8312    $r1,
8313    self::$UNDEFINED,
8314    self::$UNDEFINED
8315  );
8316  return $r1;
8317}, "text_char", ["\$silence"], [$silence]);
8318
8319}
8320private function parseangle_bracket_markup($silence, $boolParams, &$param_preproc, &$param_th) {
8321return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
8322  $key = json_encode([342, $boolParams & 0x7ebf, $param_preproc, $param_th]);
8323  $bucket = $this->currPos;
8324  $cached = $this->cache[$bucket][$key] ?? null;
8325  if ($cached) {
8326    $this->currPos = $cached->nextPos;
8327    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
8328    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
8329    return $cached->result;
8330  }
8331  $saved_preproc=$param_preproc;
8332  $saved_th=$param_th;
8333  // start choice_1
8334  $r1 = $this->parseannotation_tag($silence, $boolParams, $param_preproc, $param_th);
8335  if ($r1!==self::$FAILED) {
8336    goto choice_1;
8337  }
8338  $r1 = $this->parsemaybe_extension_tag($silence, $boolParams, $param_preproc, $param_th);
8339  if ($r1!==self::$FAILED) {
8340    goto choice_1;
8341  }
8342  $r1 = $this->parseinclude_limits($silence, $boolParams, $param_preproc, $param_th);
8343  if ($r1!==self::$FAILED) {
8344    goto choice_1;
8345  }
8346  $r1 = $this->parsehtml_tag($silence, $boolParams, $param_preproc, $param_th);
8347  if ($r1!==self::$FAILED) {
8348    goto choice_1;
8349  }
8350  $r1 = $this->parsecomment($silence);
8351  choice_1:
8352  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
8353    $this->currPos,
8354    $r1,
8355    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
8356    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
8357  );
8358  return $r1;
8359}, "angle_bracket_markup", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
8360
8361}
8362private function parselang_variant_or_tpl($silence, $boolParams, &$param_th, &$param_preproc) {
8363return $this->traceCall(function($silence, $boolParams, &$param_th, &$param_preproc) {
8364  $key = json_encode([402, $boolParams & 0x7fff, $param_th, $param_preproc]);
8365  $bucket = $this->currPos;
8366  $cached = $this->cache[$bucket][$key] ?? null;
8367  if ($cached) {
8368    $this->currPos = $cached->nextPos;
8369    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
8370    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
8371    return $cached->result;
8372  }
8373  $saved_th=$param_th;
8374  $saved_preproc=$param_preproc;
8375  // start choice_1
8376  $p2 = $this->currPos;
8377  // start seq_1
8378  $p3 = $this->currPos;
8379  $p4 = $this->currPos;
8380  // start seq_2
8381  $p6 = $this->currPos;
8382  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "-{", $this->currPos, 2, false) === 0) {
8383    $r7 = "-{";
8384    $this->currPos += 2;
8385  } else {
8386    $r7 = self::$FAILED;
8387    $r5 = self::$FAILED;
8388    goto seq_2;
8389  }
8390  $p8 = $this->currPos;
8391  // start seq_3
8392  $p10 = $this->currPos;
8393  $r11 = self::$FAILED;
8394  for (;;) {
8395    if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "{{{", $this->currPos, 3, false) === 0) {
8396      $r12 = "{{{";
8397      $this->currPos += 3;
8398      $r11 = true;
8399    } else {
8400      $r12 = self::$FAILED;
8401      break;
8402    }
8403  }
8404  if ($r11===self::$FAILED) {
8405    $r9 = self::$FAILED;
8406    goto seq_3;
8407  }
8408  // free $r12
8409  $p13 = $this->currPos;
8410  if (($this->input[$this->currPos] ?? null) === "{") {
8411    $this->currPos++;
8412    $r12 = "{";
8413  } else {
8414    $r12 = self::$FAILED;
8415  }
8416  if ($r12 === self::$FAILED) {
8417    $r12 = false;
8418  } else {
8419    $r12 = self::$FAILED;
8420    $this->currPos = $p13;
8421    $this->currPos = $p10;
8422    $r9 = self::$FAILED;
8423    goto seq_3;
8424  }
8425  // free $p13
8426  $r9 = true;
8427  seq_3:
8428  if ($r9!==self::$FAILED) {
8429    $r9 = false;
8430    $this->currPos = $p8;
8431  } else {
8432    $this->currPos = $p6;
8433    $r5 = self::$FAILED;
8434    goto seq_2;
8435  }
8436  // free $p10
8437  // free $p8
8438  $r14 = $this->discardtplarg(true, $boolParams, $param_th);
8439  if ($r14===self::$FAILED) {
8440    $this->currPos = $p6;
8441    $r5 = self::$FAILED;
8442    goto seq_2;
8443  }
8444  $r5 = true;
8445  seq_2:
8446  if ($r5!==self::$FAILED) {
8447    $r5 = false;
8448    $this->currPos = $p4;
8449  } else {
8450    $r1 = self::$FAILED;
8451    goto seq_1;
8452  }
8453  // free $p6
8454  // free $p4
8455  $r15 = $this->parselang_variant($silence, $boolParams, $param_th, $param_preproc);
8456  // a <- $r15
8457  if ($r15===self::$FAILED) {
8458    $this->currPos = $p3;
8459    $r1 = self::$FAILED;
8460    goto seq_1;
8461  }
8462  $r1 = true;
8463  seq_1:
8464  if ($r1!==self::$FAILED) {
8465    $this->savedPos = $p2;
8466    $r1 = $this->a49($r15);
8467    goto choice_1;
8468  }
8469  // free $p3
8470  $p3 = $this->currPos;
8471  // start seq_4
8472  $p4 = $this->currPos;
8473  $p6 = $this->currPos;
8474  // start seq_5
8475  $p8 = $this->currPos;
8476  if (($this->input[$this->currPos] ?? null) === "-") {
8477    $this->currPos++;
8478    $r17 = "-";
8479  } else {
8480    if (!$silence) {$this->fail(55);}
8481    $r17 = self::$FAILED;
8482    $r16 = self::$FAILED;
8483    goto seq_5;
8484  }
8485  $p10 = $this->currPos;
8486  // start seq_6
8487  $p13 = $this->currPos;
8488  $r19 = self::$FAILED;
8489  for (;;) {
8490    if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "{{{", $this->currPos, 3, false) === 0) {
8491      $r20 = "{{{";
8492      $this->currPos += 3;
8493      $r19 = true;
8494    } else {
8495      $r20 = self::$FAILED;
8496      break;
8497    }
8498  }
8499  if ($r19===self::$FAILED) {
8500    $r18 = self::$FAILED;
8501    goto seq_6;
8502  }
8503  // free $r20
8504  $p21 = $this->currPos;
8505  if (($this->input[$this->currPos] ?? null) === "{") {
8506    $this->currPos++;
8507    $r20 = "{";
8508  } else {
8509    $r20 = self::$FAILED;
8510  }
8511  if ($r20 === self::$FAILED) {
8512    $r20 = false;
8513  } else {
8514    $r20 = self::$FAILED;
8515    $this->currPos = $p21;
8516    $this->currPos = $p13;
8517    $r18 = self::$FAILED;
8518    goto seq_6;
8519  }
8520  // free $p21
8521  $r18 = true;
8522  seq_6:
8523  if ($r18!==self::$FAILED) {
8524    $r18 = false;
8525    $this->currPos = $p10;
8526  } else {
8527    $this->currPos = $p8;
8528    $r16 = self::$FAILED;
8529    goto seq_5;
8530  }
8531  // free $p13
8532  // free $p10
8533  $r16 = true;
8534  seq_5:
8535  // a <- $r16
8536  if ($r16!==self::$FAILED) {
8537    $r16 = substr($this->input, $p6, $this->currPos - $p6);
8538  } else {
8539    $r16 = self::$FAILED;
8540    $r1 = self::$FAILED;
8541    goto seq_4;
8542  }
8543  // free $p8
8544  // free $p6
8545  $r22 = $this->parsetplarg($silence, $boolParams, $param_th);
8546  // b <- $r22
8547  if ($r22===self::$FAILED) {
8548    $this->currPos = $p4;
8549    $r1 = self::$FAILED;
8550    goto seq_4;
8551  }
8552  $r1 = true;
8553  seq_4:
8554  if ($r1!==self::$FAILED) {
8555    $this->savedPos = $p3;
8556    $r1 = $this->a50($r16, $r22);
8557    goto choice_1;
8558  }
8559  // free $p4
8560  $p4 = $this->currPos;
8561  // start seq_7
8562  $p6 = $this->currPos;
8563  $p8 = $this->currPos;
8564  // start seq_8
8565  $p10 = $this->currPos;
8566  if (($this->input[$this->currPos] ?? null) === "-") {
8567    $this->currPos++;
8568    $r24 = "-";
8569  } else {
8570    if (!$silence) {$this->fail(55);}
8571    $r24 = self::$FAILED;
8572    $r23 = self::$FAILED;
8573    goto seq_8;
8574  }
8575  $p13 = $this->currPos;
8576  // start seq_9
8577  $p21 = $this->currPos;
8578  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "{{", $this->currPos, 2, false) === 0) {
8579    $r26 = "{{";
8580    $this->currPos += 2;
8581  } else {
8582    $r26 = self::$FAILED;
8583    $r25 = self::$FAILED;
8584    goto seq_9;
8585  }
8586  for (;;) {
8587    if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "{{{", $this->currPos, 3, false) === 0) {
8588      $r28 = "{{{";
8589      $this->currPos += 3;
8590    } else {
8591      $r28 = self::$FAILED;
8592      break;
8593    }
8594  }
8595  // free $r28
8596  $r27 = true;
8597  if ($r27===self::$FAILED) {
8598    $this->currPos = $p21;
8599    $r25 = self::$FAILED;
8600    goto seq_9;
8601  }
8602  // free $r27
8603  $p29 = $this->currPos;
8604  if (($this->input[$this->currPos] ?? null) === "{") {
8605    $this->currPos++;
8606    $r27 = "{";
8607  } else {
8608    $r27 = self::$FAILED;
8609  }
8610  if ($r27 === self::$FAILED) {
8611    $r27 = false;
8612  } else {
8613    $r27 = self::$FAILED;
8614    $this->currPos = $p29;
8615    $this->currPos = $p21;
8616    $r25 = self::$FAILED;
8617    goto seq_9;
8618  }
8619  // free $p29
8620  $r25 = true;
8621  seq_9:
8622  if ($r25!==self::$FAILED) {
8623    $r25 = false;
8624    $this->currPos = $p13;
8625  } else {
8626    $this->currPos = $p10;
8627    $r23 = self::$FAILED;
8628    goto seq_8;
8629  }
8630  // free $p21
8631  // free $p13
8632  $r23 = true;
8633  seq_8:
8634  // a <- $r23
8635  if ($r23!==self::$FAILED) {
8636    $r23 = substr($this->input, $p8, $this->currPos - $p8);
8637  } else {
8638    $r23 = self::$FAILED;
8639    $r1 = self::$FAILED;
8640    goto seq_7;
8641  }
8642  // free $p10
8643  // free $p8
8644  $r28 = $this->parsetemplate($silence, $boolParams, $param_th);
8645  // b <- $r28
8646  if ($r28===self::$FAILED) {
8647    $this->currPos = $p6;
8648    $r1 = self::$FAILED;
8649    goto seq_7;
8650  }
8651  $r1 = true;
8652  seq_7:
8653  if ($r1!==self::$FAILED) {
8654    $this->savedPos = $p4;
8655    $r1 = $this->a50($r23, $r28);
8656    goto choice_1;
8657  }
8658  // free $p6
8659  $p6 = $this->currPos;
8660  // start seq_10
8661  $p8 = $this->currPos;
8662  $p10 = $this->currPos;
8663  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "-{", $this->currPos, 2, false) === 0) {
8664    $r30 = "-{";
8665    $this->currPos += 2;
8666    $r30 = false;
8667    $this->currPos = $p10;
8668  } else {
8669    $r30 = self::$FAILED;
8670    $r1 = self::$FAILED;
8671    goto seq_10;
8672  }
8673  // free $p10
8674  $r31 = $this->parselang_variant($silence, $boolParams, $param_th, $param_preproc);
8675  // a <- $r31
8676  if ($r31===self::$FAILED) {
8677    $this->currPos = $p8;
8678    $r1 = self::$FAILED;
8679    goto seq_10;
8680  }
8681  $r1 = true;
8682  seq_10:
8683  if ($r1!==self::$FAILED) {
8684    $this->savedPos = $p6;
8685    $r1 = $this->a49($r31);
8686  }
8687  // free $p8
8688  choice_1:
8689  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
8690    $this->currPos,
8691    $r1,
8692    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
8693    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
8694  );
8695  return $r1;
8696}, "lang_variant_or_tpl", ["\$silence", "\$boolParams", "&\$param_th", "&\$param_preproc"], [$silence, $boolParams, &$param_th, &$param_preproc]);
8697
8698}
8699private function parsewikilink($silence, $boolParams, &$param_th, &$param_preproc) {
8700return $this->traceCall(function($silence, $boolParams, &$param_th, &$param_preproc) {
8701  $key = json_encode([434, $boolParams & 0x7fff, $param_th, $param_preproc]);
8702  $bucket = $this->currPos;
8703  $cached = $this->cache[$bucket][$key] ?? null;
8704  if ($cached) {
8705    $this->currPos = $cached->nextPos;
8706    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
8707    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
8708    return $cached->result;
8709  }
8710  $saved_th=$param_th;
8711  $saved_preproc=$param_preproc;
8712  // start choice_1
8713  $r1 = $this->parsewikilink_preproc($silence, $boolParams, self::newRef("]]"), $param_th);
8714  if ($r1!==self::$FAILED) {
8715    goto choice_1;
8716  }
8717  $r1 = $this->parsebroken_wikilink($silence, $boolParams, $param_preproc, $param_th);
8718  choice_1:
8719  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
8720    $this->currPos,
8721    $r1,
8722    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
8723    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
8724  );
8725  return $r1;
8726}, "wikilink", ["\$silence", "\$boolParams", "&\$param_th", "&\$param_preproc"], [$silence, $boolParams, &$param_th, &$param_preproc]);
8727
8728}
8729private function parsequote($silence) {
8730return $this->traceCall(function($silence) {
8731  $key = 444;
8732  $bucket = $this->currPos;
8733  $cached = $this->cache[$bucket][$key] ?? null;
8734  if ($cached) {
8735    $this->currPos = $cached->nextPos;
8736
8737    return $cached->result;
8738  }
8739
8740  $p2 = $this->currPos;
8741  $p4 = $this->currPos;
8742  // start seq_1
8743  $p5 = $this->currPos;
8744  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "''", $this->currPos, 2, false) === 0) {
8745    $r6 = "''";
8746    $this->currPos += 2;
8747  } else {
8748    if (!$silence) {$this->fail(56);}
8749    $r6 = self::$FAILED;
8750    $r3 = self::$FAILED;
8751    goto seq_1;
8752  }
8753  for (;;) {
8754    if (($this->input[$this->currPos] ?? null) === "'") {
8755      $this->currPos++;
8756      $r8 = "'";
8757    } else {
8758      if (!$silence) {$this->fail(33);}
8759      $r8 = self::$FAILED;
8760      break;
8761    }
8762  }
8763  // free $r8
8764  $r7 = true;
8765  if ($r7===self::$FAILED) {
8766    $this->currPos = $p5;
8767    $r3 = self::$FAILED;
8768    goto seq_1;
8769  }
8770  // free $r7
8771  $r3 = true;
8772  seq_1:
8773  // quotes <- $r3
8774  if ($r3!==self::$FAILED) {
8775    $r3 = substr($this->input, $p4, $this->currPos - $p4);
8776  } else {
8777    $r3 = self::$FAILED;
8778  }
8779  // free $p5
8780  // free $p4
8781  $r1 = $r3;
8782  if ($r1!==self::$FAILED) {
8783    $this->savedPos = $p2;
8784    $r1 = $this->a79($r3);
8785  }
8786  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
8787    $this->currPos,
8788    $r1,
8789    self::$UNDEFINED,
8790    self::$UNDEFINED
8791  );
8792  return $r1;
8793}, "quote", ["\$silence"], [$silence]);
8794
8795}
8796private function parseinlineline_break_on_colon($silence, $boolParams, &$param_preproc, &$param_th) {
8797return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
8798  $key = json_encode([500, $boolParams & 0x6fff, $param_preproc, $param_th]);
8799  $bucket = $this->currPos;
8800  $cached = $this->cache[$bucket][$key] ?? null;
8801  if ($cached) {
8802    $this->currPos = $cached->nextPos;
8803    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
8804    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
8805    return $cached->result;
8806  }
8807  $saved_preproc=$param_preproc;
8808  $saved_th=$param_th;
8809  $r1 = $this->parseinlineline($silence, $boolParams | 0x1000, $param_preproc, $param_th);
8810  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
8811    $this->currPos,
8812    $r1,
8813    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
8814    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
8815  );
8816  return $r1;
8817}, "inlineline_break_on_colon", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
8818
8819}
8820private function parseredirect_word($silence) {
8821return $this->traceCall(function($silence) {
8822  $key = 318;
8823  $bucket = $this->currPos;
8824  $cached = $this->cache[$bucket][$key] ?? null;
8825  if ($cached) {
8826    $this->currPos = $cached->nextPos;
8827
8828    return $cached->result;
8829  }
8830
8831  $p1 = $this->currPos;
8832  // start seq_1
8833  $p3 = $this->currPos;
8834  for (;;) {
8835    if (strspn($this->input, " \x09\x0a\x0d\x00\x0b", $this->currPos, 1) !== 0) {
8836      $r5 = $this->input[$this->currPos++];
8837    } else {
8838      $r5 = self::$FAILED;
8839      if (!$silence) {$this->fail(57);}
8840      break;
8841    }
8842  }
8843  // free $r5
8844  $r4 = true;
8845  if ($r4===self::$FAILED) {
8846    $r2 = self::$FAILED;
8847    goto seq_1;
8848  }
8849  // free $r4
8850  $p6 = $this->currPos;
8851  $r4 = self::$FAILED;
8852  for (;;) {
8853    if (strcspn($this->input, " \x09\x0a\x0d\x0c:[", $this->currPos, 1) !== 0) {
8854      $r5 = self::consumeChar($this->input, $this->currPos);
8855      $r4 = true;
8856    } else {
8857      $r5 = self::$FAILED;
8858      if (!$silence) {$this->fail(58);}
8859      break;
8860    }
8861  }
8862  // rw <- $r4
8863  if ($r4!==self::$FAILED) {
8864    $r4 = substr($this->input, $p6, $this->currPos - $p6);
8865  } else {
8866    $r4 = self::$FAILED;
8867    $this->currPos = $p3;
8868    $r2 = self::$FAILED;
8869    goto seq_1;
8870  }
8871  // free $r5
8872  // free $p6
8873  $this->savedPos = $this->currPos;
8874  $r5 = $this->a80($r4);
8875  if ($r5) {
8876    $r5 = false;
8877  } else {
8878    $r5 = self::$FAILED;
8879    $this->currPos = $p3;
8880    $r2 = self::$FAILED;
8881    goto seq_1;
8882  }
8883  $r2 = true;
8884  seq_1:
8885  if ($r2!==self::$FAILED) {
8886    $r2 = substr($this->input, $p1, $this->currPos - $p1);
8887  } else {
8888    $r2 = self::$FAILED;
8889  }
8890  // free $p3
8891  // free $p1
8892  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
8893    $this->currPos,
8894    $r2,
8895    self::$UNDEFINED,
8896    self::$UNDEFINED
8897  );
8898  return $r2;
8899}, "redirect_word", ["\$silence"], [$silence]);
8900
8901}
8902private function parseinclude_limits($silence, $boolParams, &$param_preproc, &$param_th) {
8903return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
8904  $key = json_encode([546, $boolParams & 0x7ebf, $param_preproc, $param_th]);
8905  $bucket = $this->currPos;
8906  $cached = $this->cache[$bucket][$key] ?? null;
8907  if ($cached) {
8908    $this->currPos = $cached->nextPos;
8909    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
8910    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
8911    return $cached->result;
8912  }
8913  $saved_preproc=$param_preproc;
8914  $saved_th=$param_th;
8915  $p2 = $this->currPos;
8916  // start seq_1
8917  $p3 = $this->currPos;
8918  $p4 = $this->currPos;
8919  $r5 = $this->discardinclude_check(true, $boolParams);
8920  if ($r5!==self::$FAILED) {
8921    $r5 = false;
8922    $this->currPos = $p4;
8923  } else {
8924    $r1 = self::$FAILED;
8925    goto seq_1;
8926  }
8927  // free $p4
8928  $r6 = $this->parsexmlish_tag($silence, $boolParams | 0x2, $param_preproc, $param_th);
8929  // t <- $r6
8930  if ($r6===self::$FAILED) {
8931    $this->currPos = $p3;
8932    $r1 = self::$FAILED;
8933    goto seq_1;
8934  }
8935  $r1 = true;
8936  seq_1:
8937  if ($r1!==self::$FAILED) {
8938    $this->savedPos = $p2;
8939    $r1 = $this->a81($r6);
8940  }
8941  // free $p3
8942  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
8943    $this->currPos,
8944    $r1,
8945    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
8946    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
8947  );
8948  return $r1;
8949}, "include_limits", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
8950
8951}
8952private function parseannotation_tag($silence, $boolParams, &$param_preproc, &$param_th) {
8953return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
8954  $key = json_encode([450, $boolParams & 0x7ebf, $param_preproc, $param_th]);
8955  $bucket = $this->currPos;
8956  $cached = $this->cache[$bucket][$key] ?? null;
8957  if ($cached) {
8958    $this->currPos = $cached->nextPos;
8959    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
8960    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
8961    return $cached->result;
8962  }
8963  $saved_preproc=$param_preproc;
8964  $saved_th=$param_th;
8965  $p2 = $this->currPos;
8966  // start seq_1
8967  $p3 = $this->currPos;
8968  $this->savedPos = $this->currPos;
8969  $r4 = $this->a82();
8970  if ($r4) {
8971    $r4 = false;
8972  } else {
8973    $r4 = self::$FAILED;
8974    $r1 = self::$FAILED;
8975    goto seq_1;
8976  }
8977  // start choice_1
8978  $r5 = $this->parsetvar_old_syntax_closing_HACK($silence, $boolParams);
8979  if ($r5!==self::$FAILED) {
8980    goto choice_1;
8981  }
8982  $p6 = $this->currPos;
8983  // start seq_2
8984  $p7 = $this->currPos;
8985  $p8 = $this->currPos;
8986  $r9 = $this->discardannotation_check(true, $boolParams);
8987  if ($r9!==self::$FAILED) {
8988    $r9 = false;
8989    $this->currPos = $p8;
8990  } else {
8991    $r5 = self::$FAILED;
8992    goto seq_2;
8993  }
8994  // free $p8
8995  $r10 = $this->parsexmlish_tag($silence, $boolParams | 0x2, $param_preproc, $param_th);
8996  // t <- $r10
8997  if ($r10===self::$FAILED) {
8998    $this->currPos = $p7;
8999    $r5 = self::$FAILED;
9000    goto seq_2;
9001  }
9002  $r5 = true;
9003  seq_2:
9004  if ($r5!==self::$FAILED) {
9005    $this->savedPos = $p6;
9006    $r5 = $this->a83($r10);
9007  }
9008  // free $p7
9009  choice_1:
9010  // tag <- $r5
9011  if ($r5===self::$FAILED) {
9012    $this->currPos = $p3;
9013    $r1 = self::$FAILED;
9014    goto seq_1;
9015  }
9016  $r1 = true;
9017  seq_1:
9018  if ($r1!==self::$FAILED) {
9019    $this->savedPos = $p2;
9020    $r1 = $this->a84($r5);
9021  }
9022  // free $p3
9023  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
9024    $this->currPos,
9025    $r1,
9026    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
9027    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
9028  );
9029  return $r1;
9030}, "annotation_tag", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
9031
9032}
9033private function parseheading($silence, $boolParams, &$param_preproc, &$param_th) {
9034return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
9035  $key = json_encode([346, $boolParams & 0x7fff, $param_preproc, $param_th]);
9036  $bucket = $this->currPos;
9037  $cached = $this->cache[$bucket][$key] ?? null;
9038  if ($cached) {
9039    $this->currPos = $cached->nextPos;
9040    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
9041    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
9042    return $cached->result;
9043  }
9044  $saved_preproc=$param_preproc;
9045  $saved_th=$param_th;
9046  $p2 = $this->currPos;
9047  // start seq_1
9048  $p3 = $this->currPos;
9049  $p4 = $this->currPos;
9050  if (($this->input[$this->currPos] ?? null) === "=") {
9051    $this->currPos++;
9052    $r5 = "=";
9053    $r5 = false;
9054    $this->currPos = $p4;
9055  } else {
9056    $r5 = self::$FAILED;
9057    $r1 = self::$FAILED;
9058    goto seq_1;
9059  }
9060  // free $p4
9061  $p4 = $this->currPos;
9062  // start seq_2
9063  $p7 = $this->currPos;
9064  $p9 = $this->currPos;
9065  $r8 = self::$FAILED;
9066  for (;;) {
9067    if (($this->input[$this->currPos] ?? null) === "=") {
9068      $this->currPos++;
9069      $r10 = "=";
9070      $r8 = true;
9071    } else {
9072      if (!$silence) {$this->fail(23);}
9073      $r10 = self::$FAILED;
9074      break;
9075    }
9076  }
9077  // s <- $r8
9078  if ($r8!==self::$FAILED) {
9079    $r8 = substr($this->input, $p9, $this->currPos - $p9);
9080  } else {
9081    $r8 = self::$FAILED;
9082    $r6 = self::$FAILED;
9083    goto seq_2;
9084  }
9085  // free $r10
9086  // free $p9
9087  // start seq_3
9088  $p9 = $this->currPos;
9089  $p12 = $this->currPos;
9090  $r13 = $this->parseinlineline($silence, $boolParams | 0x4, $param_preproc, $param_th);
9091  if ($r13===self::$FAILED) {
9092    $r13 = null;
9093  }
9094  // ill <- $r13
9095  $r11 = $r13;
9096  if ($r11!==self::$FAILED) {
9097    $this->savedPos = $p12;
9098    $r11 = $this->a85($r8, $r13);
9099  } else {
9100    $r10 = self::$FAILED;
9101    goto seq_3;
9102  }
9103  $p14 = $this->currPos;
9104  $r15 = self::$FAILED;
9105  for (;;) {
9106    if (($this->input[$this->currPos] ?? null) === "=") {
9107      $this->currPos++;
9108      $r16 = "=";
9109      $r15 = true;
9110    } else {
9111      if (!$silence) {$this->fail(23);}
9112      $r16 = self::$FAILED;
9113      break;
9114    }
9115  }
9116  if ($r15!==self::$FAILED) {
9117    $r15 = substr($this->input, $p14, $this->currPos - $p14);
9118  } else {
9119    $r15 = self::$FAILED;
9120    $this->currPos = $p9;
9121    $r10 = self::$FAILED;
9122    goto seq_3;
9123  }
9124  // free $r16
9125  // free $p14
9126  $r10 = [$r11,$r15];
9127  seq_3:
9128  if ($r10===self::$FAILED) {
9129    $r10 = null;
9130  }
9131  // free $p9
9132  // ce <- $r10
9133  $this->savedPos = $this->currPos;
9134  $r16 = $this->a86($r8, $r10);
9135  if ($r16) {
9136    $r16 = false;
9137  } else {
9138    $r16 = self::$FAILED;
9139    $this->currPos = $p7;
9140    $r6 = self::$FAILED;
9141    goto seq_2;
9142  }
9143  $p9 = $this->currPos;
9144  $r17 = '';
9145  // endTPos <- $r17
9146  if ($r17!==self::$FAILED) {
9147    $this->savedPos = $p9;
9148    $r17 = $this->a87($r8, $r10);
9149  } else {
9150    $this->currPos = $p7;
9151    $r6 = self::$FAILED;
9152    goto seq_2;
9153  }
9154  $r18 = [];
9155  for (;;) {
9156    // start choice_1
9157    $r19 = $this->parsespace($silence);
9158    if ($r19!==self::$FAILED) {
9159      goto choice_1;
9160    }
9161    $r19 = $this->parsesol_transparent($silence, $boolParams, $param_preproc, $param_th);
9162    choice_1:
9163    if ($r19!==self::$FAILED) {
9164      $r18[] = $r19;
9165    } else {
9166      break;
9167    }
9168  }
9169  // spc <- $r18
9170  // free $r19
9171  $p14 = $this->currPos;
9172  $r19 = $this->discardeolf(true);
9173  if ($r19!==self::$FAILED) {
9174    $r19 = false;
9175    $this->currPos = $p14;
9176  } else {
9177    $this->currPos = $p7;
9178    $r6 = self::$FAILED;
9179    goto seq_2;
9180  }
9181  // free $p14
9182  $r6 = true;
9183  seq_2:
9184  // r <- $r6
9185  if ($r6!==self::$FAILED) {
9186    $this->savedPos = $p4;
9187    $r6 = $this->a88($r8, $r10, $r17, $r18);
9188  } else {
9189    $this->currPos = $p3;
9190    $r1 = self::$FAILED;
9191    goto seq_1;
9192  }
9193  // free $p7
9194  $r1 = true;
9195  seq_1:
9196  if ($r1!==self::$FAILED) {
9197    $this->savedPos = $p2;
9198    $r1 = $this->a23($r6);
9199  }
9200  // free $p3
9201  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
9202    $this->currPos,
9203    $r1,
9204    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
9205    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
9206  );
9207  return $r1;
9208}, "heading", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
9209
9210}
9211private function parsehr($silence, $boolParams, &$param_preproc, &$param_th) {
9212return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
9213  $key = json_encode([330, $boolParams & 0x7ebf, $param_preproc, $param_th]);
9214  $bucket = $this->currPos;
9215  $cached = $this->cache[$bucket][$key] ?? null;
9216  if ($cached) {
9217    $this->currPos = $cached->nextPos;
9218    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
9219    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
9220    return $cached->result;
9221  }
9222  $saved_preproc=$param_preproc;
9223  $saved_th=$param_th;
9224  $p2 = $this->currPos;
9225  // start seq_1
9226  $p3 = $this->currPos;
9227  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "----", $this->currPos, 4, false) === 0) {
9228    $r4 = "----";
9229    $this->currPos += 4;
9230  } else {
9231    if (!$silence) {$this->fail(59);}
9232    $r4 = self::$FAILED;
9233    $r1 = self::$FAILED;
9234    goto seq_1;
9235  }
9236  $p6 = $this->currPos;
9237  for (;;) {
9238    if (($this->input[$this->currPos] ?? null) === "-") {
9239      $this->currPos++;
9240      $r7 = "-";
9241    } else {
9242      if (!$silence) {$this->fail(55);}
9243      $r7 = self::$FAILED;
9244      break;
9245    }
9246  }
9247  // free $r7
9248  $r5 = true;
9249  // d <- $r5
9250  if ($r5!==self::$FAILED) {
9251    $r5 = substr($this->input, $p6, $this->currPos - $p6);
9252  } else {
9253    $r5 = self::$FAILED;
9254    $this->currPos = $p3;
9255    $r1 = self::$FAILED;
9256    goto seq_1;
9257  }
9258  // free $p6
9259  // start choice_1
9260  $p6 = $this->currPos;
9261  // start seq_2
9262  $p8 = $this->currPos;
9263  $p9 = $this->currPos;
9264  $r10 = $this->discardsol(true, $boolParams, $param_preproc, $param_th);
9265  if ($r10!==self::$FAILED) {
9266    $r10 = false;
9267    $this->currPos = $p9;
9268  } else {
9269    $r7 = self::$FAILED;
9270    goto seq_2;
9271  }
9272  // free $p9
9273  $r7 = true;
9274  seq_2:
9275  if ($r7!==self::$FAILED) {
9276    $this->savedPos = $p6;
9277    $r7 = $this->a89($r5);
9278    goto choice_1;
9279  }
9280  // free $p8
9281  $p8 = $this->currPos;
9282  $r7 = '';
9283  if ($r7!==self::$FAILED) {
9284    $this->savedPos = $p8;
9285    $r7 = $this->a90($r5);
9286  }
9287  choice_1:
9288  // lineContent <- $r7
9289  if ($r7===self::$FAILED) {
9290    $this->currPos = $p3;
9291    $r1 = self::$FAILED;
9292    goto seq_1;
9293  }
9294  $r1 = true;
9295  seq_1:
9296  if ($r1!==self::$FAILED) {
9297    $this->savedPos = $p2;
9298    $r1 = $this->a91($r5, $r7);
9299  }
9300  // free $p3
9301  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
9302    $this->currPos,
9303    $r1,
9304    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
9305    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
9306  );
9307  return $r1;
9308}, "hr", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
9309
9310}
9311private function parsetable_line($silence, $boolParams, &$param_preproc, &$param_th) {
9312return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
9313  $key = json_encode([508, $boolParams & 0x7fff, $param_preproc, $param_th]);
9314  $bucket = $this->currPos;
9315  $cached = $this->cache[$bucket][$key] ?? null;
9316  if ($cached) {
9317    $this->currPos = $cached->nextPos;
9318    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
9319    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
9320    return $cached->result;
9321  }
9322  $saved_preproc=$param_preproc;
9323  $saved_th=$param_th;
9324  $p2 = $this->currPos;
9325  // start seq_1
9326  $p3 = $this->currPos;
9327  $r4 = [];
9328  for (;;) {
9329    $r5 = $this->parsespace_or_comment($silence);
9330    if ($r5!==self::$FAILED) {
9331      $r4[] = $r5;
9332    } else {
9333      break;
9334    }
9335  }
9336  // sc <- $r4
9337  // free $r5
9338  $p6 = $this->currPos;
9339  $r5 = $this->discardinline_breaks(true, $boolParams, $param_preproc, $param_th);
9340  if ($r5 === self::$FAILED) {
9341    $r5 = false;
9342  } else {
9343    $r5 = self::$FAILED;
9344    $this->currPos = $p6;
9345    $this->currPos = $p3;
9346    $r1 = self::$FAILED;
9347    goto seq_1;
9348  }
9349  // free $p6
9350  // start choice_1
9351  $r7 = $this->parsetable_start_tag($silence, $boolParams, $param_preproc, $param_th);
9352  if ($r7!==self::$FAILED) {
9353    goto choice_1;
9354  }
9355  $r7 = $this->parsetable_content_line($silence, $boolParams | 0x40, $param_preproc, $param_th);
9356  if ($r7!==self::$FAILED) {
9357    goto choice_1;
9358  }
9359  $r7 = $this->parsetable_end_tag($silence);
9360  choice_1:
9361  // tl <- $r7
9362  if ($r7===self::$FAILED) {
9363    $this->currPos = $p3;
9364    $r1 = self::$FAILED;
9365    goto seq_1;
9366  }
9367  $r1 = true;
9368  seq_1:
9369  if ($r1!==self::$FAILED) {
9370    $this->savedPos = $p2;
9371    $r1 = $this->a92($r4, $r7);
9372  }
9373  // free $p3
9374  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
9375    $this->currPos,
9376    $r1,
9377    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
9378    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
9379  );
9380  return $r1;
9381}, "table_line", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
9382
9383}
9384private function parsesol_prefix($silence) {
9385return $this->traceCall(function($silence) {
9386  $key = 608;
9387  $bucket = $this->currPos;
9388  $cached = $this->cache[$bucket][$key] ?? null;
9389  if ($cached) {
9390    $this->currPos = $cached->nextPos;
9391
9392    return $cached->result;
9393  }
9394
9395  // start choice_1
9396  $r1 = $this->parsenewlineToken($silence);
9397  if ($r1!==self::$FAILED) {
9398    goto choice_1;
9399  }
9400  $p2 = $this->currPos;
9401  $this->savedPos = $this->currPos;
9402  $r1 = $this->a93();
9403  if ($r1) {
9404    $r1 = false;
9405    $this->savedPos = $p2;
9406    $r1 = $this->a94();
9407  } else {
9408    $r1 = self::$FAILED;
9409  }
9410  choice_1:
9411  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
9412    $this->currPos,
9413    $r1,
9414    self::$UNDEFINED,
9415    self::$UNDEFINED
9416  );
9417  return $r1;
9418}, "sol_prefix", ["\$silence"], [$silence]);
9419
9420}
9421private function parseempty_lines_with_comments($silence) {
9422return $this->traceCall(function($silence) {
9423  $key = 610;
9424  $bucket = $this->currPos;
9425  $cached = $this->cache[$bucket][$key] ?? null;
9426  if ($cached) {
9427    $this->currPos = $cached->nextPos;
9428
9429    return $cached->result;
9430  }
9431
9432  $p2 = $this->currPos;
9433  // start seq_1
9434  $p3 = $this->currPos;
9435  $p5 = $this->currPos;
9436  $r4 = '';
9437  // p <- $r4
9438  if ($r4!==self::$FAILED) {
9439    $this->savedPos = $p5;
9440    $r4 = $this->a16();
9441  } else {
9442    $r1 = self::$FAILED;
9443    goto seq_1;
9444  }
9445  $r6 = [];
9446  for (;;) {
9447    // start seq_2
9448    $p8 = $this->currPos;
9449    $r9 = [];
9450    for (;;) {
9451      $r10 = $this->parsespace($silence);
9452      if ($r10!==self::$FAILED) {
9453        $r9[] = $r10;
9454      } else {
9455        break;
9456      }
9457    }
9458    // free $r10
9459    $r10 = $this->parsecomment($silence);
9460    if ($r10===self::$FAILED) {
9461      $this->currPos = $p8;
9462      $r7 = self::$FAILED;
9463      goto seq_2;
9464    }
9465    $r11 = [];
9466    for (;;) {
9467      $r12 = $this->parsespace_or_comment($silence);
9468      if ($r12!==self::$FAILED) {
9469        $r11[] = $r12;
9470      } else {
9471        break;
9472      }
9473    }
9474    // free $r12
9475    $r12 = $this->parsenewline($silence);
9476    if ($r12===self::$FAILED) {
9477      $this->currPos = $p8;
9478      $r7 = self::$FAILED;
9479      goto seq_2;
9480    }
9481    $r7 = [$r9,$r10,$r11,$r12];
9482    seq_2:
9483    if ($r7!==self::$FAILED) {
9484      $r6[] = $r7;
9485    } else {
9486      break;
9487    }
9488    // free $p8
9489  }
9490  if (count($r6) === 0) {
9491    $r6 = self::$FAILED;
9492  }
9493  // c <- $r6
9494  if ($r6===self::$FAILED) {
9495    $this->currPos = $p3;
9496    $r1 = self::$FAILED;
9497    goto seq_1;
9498  }
9499  // free $r7
9500  $r1 = true;
9501  seq_1:
9502  if ($r1!==self::$FAILED) {
9503    $this->savedPos = $p2;
9504    $r1 = $this->a95($r4, $r6);
9505  }
9506  // free $p3
9507  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
9508    $this->currPos,
9509    $r1,
9510    self::$UNDEFINED,
9511    self::$UNDEFINED
9512  );
9513  return $r1;
9514}, "empty_lines_with_comments", ["\$silence"], [$silence]);
9515
9516}
9517private function discardtplarg_preproc($silence, $boolParams, &$param_preproc, &$param_th) {
9518return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
9519  $key = json_encode([391, $boolParams & 0x7fff, $param_preproc, $param_th]);
9520  $bucket = $this->currPos;
9521  $cached = $this->cache[$bucket][$key] ?? null;
9522  if ($cached) {
9523    $this->currPos = $cached->nextPos;
9524    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
9525    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
9526    return $cached->result;
9527  }
9528  $saved_preproc=$param_preproc;
9529  $saved_th=$param_th;
9530  $p2 = $this->currPos;
9531  // start seq_1
9532  $p3 = $this->currPos;
9533  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "{{{", $this->currPos, 3, false) === 0) {
9534    $r4 = "{{{";
9535    $this->currPos += 3;
9536  } else {
9537    if (!$silence) {$this->fail(60);}
9538    $r4 = self::$FAILED;
9539    $r1 = self::$FAILED;
9540    goto seq_1;
9541  }
9542  for (;;) {
9543    $r6 = $this->discardnl_comment_space($silence);
9544    if ($r6===self::$FAILED) {
9545      break;
9546    }
9547  }
9548  // free $r6
9549  $r5 = true;
9550  if ($r5===self::$FAILED) {
9551    $this->currPos = $p3;
9552    $r1 = self::$FAILED;
9553    goto seq_1;
9554  }
9555  // free $r5
9556  $p7 = $this->currPos;
9557  $r5 = '';
9558  // p <- $r5
9559  if ($r5!==self::$FAILED) {
9560    $this->savedPos = $p7;
9561    $r5 = $this->a16();
9562  } else {
9563    $this->currPos = $p3;
9564    $r1 = self::$FAILED;
9565    goto seq_1;
9566  }
9567  $r6 = $this->parseinlineline_in_tpls($silence, $boolParams, $param_preproc, $param_th);
9568  if ($r6===self::$FAILED) {
9569    $r6 = null;
9570  }
9571  // target <- $r6
9572  $r8 = [];
9573  for (;;) {
9574    $p10 = $this->currPos;
9575    // start seq_2
9576    $p11 = $this->currPos;
9577    for (;;) {
9578      $r13 = $this->discardnl_comment_space($silence);
9579      if ($r13===self::$FAILED) {
9580        break;
9581      }
9582    }
9583    // free $r13
9584    $r12 = true;
9585    if ($r12===self::$FAILED) {
9586      $r9 = self::$FAILED;
9587      goto seq_2;
9588    }
9589    // free $r12
9590    if (($this->input[$this->currPos] ?? null) === "|") {
9591      $this->currPos++;
9592      $r12 = "|";
9593    } else {
9594      if (!$silence) {$this->fail(10);}
9595      $r12 = self::$FAILED;
9596      $this->currPos = $p11;
9597      $r9 = self::$FAILED;
9598      goto seq_2;
9599    }
9600    // start choice_1
9601    $p14 = $this->currPos;
9602    // start seq_3
9603    $p15 = $this->currPos;
9604    $p17 = $this->currPos;
9605    $r16 = '';
9606    // p0 <- $r16
9607    if ($r16!==self::$FAILED) {
9608      $this->savedPos = $p17;
9609      $r16 = $this->a96($r5, $r6);
9610    } else {
9611      $r13 = self::$FAILED;
9612      goto seq_3;
9613    }
9614    $r18 = [];
9615    for (;;) {
9616      $r19 = $this->parsenl_comment_space($silence);
9617      if ($r19!==self::$FAILED) {
9618        $r18[] = $r19;
9619      } else {
9620        break;
9621      }
9622    }
9623    // v <- $r18
9624    // free $r19
9625    $p20 = $this->currPos;
9626    $r19 = '';
9627    // p1 <- $r19
9628    if ($r19!==self::$FAILED) {
9629      $this->savedPos = $p20;
9630      $r19 = $this->a97($r5, $r6, $r16, $r18);
9631    } else {
9632      $this->currPos = $p15;
9633      $r13 = self::$FAILED;
9634      goto seq_3;
9635    }
9636    $p21 = $this->currPos;
9637    // start choice_2
9638    if (($this->input[$this->currPos] ?? null) === "|") {
9639      $this->currPos++;
9640      $r22 = "|";
9641      goto choice_2;
9642    } else {
9643      $r22 = self::$FAILED;
9644    }
9645    if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "}}}", $this->currPos, 3, false) === 0) {
9646      $r22 = "}}}";
9647      $this->currPos += 3;
9648    } else {
9649      $r22 = self::$FAILED;
9650    }
9651    choice_2:
9652    if ($r22!==self::$FAILED) {
9653      $r22 = false;
9654      $this->currPos = $p21;
9655    } else {
9656      $this->currPos = $p15;
9657      $r13 = self::$FAILED;
9658      goto seq_3;
9659    }
9660    // free $p21
9661    $r13 = true;
9662    seq_3:
9663    if ($r13!==self::$FAILED) {
9664      $this->savedPos = $p14;
9665      $r13 = $this->a98($r5, $r6, $r16, $r18, $r19);
9666      goto choice_1;
9667    }
9668    // free $p15
9669    $r13 = $this->parsetemplate_param_value($silence, $boolParams, $param_preproc, $param_th);
9670    choice_1:
9671    // r <- $r13
9672    if ($r13===self::$FAILED) {
9673      $this->currPos = $p11;
9674      $r9 = self::$FAILED;
9675      goto seq_2;
9676    }
9677    $r9 = true;
9678    seq_2:
9679    if ($r9!==self::$FAILED) {
9680      $this->savedPos = $p10;
9681      $r9 = $this->a99($r5, $r6, $r13);
9682      $r8[] = $r9;
9683    } else {
9684      break;
9685    }
9686    // free $p11
9687  }
9688  // params <- $r8
9689  // free $r9
9690  for (;;) {
9691    $r23 = $this->discardnl_comment_space($silence);
9692    if ($r23===self::$FAILED) {
9693      break;
9694    }
9695  }
9696  // free $r23
9697  $r9 = true;
9698  if ($r9===self::$FAILED) {
9699    $this->currPos = $p3;
9700    $r1 = self::$FAILED;
9701    goto seq_1;
9702  }
9703  // free $r9
9704  $r9 = $this->discardinline_breaks($silence, $boolParams, $param_preproc, $param_th);
9705  if ($r9===self::$FAILED) {
9706    $this->currPos = $p3;
9707    $r1 = self::$FAILED;
9708    goto seq_1;
9709  }
9710  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "}}}", $this->currPos, 3, false) === 0) {
9711    $r23 = "}}}";
9712    $this->currPos += 3;
9713  } else {
9714    if (!$silence) {$this->fail(61);}
9715    $r23 = self::$FAILED;
9716    $this->currPos = $p3;
9717    $r1 = self::$FAILED;
9718    goto seq_1;
9719  }
9720  $r1 = true;
9721  seq_1:
9722  if ($r1!==self::$FAILED) {
9723    $this->savedPos = $p2;
9724    $r1 = $this->a100($r5, $r6, $r8);
9725  }
9726  // free $p3
9727  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
9728    $this->currPos,
9729    $r1,
9730    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
9731    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
9732  );
9733  return $r1;
9734}, "tplarg_preproc", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
9735
9736}
9737private function parsetemplate_preproc($silence, $boolParams, &$param_preproc, &$param_th) {
9738return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
9739  $key = json_encode([384, $boolParams & 0x7fff, $param_preproc, $param_th]);
9740  $bucket = $this->currPos;
9741  $cached = $this->cache[$bucket][$key] ?? null;
9742  if ($cached) {
9743    $this->currPos = $cached->nextPos;
9744    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
9745    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
9746    return $cached->result;
9747  }
9748  $saved_preproc=$param_preproc;
9749  $saved_th=$param_th;
9750  // start choice_1
9751  $p2 = $this->currPos;
9752  // start seq_1
9753  $p3 = $this->currPos;
9754  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "{{", $this->currPos, 2, false) === 0) {
9755    $r4 = "{{";
9756    $this->currPos += 2;
9757  } else {
9758    if (!$silence) {$this->fail(43);}
9759    $r4 = self::$FAILED;
9760    $r1 = self::$FAILED;
9761    goto seq_1;
9762  }
9763  for (;;) {
9764    $r6 = $this->discardnl_comment_space($silence);
9765    if ($r6===self::$FAILED) {
9766      break;
9767    }
9768  }
9769  // free $r6
9770  $r5 = true;
9771  if ($r5===self::$FAILED) {
9772    $this->currPos = $p3;
9773    $r1 = self::$FAILED;
9774    goto seq_1;
9775  }
9776  // free $r5
9777  // start choice_2
9778  $r5 = $this->parseinlineline_in_tpls($silence, $boolParams, $param_preproc, $param_th);
9779  if ($r5!==self::$FAILED) {
9780    goto choice_2;
9781  }
9782  $r5 = $this->parseparsoid_fragment_marker($silence);
9783  choice_2:
9784  // target <- $r5
9785  if ($r5===self::$FAILED) {
9786    $this->currPos = $p3;
9787    $r1 = self::$FAILED;
9788    goto seq_1;
9789  }
9790  $r6 = [];
9791  for (;;) {
9792    $p8 = $this->currPos;
9793    // start seq_2
9794    $p9 = $this->currPos;
9795    for (;;) {
9796      $r11 = $this->discardnl_comment_space($silence);
9797      if ($r11===self::$FAILED) {
9798        break;
9799      }
9800    }
9801    // free $r11
9802    $r10 = true;
9803    if ($r10===self::$FAILED) {
9804      $r7 = self::$FAILED;
9805      goto seq_2;
9806    }
9807    // free $r10
9808    if (($this->input[$this->currPos] ?? null) === "|") {
9809      $this->currPos++;
9810      $r10 = "|";
9811    } else {
9812      if (!$silence) {$this->fail(10);}
9813      $r10 = self::$FAILED;
9814      $this->currPos = $p9;
9815      $r7 = self::$FAILED;
9816      goto seq_2;
9817    }
9818    // start choice_3
9819    $p12 = $this->currPos;
9820    // start seq_3
9821    $p13 = $this->currPos;
9822    $p15 = $this->currPos;
9823    $r14 = '';
9824    // p0 <- $r14
9825    if ($r14!==self::$FAILED) {
9826      $this->savedPos = $p15;
9827      $r14 = $this->a101($r5);
9828    } else {
9829      $r11 = self::$FAILED;
9830      goto seq_3;
9831    }
9832    $r16 = [];
9833    for (;;) {
9834      $r17 = $this->parsenl_comment_space($silence);
9835      if ($r17!==self::$FAILED) {
9836        $r16[] = $r17;
9837      } else {
9838        break;
9839      }
9840    }
9841    // v <- $r16
9842    // free $r17
9843    $p18 = $this->currPos;
9844    $r17 = '';
9845    // p1 <- $r17
9846    if ($r17!==self::$FAILED) {
9847      $this->savedPos = $p18;
9848      $r17 = $this->a102($r5, $r14, $r16);
9849    } else {
9850      $this->currPos = $p13;
9851      $r11 = self::$FAILED;
9852      goto seq_3;
9853    }
9854    $p19 = $this->currPos;
9855    // start choice_4
9856    if (($this->input[$this->currPos] ?? null) === "|") {
9857      $this->currPos++;
9858      $r20 = "|";
9859      goto choice_4;
9860    } else {
9861      $r20 = self::$FAILED;
9862    }
9863    if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "}}", $this->currPos, 2, false) === 0) {
9864      $r20 = "}}";
9865      $this->currPos += 2;
9866    } else {
9867      $r20 = self::$FAILED;
9868    }
9869    choice_4:
9870    if ($r20!==self::$FAILED) {
9871      $r20 = false;
9872      $this->currPos = $p19;
9873    } else {
9874      $this->currPos = $p13;
9875      $r11 = self::$FAILED;
9876      goto seq_3;
9877    }
9878    // free $p19
9879    $r11 = true;
9880    seq_3:
9881    if ($r11!==self::$FAILED) {
9882      $this->savedPos = $p12;
9883      $r11 = $this->a103($r5, $r14, $r16, $r17);
9884      goto choice_3;
9885    }
9886    // free $p13
9887    $r11 = $this->parsetemplate_param($silence, $boolParams, $param_preproc, $param_th);
9888    choice_3:
9889    // r <- $r11
9890    if ($r11===self::$FAILED) {
9891      $this->currPos = $p9;
9892      $r7 = self::$FAILED;
9893      goto seq_2;
9894    }
9895    $r7 = true;
9896    seq_2:
9897    if ($r7!==self::$FAILED) {
9898      $this->savedPos = $p8;
9899      $r7 = $this->a104($r5, $r11);
9900      $r6[] = $r7;
9901    } else {
9902      break;
9903    }
9904    // free $p9
9905  }
9906  // params <- $r6
9907  // free $r7
9908  for (;;) {
9909    $r21 = $this->discardnl_comment_space($silence);
9910    if ($r21===self::$FAILED) {
9911      break;
9912    }
9913  }
9914  // free $r21
9915  $r7 = true;
9916  if ($r7===self::$FAILED) {
9917    $this->currPos = $p3;
9918    $r1 = self::$FAILED;
9919    goto seq_1;
9920  }
9921  // free $r7
9922  $r7 = $this->discardinline_breaks($silence, $boolParams, $param_preproc, $param_th);
9923  if ($r7===self::$FAILED) {
9924    $this->currPos = $p3;
9925    $r1 = self::$FAILED;
9926    goto seq_1;
9927  }
9928  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "}}", $this->currPos, 2, false) === 0) {
9929    $r21 = "}}";
9930    $this->currPos += 2;
9931  } else {
9932    if (!$silence) {$this->fail(62);}
9933    $r21 = self::$FAILED;
9934    $this->currPos = $p3;
9935    $r1 = self::$FAILED;
9936    goto seq_1;
9937  }
9938  $r1 = true;
9939  seq_1:
9940  if ($r1!==self::$FAILED) {
9941    $this->savedPos = $p2;
9942    $r1 = $this->a105($r5, $r6);
9943    goto choice_1;
9944  }
9945  // free $p3
9946  $p3 = $this->currPos;
9947  // start seq_4
9948  $p9 = $this->currPos;
9949  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "{{", $this->currPos, 2, false) === 0) {
9950    $r22 = "{{";
9951    $this->currPos += 2;
9952  } else {
9953    if (!$silence) {$this->fail(43);}
9954    $r22 = self::$FAILED;
9955    $r1 = self::$FAILED;
9956    goto seq_4;
9957  }
9958  for (;;) {
9959    $r24 = $this->discardspace_or_newline($silence);
9960    if ($r24===self::$FAILED) {
9961      break;
9962    }
9963  }
9964  // free $r24
9965  $r23 = true;
9966  if ($r23===self::$FAILED) {
9967    $this->currPos = $p9;
9968    $r1 = self::$FAILED;
9969    goto seq_4;
9970  }
9971  // free $r23
9972  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "}}", $this->currPos, 2, false) === 0) {
9973    $r23 = "}}";
9974    $this->currPos += 2;
9975  } else {
9976    if (!$silence) {$this->fail(62);}
9977    $r23 = self::$FAILED;
9978    $this->currPos = $p9;
9979    $r1 = self::$FAILED;
9980    goto seq_4;
9981  }
9982  $r1 = true;
9983  seq_4:
9984  if ($r1!==self::$FAILED) {
9985    $r1 = substr($this->input, $p3, $this->currPos - $p3);
9986  } else {
9987    $r1 = self::$FAILED;
9988  }
9989  // free $p9
9990  // free $p3
9991  choice_1:
9992  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
9993    $this->currPos,
9994    $r1,
9995    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
9996    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
9997  );
9998  return $r1;
9999}, "template_preproc", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
10000
10001}
10002private function parsetplarg_preproc($silence, $boolParams, &$param_preproc, &$param_th) {
10003return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
10004  $key = json_encode([390, $boolParams & 0x7fff, $param_preproc, $param_th]);
10005  $bucket = $this->currPos;
10006  $cached = $this->cache[$bucket][$key] ?? null;
10007  if ($cached) {
10008    $this->currPos = $cached->nextPos;
10009    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
10010    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
10011    return $cached->result;
10012  }
10013  $saved_preproc=$param_preproc;
10014  $saved_th=$param_th;
10015  $p2 = $this->currPos;
10016  // start seq_1
10017  $p3 = $this->currPos;
10018  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "{{{", $this->currPos, 3, false) === 0) {
10019    $r4 = "{{{";
10020    $this->currPos += 3;
10021  } else {
10022    if (!$silence) {$this->fail(60);}
10023    $r4 = self::$FAILED;
10024    $r1 = self::$FAILED;
10025    goto seq_1;
10026  }
10027  for (;;) {
10028    $r6 = $this->discardnl_comment_space($silence);
10029    if ($r6===self::$FAILED) {
10030      break;
10031    }
10032  }
10033  // free $r6
10034  $r5 = true;
10035  if ($r5===self::$FAILED) {
10036    $this->currPos = $p3;
10037    $r1 = self::$FAILED;
10038    goto seq_1;
10039  }
10040  // free $r5
10041  $p7 = $this->currPos;
10042  $r5 = '';
10043  // p <- $r5
10044  if ($r5!==self::$FAILED) {
10045    $this->savedPos = $p7;
10046    $r5 = $this->a16();
10047  } else {
10048    $this->currPos = $p3;
10049    $r1 = self::$FAILED;
10050    goto seq_1;
10051  }
10052  $r6 = $this->parseinlineline_in_tpls($silence, $boolParams, $param_preproc, $param_th);
10053  if ($r6===self::$FAILED) {
10054    $r6 = null;
10055  }
10056  // target <- $r6
10057  $r8 = [];
10058  for (;;) {
10059    $p10 = $this->currPos;
10060    // start seq_2
10061    $p11 = $this->currPos;
10062    for (;;) {
10063      $r13 = $this->discardnl_comment_space($silence);
10064      if ($r13===self::$FAILED) {
10065        break;
10066      }
10067    }
10068    // free $r13
10069    $r12 = true;
10070    if ($r12===self::$FAILED) {
10071      $r9 = self::$FAILED;
10072      goto seq_2;
10073    }
10074    // free $r12
10075    if (($this->input[$this->currPos] ?? null) === "|") {
10076      $this->currPos++;
10077      $r12 = "|";
10078    } else {
10079      if (!$silence) {$this->fail(10);}
10080      $r12 = self::$FAILED;
10081      $this->currPos = $p11;
10082      $r9 = self::$FAILED;
10083      goto seq_2;
10084    }
10085    // start choice_1
10086    $p14 = $this->currPos;
10087    // start seq_3
10088    $p15 = $this->currPos;
10089    $p17 = $this->currPos;
10090    $r16 = '';
10091    // p0 <- $r16
10092    if ($r16!==self::$FAILED) {
10093      $this->savedPos = $p17;
10094      $r16 = $this->a96($r5, $r6);
10095    } else {
10096      $r13 = self::$FAILED;
10097      goto seq_3;
10098    }
10099    $r18 = [];
10100    for (;;) {
10101      $r19 = $this->parsenl_comment_space($silence);
10102      if ($r19!==self::$FAILED) {
10103        $r18[] = $r19;
10104      } else {
10105        break;
10106      }
10107    }
10108    // v <- $r18
10109    // free $r19
10110    $p20 = $this->currPos;
10111    $r19 = '';
10112    // p1 <- $r19
10113    if ($r19!==self::$FAILED) {
10114      $this->savedPos = $p20;
10115      $r19 = $this->a97($r5, $r6, $r16, $r18);
10116    } else {
10117      $this->currPos = $p15;
10118      $r13 = self::$FAILED;
10119      goto seq_3;
10120    }
10121    $p21 = $this->currPos;
10122    // start choice_2
10123    if (($this->input[$this->currPos] ?? null) === "|") {
10124      $this->currPos++;
10125      $r22 = "|";
10126      goto choice_2;
10127    } else {
10128      $r22 = self::$FAILED;
10129    }
10130    if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "}}}", $this->currPos, 3, false) === 0) {
10131      $r22 = "}}}";
10132      $this->currPos += 3;
10133    } else {
10134      $r22 = self::$FAILED;
10135    }
10136    choice_2:
10137    if ($r22!==self::$FAILED) {
10138      $r22 = false;
10139      $this->currPos = $p21;
10140    } else {
10141      $this->currPos = $p15;
10142      $r13 = self::$FAILED;
10143      goto seq_3;
10144    }
10145    // free $p21
10146    $r13 = true;
10147    seq_3:
10148    if ($r13!==self::$FAILED) {
10149      $this->savedPos = $p14;
10150      $r13 = $this->a98($r5, $r6, $r16, $r18, $r19);
10151      goto choice_1;
10152    }
10153    // free $p15
10154    $r13 = $this->parsetemplate_param_value($silence, $boolParams, $param_preproc, $param_th);
10155    choice_1:
10156    // r <- $r13
10157    if ($r13===self::$FAILED) {
10158      $this->currPos = $p11;
10159      $r9 = self::$FAILED;
10160      goto seq_2;
10161    }
10162    $r9 = true;
10163    seq_2:
10164    if ($r9!==self::$FAILED) {
10165      $this->savedPos = $p10;
10166      $r9 = $this->a99($r5, $r6, $r13);
10167      $r8[] = $r9;
10168    } else {
10169      break;
10170    }
10171    // free $p11
10172  }
10173  // params <- $r8
10174  // free $r9
10175  for (;;) {
10176    $r23 = $this->discardnl_comment_space($silence);
10177    if ($r23===self::$FAILED) {
10178      break;
10179    }
10180  }
10181  // free $r23
10182  $r9 = true;
10183  if ($r9===self::$FAILED) {
10184    $this->currPos = $p3;
10185    $r1 = self::$FAILED;
10186    goto seq_1;
10187  }
10188  // free $r9
10189  $r9 = $this->discardinline_breaks($silence, $boolParams, $param_preproc, $param_th);
10190  if ($r9===self::$FAILED) {
10191    $this->currPos = $p3;
10192    $r1 = self::$FAILED;
10193    goto seq_1;
10194  }
10195  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "}}}", $this->currPos, 3, false) === 0) {
10196    $r23 = "}}}";
10197    $this->currPos += 3;
10198  } else {
10199    if (!$silence) {$this->fail(61);}
10200    $r23 = self::$FAILED;
10201    $this->currPos = $p3;
10202    $r1 = self::$FAILED;
10203    goto seq_1;
10204  }
10205  $r1 = true;
10206  seq_1:
10207  if ($r1!==self::$FAILED) {
10208    $this->savedPos = $p2;
10209    $r1 = $this->a100($r5, $r6, $r8);
10210  }
10211  // free $p3
10212  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
10213    $this->currPos,
10214    $r1,
10215    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
10216    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
10217  );
10218  return $r1;
10219}, "tplarg_preproc", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
10220
10221}
10222private function discardwikilink_preproc($silence, $boolParams, &$param_preproc, &$param_th) {
10223return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
10224  $key = json_encode([439, $boolParams & 0x7fff, $param_preproc, $param_th]);
10225  $bucket = $this->currPos;
10226  $cached = $this->cache[$bucket][$key] ?? null;
10227  if ($cached) {
10228    $this->currPos = $cached->nextPos;
10229    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
10230    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
10231    return $cached->result;
10232  }
10233  $saved_preproc=$param_preproc;
10234  $saved_th=$param_th;
10235  $p2 = $this->currPos;
10236  // start seq_1
10237  $p3 = $this->currPos;
10238  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "[[", $this->currPos, 2, false) === 0) {
10239    $r4 = "[[";
10240    $this->currPos += 2;
10241  } else {
10242    if (!$silence) {$this->fail(41);}
10243    $r4 = self::$FAILED;
10244    $r1 = self::$FAILED;
10245    goto seq_1;
10246  }
10247  $p6 = $this->currPos;
10248  $r5 = '';
10249  // spos <- $r5
10250  if ($r5!==self::$FAILED) {
10251    $this->savedPos = $p6;
10252    $r5 = $this->a16();
10253  } else {
10254    $this->currPos = $p3;
10255    $r1 = self::$FAILED;
10256    goto seq_1;
10257  }
10258  $r7 = $this->parsewikilink_preprocessor_text($silence, $boolParams, $param_preproc, $param_th);
10259  if ($r7===self::$FAILED) {
10260    $r7 = null;
10261  }
10262  // target <- $r7
10263  $p9 = $this->currPos;
10264  $r8 = '';
10265  // tpos <- $r8
10266  if ($r8!==self::$FAILED) {
10267    $this->savedPos = $p9;
10268    $r8 = $this->a106($r5, $r7);
10269  } else {
10270    $this->currPos = $p3;
10271    $r1 = self::$FAILED;
10272    goto seq_1;
10273  }
10274  // start choice_1
10275  $p11 = $this->currPos;
10276  // start seq_2
10277  $p12 = $this->currPos;
10278  $r13 = $this->parsewikilink_content($silence, $boolParams, $param_preproc, $param_th);
10279  // l <- $r13
10280  if ($r13===self::$FAILED) {
10281    $r10 = self::$FAILED;
10282    goto seq_2;
10283  }
10284  $r14 = $this->discardinline_breaks($silence, $boolParams, $param_preproc, $param_th);
10285  if ($r14===self::$FAILED) {
10286    $this->currPos = $p12;
10287    $r10 = self::$FAILED;
10288    goto seq_2;
10289  }
10290  $r10 = true;
10291  seq_2:
10292  if ($r10!==self::$FAILED) {
10293    $this->savedPos = $p11;
10294    $r10 = $this->a107($r5, $r7, $r8, $r13);
10295    goto choice_1;
10296  }
10297  // free $p12
10298  $p12 = $this->currPos;
10299  $r15 = $this->parseinlineline($silence, $boolParams, $param_preproc, $param_th);
10300  // l <- $r15
10301  $r10 = $r15;
10302  if ($r10!==self::$FAILED) {
10303    $this->savedPos = $p12;
10304    $r10 = $this->a108($r5, $r7, $r8, $r15);
10305  }
10306  choice_1:
10307  // lcs <- $r10
10308  if ($r10===self::$FAILED) {
10309    $this->currPos = $p3;
10310    $r1 = self::$FAILED;
10311    goto seq_1;
10312  }
10313  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "]]", $this->currPos, 2, false) === 0) {
10314    $r16 = "]]";
10315    $this->currPos += 2;
10316  } else {
10317    if (!$silence) {$this->fail(63);}
10318    $r16 = self::$FAILED;
10319    $this->currPos = $p3;
10320    $r1 = self::$FAILED;
10321    goto seq_1;
10322  }
10323  $r1 = true;
10324  seq_1:
10325  if ($r1!==self::$FAILED) {
10326    $this->savedPos = $p2;
10327    $r1 = $this->a109($r5, $r7, $r8, $r10);
10328  }
10329  // free $p3
10330  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
10331    $this->currPos,
10332    $r1,
10333    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
10334    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
10335  );
10336  return $r1;
10337}, "wikilink_preproc", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
10338
10339}
10340private function discardbroken_wikilink($silence, $boolParams, &$param_preproc, &$param_th) {
10341return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
10342  $key = json_encode([437, $boolParams & 0x7fff, $param_preproc, $param_th]);
10343  $bucket = $this->currPos;
10344  $cached = $this->cache[$bucket][$key] ?? null;
10345  if ($cached) {
10346    $this->currPos = $cached->nextPos;
10347    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
10348    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
10349    return $cached->result;
10350  }
10351  $saved_preproc=$param_preproc;
10352  $saved_th=$param_th;
10353  $p2 = $this->currPos;
10354  // start seq_1
10355  $p3 = $this->currPos;
10356  $p4 = $this->currPos;
10357  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "[[", $this->currPos, 2, false) === 0) {
10358    $r5 = "[[";
10359    $this->currPos += 2;
10360    $r5 = false;
10361    $this->currPos = $p4;
10362  } else {
10363    $r5 = self::$FAILED;
10364    $r1 = self::$FAILED;
10365    goto seq_1;
10366  }
10367  // free $p4
10368  $this->savedPos = $this->currPos;
10369  $r6 = $this->a110($param_preproc);
10370  if ($r6) {
10371    $r6 = false;
10372  } else {
10373    $r6 = self::$FAILED;
10374    $this->currPos = $p3;
10375    $r1 = self::$FAILED;
10376    goto seq_1;
10377  }
10378  // start seq_2
10379  $p4 = $this->currPos;
10380  if (($this->input[$this->currPos] ?? null) === "[") {
10381    $this->currPos++;
10382    $r8 = "[";
10383  } else {
10384    if (!$silence) {$this->fail(17);}
10385    $r8 = self::$FAILED;
10386    $r7 = self::$FAILED;
10387    goto seq_2;
10388  }
10389  // start choice_1
10390  $r9 = $this->parseextlink($silence, $boolParams, $param_preproc, $param_th);
10391  if ($r9!==self::$FAILED) {
10392    goto choice_1;
10393  }
10394  if (($this->input[$this->currPos] ?? null) === "[") {
10395    $this->currPos++;
10396    $r9 = "[";
10397  } else {
10398    if (!$silence) {$this->fail(17);}
10399    $r9 = self::$FAILED;
10400  }
10401  choice_1:
10402  if ($r9===self::$FAILED) {
10403    $this->currPos = $p4;
10404    $r7 = self::$FAILED;
10405    goto seq_2;
10406  }
10407  $r7 = [$r8,$r9];
10408  seq_2:
10409  // a <- $r7
10410  if ($r7===self::$FAILED) {
10411    $this->currPos = $p3;
10412    $r1 = self::$FAILED;
10413    goto seq_1;
10414  }
10415  // free $p4
10416  $r1 = true;
10417  seq_1:
10418  if ($r1!==self::$FAILED) {
10419    $this->savedPos = $p2;
10420    $r1 = $this->a111($param_preproc, $r7);
10421  }
10422  // free $p3
10423  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
10424    $this->currPos,
10425    $r1,
10426    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
10427    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
10428  );
10429  return $r1;
10430}, "broken_wikilink", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
10431
10432}
10433private function parsewellformed_extension_tag($silence, $boolParams, &$param_preproc, &$param_th) {
10434return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
10435  $key = json_encode([456, $boolParams & 0x7ebf, $param_preproc, $param_th]);
10436  $bucket = $this->currPos;
10437  $cached = $this->cache[$bucket][$key] ?? null;
10438  if ($cached) {
10439    $this->currPos = $cached->nextPos;
10440    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
10441    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
10442    return $cached->result;
10443  }
10444  $saved_preproc=$param_preproc;
10445  $saved_th=$param_th;
10446  $p2 = $this->currPos;
10447  // start seq_1
10448  $p3 = $this->currPos;
10449  $r4 = $this->parsemaybe_extension_tag($silence, $boolParams, $param_preproc, $param_th);
10450  // extToken <- $r4
10451  if ($r4===self::$FAILED) {
10452    $r1 = self::$FAILED;
10453    goto seq_1;
10454  }
10455  $this->savedPos = $this->currPos;
10456  $r5 = $this->a112($r4);
10457  if ($r5) {
10458    $r5 = false;
10459  } else {
10460    $r5 = self::$FAILED;
10461    $this->currPos = $p3;
10462    $r1 = self::$FAILED;
10463    goto seq_1;
10464  }
10465  $r1 = true;
10466  seq_1:
10467  if ($r1!==self::$FAILED) {
10468    $this->savedPos = $p2;
10469    $r1 = $this->a113($r4);
10470  }
10471  // free $p3
10472  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
10473    $this->currPos,
10474    $r1,
10475    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
10476    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
10477  );
10478  return $r1;
10479}, "wellformed_extension_tag", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
10480
10481}
10482private function parsexmlish_tag($silence, $boolParams, &$param_preproc, &$param_th) {
10483return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
10484  $key = json_encode([470, $boolParams & 0x7ebf, $param_preproc, $param_th]);
10485  $bucket = $this->currPos;
10486  $cached = $this->cache[$bucket][$key] ?? null;
10487  if ($cached) {
10488    $this->currPos = $cached->nextPos;
10489    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
10490    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
10491    return $cached->result;
10492  }
10493  $saved_preproc=$param_preproc;
10494  $saved_th=$param_th;
10495  $p2 = $this->currPos;
10496  // start seq_1
10497  $p3 = $this->currPos;
10498  $r4 = $this->parsexmlish_start($silence);
10499  // start <- $r4
10500  if ($r4===self::$FAILED) {
10501    $this->currPos = $p3;
10502    $r1 = self::$FAILED;
10503    goto seq_1;
10504  }
10505  $this->savedPos = $this->currPos;
10506  $r5 = $this->a114(/*annOrExtTag*/($boolParams & 0x2) !== 0, $r4);
10507  if ($r5) {
10508    $r5 = false;
10509  } else {
10510    $r5 = self::$FAILED;
10511    $this->currPos = $p3;
10512    $r1 = self::$FAILED;
10513    goto seq_1;
10514  }
10515  $r6 = $this->parsegeneric_newline_attributes($silence, $boolParams & ~0x140, $param_preproc, $param_th);
10516  // attribs <- $r6
10517  if ($r6===self::$FAILED) {
10518    $this->currPos = $p3;
10519    $r1 = self::$FAILED;
10520    goto seq_1;
10521  }
10522  for (;;) {
10523    $r8 = $this->discardspace_or_newline_or_solidus($silence);
10524    if ($r8===self::$FAILED) {
10525      break;
10526    }
10527  }
10528  // free $r8
10529  $r7 = true;
10530  if ($r7===self::$FAILED) {
10531    $this->currPos = $p3;
10532    $r1 = self::$FAILED;
10533    goto seq_1;
10534  }
10535  // free $r7
10536  if (($this->input[$this->currPos] ?? null) === "/") {
10537    $this->currPos++;
10538    $r7 = "/";
10539  } else {
10540    if (!$silence) {$this->fail(35);}
10541    $r7 = self::$FAILED;
10542    $r7 = null;
10543  }
10544  // selfclose <- $r7
10545  for (;;) {
10546    $r9 = $this->discardspace($silence);
10547    if ($r9===self::$FAILED) {
10548      break;
10549    }
10550  }
10551  // free $r9
10552  $r8 = true;
10553  if ($r8===self::$FAILED) {
10554    $this->currPos = $p3;
10555    $r1 = self::$FAILED;
10556    goto seq_1;
10557  }
10558  // free $r8
10559  if (($this->input[$this->currPos] ?? null) === ">") {
10560    $this->currPos++;
10561    $r8 = ">";
10562  } else {
10563    if (!$silence) {$this->fail(64);}
10564    $r8 = self::$FAILED;
10565    $this->currPos = $p3;
10566    $r1 = self::$FAILED;
10567    goto seq_1;
10568  }
10569  $r1 = true;
10570  seq_1:
10571  if ($r1!==self::$FAILED) {
10572    $this->savedPos = $p2;
10573    $r1 = $this->a115(/*annOrExtTag*/($boolParams & 0x2) !== 0, $r4, $r6, $r7);
10574  }
10575  // free $p3
10576  $this->cache[$bucket][$key] = new TracingGrammarCacheEntry(
10577    $this->currPos,
10578    $r1,
10579    $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED,
10580    $saved_th !== $param_th ? $param_th : self::$UNDEFINED
10581  );
10582  return $r1;
10583}, "xmlish_tag", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]);
10584
10585}
10586private function parseautourl($silence, $boolParams, &$param_preproc, &$param_th) {
10587return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) {
10588  $key = json_encode([370, $boolParams & 0x7fff, $param_preproc, $param_th]);
10589  $bucket = $this->currPos;
10590  $cached = $this->cache[$bucket][$key] ?? null;
10591  if ($cached) {
10592    $this->currPos = $cached->nextPos;
10593    if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; }
10594    if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; }
10595    return $cached->result;
10596  }
10597  $saved_preproc=$param_preproc;
10598  $saved_th=$param_th;
10599  $p2 = $this->currPos;
10600  // start seq_1
10601  $p3 = $this->currPos;
10602  $p4 = $this->currPos;
10603  if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "//", $this->currPos, 2, false) === 0) {
10604    $r5 = "//";
10605    $this->currPos += 2;
10606  } else {
10607    $r5 = self::$FAILED;
10608  }
10609  if ($r5 === self::$FAILED) {
10610    $r5 = false;
10611  } else {
10612    $r5 = self::$FAILED;
10613    $this->currPos = $p4;
10614    $r1 = self::$FAILED;
10615    goto seq_1;
10616  }
10617  // free $p4
10618  $p4 = $this->currPos;
10619  // start seq_2
10620  $p7 = $this->currPos;
10621  $r8 = $this->parseurl_protocol($silence);
10622  // proto <- $r8
10623  if ($r8===self::$FAILED) {
10624    $r6 = self::$FAILED;
10625    goto seq_2;
10626  }
10627  // start choice_1
10628  $r9 = $this->parseipv6urladdr($silence);
10629  if ($r9!==self::$FAILED) {
10630    goto choice_1;
10631  }
10632  $r9 = '';
10633  choice_1:
10634  // addr <- $r9
10635  if ($r9===self::$FAILED) {
10636    $this->currPos = $p7;
10637    $r6 = self::$FAILED;
10638    goto seq_2;
10639  }
10640  $r10 = [];
10641  for (;;) {
10642    $p12 = $this->currPos;
10643    // start seq_3
10644    $p13 = $this->currPos;
10645    $p14 = $this->currPos;
10646    $r15 = $this->discardinline_breaks(true, $boolParams, $param_preproc, $param_th);
10647    if ($r15 === self::$FAILED) {
10648      $r15 = false;
10649    } else {
10650      $r15 = self::$FAILED;
10651      $this->currPos = $p14;
10652      $r11 = self::$FAILED;
10653      goto seq_3;
10654    }
10655    // free $p14
10656    // start choice_2
10657    $r16 = $this->parseno_punctuation_char($silence);
10658    if ($r16!==self::$FAILED) {
10659      goto choice_2;
10660    }
10661    $r16 = $this->parsecomment($silence);
10662    if ($r16!==self::$FAILED) {
10663      goto choice_2;
10664    }
10665    $r16 = $this->parsetplarg_or_template($silence, $boolParams, $param_th, $param_preproc);
10666    if ($r16!==self::$FAILED) {
10667      goto choice_2;
10668    }
10669    $p14 = $this->currPos;
10670    // start seq_4
10671    $p17 = $this->currPos;
10672    if (($this->input[$this->currPos] ?? null) === "'") {
10673      $this->currPos++;
10674      $r18 = "'";
10675    } else {
10676      if (!$silence) {$this->fail(33);}
10677      $r18 = self::$FAILED;
10678      $r16 = self::$FAILED;
10679      goto seq_4;
10680    }
10681    $p19 = $this->currPos;
10682    if (($this->input[$this->currPos] ?? null) === "'") {
10683      $this->currPos++;
10684      $r20 = "'";
10685    } else {
10686      $r20 = self::$FAILED;
10687    }
10688    if ($r20 === self::$FAILED) {
10689      $r20 = false;
10690    } else {
10691      $r20 = self::$FAILED;
10692      $this->currPos = $p19;
10693      $this->currPos = $p17;
10694      $r16 = self::$FAILED;
10695      goto seq_4;
10696    }
10697    // free $p19
10698    $r16 = true;
10699    seq_4:
10700    if ($r16!==self::$FAILED) {
10701      $r16 = substr($this->input, $p14, $this->currPos - $p14);
10702      goto choice_2;
10703    } else {
10704      $r16 = self::$FAILED;
10705    }
10706    // free $p17
10707    // free $p14
10708    if (($this->input[$this->currPos] ?? null) === "{") {
10709      $this->currPos++;
10710      $r16 = "{";
10711      goto choice_2;
10712    } else