Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 10206 |
|
0.00% |
0 / 368 |
CRAP | |
0.00% |
0 / 2 |
TracingGrammarCacheEntry | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 | |||
TracingGrammar | |
0.00% |
0 / 10202 |
|
0.00% |
0 / 367 |
7072940 | |
0.00% |
0 / 1 |
initialize | |
0.00% |
0 / 11 |
|
0.00% |
0 / 1 |
2 | |||
resetState | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
assert | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
6 | |||
unreachable | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
startOffset | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
endOffset | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
tsrOffsets | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
20 | |||
emitChunk | |
0.00% |
0 / 9 |
|
0.00% |
0 / 1 |
12 | |||
isXMLTag | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
6 | |||
a0 | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
6 | |||
a1 | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
6 | |||
a2 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a3 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a4 | |
0.00% |
0 / 7 |
|
0.00% |
0 / 1 |
12 | |||
a5 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a6 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a7 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a8 | |
0.00% |
0 / 11 |
|
0.00% |
0 / 1 |
20 | |||
a9 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a10 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a11 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a12 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
6 | |||
a13 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a14 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a15 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a16 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a17 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a18 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a19 | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
6 | |||
a20 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a21 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a22 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a23 | |
0.00% |
0 / 16 |
|
0.00% |
0 / 1 |
2 | |||
a24 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a25 | |
0.00% |
0 / 9 |
|
0.00% |
0 / 1 |
30 | |||
a26 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a27 | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
6 | |||
a28 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a29 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a30 | |
0.00% |
0 / 16 |
|
0.00% |
0 / 1 |
2 | |||
a31 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a32 | |
0.00% |
0 / 13 |
|
0.00% |
0 / 1 |
6 | |||
a33 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a34 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a35 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a36 | |
0.00% |
0 / 11 |
|
0.00% |
0 / 1 |
20 | |||
a37 | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
6 | |||
a38 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a39 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a40 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a41 | |
0.00% |
0 / 11 |
|
0.00% |
0 / 1 |
20 | |||
a42 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a43 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a44 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a45 | |
0.00% |
0 / 23 |
|
0.00% |
0 / 1 |
20 | |||
a46 | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
6 | |||
a47 | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
6 | |||
a48 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a49 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
6 | |||
a50 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a51 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a52 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a53 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
6 | |||
a54 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a55 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
6 | |||
a56 | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
a57 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a58 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a59 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a60 | |
0.00% |
0 / 7 |
|
0.00% |
0 / 1 |
6 | |||
a61 | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
a62 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a63 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a64 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a65 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a66 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a67 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a68 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a69 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a70 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
6 | |||
a71 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
6 | |||
a72 | |
0.00% |
0 / 14 |
|
0.00% |
0 / 1 |
12 | |||
a73 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a74 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a75 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
6 | |||
a76 | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
a77 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a78 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a79 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a80 | |
0.00% |
0 / 9 |
|
0.00% |
0 / 1 |
6 | |||
a81 | |
0.00% |
0 / 20 |
|
0.00% |
0 / 1 |
56 | |||
a82 | |
0.00% |
0 / 7 |
|
0.00% |
0 / 1 |
6 | |||
a83 | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
6 | |||
a84 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a85 | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
2 | |||
a86 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a87 | |
0.00% |
0 / 72 |
|
0.00% |
0 / 1 |
306 | |||
a88 | |
0.00% |
0 / 23 |
|
0.00% |
0 / 1 |
56 | |||
a89 | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
6 | |||
a90 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
6 | |||
a91 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
6 | |||
a92 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a93 | |
0.00% |
0 / 34 |
|
0.00% |
0 / 1 |
42 | |||
a94 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a95 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a96 | |
0.00% |
0 / 7 |
|
0.00% |
0 / 1 |
12 | |||
a97 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a98 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a99 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a100 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a101 | |
0.00% |
0 / 12 |
|
0.00% |
0 / 1 |
12 | |||
a102 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a103 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a104 | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
a105 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a106 | |
0.00% |
0 / 9 |
|
0.00% |
0 / 1 |
2 | |||
a107 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a108 | |
0.00% |
0 / 23 |
|
0.00% |
0 / 1 |
56 | |||
a109 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a110 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a111 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a112 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a113 | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
12 | |||
a114 | |
0.00% |
0 / 13 |
|
0.00% |
0 / 1 |
56 | |||
a115 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
12 | |||
a116 | |
0.00% |
0 / 12 |
|
0.00% |
0 / 1 |
30 | |||
a117 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a118 | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
2 | |||
a119 | |
0.00% |
0 / 22 |
|
0.00% |
0 / 1 |
2 | |||
a120 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a121 | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
12 | |||
a122 | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
12 | |||
a123 | |
0.00% |
0 / 18 |
|
0.00% |
0 / 1 |
2 | |||
a124 | |
0.00% |
0 / 52 |
|
0.00% |
0 / 1 |
132 | |||
a125 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a126 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a127 | |
0.00% |
0 / 8 |
|
0.00% |
0 / 1 |
12 | |||
a128 | |
0.00% |
0 / 7 |
|
0.00% |
0 / 1 |
6 | |||
a129 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a130 | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
a131 | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
a132 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
6 | |||
a133 | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 | |||
a134 | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
a135 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a136 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a137 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a138 | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
2 | |||
a139 | |
0.00% |
0 / 22 |
|
0.00% |
0 / 1 |
12 | |||
a140 | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
a141 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a142 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a143 | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 | |||
a144 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a145 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a146 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a147 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a148 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a149 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
6 | |||
a150 | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
6 | |||
a151 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a152 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a153 | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
20 | |||
a154 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a155 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a156 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a157 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a158 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a159 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a160 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a161 | |
0.00% |
0 / 31 |
|
0.00% |
0 / 1 |
56 | |||
a162 | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
a163 | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
2 | |||
a164 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a165 | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
a166 | |
0.00% |
0 / 9 |
|
0.00% |
0 / 1 |
30 | |||
a167 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a168 | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
12 | |||
a169 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a170 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a171 | |
0.00% |
0 / 49 |
|
0.00% |
0 / 1 |
420 | |||
a172 | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 | |||
a173 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a174 | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
12 | |||
a175 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a176 | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
12 | |||
a177 | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
a178 | |
0.00% |
0 / 9 |
|
0.00% |
0 / 1 |
30 | |||
a179 | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
12 | |||
a180 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a181 | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
2 | |||
a182 | |
0.00% |
0 / 7 |
|
0.00% |
0 / 1 |
2 | |||
a183 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a184 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a185 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a186 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a187 | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
2 | |||
a188 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
a189 | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
a190 | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
streamstart_async | |
0.00% |
0 / 48 |
|
0.00% |
0 / 1 |
132 | |||
parsestart | |
0.00% |
0 / 34 |
|
0.00% |
0 / 1 |
110 | |||
parsetable_start_tag | |
0.00% |
0 / 79 |
|
0.00% |
0 / 1 |
420 | |||
parseurl | |
0.00% |
0 / 173 |
|
0.00% |
0 / 1 |
1560 | |||
parserow_syntax_table_args | |
0.00% |
0 / 48 |
|
0.00% |
0 / 1 |
132 | |||
parsetable_attributes | |
0.00% |
0 / 41 |
|
0.00% |
0 / 1 |
156 | |||
parsegeneric_newline_attributes | |
0.00% |
0 / 24 |
|
0.00% |
0 / 1 |
72 | |||
parsetplarg_or_template_or_bust | |
0.00% |
0 / 35 |
|
0.00% |
0 / 1 |
132 | |||
parseextlink | |
0.00% |
0 / 144 |
|
0.00% |
0 / 1 |
870 | |||
parselist_item | |
0.00% |
0 / 26 |
|
0.00% |
0 / 1 |
72 | |||
parsetlb | |
0.00% |
0 / 37 |
|
0.00% |
0 / 1 |
72 | |||
parsenewlineToken | |
0.00% |
0 / 20 |
|
0.00% |
0 / 1 |
12 | |||
parsespace | |
0.00% |
0 / 20 |
|
0.00% |
0 / 1 |
30 | |||
parsecomment | |
0.00% |
0 / 72 |
|
0.00% |
0 / 1 |
342 | |||
parsepipe | |
0.00% |
0 / 26 |
|
0.00% |
0 / 1 |
56 | |||
parseurl_protocol | |
0.00% |
0 / 75 |
|
0.00% |
0 / 1 |
380 | |||
parseipv6urladdr | |
0.00% |
0 / 48 |
|
0.00% |
0 / 1 |
132 | |||
discardinline_breaks | |
0.00% |
0 / 43 |
|
0.00% |
0 / 1 |
90 | |||
parseno_punctuation_char | |
0.00% |
0 / 20 |
|
0.00% |
0 / 1 |
20 | |||
parsetplarg_or_template | |
0.00% |
0 / 39 |
|
0.00% |
0 / 1 |
110 | |||
parsehtmlentity | |
0.00% |
0 / 21 |
|
0.00% |
0 / 1 |
12 | |||
parseoptional_spaces | |
0.00% |
0 / 26 |
|
0.00% |
0 / 1 |
56 | |||
discardpipe | |
0.00% |
0 / 26 |
|
0.00% |
0 / 1 |
56 | |||
parsetable_attribute | |
0.00% |
0 / 72 |
|
0.00% |
0 / 1 |
272 | |||
discardoptionalSpaceToken | |
0.00% |
0 / 21 |
|
0.00% |
0 / 1 |
12 | |||
parsebroken_table_attribute_name_char | |
0.00% |
0 / 24 |
|
0.00% |
0 / 1 |
30 | |||
parsegeneric_newline_attribute | |
0.00% |
0 / 78 |
|
0.00% |
0 / 1 |
420 | |||
parseextlink_nonipv6url | |
0.00% |
0 / 20 |
|
0.00% |
0 / 1 |
42 | |||
discardspace | |
0.00% |
0 / 20 |
|
0.00% |
0 / 1 |
30 | |||
discardunispace | |
0.00% |
0 / 20 |
|
0.00% |
0 / 1 |
20 | |||
parseinlineline | |
0.00% |
0 / 75 |
|
0.00% |
0 / 1 |
380 | |||
parsedtdd | |
0.00% |
0 / 87 |
|
0.00% |
0 / 1 |
380 | |||
parsehacky_dl_uses | |
0.00% |
0 / 96 |
|
0.00% |
0 / 1 |
812 | |||
parseli | |
0.00% |
0 / 49 |
|
0.00% |
0 / 1 |
210 | |||
discardeof | |
0.00% |
0 / 20 |
|
0.00% |
0 / 1 |
12 | |||
parseblock | |
0.00% |
0 / 80 |
|
0.00% |
0 / 1 |
342 | |||
discardnewline | |
0.00% |
0 / 26 |
|
0.00% |
0 / 1 |
56 | |||
parsetplarg_or_template_guarded | |
0.00% |
0 / 193 |
|
0.00% |
0 / 1 |
1806 | |||
parseraw_htmlentity | |
0.00% |
0 / 53 |
|
0.00% |
0 / 1 |
156 | |||
parseoptionalSpaceToken | |
0.00% |
0 / 21 |
|
0.00% |
0 / 1 |
12 | |||
parsetable_attribute_name | |
0.00% |
0 / 133 |
|
0.00% |
0 / 1 |
992 | |||
parsetable_att_value | |
0.00% |
0 / 178 |
|
0.00% |
0 / 1 |
2256 | |||
discardspace_or_newline_or_solidus | |
0.00% |
0 / 43 |
|
0.00% |
0 / 1 |
72 | |||
parsegeneric_attribute_name | |
0.00% |
0 / 106 |
|
0.00% |
0 / 1 |
756 | |||
discardspace_or_newline | |
0.00% |
0 / 19 |
|
0.00% |
0 / 1 |
20 | |||
parsegeneric_att_value | |
0.00% |
0 / 195 |
|
0.00% |
0 / 1 |
1980 | |||
parseextlink_nonipv6url_parameterized | |
0.00% |
0 / 94 |
|
0.00% |
0 / 1 |
650 | |||
parseurltext | |
0.00% |
0 / 101 |
|
0.00% |
0 / 1 |
462 | |||
parseinline_element | |
0.00% |
0 / 154 |
|
0.00% |
0 / 1 |
930 | |||
discardlist_char | |
0.00% |
0 / 19 |
|
0.00% |
0 / 1 |
20 | |||
parselist_char | |
0.00% |
0 / 19 |
|
0.00% |
0 / 1 |
20 | |||
parsedtdd_colon | |
0.00% |
0 / 39 |
|
0.00% |
0 / 1 |
110 | |||
discardeolf | |
0.00% |
0 / 19 |
|
0.00% |
0 / 1 |
12 | |||
parsetable_line | |
0.00% |
0 / 53 |
|
0.00% |
0 / 1 |
210 | |||
parsesol | |
0.00% |
0 / 37 |
|
0.00% |
0 / 1 |
132 | |||
discardcomment | |
0.00% |
0 / 72 |
|
0.00% |
0 / 1 |
342 | |||
discardsof | |
0.00% |
0 / 20 |
|
0.00% |
0 / 1 |
12 | |||
parseredirect | |
0.00% |
0 / 74 |
|
0.00% |
0 / 1 |
380 | |||
parsesol_transparent | |
0.00% |
0 / 29 |
|
0.00% |
0 / 1 |
90 | |||
parseblock_line | |
0.00% |
0 / 52 |
|
0.00% |
0 / 1 |
182 | |||
parseblock_lines | |
0.00% |
0 / 50 |
|
0.00% |
0 / 1 |
156 | |||
discardtplarg | |
0.00% |
0 / 18 |
|
0.00% |
0 / 1 |
20 | |||
parsetemplate | |
0.00% |
0 / 18 |
|
0.00% |
0 / 1 |
20 | |||
parsebroken_template | |
0.00% |
0 / 31 |
|
0.00% |
0 / 1 |
72 | |||
parsetplarg | |
0.00% |
0 / 18 |
|
0.00% |
0 / 1 |
20 | |||
discardwikilink | |
0.00% |
0 / 23 |
|
0.00% |
0 / 1 |
56 | |||
parsedirective | |
0.00% |
0 / 74 |
|
0.00% |
0 / 1 |
306 | |||
parsehtml_tag | |
0.00% |
0 / 20 |
|
0.00% |
0 / 1 |
42 | |||
parsetable_attribute_preprocessor_text_single | |
0.00% |
0 / 65 |
|
0.00% |
0 / 1 |
380 | |||
parsetable_attribute_preprocessor_text_double | |
0.00% |
0 / 65 |
|
0.00% |
0 / 1 |
380 | |||
parsetable_attribute_preprocessor_text | |
0.00% |
0 / 67 |
|
0.00% |
0 / 1 |
420 | |||
parseless_than | |
0.00% |
0 / 34 |
|
0.00% |
0 / 1 |
42 | |||
parseattribute_preprocessor_text_single | |
0.00% |
0 / 80 |
|
0.00% |
0 / 1 |
552 | |||
parseattribute_preprocessor_text_double | |
0.00% |
0 / 80 |
|
0.00% |
0 / 1 |
552 | |||
parseattribute_preprocessor_text | |
0.00% |
0 / 82 |
|
0.00% |
0 / 1 |
600 | |||
parseautolink | |
0.00% |
0 / 49 |
|
0.00% |
0 / 1 |
156 | |||
parsebehavior_switch | |
0.00% |
0 / 46 |
|
0.00% |
0 / 1 |
132 | |||
parsetext_char | |
0.00% |
0 / 19 |
|
0.00% |
0 / 1 |
20 | |||
parseangle_bracket_markup | |
0.00% |
0 / 32 |
|
0.00% |
0 / 1 |
110 | |||
parselang_variant_or_tpl | |
0.00% |
0 / 223 |
|
0.00% |
0 / 1 |
2450 | |||
parsewikilink | |
0.00% |
0 / 23 |
|
0.00% |
0 / 1 |
56 | |||
parsequote | |
0.00% |
0 / 44 |
|
0.00% |
0 / 1 |
132 | |||
parseinlineline_break_on_colon | |
0.00% |
0 / 20 |
|
0.00% |
0 / 1 |
42 | |||
parsetable_content_line | |
0.00% |
0 / 43 |
|
0.00% |
0 / 1 |
182 | |||
parsetable_end_tag | |
0.00% |
0 / 50 |
|
0.00% |
0 / 1 |
110 | |||
parsesol_prefix | |
0.00% |
0 / 26 |
|
0.00% |
0 / 1 |
20 | |||
parseempty_lines_with_comments | |
0.00% |
0 / 63 |
|
0.00% |
0 / 1 |
240 | |||
parseredirect_word | |
0.00% |
0 / 78 |
|
0.00% |
0 / 1 |
306 | |||
parseinclude_limits | |
0.00% |
0 / 37 |
|
0.00% |
0 / 1 |
90 | |||
parseannotation_tag | |
0.00% |
0 / 45 |
|
0.00% |
0 / 1 |
132 | |||
parseheading | |
0.00% |
0 / 118 |
|
0.00% |
0 / 1 |
702 | |||
parsehr | |
0.00% |
0 / 69 |
|
0.00% |
0 / 1 |
342 | |||
discardtplarg_preproc | |
0.00% |
0 / 136 |
|
0.00% |
0 / 1 |
1332 | |||
parsetemplate_preproc | |
0.00% |
0 / 177 |
|
0.00% |
0 / 1 |
2450 | |||
parsetplarg_preproc | |
0.00% |
0 / 136 |
|
0.00% |
0 / 1 |
1332 | |||
discardwikilink_preproc | |
0.00% |
0 / 69 |
|
0.00% |
0 / 1 |
342 | |||
discardbroken_wikilink | |
0.00% |
0 / 67 |
|
0.00% |
0 / 1 |
306 | |||
parsewellformed_extension_tag | |
0.00% |
0 / 37 |
|
0.00% |
0 / 1 |
90 | |||
parsexmlish_tag | |
0.00% |
0 / 73 |
|
0.00% |
0 / 1 |
420 | |||
parseautourl | |
0.00% |
0 / 184 |
|
0.00% |
0 / 1 |
1560 | |||
parseautoref | |
0.00% |
0 / 59 |
|
0.00% |
0 / 1 |
210 | |||
parseisbn | |
0.00% |
0 / 127 |
|
0.00% |
0 / 1 |
992 | |||
discardbehavior_text | |
0.00% |
0 / 48 |
|
0.00% |
0 / 1 |
156 | |||
parsemaybe_extension_tag | |
0.00% |
0 / 37 |
|
0.00% |
0 / 1 |
90 | |||
parselang_variant | |
0.00% |
0 / 23 |
|
0.00% |
0 / 1 |
56 | |||
parsewikilink_preproc | |
0.00% |
0 / 69 |
|
0.00% |
0 / 1 |
342 | |||
parsebroken_wikilink | |
0.00% |
0 / 67 |
|
0.00% |
0 / 1 |
306 | |||
parsetable_heading_tags | |
0.00% |
0 / 18 |
|
0.00% |
0 / 1 |
20 | |||
parsetable_row_tag | |
0.00% |
0 / 75 |
|
0.00% |
0 / 1 |
380 | |||
parsetable_data_tags | |
0.00% |
0 / 57 |
|
0.00% |
0 / 1 |
210 | |||
parsetable_caption_tag | |
0.00% |
0 / 59 |
|
0.00% |
0 / 1 |
240 | |||
parsenewline | |
0.00% |
0 / 26 |
|
0.00% |
0 / 1 |
56 | |||
discardinclude_check | |
0.00% |
0 / 35 |
|
0.00% |
0 / 1 |
30 | |||
parsetvar_old_syntax_closing_HACK | |
0.00% |
0 / 42 |
|
0.00% |
0 / 1 |
72 | |||
discardannotation_check | |
0.00% |
0 / 35 |
|
0.00% |
0 / 1 |
30 | |||
discardsol | |
0.00% |
0 / 37 |
|
0.00% |
0 / 1 |
132 | |||
parsetemplate_param_value | |
0.00% |
0 / 25 |
|
0.00% |
0 / 1 |
56 | |||
discardnl_comment_space | |
0.00% |
0 / 22 |
|
0.00% |
0 / 1 |
20 | |||
parsenl_comment_space | |
0.00% |
0 / 22 |
|
0.00% |
0 / 1 |
20 | |||
parseparsoid_fragment_marker | |
0.00% |
0 / 40 |
|
0.00% |
0 / 1 |
110 | |||
parsetemplate_param | |
0.00% |
0 / 78 |
|
0.00% |
0 / 1 |
306 | |||
parsewikilink_preprocessor_text | |
0.00% |
0 / 93 |
|
0.00% |
0 / 1 |
756 | |||
parsewikilink_content | |
0.00% |
0 / 43 |
|
0.00% |
0 / 1 |
132 | |||
parsexmlish_start | |
0.00% |
0 / 39 |
|
0.00% |
0 / 1 |
72 | |||
parseRFC | |
0.00% |
0 / 36 |
|
0.00% |
0 / 1 |
56 | |||
parsePMID | |
0.00% |
0 / 36 |
|
0.00% |
0 / 1 |
56 | |||
parsespace_or_nbsp | |
0.00% |
0 / 49 |
|
0.00% |
0 / 1 |
72 | |||
discardend_of_word | |
0.00% |
0 / 27 |
|
0.00% |
0 / 1 |
30 | |||
parsespace_or_nbsp_or_dash | |
0.00% |
0 / 23 |
|
0.00% |
0 / 1 |
30 | |||
discardtext_char | |
0.00% |
0 / 19 |
|
0.00% |
0 / 1 |
20 | |||
discardextension_check | |
0.00% |
0 / 35 |
|
0.00% |
0 / 1 |
30 | |||
parselang_variant_preproc | |
0.00% |
0 / 128 |
|
0.00% |
0 / 1 |
756 | |||
parsebroken_lang_variant | |
0.00% |
0 / 30 |
|
0.00% |
0 / 1 |
72 | |||
parsetable_heading_tags_parameterized | |
0.00% |
0 / 42 |
|
0.00% |
0 / 1 |
132 | |||
parsetable_data_tag | |
0.00% |
0 / 52 |
|
0.00% |
0 / 1 |
182 | |||
parsetds | |
0.00% |
0 / 37 |
|
0.00% |
0 / 1 |
110 | |||
parsenested_block_in_table | |
0.00% |
0 / 78 |
|
0.00% |
0 / 1 |
462 | |||
parsetemplate_param_text | |
0.00% |
0 / 34 |
|
0.00% |
0 / 1 |
132 | |||
discardnewlineToken | |
0.00% |
0 / 20 |
|
0.00% |
0 / 1 |
12 | |||
parsetemplate_param_name | |
0.00% |
0 / 32 |
|
0.00% |
0 / 1 |
72 | |||
parselink_text | |
0.00% |
0 / 20 |
|
0.00% |
0 / 1 |
42 | |||
parsetag_name | |
0.00% |
0 / 26 |
|
0.00% |
0 / 1 |
42 | |||
parseunispace | |
0.00% |
0 / 20 |
|
0.00% |
0 / 1 |
20 | |||
parseopt_lang_variant_flags | |
0.00% |
0 / 43 |
|
0.00% |
0 / 1 |
132 | |||
parselang_variant_text | |
0.00% |
0 / 36 |
|
0.00% |
0 / 1 |
156 | |||
parselang_variant_option_list | |
0.00% |
0 / 78 |
|
0.00% |
0 / 1 |
380 | |||
parsetable_heading_tag | |
0.00% |
0 / 50 |
|
0.00% |
0 / 1 |
156 | |||
parseths | |
0.00% |
0 / 43 |
|
0.00% |
0 / 1 |
182 | |||
parsepipe_pipe | |
0.00% |
0 / 26 |
|
0.00% |
0 / 1 |
72 | |||
parsenested_block | |
0.00% |
0 / 38 |
|
0.00% |
0 / 1 |
90 | |||
parselink_text_parameterized | |
0.00% |
0 / 131 |
|
0.00% |
0 / 1 |
1332 | |||
parselang_variant_flags | |
0.00% |
0 / 79 |
|
0.00% |
0 / 1 |
506 | |||
parselang_variant_option | |
0.00% |
0 / 165 |
|
0.00% |
0 / 1 |
1980 | |||
discardbogus_lang_variant_option | |
0.00% |
0 / 22 |
|
0.00% |
0 / 1 |
56 | |||
parsefull_table_in_link_caption | |
0.00% |
0 / 38 |
|
0.00% |
0 / 1 |
90 | |||
parselang_variant_flag | |
0.00% |
0 / 76 |
|
0.00% |
0 / 1 |
342 | |||
parselang_variant_name | |
0.00% |
0 / 46 |
|
0.00% |
0 / 1 |
182 | |||
parselang_variant_nowiki | |
0.00% |
0 / 40 |
|
0.00% |
0 / 1 |
132 | |||
parselang_variant_text_no_semi | |
0.00% |
0 / 20 |
|
0.00% |
0 / 1 |
42 | |||
parselang_variant_text_no_semi_or_arrow | |
0.00% |
0 / 20 |
|
0.00% |
0 / 1 |
42 | |||
discardlang_variant_text | |
0.00% |
0 / 36 |
|
0.00% |
0 / 1 |
156 | |||
parsefull_table_in_link_caption_parameterized | |
0.00% |
0 / 77 |
|
0.00% |
0 / 1 |
600 | |||
discardnowiki | |
0.00% |
0 / 37 |
|
0.00% |
0 / 1 |
90 | |||
parsenowiki_text | |
0.00% |
0 / 25 |
|
0.00% |
0 / 1 |
56 | |||
discardnowiki_check | |
0.00% |
0 / 35 |
|
0.00% |
0 / 1 |
30 | |||
parsenowiki | |
0.00% |
0 / 37 |
|
0.00% |
0 / 1 |
90 | |||
parse | |
0.00% |
0 / 44 |
|
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 | |
8 | namespace 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\EndTagTk; |
22 | use Wikimedia\Parsoid\Tokens\KV; |
23 | use Wikimedia\Parsoid\Tokens\KVSourceRange; |
24 | use Wikimedia\Parsoid\Tokens\NlTk; |
25 | use Wikimedia\Parsoid\Tokens\SelfclosingTagTk; |
26 | use Wikimedia\Parsoid\Tokens\SourceRange; |
27 | use Wikimedia\Parsoid\Tokens\TagTk; |
28 | use Wikimedia\Parsoid\Tokens\Token; |
29 | use Wikimedia\Parsoid\Utils\DOMDataUtils; |
30 | use Wikimedia\Parsoid\Utils\PHPUtils; |
31 | use Wikimedia\Parsoid\Utils\TokenUtils; |
32 | use Wikimedia\Parsoid\Utils\Utils; |
33 | use Wikimedia\Parsoid\Utils\WTUtils; |
34 | use Wikimedia\Parsoid\Wikitext\Consts; |
35 | |
36 | |
37 | |
38 | class TracingGrammarCacheEntry { |
39 | public $nextPos; |
40 | public $result; |
41 | public $preproc; |
42 | public $th; |
43 | |
44 | |
45 | public function __construct( $nextPos, $result, $preproc, $th ) { |
46 | $this->nextPos = $nextPos; |
47 | $this->result = $result; |
48 | $this->preproc = $preproc; |
49 | $this->th = $th; |
50 | |
51 | } |
52 | } |
53 | |
54 | |
55 | class TracingGrammar extends \Wikimedia\WikiPEG\PEGParserBase { |
56 | // initializer |
57 | |
58 | /** @var Env */ |
59 | private $env; |
60 | |
61 | /** @var SiteConfig */ |
62 | private $siteConfig; |
63 | |
64 | /** @var array */ |
65 | private $pipelineOpts; |
66 | |
67 | /** @var int */ |
68 | private $pipelineOffset; |
69 | |
70 | private $extTags; |
71 | |
72 | private $startTime; |
73 | |
74 | /** @var string */ |
75 | private $reUrltextLookahead; |
76 | |
77 | /** @var string */ |
78 | private $urltextPlainSegment = ''; |
79 | |
80 | /** @var bool */ |
81 | private $urltextFoundAutolink = false; |
82 | |
83 | protected function initialize() { |
84 | $this->env = $this->options['env']; |
85 | $this->siteConfig = $this->env->getSiteConfig(); |
86 | |
87 | $tokenizer = $this->options['pegTokenizer']; |
88 | $this->pipelineOpts = $tokenizer->getOptions(); |
89 | // FIXME: inTemplate option may not always be set in |
90 | // standalone tokenizers user by some pipelines handlers. |
91 | $this->pipelineOffset = $this->options['pipelineOffset'] ?? 0; |
92 | $this->extTags = $this->siteConfig->getExtensionTagNameMap(); |
93 | |
94 | // Non-greedy text_char sequence: stop at ampersand, double-underscore, |
95 | // magic link prefix or protocol |
96 | $this->reUrltextLookahead = '!(?:' . |
97 | '([^-\'<[{\n\r:;\]}|\!=&]*?)' . |
98 | '(?:__|$|[-\'<[{\n\r:;\]}|\!=&]|(RFC|PMID|ISBN|' . |
99 | '(?i)' . $this->siteConfig->getProtocolsRegex( true ) . |
100 | ')))!A'; |
101 | } |
102 | |
103 | private $prevOffset = 0; |
104 | private $headingIndex = 0; |
105 | |
106 | public function resetState() { |
107 | $this->prevOffset = 0; |
108 | $this->headingIndex = 0; |
109 | } |
110 | |
111 | private function assert( $condition, $text ) { |
112 | if ( !$condition ) { |
113 | throw new \RuntimeException( "Grammar.pegphp assertion failure: $text" ); |
114 | } |
115 | } |
116 | |
117 | private function unreachable() { |
118 | throw new UnreachableException( "Grammar.pegphp: this should be unreachable" ); |
119 | } |
120 | |
121 | // Some shorthands for legibility |
122 | private function startOffset() { |
123 | return $this->savedPos; |
124 | } |
125 | |
126 | private function endOffset() { |
127 | return $this->currPos; |
128 | } |
129 | |
130 | private function tsrOffsets( $flag = 'default' ): SourceRange { |
131 | switch ( $flag ) { |
132 | case 'start': |
133 | return new SourceRange( $this->savedPos, $this->savedPos ); |
134 | case 'end': |
135 | return new SourceRange( $this->currPos, $this->currPos ); |
136 | default: |
137 | return new SourceRange( $this->savedPos, $this->currPos ); |
138 | } |
139 | } |
140 | |
141 | /* |
142 | * Emit a chunk of tokens to our consumers. Once this has been done, the |
143 | * current expression can return an empty list (true). |
144 | */ |
145 | private function emitChunk( $tokens ) { |
146 | // FIXME: We don't expect nulls here, but looks like |
147 | // hack from I1c695ab6cdd3655e98877c175ddbabdee9dc44b7 |
148 | // introduces them. Work around it for now! |
149 | if ( !$tokens ) { |
150 | return []; |
151 | } |
152 | |
153 | // Shift tsr of all tokens by the pipeline offset |
154 | TokenUtils::shiftTokenTSR( $tokens, $this->pipelineOffset ); |
155 | $this->env->log( 'trace/peg', $this->options['pipelineId'] ?? '0', '----> ', $tokens ); |
156 | |
157 | $i = null; |
158 | $n = count( $tokens ); |
159 | |
160 | // Enforce parsing resource limits |
161 | for ( $i = 0; $i < $n; $i++ ) { |
162 | TokenizerUtils::enforceParserResourceLimits( $this->env, $tokens[ $i ] ); |
163 | } |
164 | |
165 | return $tokens; |
166 | } |
167 | |
168 | /* ------------------------------------------------------------------------ |
169 | * Extension tags should be parsed with higher priority than anything else. |
170 | * |
171 | * The trick we use is to strip out the content inside a matching tag-pair |
172 | * and not tokenize it. The content, if it needs to parsed (for example, |
173 | * for <ref>, <*include*> tags), is parsed in a fresh tokenizer context |
174 | * which means any error correction that needs to happen is restricted to |
175 | * the scope of the extension content and doesn't spill over to the higher |
176 | * level. Ex: <math><!--foo</math>. |
177 | * |
178 | * IGNORE: {{ this just balances the blocks in this comment for pegjs |
179 | * |
180 | * This trick also lets us prevent extension content (that don't accept WT) |
181 | * from being parsed as wikitext (Ex: <math>\frac{foo\frac{bar}}</math>) |
182 | * We don't want the "}}" being treated as a template closing tag and |
183 | * closing outer templates. |
184 | * --------------------------------------------------------------------- */ |
185 | |
186 | private function isXMLTag( string $name ): bool { |
187 | $lName = mb_strtolower( $name ); |
188 | return isset( Consts::$HTML['HTML5Tags'][$lName] ) || |
189 | isset( Consts::$HTML['OlderHTMLTags'][$lName] ); |
190 | } |
191 | |
192 | |
193 | |
194 | // cache init |
195 | protected $cache = []; |
196 | |
197 | // expectations |
198 | protected $expectations = [ |
199 | 0 => ["type" => "end", "description" => "end of input"], |
200 | 1 => ["type" => "other", "description" => "start"], |
201 | 2 => ["type" => "other", "description" => "table_start_tag"], |
202 | 3 => ["type" => "class", "value" => "['{]", "description" => "['{]"], |
203 | 4 => ["type" => "literal", "value" => "&", "description" => "\"&\""], |
204 | 5 => ["type" => "other", "description" => "table_attributes"], |
205 | 6 => ["type" => "other", "description" => "generic_newline_attributes"], |
206 | 7 => ["type" => "any", "description" => "any character"], |
207 | 8 => ["type" => "other", "description" => "extlink"], |
208 | 9 => ["type" => "other", "description" => "tlb"], |
209 | 10 => ["type" => "class", "value" => "[ \\t]", "description" => "[ \\t]"], |
210 | 11 => ["type" => "literal", "value" => "<!--", "description" => "\"<!--\""], |
211 | 12 => ["type" => "literal", "value" => "-->", "description" => "\"-->\""], |
212 | 13 => ["type" => "literal", "value" => "|", "description" => "\"|\""], |
213 | 14 => ["type" => "literal", "value" => "{{!}}", "description" => "\"{{!}}\""], |
214 | 15 => ["type" => "literal", "value" => "//", "description" => "\"//\""], |
215 | 16 => ["type" => "class", "value" => "[A-Za-z]", "description" => "[A-Za-z]"], |
216 | 17 => ["type" => "class", "value" => "[-A-Za-z0-9+.]", "description" => "[-A-Za-z0-9+.]"], |
217 | 18 => ["type" => "literal", "value" => ":", "description" => "\":\""], |
218 | 19 => ["type" => "literal", "value" => "[", "description" => "\"[\""], |
219 | 20 => ["type" => "class", "value" => "[0-9A-Fa-f:.]", "description" => "[0-9A-Fa-f:.]"], |
220 | 21 => ["type" => "literal", "value" => "]", "description" => "\"]\""], |
221 | 22 => ["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{]"], |
222 | 23 => ["type" => "literal", "value" => "=", "description" => "\"=\""], |
223 | 24 => ["type" => "class", "value" => "[\\0/=>]", "description" => "[\\0/=>]"], |
224 | 25 => ["type" => "class", "value" => "[ \\u00A0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]", "description" => "[ \\u00A0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]"], |
225 | 26 => ["type" => "literal", "value" => ";", "description" => "\";\""], |
226 | 27 => ["type" => "literal", "value" => "\x0a", "description" => "\"\\n\""], |
227 | 28 => ["type" => "literal", "value" => "\x0d\x0a", "description" => "\"\\r\\n\""], |
228 | 29 => ["type" => "literal", "value" => "{", "description" => "\"{\""], |
229 | 30 => ["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}]"], |
230 | 31 => ["type" => "class", "value" => "[\"'=]", "description" => "[\"'=]"], |
231 | 32 => ["type" => "class", "value" => "[^ \\t\\r\\n\\0/=><&{}\\-!|\\[]", "description" => "[^ \\t\\r\\n\\0/=><&{}\\-!|\\[]"], |
232 | 33 => ["type" => "literal", "value" => "'", "description" => "\"'\""], |
233 | 34 => ["type" => "literal", "value" => "\"", "description" => "\"\\\"\""], |
234 | 35 => ["type" => "literal", "value" => "/", "description" => "\"/\""], |
235 | 36 => ["type" => "class", "value" => "[^ \\t\\r\\n\\0/=><&{}\\-!|]", "description" => "[^ \\t\\r\\n\\0/=><&{}\\-!|]"], |
236 | 37 => ["type" => "class", "value" => "[ \\t\\n\\r\\x0c]", "description" => "[ \\t\\n\\r\\x0c]"], |
237 | 38 => ["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]"], |
238 | 39 => ["type" => "class", "value" => "[&|{\\-!}=]", "description" => "[&|{\\-!}=]"], |
239 | 40 => ["type" => "class", "value" => "[']", "description" => "[']"], |
240 | 41 => ["type" => "literal", "value" => "[[", "description" => "\"[[\""], |
241 | 42 => ["type" => "class", "value" => "[*#:;]", "description" => "[*#:;]"], |
242 | 43 => ["type" => "literal", "value" => "{{", "description" => "\"{{\""], |
243 | 44 => ["type" => "class", "value" => "[^{}&<\\-!\\['\\r\\n|]", "description" => "[^{}&<\\-!\\['\\r\\n|]"], |
244 | 45 => ["type" => "class", "value" => "[{}&<\\-!\\[]", "description" => "[{}&<\\-!\\[]"], |
245 | 46 => ["type" => "class", "value" => "[^{}&<\\-!\\[\"\\r\\n|]", "description" => "[^{}&<\\-!\\[\"\\r\\n|]"], |
246 | 47 => ["type" => "class", "value" => "[^{}&<\\-!\\[ \\t\\n\\r\\x0c|]", "description" => "[^{}&<\\-!\\[ \\t\\n\\r\\x0c|]"], |
247 | 48 => ["type" => "literal", "value" => "<", "description" => "\"<\""], |
248 | 49 => ["type" => "class", "value" => "[^{}&<\\-|/'>]", "description" => "[^{}&<\\-|/'>]"], |
249 | 50 => ["type" => "class", "value" => "[{}&\\-|/]", "description" => "[{}&\\-|/]"], |
250 | 51 => ["type" => "class", "value" => "[^{}&<\\-|/\">]", "description" => "[^{}&<\\-|/\">]"], |
251 | 52 => ["type" => "class", "value" => "[^{}&<\\-|/ \\t\\n\\r\\x0c>]", "description" => "[^{}&<\\-|/ \\t\\n\\r\\x0c>]"], |
252 | 53 => ["type" => "literal", "value" => "__", "description" => "\"__\""], |
253 | 54 => ["type" => "class", "value" => "[^-'<[{\\n\\r:;\\]}|!=]", "description" => "[^-'<[{\\n\\r:;\\]}|!=]"], |
254 | 55 => ["type" => "literal", "value" => "-", "description" => "\"-\""], |
255 | 56 => ["type" => "literal", "value" => "''", "description" => "\"''\""], |
256 | 57 => ["type" => "literal", "value" => "}", "description" => "\"}\""], |
257 | 58 => ["type" => "class", "value" => "[ \\t\\n\\r\\0\\x0b]", "description" => "[ \\t\\n\\r\\0\\x0b]"], |
258 | 59 => ["type" => "literal", "value" => "----", "description" => "\"----\""], |
259 | 60 => ["type" => "literal", "value" => "{{{", "description" => "\"{{{\""], |
260 | 61 => ["type" => "literal", "value" => "}}}", "description" => "\"}}}\""], |
261 | 62 => ["type" => "literal", "value" => "}}", "description" => "\"}}\""], |
262 | 63 => ["type" => "literal", "value" => "]]", "description" => "\"]]\""], |
263 | 64 => ["type" => "literal", "value" => ">", "description" => "\">\""], |
264 | 65 => ["type" => "class", "value" => "[0-9]", "description" => "[0-9]"], |
265 | 66 => ["type" => "literal", "value" => "ISBN", "description" => "\"ISBN\""], |
266 | 67 => ["type" => "class", "value" => "[xX]", "description" => "[xX]"], |
267 | 68 => ["type" => "literal", "value" => "+", "description" => "\"+\""], |
268 | 69 => ["type" => "literal", "value" => "</>", "description" => "\"</>\""], |
269 | 70 => ["type" => "literal", "value" => "#parsoid\x00fragment:", "description" => "\"#parsoid\\u0000fragment:\""], |
270 | 71 => ["type" => "class", "value" => "[^<[{\\n\\r\\t|!\\]}{ &\\-]", "description" => "[^<[{\\n\\r\\t|!\\]}{ &\\-]"], |
271 | 72 => ["type" => "class", "value" => "[!<\\-\\}\\]\\n\\r]", "description" => "[!<\\-\\}\\]\\n\\r]"], |
272 | 73 => ["type" => "literal", "value" => "RFC", "description" => "\"RFC\""], |
273 | 74 => ["type" => "literal", "value" => "PMID", "description" => "\"PMID\""], |
274 | 75 => ["type" => "literal", "value" => "-{", "description" => "\"-{\""], |
275 | 76 => ["type" => "literal", "value" => "}-", "description" => "\"}-\""], |
276 | 77 => ["type" => "literal", "value" => "!", "description" => "\"!\""], |
277 | 78 => ["type" => "class", "value" => "[^\\t\\n\\v />\\0]", "description" => "[^\\t\\n\\v />\\0]"], |
278 | 79 => ["type" => "literal", "value" => "!!", "description" => "\"!!\""], |
279 | 80 => ["type" => "literal", "value" => "||", "description" => "\"||\""], |
280 | 81 => ["type" => "literal", "value" => "{{!}}{{!}}", "description" => "\"{{!}}{{!}}\""], |
281 | 82 => ["type" => "literal", "value" => "=>", "description" => "\"=>\""], |
282 | 83 => ["type" => "class", "value" => "[-+A-Z]", "description" => "[-+A-Z]"], |
283 | 84 => ["type" => "class", "value" => "[^{}|;]", "description" => "[^{}|;]"], |
284 | 85 => ["type" => "class", "value" => "[a-z]", "description" => "[a-z]"], |
285 | 86 => ["type" => "class", "value" => "[-a-zA-Z]", "description" => "[-a-zA-Z]"], |
286 | ]; |
287 | |
288 | // actions |
289 | private function a0() { |
290 | |
291 | $this->startTime = null; |
292 | if ( $this->env->profiling() ) { |
293 | $profile = $this->env->getCurrentProfile(); |
294 | $this->startTime = microtime( true ); |
295 | } |
296 | return true; |
297 | |
298 | } |
299 | private function a1($t) { |
300 | |
301 | if ( $this->env->profiling() ) { |
302 | $profile = $this->env->getCurrentProfile(); |
303 | $profile->bumpTimeUse( |
304 | 'PEG', 1000 * ( microtime( true ) - $this->startTime ), 'PEG' ); |
305 | } |
306 | return true; |
307 | |
308 | } |
309 | private function a2($t) { |
310 | return $t; |
311 | } |
312 | private function a3() { |
313 | |
314 | // "tlb" matches "block" matches "sol" matches "newlineToken" |
315 | // But, "tlb" is prefixed with a !eof clause, so, we should only |
316 | // get here on eof. So, safe to unconditionally terminate the |
317 | // generator loop here. |
318 | return false; |
319 | |
320 | } |
321 | private function a4($t, $n) { |
322 | |
323 | if ( count( $t ) ) { |
324 | $ret = TokenizerUtils::flattenIfArray( $t ); |
325 | } else { |
326 | $ret = []; |
327 | } |
328 | if ( count( $n ) ) { |
329 | PHPUtils::pushArray($ret, $n); |
330 | } |
331 | $ret[] = new EOFTk(); |
332 | return $ret; |
333 | |
334 | } |
335 | private function a5($sc) { |
336 | return $this->endOffset(); |
337 | } |
338 | private function a6($sc, $startPos, $b, $p) { |
339 | $this->unreachable(); |
340 | } |
341 | private function a7($sc, $startPos, $b, $p, $ta) { |
342 | return $this->endOffset(); |
343 | } |
344 | private function a8($sc, $startPos, $b, $p, $ta, $tsEndPos, $s2) { |
345 | |
346 | $coms = TokenizerUtils::popComments( $ta ); |
347 | if ( $coms ) { |
348 | $tsEndPos = $coms['commentStartPos']; |
349 | } |
350 | |
351 | $dp = new DataParsoid; |
352 | $dp->tsr = new SourceRange( $startPos, $tsEndPos ); |
353 | if ( $p !== '|' ) { |
354 | // Variation from default |
355 | $dp->startTagSrc = $b . $p; |
356 | } |
357 | |
358 | return array_merge( $sc, |
359 | [ new TagTk( 'table', $ta, $dp ) ], |
360 | $coms ? $coms['buf'] : [], |
361 | $s2 ); |
362 | |
363 | } |
364 | private function a9($proto, $addr, $he) { |
365 | return $he; |
366 | } |
367 | private function a10($proto, $addr, $r) { |
368 | return $r; |
369 | } |
370 | private function a11($proto, $addr, $c) { |
371 | return $c; |
372 | } |
373 | private function a12($proto, $addr, $path) { |
374 | return $addr !== '' || count( $path ) > 0; |
375 | } |
376 | private function a13($proto, $addr, $path) { |
377 | |
378 | return TokenizerUtils::flattenString( array_merge( [ $proto, $addr ], $path ) ); |
379 | |
380 | } |
381 | private function a14($as, $s, $p) { |
382 | |
383 | return [ $as, $s, $p ]; |
384 | |
385 | } |
386 | private function a15($b) { |
387 | return $b; |
388 | } |
389 | private function a16($r) { |
390 | return TokenizerUtils::flattenIfArray( $r ); |
391 | } |
392 | private function a17() { |
393 | return $this->endOffset(); |
394 | } |
395 | private function a18($p0, $addr, $target) { |
396 | return TokenizerUtils::flattenString( [ $addr, $target ] ); |
397 | } |
398 | private function a19($p0, $flat) { |
399 | |
400 | // Protocol must be valid and there ought to be at least one |
401 | // post-protocol character. So strip last char off target |
402 | // before testing protocol. |
403 | if ( is_array( $flat ) ) { |
404 | // There are templates present, alas. |
405 | return count( $flat ) > 0; |
406 | } |
407 | return Utils::isProtocolValid( substr( $flat, 0, -1 ), $this->env ); |
408 | |
409 | } |
410 | private function a20($p0, $flat) { |
411 | return $this->endOffset(); |
412 | } |
413 | private function a21($p0, $flat, $p1, $sp) { |
414 | return $this->endOffset(); |
415 | } |
416 | private function a22($p0, $flat, $p1, $sp, $p2, $content) { |
417 | return $this->endOffset(); |
418 | } |
419 | private function a23($p0, $flat, $p1, $sp, $p2, $content, $p3) { |
420 | |
421 | $tsr1 = new SourceRange( $p0, $p1 ); |
422 | $tsr2 = new SourceRange( $p2, $p3 ); |
423 | $dp = new DataParsoid; |
424 | $dp->tsr = $this->tsrOffsets(); |
425 | $dp->getTemp()->extLinkContentOffsets = $tsr2; |
426 | return [ |
427 | new SelfclosingTagTk( |
428 | 'extlink', |
429 | [ |
430 | new KV( 'href', $flat, $tsr1->expandTsrV() ), |
431 | new KV( 'mw:content', $content ?? '', $tsr2->expandTsrV() ), |
432 | new KV( 'spaces', $sp ) |
433 | ], |
434 | $dp |
435 | ) |
436 | ]; |
437 | } |
438 | private function a24($r) { |
439 | return $r; |
440 | } |
441 | private function a25($b) { |
442 | |
443 | // Clear the tokenizer's backtracking cache after matching each |
444 | // toplevelblock. There won't be any backtracking as a document is just a |
445 | // sequence of toplevelblocks, so the cache for previous toplevelblocks |
446 | // will never be needed. |
447 | $end = $this->startOffset(); |
448 | for ( ; $this->prevOffset < $end; $this->prevOffset++ ) { |
449 | unset( $this->cache[$this->prevOffset] ); |
450 | } |
451 | |
452 | $tokens = null; |
453 | if ( is_array( $b ) && count( $b ) ) { |
454 | $tokens = TokenizerUtils::flattenIfArray( $b ); |
455 | } elseif ( is_string( $b ) ) { |
456 | $tokens = [ $b ]; |
457 | } |
458 | |
459 | // Emit tokens for this toplevelblock. This feeds a chunk to the parser pipeline. |
460 | return $this->emitChunk( $tokens ); |
461 | |
462 | } |
463 | private function a26() { |
464 | return [ new NlTk( $this->tsrOffsets() ) ]; |
465 | } |
466 | private function a27($c, $cEnd) { |
467 | |
468 | $data = WTUtils::encodeComment( $c ); |
469 | $dp = new DataParsoid; |
470 | $dp->tsr = $this->tsrOffsets(); |
471 | if ( $cEnd !== '-->' ) { |
472 | $dp->unclosedComment = true; |
473 | } |
474 | return [ new CommentTk( $data, $dp ) ]; |
475 | |
476 | } |
477 | private function a28($p) { |
478 | return Utils::isProtocolValid( $p, $this->env ); |
479 | } |
480 | private function a29($p) { |
481 | return $p; |
482 | } |
483 | private function a30($annOrExtTag, $h, $extlink, $intemplate, &$preproc, $equal, $table, $templateArg, $tableCellArg, $semicolon, $arrow, $linkdesc, $colon, &$th) { |
484 | |
485 | return TokenizerUtils::inlineBreaks( $this->input, $this->endOffset(), [ |
486 | 'annOrExtTag' => $annOrExtTag, |
487 | 'h' => $h, |
488 | 'extlink' => $extlink, |
489 | 'intemplate' => $intemplate, |
490 | 'preproc' => $preproc, |
491 | 'equal' => $equal, |
492 | 'table' => $table, |
493 | 'templateArg' => $templateArg, |
494 | 'tableCellArg' => $tableCellArg, |
495 | 'semicolon' => $semicolon, |
496 | 'arrow' => $arrow, |
497 | 'linkdesc' => $linkdesc, |
498 | 'colon' => $colon, |
499 | 'th' => $th |
500 | ], $this->env ); |
501 | |
502 | } |
503 | private function a31($t) { |
504 | |
505 | return $t; |
506 | |
507 | } |
508 | private function a32($cc) { |
509 | |
510 | // if this is an invalid entity, don't tag it with 'mw:Entity' |
511 | // note that some entities (like ∾̳) decode to 2 codepoints! |
512 | if ( mb_strlen( $cc ) > 2 /* decoded entity would be 1-2 codepoints */ ) { |
513 | return $cc; |
514 | } |
515 | $dpStart = new DataParsoid; |
516 | $dpStart->src = $this->text(); |
517 | $dpStart->srcContent = $cc; |
518 | $dpStart->tsr = $this->tsrOffsets( 'start' ); |
519 | $dpEnd = new DataParsoid; |
520 | $dpEnd->tsr = $this->tsrOffsets( 'end' ); |
521 | return [ |
522 | // If this changes, the nowiki extension's toDOM will need to follow suit |
523 | new TagTk( 'span', [ new KV( 'typeof', 'mw:Entity' ) ], $dpStart ), |
524 | $cc, |
525 | new EndTagTk( 'span', [], $dpEnd ) |
526 | ]; |
527 | |
528 | } |
529 | private function a33($s) { |
530 | return $this->endOffset(); |
531 | } |
532 | private function a34($s, $namePos0, $name) { |
533 | return $this->endOffset(); |
534 | } |
535 | private function a35($s, $namePos0, $name, $namePos1, $v) { |
536 | return $v; |
537 | } |
538 | private function a36($s, $namePos0, $name, $namePos1, $vd) { |
539 | |
540 | // NB: Keep in sync w/ generic_newline_attribute |
541 | $res = null; |
542 | // Encapsulate protected attributes. |
543 | if ( gettype( $name ) === 'string' ) { |
544 | $name = TokenizerUtils::protectAttrs( $name ); |
545 | } |
546 | $nameSO = new SourceRange( $namePos0, $namePos1 ); |
547 | if ( $vd !== null ) { |
548 | $res = new KV( $name, $vd['value'], $nameSO->join( $vd['srcOffsets'] ) ); |
549 | $res->vsrc = $vd['srcOffsets']->substr( $this->input ); |
550 | } else { |
551 | $res = new KV( $name, '', $nameSO->expandTsrK() ); |
552 | } |
553 | if ( is_array( $name ) ) { |
554 | $res->ksrc = $nameSO->substr( $this->input ); |
555 | } |
556 | return $res; |
557 | |
558 | } |
559 | private function a37($s) { |
560 | |
561 | if ( $s !== '' ) { |
562 | return [ $s ]; |
563 | } else { |
564 | return []; |
565 | } |
566 | |
567 | } |
568 | private function a38($c) { |
569 | return new KV( $c, '' ); |
570 | } |
571 | private function a39($namePos0, $name) { |
572 | return $this->endOffset(); |
573 | } |
574 | private function a40($namePos0, $name, $namePos1, $v) { |
575 | return $v; |
576 | } |
577 | private function a41($namePos0, $name, $namePos1, $vd) { |
578 | |
579 | // NB: Keep in sync w/ table_attibute |
580 | $res = null; |
581 | // Encapsulate protected attributes. |
582 | if ( is_string( $name ) ) { |
583 | $name = TokenizerUtils::protectAttrs( $name ); |
584 | } |
585 | $nameSO = new SourceRange( $namePos0, $namePos1 ); |
586 | if ( $vd !== null ) { |
587 | $res = new KV( $name, $vd['value'], $nameSO->join( $vd['srcOffsets'] ) ); |
588 | $res->vsrc = $vd['srcOffsets']->substr( $this->input ); |
589 | } else { |
590 | $res = new KV( $name, '', $nameSO->expandTsrK() ); |
591 | } |
592 | if ( is_array( $name ) ) { |
593 | $res->ksrc = $nameSO->substr( $this->input ); |
594 | } |
595 | return $res; |
596 | |
597 | } |
598 | private function a42($s) { |
599 | return $s; |
600 | } |
601 | private function a43($c) { |
602 | |
603 | return TokenizerUtils::flattenStringlist( $c ); |
604 | |
605 | } |
606 | private function a44($lc) { |
607 | return $lc; |
608 | } |
609 | private function a45($bullets, $colons, $d) { |
610 | |
611 | $bulletToks = []; |
612 | // Leave bullets as an array -- list handler expects this |
613 | // TSR: +1 for the leading ";" |
614 | $numBullets = count( $bullets ) + 1; |
615 | $tsr = $this->tsrOffsets( 'start' ); |
616 | $tsr->end += $numBullets; |
617 | $li1Bullets = $bullets; |
618 | $li1Bullets[] = ';'; |
619 | $dp = new DataParsoid; |
620 | $dp->tsr = $tsr; |
621 | $bulletToks[] = new TagTk( 'listItem', [ new KV( 'bullets', $li1Bullets, $tsr->expandTsrV() ) ], $dp ); |
622 | foreach ( $colons as $colon) { |
623 | if ( $colon[0] ) { // can be null because of "?" in dtdd_colon |
624 | $bulletToks[] = $colon[0]; |
625 | } |
626 | $cpos = $colon[1]; |
627 | // TSR: -1 for the intermediate ":" |
628 | $li2Bullets = $bullets; |
629 | $li2Bullets[] = ':'; |
630 | $tsr2 = new SourceRange( $cpos - 1, $cpos ); |
631 | $dp2 = new DataParsoid; |
632 | $dp2->tsr = $tsr2; |
633 | $dp2->stx = 'row'; |
634 | $bulletToks[] = new TagTk( 'listItem', [ new KV( 'bullets', $li2Bullets, $tsr2->expandTsrV() ) ], $dp2 ); |
635 | } |
636 | |
637 | if ( $d ) { |
638 | $bulletToks = array_merge( $bulletToks, $d ); |
639 | } |
640 | return $bulletToks; |
641 | |
642 | } |
643 | private function a46($bullets, $tbl, $line) { |
644 | |
645 | // Leave bullets as an array -- list handler expects this |
646 | $tsr = $this->tsrOffsets( 'start' ); |
647 | $tsr->end += count( $bullets ); |
648 | $dp = new DataParsoid; |
649 | $dp->tsr = $tsr; |
650 | $li = new TagTk( 'listItem', [ new KV( 'bullets', $bullets, $tsr->expandTsrV() ) ], $dp ); |
651 | return TokenizerUtils::flattenIfArray( [ $li, $tbl, $line ?: [] ] ); |
652 | |
653 | } |
654 | private function a47($bullets, $c) { |
655 | |
656 | // Leave bullets as an array -- list handler expects this |
657 | $tsr = $this->tsrOffsets( 'start' ); |
658 | $tsr->end += count( $bullets ); |
659 | $dp = new DataParsoid; |
660 | $dp->tsr = $tsr; |
661 | $li = new TagTk( 'listItem', [ new KV( 'bullets', $bullets, $tsr->expandTsrV() ) ], $dp ); |
662 | return array_merge( [ $li ], $c ?: [] ); |
663 | |
664 | } |
665 | private function a48() { |
666 | return $this->endOffset() === $this->inputLength; |
667 | } |
668 | private function a49($r, $cil, $bl) { |
669 | |
670 | return array_merge( [ $r ], $cil, $bl ?: [] ); |
671 | |
672 | } |
673 | private function a50($a) { |
674 | return $a; |
675 | } |
676 | private function a51($a, $b) { |
677 | return [ $a, $b ]; |
678 | } |
679 | private function a52($m) { |
680 | |
681 | return Utils::decodeWtEntities( $m ); |
682 | |
683 | } |
684 | private function a53($q, $x, $ill) { |
685 | return array_merge( [$x], $ill ?: [] ); |
686 | } |
687 | private function a54($q, $t) { |
688 | return $t; |
689 | } |
690 | private function a55($q, $r) { |
691 | return count( $r ) > 0 || $q !== ''; |
692 | } |
693 | private function a56($q, $r) { |
694 | |
695 | array_unshift( $r, $q ); |
696 | return TokenizerUtils::flattenString( $r ); |
697 | |
698 | } |
699 | private function a57($s, $t, $q) { |
700 | |
701 | return TokenizerUtils::getAttrVal( $t, $this->startOffset() + strlen( $s ), $this->endOffset() - strlen( $q ) ); |
702 | |
703 | } |
704 | private function a58($s, $t) { |
705 | |
706 | return TokenizerUtils::getAttrVal( $t, $this->startOffset() + strlen( $s ), $this->endOffset() ); |
707 | |
708 | } |
709 | private function a59($r) { |
710 | |
711 | return TokenizerUtils::flattenString( $r ); |
712 | |
713 | } |
714 | private function a60() { |
715 | |
716 | if ( preg_match( $this->reUrltextLookahead, $this->input, $m, 0, $this->currPos ) ) { |
717 | $plain = $m[1]; |
718 | $this->urltextPlainSegment = $plain; |
719 | $this->urltextFoundAutolink = ( $m[2] ?? '' ) !== ''; |
720 | return (bool)strlen( $plain ); |
721 | } else { |
722 | $this->urltextFoundAutolink = false; |
723 | return false; |
724 | } |
725 | |
726 | } |
727 | private function a61() { |
728 | |
729 | $this->currPos += strlen( $this->urltextPlainSegment ); |
730 | return $this->urltextPlainSegment; |
731 | |
732 | } |
733 | private function a62() { |
734 | return $this->urltextFoundAutolink; |
735 | } |
736 | private function a63($al) { |
737 | return $al; |
738 | } |
739 | private function a64($he) { |
740 | return $he; |
741 | } |
742 | private function a65($bs) { |
743 | return $bs; |
744 | } |
745 | private function a66($c) { |
746 | return $this->endOffset(); |
747 | } |
748 | private function a67($c, $cpos) { |
749 | |
750 | return [ $c, $cpos ]; |
751 | |
752 | } |
753 | private function a68($tl) { |
754 | |
755 | return $tl; |
756 | |
757 | } |
758 | private function a69($sp, $elc, $st) { |
759 | |
760 | return [ $sp, $elc ?? [], $st ]; |
761 | |
762 | } |
763 | private function a70() { |
764 | return $this->endOffset() === 0 && !$this->pipelineOffset; |
765 | } |
766 | private function a71($rw, $sp, $c, $wl) { |
767 | |
768 | return count( $wl ) === 1 && $wl[0] instanceof Token; |
769 | |
770 | } |
771 | private function a72($rw, $sp, $c, $wl) { |
772 | |
773 | $link = $wl[0]; |
774 | if ( $sp ) { |
775 | $rw .= $sp; |
776 | } |
777 | if ( $c ) { |
778 | $rw .= $c; |
779 | } |
780 | // Build a redirect token |
781 | $dp = new DataParsoid; |
782 | $dp->src = $rw; |
783 | $dp->tsr = $this->tsrOffsets(); |
784 | $dp->linkTk = $link; |
785 | $redirect = new SelfclosingTagTk( 'mw:redirect', |
786 | // Put 'href' into attributes so it gets template-expanded |
787 | [ $link->getAttributeKV( 'href' ) ], |
788 | $dp |
789 | ); |
790 | return $redirect; |
791 | |
792 | } |
793 | private function a73($st, $tl) { |
794 | |
795 | return array_merge( $st, $tl ); |
796 | |
797 | } |
798 | private function a74($s, $os, $so) { |
799 | return array_merge( $os, $so ); |
800 | } |
801 | private function a75($s, $s2, $bl) { |
802 | |
803 | return array_merge( $s, $s2 ?: [], $bl ); |
804 | |
805 | } |
806 | private function a76(&$preproc, $t) { |
807 | |
808 | $preproc = null; |
809 | return $t; |
810 | |
811 | } |
812 | private function a77($v) { |
813 | return $v; |
814 | } |
815 | private function a78($e) { |
816 | return $e; |
817 | } |
818 | private function a79() { |
819 | return Utils::isUniWord(Utils::lastUniChar( $this->input, $this->endOffset() ) ); |
820 | } |
821 | private function a80($bs) { |
822 | |
823 | if ( $this->siteConfig->isBehaviorSwitch( $bs ) ) { |
824 | $dp = new DataParsoid; |
825 | $dp->tsr = $this->tsrOffsets(); |
826 | $dp->src = $bs; |
827 | $dp->magicSrc = $bs; |
828 | return [ |
829 | new SelfclosingTagTk( 'behavior-switch', [ new KV( 'word', $bs ) ], $dp ) |
830 | ]; |
831 | } else { |
832 | return [ $bs ]; |
833 | } |
834 | |
835 | } |
836 | private function a81($quotes) { |
837 | |
838 | // sequences of four or more than five quotes are assumed to start |
839 | // with some number of plain-text apostrophes. |
840 | $plainticks = 0; |
841 | $result = []; |
842 | if ( strlen( $quotes ) === 4 ) { |
843 | $plainticks = 1; |
844 | } elseif ( strlen( $quotes ) > 5 ) { |
845 | $plainticks = strlen( $quotes ) - 5; |
846 | } |
847 | if ( $plainticks > 0 ) { |
848 | $result[] = substr( $quotes, 0, $plainticks ); |
849 | } |
850 | // mw-quote token will be consumed in token transforms |
851 | $tsr = $this->tsrOffsets(); |
852 | $tsr->start += $plainticks; |
853 | $dp = new DataParsoid; |
854 | $dp->tsr = $tsr; |
855 | $mwq = new SelfclosingTagTk( 'mw-quote', |
856 | [ new KV( 'value', substr( $quotes, $plainticks ) ) ], |
857 | $dp ); |
858 | if ( strlen( $quotes ) > 2 ) { |
859 | $mwq->addAttribute( 'isSpace_1', $tsr->start > 0 && substr( $this->input, $tsr->start - 1, 1 ) === ' '); |
860 | $mwq->addAttribute( 'isSpace_2', $tsr->start > 1 && substr( $this->input, $tsr->start - 2, 1 ) === ' '); |
861 | } |
862 | $result[] = $mwq; |
863 | return $result; |
864 | |
865 | } |
866 | private function a82($sc, $startPos, $p, $b) { |
867 | |
868 | $dp = new DataParsoid; |
869 | $dp->tsr = new SourceRange( $startPos, $this->endOffset() ); |
870 | $tblEnd = new EndTagTk( 'table', [], $dp ); |
871 | if ( $p !== '|' ) { |
872 | // p+"<brace-char>" is triggering some bug in pegJS |
873 | // I cannot even use that expression in the comment! |
874 | $tblEnd->dataParsoid->endTagSrc = $p . $b; |
875 | } |
876 | array_push( $sc, $tblEnd ); |
877 | return $sc; |
878 | |
879 | } |
880 | private function a83() { |
881 | |
882 | // Use the sol flag only at the start of the input |
883 | // Flag should always be an actual boolean (not falsy or undefined) |
884 | $this->assert( is_bool( $this->options['sol'] ), 'sol should be boolean' ); |
885 | return $this->endOffset() === 0 && $this->options['sol']; |
886 | |
887 | } |
888 | private function a84() { |
889 | |
890 | return []; |
891 | |
892 | } |
893 | private function a85($p, $c) { |
894 | |
895 | $dp = new DataParsoid; |
896 | $dp->tsr = new SourceRange( $p, $this->endOffset() ); |
897 | $dp->tokens = TokenizerUtils::flattenIfArray( $c ); |
898 | return [ |
899 | new SelfclosingTagTk( 'meta', [ new KV( 'typeof', 'mw:EmptyLine' ) ], $dp ) |
900 | ]; |
901 | |
902 | } |
903 | private function a86($rw) { |
904 | |
905 | return preg_match( $this->env->getSiteConfig()->getMagicWordMatcher( 'redirect' ), $rw ); |
906 | |
907 | } |
908 | private function a87($t) { |
909 | |
910 | $tagName = mb_strtolower( $t->getName() ); |
911 | switch ( $tagName ) { |
912 | case 'includeonly': |
913 | $typeOf = 'mw:Includes/IncludeOnly'; |
914 | break; |
915 | case 'noinclude': |
916 | $typeOf = 'mw:Includes/NoInclude'; |
917 | break; |
918 | case 'onlyinclude': |
919 | $typeOf = 'mw:Includes/OnlyInclude'; |
920 | break; |
921 | default: |
922 | $this->unreachable(); |
923 | } |
924 | |
925 | $isEnd = ( $t instanceof EndTagTk ); |
926 | if ( $isEnd ) { |
927 | $typeOf .= '/End'; |
928 | } |
929 | |
930 | $dp = new DataParsoid; |
931 | $dp->tsr = $t->dataParsoid->tsr; |
932 | $dp->src = $dp->tsr->substr( $this->input ); |
933 | |
934 | $meta = new SelfclosingTagTk( |
935 | 'meta', [ new KV( 'typeof', $typeOf ) ], $dp |
936 | ); |
937 | |
938 | $startTagWithContent = false; |
939 | if ( $t instanceof TagTk ) { |
940 | $endTagRE = '~.*?(</' . preg_quote( $tagName, '~' ) . '\s*>)~iusA'; |
941 | $startTagWithContent = preg_match( |
942 | $endTagRE, $this->input, $content, 0, $dp->tsr->start |
943 | ); |
944 | } |
945 | |
946 | if ( !empty( $this->pipelineOpts['inTemplate'] ) ) { |
947 | switch ( $tagName ) { |
948 | case 'includeonly': |
949 | // Drop the tag |
950 | return []; |
951 | case 'noinclude': |
952 | if ( $startTagWithContent ) { |
953 | // Skip the content |
954 | $this->currPos = $dp->tsr->start + strlen( $content[0] ); |
955 | } |
956 | // Drop it all |
957 | return []; |
958 | case 'onlyinclude': |
959 | if ( $startTagWithContent ) { |
960 | // Parse the content, strip eof, and shift tsr |
961 | $contentSrc = $content[0]; |
962 | $endOffset = $dp->tsr->start + strlen( $contentSrc ); |
963 | $endTagWidth = strlen( $content[1] ); |
964 | $tagOffsets = new DomSourceRange( |
965 | $dp->tsr->start, $endOffset, |
966 | $dp->tsr->length(), $endTagWidth |
967 | ); |
968 | $this->currPos = $tagOffsets->innerEnd(); |
969 | $justContent = $tagOffsets->stripTags( $contentSrc ); |
970 | // FIXME: What about the pipelineOpts of the current pipeline? |
971 | $tokenizer = new PegTokenizer( $this->env ); |
972 | $tokenizer->setSourceOffsets( $tagOffsets->innerRange() ); |
973 | $contentToks = $tokenizer->tokenizeSync( |
974 | $justContent, [ 'sol' => true ] |
975 | ); |
976 | TokenUtils::stripEOFTkFromTokens( $contentToks ); |
977 | array_unshift( $contentToks, $t ); |
978 | return $contentToks; |
979 | } else { |
980 | return [$t]; |
981 | } |
982 | } |
983 | } else { |
984 | $tokens = [ $meta ]; |
985 | if ( $tagName === 'includeonly' ) { |
986 | if ( $startTagWithContent ) { |
987 | // Add the content / end tag to the meta for roundtripping |
988 | $dp->tsr->end = $dp->tsr->start + strlen( $content[0] ); |
989 | $dp->src = $dp->tsr->substr( $this->input ); |
990 | $meta->dataMw = new DataMw( [ 'src' => $dp->src ] ); |
991 | $this->currPos = $dp->tsr->end; |
992 | // FIXME: We shouldn't bother with this because SelfclosingTk |
993 | // was never balanced to begin with |
994 | if ( strlen( $content[1] ) ) { |
995 | $eDp = new DataParsoid; |
996 | $eDp->tsr = new SourceRange( $dp->tsr->end, $dp->tsr->end ); |
997 | $eDp->src = $eDp->tsr->substr( $this->input ); |
998 | $tokens[] = new SelfclosingTagTk( 'meta', [ |
999 | new KV( 'typeof', 'mw:Includes/IncludeOnly/End' ) |
1000 | ], $eDp ); |
1001 | } |
1002 | } elseif ( !( $t instanceof EndTagTk ) ) { |
1003 | $meta->dataMw = new DataMw( [ 'src' => $dp->src ] ); |
1004 | } else { |
1005 | // Compatibility with the legacy parser which leaves these in |
1006 | // as strings, which the sanitizer will do for us |
1007 | array_pop( $tokens ); |
1008 | $tokens[] = $t; |
1009 | } |
1010 | } |
1011 | return $tokens; |
1012 | } |
1013 | |
1014 | } |
1015 | private function a88($t) { |
1016 | |
1017 | $end = ( $t instanceof EndTagTk ); |
1018 | $attribs = $t->attribs; |
1019 | $tagName = mb_strtolower( $t->getName() ); |
1020 | $tsr = $t->dataParsoid->tsr; |
1021 | |
1022 | // We already applied this logic in WTUtils::isAnnotationTag |
1023 | // to get here so we can make some assumptions. |
1024 | if ( !$this->siteConfig->isAnnotationTag( $tagName ) ) { |
1025 | $pipepos = strpos( $tagName, '|' ); |
1026 | $strBeforePipe = substr( $tagName, 0, $pipepos ); |
1027 | $newName = substr( $tagName, $pipepos + 1, strlen( $tagName ) - $pipepos - 1 ); |
1028 | $attribs = [ new KV( "name", $newName ) ]; |
1029 | $tagName = $strBeforePipe; |
1030 | } |
1031 | |
1032 | $metaAttrs = [ new KV( 'typeof', 'mw:Annotation/' . $tagName . ( $end ? '/End' : '' ) ) ]; |
1033 | $datamw = null; |
1034 | if ( count( $attribs ) > 0 ) { |
1035 | $attrMap = []; |
1036 | foreach ( $attribs as $attr ) { |
1037 | // If the key or the value is not a string, |
1038 | // we replace it by the thing that generated it and |
1039 | // consider that wikitext as a raw string instead. |
1040 | $k = is_string( $attr->k ) ? $attr->k : $attr->ksrc; |
1041 | $v = is_string( $attr->v ) ? $attr->v : $attr->vsrc; |
1042 | $attrMap[$k] = $v; |
1043 | } |
1044 | // Possible follow-up in T295168 for attribute sanitation |
1045 | // T367616: 'attrs' should be renamed to 'extAttrs' |
1046 | $datamw = new DataMw( [ 'attrs' => (object)$attrMap ] ); |
1047 | } |
1048 | $dp = new DataParsoid(); |
1049 | $dp->tsr = $tsr; |
1050 | $this->env->hasAnnotations = true; |
1051 | |
1052 | return new SelfclosingTagTk ( 'meta', $metaAttrs, $dp, $datamw ); |
1053 | |
1054 | } |
1055 | private function a89($tag) { |
1056 | |
1057 | // FIXME: Suppress annotation meta tokens from template pipelines |
1058 | // since they may not have TSR values and won't get recognized as |
1059 | // annotation ranges. Without TSR, they might end up stuck in |
1060 | // fosterable positions and cause havoc on edits by breaking selser. |
1061 | if ( empty( $this->pipelineOpts['inTemplate'] ) ) { |
1062 | return $tag; |
1063 | } else { |
1064 | return ''; |
1065 | } |
1066 | |
1067 | } |
1068 | private function a90($s, $ill) { |
1069 | return $ill ?: []; |
1070 | } |
1071 | private function a91($s, $ce) { |
1072 | return $ce || strlen( $s ) > 2; |
1073 | } |
1074 | private function a92($s, $ce) { |
1075 | return $this->endOffset(); |
1076 | } |
1077 | private function a93($s, $ce, $endTPos, $spc) { |
1078 | |
1079 | $c = null; |
1080 | $e = null; |
1081 | $level = null; |
1082 | if ( $ce ) { |
1083 | $c = $ce[0]; |
1084 | $e = $ce[1]; |
1085 | $level = min( strlen( $s ), strlen( $e ) ); |
1086 | } else { |
1087 | // split up equal signs into two equal parts, with at least |
1088 | // one character in the middle. |
1089 | $level = (int)floor( ( strlen( $s ) - 1 ) / 2 ); |
1090 | $c = [ str_repeat( '=', strlen( $s ) - 2 * $level ) ]; |
1091 | $s = $e = str_repeat( '=', $level ); |
1092 | } |
1093 | $level = min( 6, $level ); |
1094 | // convert surplus equals into text |
1095 | if ( strlen( $s ) > $level ) { |
1096 | $extras1 = substr( $s, 0, strlen( $s ) - $level ); |
1097 | if ( is_string( $c[0] ) ) { |
1098 | $c[0] = $extras1 . $c[0]; |
1099 | } else { |
1100 | array_unshift( $c, $extras1 ); |
1101 | } |
1102 | } |
1103 | if ( strlen( $e ) > $level ) { |
1104 | $extras2 = substr( $e, 0, strlen( $e ) - $level ); |
1105 | $lastElem = PHPUtils::lastItem( $c ); |
1106 | if ( is_string( $lastElem ) ) { |
1107 | $c[count( $c ) - 1] .= $extras2; |
1108 | } else { |
1109 | $c[] = $extras2; |
1110 | } |
1111 | } |
1112 | |
1113 | $tagDP = new DataParsoid; |
1114 | $tagDP->tsr = $this->tsrOffsets( 'start' ); |
1115 | $tagDP->tsr->end += $level; |
1116 | // Match the old parser's behavior by |
1117 | // (a) making headingIndex part of tokenizer state |
1118 | // (don't reuse pipeline! see $this->resetState above) |
1119 | // (b) assigning the index when ==*== is tokenized, |
1120 | // even if we're inside a template argument |
1121 | // or other context which won't end up putting the heading |
1122 | // on the output page. T213468/T214538 |
1123 | $this->headingIndex++; |
1124 | $tagDP->getTemp()->headingIndex = $this->headingIndex; |
1125 | $res = [ new TagTk( 'h' . $level, [], $tagDP ) ]; |
1126 | |
1127 | PHPUtils::pushArray( $res, $c ); |
1128 | |
1129 | $endTagDP = new DataParsoid; |
1130 | $endTagDP->tsr = new SourceRange( $endTPos - $level, $endTPos ); |
1131 | $res[] = new EndTagTk( 'h' . $level, [], $endTagDP ); |
1132 | $res[] = $spc; |
1133 | return $res; |
1134 | |
1135 | } |
1136 | private function a94($d) { |
1137 | return null; |
1138 | } |
1139 | private function a95($d) { |
1140 | return true; |
1141 | } |
1142 | private function a96($d, $lineContent) { |
1143 | |
1144 | $dataParsoid = new DataParsoid; |
1145 | $dataParsoid->tsr = $this->tsrOffsets(); |
1146 | if ( $lineContent !== null ) { |
1147 | $dataParsoid->lineContent = $lineContent; |
1148 | } |
1149 | if ( strlen( $d ) > 0 ) { |
1150 | $dataParsoid->extra_dashes = strlen( $d ); |
1151 | } |
1152 | return [new SelfclosingTagTk( 'hr', [], $dataParsoid )]; |
1153 | |
1154 | } |
1155 | private function a97($p, $target) { |
1156 | return $this->endOffset(); |
1157 | } |
1158 | private function a98($p, $target, $p0, $v) { |
1159 | return $this->endOffset(); |
1160 | } |
1161 | private function a99($p, $target, $p0, $v, $p1) { |
1162 | |
1163 | // empty argument |
1164 | return [ 'tokens' => $v, 'srcOffsets' => new SourceRange( $p0, $p1 ) ]; |
1165 | |
1166 | } |
1167 | private function a100($p, $target, $r) { |
1168 | return $r; |
1169 | } |
1170 | private function a101($p, $target, $params) { |
1171 | |
1172 | $kvs = []; |
1173 | |
1174 | if ( $target === null ) { |
1175 | $target = [ 'tokens' => '', 'srcOffsets' => new SourceRange( $p, $p ) ]; |
1176 | } |
1177 | // Insert target as first positional attribute, so that it can be |
1178 | // generically expanded. The TemplateHandler then needs to shift it out |
1179 | // again. |
1180 | $kvs[] = new KV( TokenizerUtils::flattenIfArray( $target['tokens'] ), '', $target['srcOffsets']->expandTsrK() ); |
1181 | |
1182 | foreach ( $params as $o ) { |
1183 | $s = $o['srcOffsets']; |
1184 | $kvs[] = new KV( '', TokenizerUtils::flattenIfArray( $o['tokens'] ), $s->expandTsrV() ); |
1185 | } |
1186 | |
1187 | $dp = new DataParsoid; |
1188 | $dp->tsr = $this->tsrOffsets(); |
1189 | $dp->src = $this->text(); |
1190 | $obj = new SelfclosingTagTk( 'templatearg', $kvs, $dp ); |
1191 | return $obj; |
1192 | |
1193 | } |
1194 | private function a102($leadWS, $target) { |
1195 | return $this->endOffset(); |
1196 | } |
1197 | private function a103($leadWS, $target, $p0, $v) { |
1198 | return $this->endOffset(); |
1199 | } |
1200 | private function a104($leadWS, $target, $p0, $v, $p1) { |
1201 | |
1202 | // empty argument |
1203 | $tsr0 = new SourceRange( $p0, $p1 ); |
1204 | return new KV( '', TokenizerUtils::flattenIfArray( $v ), $tsr0->expandTsrV() ); |
1205 | |
1206 | } |
1207 | private function a105($leadWS, $target, $r) { |
1208 | return $r; |
1209 | } |
1210 | private function a106($leadWS, $target, $params, $trailWS) { |
1211 | |
1212 | // Insert target as first positional attribute, so that it can be |
1213 | // generically expanded. The TemplateHandler then needs to shift it out |
1214 | // again. |
1215 | array_unshift( $params, new KV( TokenizerUtils::flattenIfArray( $target['tokens'] ), '', $target['srcOffsets']->expandTsrK() ) ); |
1216 | $dp = new DataParsoid; |
1217 | $dp->tsr = $this->tsrOffsets(); |
1218 | $dp->src = $this->text(); |
1219 | $tmp = $dp->getTemp(); |
1220 | $tmp->leadWS = $leadWS; |
1221 | $tmp->trailWS = $trailWS; |
1222 | $obj = new SelfclosingTagTk( 'template', $params, $dp ); |
1223 | return $obj; |
1224 | |
1225 | } |
1226 | private function a107($spos, $target) { |
1227 | return $this->endOffset(); |
1228 | } |
1229 | private function a108($spos, $target, $tpos, $lcs) { |
1230 | |
1231 | $pipeTrick = count( $lcs ) === 1 && count( $lcs[0]->v ) === 0; |
1232 | $textTokens = []; |
1233 | if ( $target === null || $pipeTrick ) { |
1234 | $textTokens[] = '[['; |
1235 | if ( $target ) { |
1236 | $textTokens[] = $target; |
1237 | } |
1238 | foreach ( $lcs as $a ) { |
1239 | // a is a mw:maybeContent attribute |
1240 | $textTokens[] = '|'; |
1241 | if ( count( $a->v ) > 0 ) { |
1242 | $textTokens[] = $a->v; |
1243 | } |
1244 | } |
1245 | $textTokens[] = ']]'; |
1246 | return $textTokens; |
1247 | } |
1248 | $obj = new SelfclosingTagTk( 'wikilink' ); |
1249 | $tsr = new SourceRange( $spos, $tpos ); |
1250 | $hrefKV = new KV( 'href', $target, $tsr->expandTsrV() ); |
1251 | $hrefKV->vsrc = $tsr->substr( $this->input ); |
1252 | // XXX: Point to object with path, revision and input information |
1253 | // obj.source = input; |
1254 | $obj->attribs[] = $hrefKV; |
1255 | $obj->attribs = array_merge( $obj->attribs, $lcs ); |
1256 | $dp = new DataParsoid; |
1257 | $dp->tsr = $this->tsrOffsets(); |
1258 | $dp->src = $this->text(); |
1259 | $obj->dataParsoid = $dp; |
1260 | return [ $obj ]; |
1261 | |
1262 | } |
1263 | private function a109(&$preproc) { |
1264 | $preproc = null; return true; |
1265 | } |
1266 | private function a110(&$preproc, $a) { |
1267 | |
1268 | return $a; |
1269 | |
1270 | } |
1271 | private function a111($extToken) { |
1272 | return $extToken->getName() === 'extension'; |
1273 | } |
1274 | private function a112($extToken) { |
1275 | return $extToken; |
1276 | } |
1277 | private function a113($annOrExtTag, $start) { |
1278 | |
1279 | // Only enforce ascii alpha first char for non-extension tags. |
1280 | // See tag_name above for the details. |
1281 | list(,$name) = $start; |
1282 | return $annOrExtTag || |
1283 | ( preg_match( '/^[A-Za-z]/', $name ) && $this->isXMLTag( $name ) ); |
1284 | |
1285 | } |
1286 | private function a114($annOrExtTag, $start, $attribs, $selfclose) { |
1287 | |
1288 | list($end, $name) = $start; |
1289 | $lcName = mb_strtolower( $name ); |
1290 | |
1291 | // Extension tags don't necessarily have the same semantics as html tags, |
1292 | // so don't treat them as void elements. |
1293 | $isVoidElt = Utils::isVoidElement( $lcName ) && !$annOrExtTag; |
1294 | |
1295 | // Support </br> |
1296 | if ( $lcName === 'br' && $end ) { |
1297 | $end = null; |
1298 | } |
1299 | |
1300 | $tsr = $this->tsrOffsets(); |
1301 | $res = TokenizerUtils::buildXMLTag( |
1302 | $name, $lcName, $attribs, $end, !!$selfclose || $isVoidElt, $tsr |
1303 | ); |
1304 | |
1305 | // change up data-attribs in one scenario |
1306 | // void-elts that aren't self-closed ==> useful for accurate RT-ing |
1307 | if ( !$selfclose && $isVoidElt ) { |
1308 | unset( $res->dataParsoid->selfClose ); |
1309 | $res->dataParsoid->noClose = true; |
1310 | } |
1311 | |
1312 | return $res; |
1313 | |
1314 | } |
1315 | private function a115($proto, $addr, $rhe) { |
1316 | return $rhe === '<' || $rhe === '>' || $rhe === "\u{A0}"; |
1317 | } |
1318 | private function a116($proto, $addr, $path) { |
1319 | |
1320 | // as in Parser.php::makeFreeExternalLink, we're going to |
1321 | // yank trailing punctuation out of this match. |
1322 | $url = TokenizerUtils::flattenStringlist( array_merge( [ $proto, $addr ], $path ) ); |
1323 | // only need to look at last element; HTML entities are strip-proof. |
1324 | $last = PHPUtils::lastItem( $url ); |
1325 | $trim = 0; |
1326 | if ( is_string( $last ) ) { |
1327 | $strip = TokenizerUtils::getAutoUrlTerminatingChars( in_array( '(', $path, true ) ); |
1328 | $trim = strspn( strrev( $last ), $strip ); |
1329 | $url[ count( $url ) - 1 ] = substr( $last, 0, strlen( $last ) - $trim ); |
1330 | } |
1331 | $url = TokenizerUtils::flattenStringlist( $url ); |
1332 | if ( count( $url ) === 1 && is_string( $url[0] ) && strlen( $url[0] ) <= strlen( $proto ) ) { |
1333 | return null; // ensure we haven't stripped everything: T106945 |
1334 | } |
1335 | $this->currPos -= $trim; |
1336 | return $url; |
1337 | |
1338 | } |
1339 | private function a117($r) { |
1340 | return $r !== null; |
1341 | } |
1342 | private function a118($r) { |
1343 | |
1344 | $tsr = $this->tsrOffsets(); |
1345 | $dp = new DataParsoid; |
1346 | $dp->tsr = $tsr; |
1347 | $res = [ new SelfclosingTagTk( 'urllink', [ new KV( 'href', $r, $tsr->expandTsrV() ) ], $dp ) ]; |
1348 | return $res; |
1349 | |
1350 | } |
1351 | private function a119($ref, $sp, $identifier) { |
1352 | |
1353 | $base_urls = [ |
1354 | 'RFC' => 'https://tools.ietf.org/html/rfc%s', |
1355 | 'PMID' => '//www.ncbi.nlm.nih.gov/pubmed/%s?dopt=Abstract' |
1356 | ]; |
1357 | $tsr = $this->tsrOffsets(); |
1358 | $dp = new DataParsoid; |
1359 | $dp->tsr = $tsr; |
1360 | $dp->stx = 'magiclink'; |
1361 | $this->env->getDataAccess()->addTrackingCategory( |
1362 | $this->env->getPageConfig(), |
1363 | $this->env->getMetadata(), |
1364 | 'magiclink-tracking-' . strtolower($ref) |
1365 | ); |
1366 | return [ |
1367 | new SelfclosingTagTk( 'extlink', [ |
1368 | new KV( 'href', sprintf( $base_urls[$ref], $identifier ) ), |
1369 | new KV( 'mw:content', TokenizerUtils::flattenString( [ $ref, $sp, $identifier ] ), $tsr->expandTsrV() ), |
1370 | new KV( 'typeof', 'mw:ExtLink/' . $ref ) |
1371 | ], |
1372 | $dp |
1373 | ) |
1374 | ]; |
1375 | |
1376 | } |
1377 | private function a120() { |
1378 | return $this->siteConfig->magicLinkEnabled("ISBN"); |
1379 | } |
1380 | private function a121($sp, $isbn) { |
1381 | |
1382 | // Convert isbn token-and-entity array to stripped string. |
1383 | $stripped = ''; |
1384 | foreach ( TokenizerUtils::flattenStringlist( $isbn ) as $part ) { |
1385 | if ( is_string( $part ) ) { |
1386 | $stripped .= $part; |
1387 | } |
1388 | } |
1389 | return strtoupper( preg_replace( '/[^\dX]/i', '', $stripped ) ); |
1390 | |
1391 | } |
1392 | private function a122($sp, $isbn, $isbncode) { |
1393 | |
1394 | // ISBNs can only be 10 or 13 digits long (with a specific format) |
1395 | return strlen( $isbncode ) === 10 |
1396 | || ( strlen( $isbncode ) === 13 && preg_match( '/^97[89]/', $isbncode ) ); |
1397 | |
1398 | } |
1399 | private function a123($sp, $isbn, $isbncode) { |
1400 | |
1401 | $tsr = $this->tsrOffsets(); |
1402 | $dp = new DataParsoid; |
1403 | $dp->stx = 'magiclink'; |
1404 | $dp->tsr = $tsr; |
1405 | $this->env->getDataAccess()->addTrackingCategory( |
1406 | $this->env->getPageConfig(), |
1407 | $this->env->getMetadata(), |
1408 | 'magiclink-tracking-isbn' |
1409 | ); |
1410 | return [ |
1411 | new SelfclosingTagTk( 'extlink', [ |
1412 | new KV( 'href', 'Special:BookSources/' . $isbncode ), |
1413 | new KV( 'mw:content', TokenizerUtils::flattenString( [ 'ISBN', $sp, $isbn ] ), $tsr->expandTsrV() ), |
1414 | new KV( 'typeof', 'mw:WikiLink/ISBN' ) |
1415 | ], |
1416 | $dp |
1417 | ) |
1418 | ]; |
1419 | |
1420 | } |
1421 | private function a124($t) { |
1422 | |
1423 | $tagName = mb_strtolower( $t->getName() ); |
1424 | $dp = $t->dataParsoid; |
1425 | $endTagRE = '~.*?(</' . preg_quote( $tagName, '~' ) . '\s*>)~iusA'; |
1426 | |
1427 | switch ( get_class( $t ) ) { |
1428 | case EndTagTk::class: |
1429 | // Similar to TagTk, we rely on the sanitizer to convert to text |
1430 | // where necessary and emit tokens to ease the wikitext escaping |
1431 | // code. However, extension tags that shadow html tags will see |
1432 | // their unmatched end tags dropped while tree building, since |
1433 | // the sanitizer will let them through. |
1434 | return $t; // not text() |
1435 | |
1436 | case SelfclosingTagTk::class: |
1437 | $dp->src = $dp->tsr->substr( $this->input ); |
1438 | $dp->extTagOffsets = new DomSourceRange( |
1439 | $dp->tsr->start, $dp->tsr->end, |
1440 | $dp->tsr->length(), 0 |
1441 | ); |
1442 | break; |
1443 | |
1444 | case TagTk::class: |
1445 | $tagContentFound = preg_match( $endTagRE, $this->input, $tagContent, 0, $dp->tsr->start ); |
1446 | if ( !$tagContentFound ) { |
1447 | // This is undefined behaviour. The old parser currently |
1448 | // returns text here (see core commit 674e8388cba), |
1449 | // whereas this results in unclosed |
1450 | // extension tags that shadow html tags falling back to |
1451 | // their html equivalent. The sanitizer will take care |
1452 | // of converting to text where necessary. We do this to |
1453 | // simplify `hasWikitextTokens` when escaping wikitext, |
1454 | // which wants these as tokens because it's otherwise |
1455 | // lacking in context. |
1456 | return $t; // not text() |
1457 | } |
1458 | |
1459 | $extSrc = $tagContent[0]; |
1460 | $extEndOffset = $dp->tsr->start + strlen( $extSrc ); |
1461 | $extEndTagWidth = strlen( $tagContent[1] ); |
1462 | |
1463 | if ( !empty( $this->pipelineOpts['inTemplate'] ) ) { |
1464 | // Support nesting in extensions tags while tokenizing in templates |
1465 | // to support the #tag parser function. |
1466 | // |
1467 | // It's necessary to permit this broadly in templates because |
1468 | // there's no way to distinguish whether the nesting happened |
1469 | // while expanding the #tag parser function, or just a general |
1470 | // syntax errors. In other words, |
1471 | // |
1472 | // hi<ref>ho<ref>hi</ref>ho</ref> |
1473 | // |
1474 | // and |
1475 | // |
1476 | // hi{{#tag:ref|ho<ref>hi</ref>ho}} |
1477 | // |
1478 | // found in template are returned indistinguishably after a |
1479 | // preprocessing request, though the old parser renders them |
1480 | // differently. #tag in template is probably a common enough |
1481 | // use case that we want to accept these false positives, |
1482 | // though another approach could be to drop this code here, and |
1483 | // invoke a native #tag handler and forgo those in templates. |
1484 | // |
1485 | // Expand `extSrc` as long as there is a <tagName> found in the |
1486 | // extension source body. |
1487 | $startTagRE = '~<' . preg_quote( $tagName, '~' ) . '(?:[^/>]|/(?!>))*>~i'; |
1488 | $s = substr( $extSrc, $dp->tsr->end - $dp->tsr->start ); |
1489 | $openTags = 0; |
1490 | while ( true ) { |
1491 | if ( preg_match_all( $startTagRE, $s, $matches ) ) { |
1492 | $openTags += count( $matches[0] ); |
1493 | } |
1494 | if ( !$openTags ) { |
1495 | break; |
1496 | } |
1497 | if ( !preg_match( $endTagRE, $this->input, $tagContent, 0, $extEndOffset ) ) { |
1498 | break; |
1499 | } |
1500 | $openTags -= 1; |
1501 | $s = $tagContent[0]; |
1502 | $extEndOffset += strlen( $s ); |
1503 | $extEndTagWidth = strlen( $tagContent[1] ); |
1504 | $extSrc .= $s; |
1505 | } |
1506 | } |
1507 | |
1508 | // Extension content source |
1509 | $dp->src = $extSrc; |
1510 | $dp->extTagOffsets = new DomSourceRange( |
1511 | $dp->tsr->start, $extEndOffset, |
1512 | $dp->tsr->length(), $extEndTagWidth |
1513 | ); |
1514 | |
1515 | $this->currPos = $dp->extTagOffsets->end; |
1516 | |
1517 | // update tsr->end to span the start and end tags. |
1518 | $dp->tsr->end = $this->endOffset(); // was just modified above |
1519 | break; |
1520 | |
1521 | default: |
1522 | $this->unreachable(); |
1523 | } |
1524 | |
1525 | return new SelfclosingTagTk( 'extension', [ |
1526 | new KV( 'typeof', 'mw:Extension' ), |
1527 | new KV( 'name', $tagName ), |
1528 | new KV( 'about', $this->env->newAboutId() ), |
1529 | new KV( 'source', $dp->src ), |
1530 | new KV( 'options', $t->attribs ) |
1531 | ], $dp ); |
1532 | |
1533 | } |
1534 | private function a125($p, $dashes) { |
1535 | $this->unreachable(); |
1536 | } |
1537 | private function a126($p, $dashes, $a) { |
1538 | return $this->endOffset(); |
1539 | } |
1540 | private function a127($p, $dashes, $a, $tagEndPos, $s2) { |
1541 | |
1542 | $coms = TokenizerUtils::popComments( $a ); |
1543 | if ( $coms ) { |
1544 | $tagEndPos = $coms['commentStartPos']; |
1545 | } |
1546 | |
1547 | $da = new DataParsoid; |
1548 | $da->tsr = new SourceRange( $this->startOffset(), $tagEndPos ); |
1549 | $da->startTagSrc = $p . $dashes; |
1550 | |
1551 | // We rely on our tree builder to close the row as needed. This is |
1552 | // needed to support building tables from fragment templates with |
1553 | // individual cells or rows. |
1554 | $trToken = new TagTk( 'tr', $a, $da ); |
1555 | |
1556 | return array_merge( [ $trToken ], $coms ? $coms['buf'] : [], $s2 ); |
1557 | |
1558 | } |
1559 | private function a128($p, $td, $tds) { |
1560 | |
1561 | // Avoid modifying a cached result |
1562 | $td[0] = clone $td[0]; |
1563 | $da = $td[0]->dataParsoid = clone $td[0]->dataParsoid; |
1564 | $da->tsr = clone $da->tsr; |
1565 | $da->tsr->start -= strlen( $p ); // include "|" |
1566 | if ( $p !== '|' ) { |
1567 | // Variation from default |
1568 | $da->startTagSrc = $p; |
1569 | } |
1570 | return array_merge( $td, $tds ); |
1571 | |
1572 | } |
1573 | private function a129($p, $args) { |
1574 | return $this->endOffset(); |
1575 | } |
1576 | private function a130($p, $args, $tagEndPos, $c) { |
1577 | |
1578 | $tsr = new SourceRange( $this->startOffset(), $tagEndPos ); |
1579 | return TokenizerUtils::buildTableTokens( |
1580 | 'caption', '|+', $args, $tsr, $this->endOffset(), $c, true ); |
1581 | |
1582 | } |
1583 | private function a131($start) { |
1584 | |
1585 | list(,$name) = $start; |
1586 | return WTUtils::isIncludeTag( mb_strtolower( $name ) ); |
1587 | |
1588 | } |
1589 | private function a132() { |
1590 | return $this->env->hasAnnotations && $this->siteConfig->isAnnotationTag( 'tvar' ); |
1591 | } |
1592 | private function a133() { |
1593 | |
1594 | $metaAttrs = [ new KV( 'typeof', 'mw:Annotation/tvar/End' ) ]; |
1595 | $dp = new DataParsoid(); |
1596 | $dp->tsr = $this->tsrOffsets(); |
1597 | return new SelfclosingTagTk ( 'meta', $metaAttrs, $dp ); |
1598 | |
1599 | } |
1600 | private function a134($start) { |
1601 | |
1602 | list(,$name) = $start; |
1603 | return WTUtils::isAnnotationTag( $this->env, $name ); |
1604 | |
1605 | } |
1606 | private function a135($tpt) { |
1607 | |
1608 | return [ 'tokens' => $tpt, 'srcOffsets' => $this->tsrOffsets() ]; |
1609 | |
1610 | } |
1611 | private function a136($name) { |
1612 | return $this->endOffset(); |
1613 | } |
1614 | private function a137($name, $kEndPos) { |
1615 | return $this->endOffset(); |
1616 | } |
1617 | private function a138($name, $kEndPos, $vStartPos, $optSp, $tpv) { |
1618 | |
1619 | return [ |
1620 | 'kEndPos' => $kEndPos, |
1621 | 'vStartPos' => $vStartPos, |
1622 | 'value' => TokenizerUtils::flattenString( [ $optSp, $tpv['tokens'] ?? [] ] ), |
1623 | ]; |
1624 | |
1625 | } |
1626 | private function a139($name, $val) { |
1627 | |
1628 | if ( $val !== null ) { |
1629 | if ( $val['value'] !== null ) { |
1630 | $so = new KVSourceRange( |
1631 | $this->startOffset(), $val['kEndPos'], |
1632 | $val['vStartPos'], $this->endOffset() |
1633 | ); |
1634 | return new KV( |
1635 | $name, |
1636 | TokenizerUtils::flattenIfArray( $val['value'] ), |
1637 | $so |
1638 | ); |
1639 | } else { |
1640 | return new KV( |
1641 | TokenizerUtils::flattenIfArray( $name ), |
1642 | '', |
1643 | $so |
1644 | ); |
1645 | } |
1646 | } else { |
1647 | $so = new SourceRange( $this->startOffset(), $this->endOffset() ); |
1648 | return new KV( |
1649 | '', |
1650 | TokenizerUtils::flattenIfArray( $name ), |
1651 | $so->expandTsrV() |
1652 | ); |
1653 | } |
1654 | |
1655 | } |
1656 | private function a140() { |
1657 | |
1658 | $so = new SourceRange( $this->startOffset(), $this->endOffset() ); |
1659 | return new KV( '', '', $so->expandTsrV() ); |
1660 | |
1661 | } |
1662 | private function a141($t, $wr) { |
1663 | return $wr; |
1664 | } |
1665 | private function a142($r) { |
1666 | |
1667 | return TokenizerUtils::flattenStringlist( $r ); |
1668 | |
1669 | } |
1670 | private function a143($startPos, $lt) { |
1671 | |
1672 | $tsr = new SourceRange( $startPos, $this->endOffset() ); |
1673 | $maybeContent = new KV( 'mw:maybeContent', $lt ?? [], $tsr->expandTsrV() ); |
1674 | $maybeContent->vsrc = substr( $this->input, $startPos, $this->endOffset() - $startPos ); |
1675 | return $maybeContent; |
1676 | |
1677 | } |
1678 | private function a144($end, $name) { |
1679 | return [ $end, $name ]; |
1680 | } |
1681 | private function a145() { |
1682 | return $this->siteConfig->magicLinkEnabled("RFC"); |
1683 | } |
1684 | private function a146() { |
1685 | |
1686 | return 'RFC'; |
1687 | |
1688 | } |
1689 | private function a147() { |
1690 | return $this->siteConfig->magicLinkEnabled("PMID"); |
1691 | } |
1692 | private function a148() { |
1693 | |
1694 | return 'PMID'; |
1695 | |
1696 | } |
1697 | private function a149($he) { |
1698 | return is_array( $he ) && $he[ 1 ] === "\u{A0}"; |
1699 | } |
1700 | private function a150($start) { |
1701 | |
1702 | list(,$name) = $start; |
1703 | return isset( $this->extTags[mb_strtolower( $name )] ) && |
1704 | // NOTE: This check is redundant with the precedence of the current |
1705 | // rules ( annotation_tag / *_extension_tag ) but kept as a precaution |
1706 | // since annotation tags are in extTags and we want them handled |
1707 | // elsewhere. |
1708 | !WTUtils::isAnnotationTag( $this->env, $name ); |
1709 | |
1710 | } |
1711 | private function a151() { |
1712 | return $this->startOffset(); |
1713 | } |
1714 | private function a152($lv0) { |
1715 | return $this->env->langConverterEnabled(); |
1716 | } |
1717 | private function a153($lv0, $ff) { |
1718 | |
1719 | // if flags contains 'R', then don't treat ; or : specially inside. |
1720 | if ( isset( $ff['flags'] ) ) { |
1721 | $ff['raw'] = isset( $ff['flags']['R'] ) || isset( $ff['flags']['N'] ); |
1722 | } elseif ( isset( $ff['variants'] ) ) { |
1723 | $ff['raw'] = true; |
1724 | } |
1725 | return $ff; |
1726 | |
1727 | } |
1728 | private function a154($lv0) { |
1729 | return !$this->env->langConverterEnabled(); |
1730 | } |
1731 | private function a155($lv0) { |
1732 | |
1733 | // if language converter not enabled, don't try to parse inside. |
1734 | return [ 'raw' => true ]; |
1735 | |
1736 | } |
1737 | private function a156($lv0, $f) { |
1738 | return $f['raw']; |
1739 | } |
1740 | private function a157($lv0, $f, $lv) { |
1741 | return [ [ 'text' => $lv ] ]; |
1742 | } |
1743 | private function a158($lv0, $f) { |
1744 | return !$f['raw']; |
1745 | } |
1746 | private function a159($lv0, $f, $lv) { |
1747 | return $lv; |
1748 | } |
1749 | private function a160($lv0, $f, $ts) { |
1750 | return $this->endOffset(); |
1751 | } |
1752 | private function a161($lv0, $f, $ts, $lv1) { |
1753 | |
1754 | if ( !$this->env->langConverterEnabled() ) { |
1755 | return [ '-{', $ts[0]['text']['tokens'], '}-' ]; |
1756 | } |
1757 | $lvsrc = substr( $this->input, $lv0, $lv1 - $lv0 ); |
1758 | $attribs = []; |
1759 | |
1760 | foreach ( $ts as &$t ) { |
1761 | // move token strings into KV attributes so that they are |
1762 | // properly expanded by early stages of the token pipeline |
1763 | foreach ( [ 'text', 'from', 'to' ] as $fld ) { |
1764 | if ( !isset( $t[$fld] ) ) { |
1765 | continue; |
1766 | } |
1767 | $name = 'mw:lv' . count( $attribs ); |
1768 | // Note that AttributeExpander will expect the tokens array to be |
1769 | // flattened. We do that in lang_variant_text / lang_variant_nowiki |
1770 | $attribs[] = new KV( $name, $t[$fld]['tokens'], $t[$fld]['srcOffsets']->expandTsrV() ); |
1771 | $t[$fld] = $name; |
1772 | } |
1773 | } |
1774 | unset( $t ); |
1775 | |
1776 | $flags = isset( $f['flags'] ) ? array_keys( $f['flags'] ) : []; |
1777 | sort( $flags ); |
1778 | $variants = isset( $f['variants'] ) ? array_keys( $f['variants'] ) : []; |
1779 | sort( $variants ); |
1780 | |
1781 | $dp = new DataParsoid; |
1782 | $dp->tsr = new SourceRange( $lv0, $lv1 ); |
1783 | $dp->src = $lvsrc; |
1784 | $dp->flags = $flags; |
1785 | $dp->variants = $variants; |
1786 | $dp->original = $f['original']; |
1787 | $dp->flagSp = $f['sp']; |
1788 | $dp->texts = $ts; |
1789 | |
1790 | return [ |
1791 | new SelfclosingTagTk( |
1792 | 'language-variant', |
1793 | $attribs, |
1794 | $dp |
1795 | ) |
1796 | ]; |
1797 | |
1798 | } |
1799 | private function a162($r, &$preproc) { |
1800 | |
1801 | $preproc = null; |
1802 | return $r; |
1803 | |
1804 | } |
1805 | private function a163($thTag, $thTags) { |
1806 | |
1807 | // Avoid modifying a cached result |
1808 | $thTag[0] = clone $thTag[0]; |
1809 | $da = $thTag[0]->dataParsoid = clone $thTag[0]->dataParsoid; |
1810 | $da->tsr = clone $da->tsr; |
1811 | $da->tsr->start--; // include "!" |
1812 | array_unshift( $thTags, $thTag ); |
1813 | return $thTags; |
1814 | |
1815 | } |
1816 | private function a164($arg) { |
1817 | return $this->endOffset(); |
1818 | } |
1819 | private function a165($arg, $tagEndPos, $td) { |
1820 | |
1821 | $tsr = new SourceRange( $this->startOffset(), $tagEndPos ); |
1822 | return TokenizerUtils::buildTableTokens( 'td', '|', $arg, |
1823 | $tsr, $this->endOffset(), $td ); |
1824 | |
1825 | } |
1826 | private function a166($pp, $tdt) { |
1827 | |
1828 | // Avoid modifying cached dataParsoid object |
1829 | $tdt[0] = clone $tdt[0]; |
1830 | $da = $tdt[0]->dataParsoid = clone $tdt[0]->dataParsoid; |
1831 | $da->tsr = clone $da->tsr; |
1832 | $da->stx = 'row'; |
1833 | $da->setTempFlag( TempData::NON_MERGEABLE_TABLE_CELL ); |
1834 | $da->tsr->start -= strlen( $pp ); // include "||" |
1835 | if ( $pp !== '||' || ( isset( $da->startTagSrc ) && $da->startTagSrc !== $pp ) ) { |
1836 | // Variation from default |
1837 | $da->startTagSrc = $pp . ( isset( $da->startTagSrc ) ? substr( $da->startTagSrc, 1 ) : '' ); |
1838 | } |
1839 | return $tdt; |
1840 | |
1841 | } |
1842 | private function a167($b) { |
1843 | |
1844 | return $b; |
1845 | |
1846 | } |
1847 | private function a168($il) { |
1848 | |
1849 | // il is guaranteed to be an array -- so, tu.flattenIfArray will |
1850 | // always return an array |
1851 | $r = TokenizerUtils::flattenIfArray( $il ); |
1852 | if ( count( $r ) === 1 && is_string( $r[0] ) ) { |
1853 | $r = $r[0]; |
1854 | } |
1855 | return $r; |
1856 | |
1857 | } |
1858 | private function a169() { |
1859 | return ''; |
1860 | } |
1861 | private function a170($ff) { |
1862 | return $ff; |
1863 | } |
1864 | private function a171($f) { |
1865 | |
1866 | // Collect & separate flags and variants into a hashtable (by key) and ordered list |
1867 | $flags = []; |
1868 | $variants = []; |
1869 | $flagList = []; |
1870 | $flagSpace = []; |
1871 | $variantList = []; |
1872 | $variantSpace = []; |
1873 | $useVariants = false; |
1874 | if ( $f !== null ) { |
1875 | // lang_variant_flags returns arrays in reverse order. |
1876 | $spPtr = count( $f['sp'] ) - 1; |
1877 | for ( $i = count( $f['flags'] ) - 1; $i >= 0; $i--) { |
1878 | $item = $f['flags'][$i]; |
1879 | if ( isset( $item['flag'] ) ) { |
1880 | $flagSpace[] = $f['sp'][$spPtr--]; |
1881 | $flags[$item['flag']] = true; |
1882 | $flagList[] = $item['flag']; |
1883 | $flagSpace[] = $f['sp'][$spPtr--]; |
1884 | } |
1885 | if ( isset( $item['variant'] ) ) { |
1886 | $variantSpace[] = $f['sp'][$spPtr--]; |
1887 | $variants[$item['variant']] = true; |
1888 | $variantList[] = $item['variant']; |
1889 | $variantSpace[] = $f['sp'][$spPtr--]; |
1890 | } |
1891 | } |
1892 | if ( $spPtr >= 0 ) { |
1893 | // handle space after a trailing semicolon |
1894 | $flagSpace[] = $f['sp'][$spPtr]; |
1895 | $variantSpace[] = $f['sp'][$spPtr]; |
1896 | } |
1897 | } |
1898 | // Parse flags (this logic is from core/languages/ConverterRule.php |
1899 | // in the parseFlags() function) |
1900 | if ( count( $flags ) === 0 && count( $variants ) === 0 ) { |
1901 | $flags['$S'] = true; |
1902 | } elseif ( isset( $flags['R'] ) ) { |
1903 | $flags = [ 'R' => true ]; // remove other flags |
1904 | } elseif ( isset( $flags['N'] ) ) { |
1905 | $flags = [ 'N' => true ]; // remove other flags |
1906 | } elseif ( isset( $flags['-'] ) ) { |
1907 | $flags = [ '-' => true ]; // remove other flags |
1908 | } elseif ( isset( $flags['T'] ) && count( $flags ) === 1 ) { |
1909 | $flags['H'] = true; |
1910 | } elseif ( isset( $flags['H'] ) ) { |
1911 | // Replace A flag, and remove other flags except T and D |
1912 | $nf = [ '$+' => true, 'H' => true ]; |
1913 | if ( isset( $flags['T'] ) ) { $nf['T'] = true; } |
1914 | if ( isset( $flags['D'] ) ) { $nf['D'] = true; } |
1915 | $flags = $nf; |
1916 | } elseif ( count( $variants ) > 0 ) { |
1917 | $useVariants = true; |
1918 | } else { |
1919 | if ( isset( $flags['A'] ) ) { |
1920 | $flags['$+'] = true; |
1921 | $flags['$S'] = true; |
1922 | } |
1923 | if ( isset( $flags['D'] ) ) { |
1924 | unset( $flags['$S'] ); |
1925 | } |
1926 | } |
1927 | if ( $useVariants ) { |
1928 | return [ 'variants' => $variants, 'original' => $variantList, 'sp' => $variantSpace ]; |
1929 | } else { |
1930 | return [ 'flags' => $flags, 'original' => $flagList, 'sp' => $flagSpace ]; |
1931 | } |
1932 | |
1933 | } |
1934 | private function a172($tokens) { |
1935 | |
1936 | return [ |
1937 | 'tokens' => TokenizerUtils::flattenStringlist( $tokens ), |
1938 | 'srcOffsets' => $this->tsrOffsets(), |
1939 | ]; |
1940 | |
1941 | } |
1942 | private function a173($o, $oo) { |
1943 | return $oo; |
1944 | } |
1945 | private function a174($o, $rest, $tr) { |
1946 | |
1947 | array_unshift( $rest, $o ); |
1948 | // if the last bogus option is just spaces, keep them; otherwise |
1949 | // drop all this bogus stuff on the ground |
1950 | if ( count($tr) > 0 ) { |
1951 | $last = $tr[count($tr)-1]; |
1952 | if (preg_match('/^\s*$/Du', $last[1])) { |
1953 | $rest[] = [ 'semi' => true, 'sp' => $last[1] ]; |
1954 | } |
1955 | } |
1956 | return $rest; |
1957 | |
1958 | } |
1959 | private function a175($lvtext) { |
1960 | return [ [ 'text' => $lvtext ] ]; |
1961 | } |
1962 | private function a176($arg, $tagEndPos, &$th, $d) { |
1963 | |
1964 | // Ignore newlines found in transclusions! |
1965 | // This is not perfect (since {{..}} may not always tokenize to transclusions). |
1966 | if ( $th !== false && strpos( preg_replace( "/{{[\s\S]+?}}/", "", $this->text() ), "\n" ) !== false ) { |
1967 | // There's been a newline. Remove the break and continue |
1968 | // tokenizing nested_block_in_tables. |
1969 | $th = false; |
1970 | } |
1971 | return $d; |
1972 | |
1973 | } |
1974 | private function a177($arg, $tagEndPos, $c) { |
1975 | |
1976 | $tsr = new SourceRange( $this->startOffset(), $tagEndPos ); |
1977 | return TokenizerUtils::buildTableTokens( 'th', '!', $arg, |
1978 | $tsr, $this->endOffset(), $c ); |
1979 | |
1980 | } |
1981 | private function a178($pp, $tht) { |
1982 | |
1983 | // Avoid modifying cached dataParsoid object |
1984 | $tht[0] = clone $tht[0]; |
1985 | $da = $tht[0]->dataParsoid = clone $tht[0]->dataParsoid; |
1986 | $da->tsr = clone $da->tsr; |
1987 | $da->stx = 'row'; |
1988 | $da->setTempFlag( TempData::NON_MERGEABLE_TABLE_CELL ); |
1989 | $da->tsr->start -= strlen( $pp ); // include "!!" or "||" |
1990 | if ( $pp !== '!!' || ( isset( $da->startTagSrc ) && $da->startTagSrc !== $pp ) ) { |
1991 | // Variation from default |
1992 | $da->startTagSrc = $pp . ( isset( $da->startTagSrc ) ? substr( $da->startTagSrc, 1 ) : '' ); |
1993 | } |
1994 | return $tht; |
1995 | |
1996 | } |
1997 | private function a179($sp1, $f, $sp2, $more) { |
1998 | |
1999 | $r = ( $more && $more[1] ) ? $more[1] : [ 'sp' => [], 'flags' => [] ]; |
2000 | // Note that sp and flags are in reverse order, since we're using |
2001 | // right recursion and want to push instead of unshift. |
2002 | $r['sp'][] = $sp2; |
2003 | $r['sp'][] = $sp1; |
2004 | $r['flags'][] = $f; |
2005 | return $r; |
2006 | |
2007 | } |
2008 | private function a180($sp) { |
2009 | |
2010 | return [ 'sp' => [ $sp ], 'flags' => [] ]; |
2011 | |
2012 | } |
2013 | private function a181($sp1, $lang, $sp2, $sp3, $lvtext) { |
2014 | |
2015 | return [ |
2016 | 'twoway' => true, |
2017 | 'lang' => $lang, |
2018 | 'text' => $lvtext, |
2019 | 'sp' => [ $sp1, $sp2, $sp3 ] |
2020 | ]; |
2021 | |
2022 | } |
2023 | private function a182($sp1, $from, $sp2, $lang, $sp3, $sp4, $to) { |
2024 | |
2025 | return [ |
2026 | 'oneway' => true, |
2027 | 'from' => $from, |
2028 | 'lang' => $lang, |
2029 | 'to' => $to, |
2030 | 'sp' => [ $sp1, $sp2, $sp3, $sp4 ] |
2031 | ]; |
2032 | |
2033 | } |
2034 | private function a183($r) { |
2035 | |
2036 | return $r; |
2037 | |
2038 | } |
2039 | private function a184($f) { |
2040 | return [ 'flag' => $f ]; |
2041 | } |
2042 | private function a185($v) { |
2043 | return [ 'variant' => $v ]; |
2044 | } |
2045 | private function a186($b) { |
2046 | return [ 'bogus' => $b ]; /* bad flag */ |
2047 | } |
2048 | private function a187($n, $sp) { |
2049 | |
2050 | $tsr = $this->tsrOffsets(); |
2051 | $tsr->end -= strlen( $sp ); |
2052 | return [ |
2053 | 'tokens' => [ $n ], |
2054 | 'srcOffsets' => $tsr, |
2055 | ]; |
2056 | |
2057 | } |
2058 | private function a188($ext) { |
2059 | return $ext; |
2060 | } |
2061 | private function a189($extToken) { |
2062 | |
2063 | $txt = Utils::extractExtBody( $extToken ); |
2064 | return Utils::decodeWtEntities( $txt ); |
2065 | |
2066 | } |
2067 | private function a190($start) { |
2068 | |
2069 | list(,$name) = $start; |
2070 | return ( mb_strtolower( $name ) === 'nowiki' ); |
2071 | |
2072 | } |
2073 | |
2074 | // generated |
2075 | private function streamstart_async($silence, &$param_preproc) { |
2076 | for (;;) { |
2077 | // start choice_1 |
2078 | $p2 = $this->currPos; |
2079 | // start seq_1 |
2080 | $p3 = $this->currPos; |
2081 | $this->savedPos = $this->currPos; |
2082 | $r4 = $this->a0(); |
2083 | if ($r4) { |
2084 | $r4 = false; |
2085 | } else { |
2086 | $r4 = self::$FAILED; |
2087 | $r1 = self::$FAILED; |
2088 | goto seq_1; |
2089 | } |
2090 | $r5 = $this->parsetlb($silence, $param_preproc); |
2091 | // t <- $r5 |
2092 | if ($r5===self::$FAILED) { |
2093 | $this->currPos = $p3; |
2094 | $r1 = self::$FAILED; |
2095 | goto seq_1; |
2096 | } |
2097 | $this->savedPos = $this->currPos; |
2098 | $r6 = $this->a1($r5); |
2099 | if ($r6) { |
2100 | $r6 = false; |
2101 | } else { |
2102 | $r6 = self::$FAILED; |
2103 | $this->currPos = $p3; |
2104 | $r1 = self::$FAILED; |
2105 | goto seq_1; |
2106 | } |
2107 | $r1 = true; |
2108 | seq_1: |
2109 | if ($r1!==self::$FAILED) { |
2110 | $this->savedPos = $p2; |
2111 | $r1 = $this->a2($r5); |
2112 | goto choice_1; |
2113 | } |
2114 | // free $p3 |
2115 | // start seq_2 |
2116 | $p3 = $this->currPos; |
2117 | $r7 = []; |
2118 | for (;;) { |
2119 | $r8 = $this->parsenewlineToken($silence); |
2120 | if ($r8!==self::$FAILED) { |
2121 | $r7[] = $r8; |
2122 | } else { |
2123 | break; |
2124 | } |
2125 | } |
2126 | // free $r8 |
2127 | $this->savedPos = $this->currPos; |
2128 | $r8 = $this->a3(); |
2129 | if ($r8) { |
2130 | $r8 = false; |
2131 | } else { |
2132 | $r8 = self::$FAILED; |
2133 | $this->currPos = $p3; |
2134 | $r1 = self::$FAILED; |
2135 | goto seq_2; |
2136 | } |
2137 | $r1 = [$r7,$r8]; |
2138 | seq_2: |
2139 | // free $p3 |
2140 | choice_1: |
2141 | if ($r1!==self::$FAILED) { |
2142 | yield $r1; |
2143 | } else { |
2144 | if ($this->currPos < $this->inputLength) { |
2145 | $this->fail(0); |
2146 | throw $this->buildParseException(); |
2147 | } |
2148 | break; |
2149 | } |
2150 | } |
2151 | } |
2152 | private function parsestart($silence, &$param_preproc) { |
2153 | return $this->traceCall(function($silence, &$param_preproc) { |
2154 | $key = json_encode([298, $param_preproc]); |
2155 | $bucket = $this->currPos; |
2156 | $cached = $this->cache[$bucket][$key] ?? null; |
2157 | if ($cached) { |
2158 | $this->currPos = $cached->nextPos; |
2159 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
2160 | return $cached->result; |
2161 | } |
2162 | $saved_preproc=$param_preproc; |
2163 | $p2 = $this->currPos; |
2164 | // start seq_1 |
2165 | $p3 = $this->currPos; |
2166 | $r4 = []; |
2167 | for (;;) { |
2168 | $r5 = $this->parsetlb(true, $param_preproc); |
2169 | if ($r5!==self::$FAILED) { |
2170 | $r4[] = $r5; |
2171 | } else { |
2172 | break; |
2173 | } |
2174 | } |
2175 | // t <- $r4 |
2176 | // free $r5 |
2177 | $r5 = []; |
2178 | for (;;) { |
2179 | $r6 = $this->parsenewlineToken(true); |
2180 | if ($r6!==self::$FAILED) { |
2181 | $r5[] = $r6; |
2182 | } else { |
2183 | break; |
2184 | } |
2185 | } |
2186 | // n <- $r5 |
2187 | // free $r6 |
2188 | $r1 = true; |
2189 | seq_1: |
2190 | if ($r1!==self::$FAILED) { |
2191 | $this->savedPos = $p2; |
2192 | $r1 = $this->a4($r4, $r5); |
2193 | } else { |
2194 | if (!$silence) {$this->fail(1);} |
2195 | } |
2196 | // free $p3 |
2197 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
2198 | $this->currPos, |
2199 | $r1, |
2200 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
2201 | self::$UNDEFINED |
2202 | ); |
2203 | return $r1; |
2204 | }, "start", ["\$silence", "&\$param_preproc"], [$silence, &$param_preproc]); |
2205 | |
2206 | } |
2207 | private function parsetable_start_tag($silence, $boolParams, &$param_preproc, &$param_th) { |
2208 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
2209 | $key = json_encode([498, $boolParams & 0x1fbf, $param_preproc, $param_th]); |
2210 | $bucket = $this->currPos; |
2211 | $cached = $this->cache[$bucket][$key] ?? null; |
2212 | if ($cached) { |
2213 | $this->currPos = $cached->nextPos; |
2214 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
2215 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
2216 | return $cached->result; |
2217 | } |
2218 | $saved_preproc=$param_preproc; |
2219 | $saved_th=$param_th; |
2220 | $p2 = $this->currPos; |
2221 | // start seq_1 |
2222 | $p3 = $this->currPos; |
2223 | $r4 = []; |
2224 | for (;;) { |
2225 | // start choice_1 |
2226 | $r5 = $this->parsespace(true); |
2227 | if ($r5!==self::$FAILED) { |
2228 | goto choice_1; |
2229 | } |
2230 | $r5 = $this->parsecomment(true); |
2231 | choice_1: |
2232 | if ($r5!==self::$FAILED) { |
2233 | $r4[] = $r5; |
2234 | } else { |
2235 | break; |
2236 | } |
2237 | } |
2238 | // sc <- $r4 |
2239 | // free $r5 |
2240 | $p6 = $this->currPos; |
2241 | $r5 = ''; |
2242 | // startPos <- $r5 |
2243 | if ($r5!==self::$FAILED) { |
2244 | $this->savedPos = $p6; |
2245 | $r5 = $this->a5($r4); |
2246 | } else { |
2247 | $this->currPos = $p3; |
2248 | $r1 = self::$FAILED; |
2249 | goto seq_1; |
2250 | } |
2251 | // b <- $r7 |
2252 | if (($this->input[$this->currPos] ?? null) === "{") { |
2253 | $this->currPos++; |
2254 | $r7 = "{"; |
2255 | } else { |
2256 | $r7 = self::$FAILED; |
2257 | $this->currPos = $p3; |
2258 | $r1 = self::$FAILED; |
2259 | goto seq_1; |
2260 | } |
2261 | $r8 = $this->parsepipe(true); |
2262 | // p <- $r8 |
2263 | if ($r8===self::$FAILED) { |
2264 | $this->currPos = $p3; |
2265 | $r1 = self::$FAILED; |
2266 | goto seq_1; |
2267 | } |
2268 | // start choice_2 |
2269 | $r9 = $this->parsetable_attributes(true, $boolParams & ~0x40, $param_preproc, $param_th); |
2270 | if ($r9!==self::$FAILED) { |
2271 | goto choice_2; |
2272 | } |
2273 | $this->savedPos = $this->currPos; |
2274 | $r9 = $this->a6($r4, $r5, $r7, $r8); |
2275 | if ($r9) { |
2276 | $r9 = false; |
2277 | } else { |
2278 | $r9 = self::$FAILED; |
2279 | } |
2280 | choice_2: |
2281 | // ta <- $r9 |
2282 | if ($r9===self::$FAILED) { |
2283 | $this->currPos = $p3; |
2284 | $r1 = self::$FAILED; |
2285 | goto seq_1; |
2286 | } |
2287 | $p11 = $this->currPos; |
2288 | $r10 = ''; |
2289 | // tsEndPos <- $r10 |
2290 | if ($r10!==self::$FAILED) { |
2291 | $this->savedPos = $p11; |
2292 | $r10 = $this->a7($r4, $r5, $r7, $r8, $r9); |
2293 | } else { |
2294 | $this->currPos = $p3; |
2295 | $r1 = self::$FAILED; |
2296 | goto seq_1; |
2297 | } |
2298 | $r12 = []; |
2299 | for (;;) { |
2300 | $r13 = $this->parsespace(true); |
2301 | if ($r13!==self::$FAILED) { |
2302 | $r12[] = $r13; |
2303 | } else { |
2304 | break; |
2305 | } |
2306 | } |
2307 | // s2 <- $r12 |
2308 | // free $r13 |
2309 | $r1 = true; |
2310 | seq_1: |
2311 | if ($r1!==self::$FAILED) { |
2312 | $this->savedPos = $p2; |
2313 | $r1 = $this->a8($r4, $r5, $r7, $r8, $r9, $r10, $r12); |
2314 | } else { |
2315 | if (!$silence) {$this->fail(2);} |
2316 | } |
2317 | // free $p3 |
2318 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
2319 | $this->currPos, |
2320 | $r1, |
2321 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
2322 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
2323 | ); |
2324 | return $r1; |
2325 | }, "table_start_tag", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
2326 | |
2327 | } |
2328 | private function parseurl($silence, &$param_preproc) { |
2329 | return $this->traceCall(function($silence, &$param_preproc) { |
2330 | $key = json_encode([358, $param_preproc]); |
2331 | $bucket = $this->currPos; |
2332 | $cached = $this->cache[$bucket][$key] ?? null; |
2333 | if ($cached) { |
2334 | $this->currPos = $cached->nextPos; |
2335 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
2336 | return $cached->result; |
2337 | } |
2338 | $saved_preproc=$param_preproc; |
2339 | $p2 = $this->currPos; |
2340 | // start seq_1 |
2341 | $p3 = $this->currPos; |
2342 | $r4 = $this->parseurl_protocol($silence); |
2343 | // proto <- $r4 |
2344 | if ($r4===self::$FAILED) { |
2345 | $r1 = self::$FAILED; |
2346 | goto seq_1; |
2347 | } |
2348 | // start choice_1 |
2349 | $r5 = $this->parseipv6urladdr($silence); |
2350 | if ($r5!==self::$FAILED) { |
2351 | goto choice_1; |
2352 | } |
2353 | $r5 = ''; |
2354 | choice_1: |
2355 | // addr <- $r5 |
2356 | if ($r5===self::$FAILED) { |
2357 | $this->currPos = $p3; |
2358 | $r1 = self::$FAILED; |
2359 | goto seq_1; |
2360 | } |
2361 | $r6 = []; |
2362 | for (;;) { |
2363 | $p8 = $this->currPos; |
2364 | // start seq_2 |
2365 | $p9 = $this->currPos; |
2366 | $p10 = $this->currPos; |
2367 | $r11 = $this->discardinline_breaks(true, 0x0, $param_preproc, self::newRef(null)); |
2368 | if ($r11 === self::$FAILED) { |
2369 | $r11 = false; |
2370 | } else { |
2371 | $r11 = self::$FAILED; |
2372 | $this->currPos = $p10; |
2373 | $r7 = self::$FAILED; |
2374 | goto seq_2; |
2375 | } |
2376 | // free $p10 |
2377 | // start choice_2 |
2378 | $r12 = $this->parseno_punctuation_char($silence); |
2379 | if ($r12!==self::$FAILED) { |
2380 | goto choice_2; |
2381 | } |
2382 | $r12 = $this->parsecomment($silence); |
2383 | if ($r12!==self::$FAILED) { |
2384 | goto choice_2; |
2385 | } |
2386 | $r12 = $this->parsetplarg_or_template($silence, 0x0, self::newRef(null), $param_preproc); |
2387 | if ($r12!==self::$FAILED) { |
2388 | goto choice_2; |
2389 | } |
2390 | $r12 = $this->input[$this->currPos] ?? ''; |
2391 | if ($r12 === "'" || $r12 === "{") { |
2392 | $this->currPos++; |
2393 | goto choice_2; |
2394 | } else { |
2395 | $r12 = self::$FAILED; |
2396 | if (!$silence) {$this->fail(3);} |
2397 | } |
2398 | $p10 = $this->currPos; |
2399 | // start seq_3 |
2400 | $p13 = $this->currPos; |
2401 | $p14 = $this->currPos; |
2402 | // start seq_4 |
2403 | $p16 = $this->currPos; |
2404 | if (($this->input[$this->currPos] ?? null) === "&") { |
2405 | $this->currPos++; |
2406 | $r17 = "&"; |
2407 | } else { |
2408 | $r17 = self::$FAILED; |
2409 | $r15 = self::$FAILED; |
2410 | goto seq_4; |
2411 | } |
2412 | // start choice_3 |
2413 | // start seq_5 |
2414 | $p19 = $this->currPos; |
2415 | $r20 = $this->input[$this->currPos] ?? ''; |
2416 | if ($r20 === "l" || $r20 === "L") { |
2417 | $this->currPos++; |
2418 | } else { |
2419 | $r20 = self::$FAILED; |
2420 | $r18 = self::$FAILED; |
2421 | goto seq_5; |
2422 | } |
2423 | $r21 = $this->input[$this->currPos] ?? ''; |
2424 | if ($r21 === "t" || $r21 === "T") { |
2425 | $this->currPos++; |
2426 | } else { |
2427 | $r21 = self::$FAILED; |
2428 | $this->currPos = $p19; |
2429 | $r18 = self::$FAILED; |
2430 | goto seq_5; |
2431 | } |
2432 | $r18 = true; |
2433 | seq_5: |
2434 | if ($r18!==self::$FAILED) { |
2435 | goto choice_3; |
2436 | } |
2437 | // free $p19 |
2438 | // start seq_6 |
2439 | $p19 = $this->currPos; |
2440 | $r22 = $this->input[$this->currPos] ?? ''; |
2441 | if ($r22 === "g" || $r22 === "G") { |
2442 | $this->currPos++; |
2443 | } else { |
2444 | $r22 = self::$FAILED; |
2445 | $r18 = self::$FAILED; |
2446 | goto seq_6; |
2447 | } |
2448 | $r23 = $this->input[$this->currPos] ?? ''; |
2449 | if ($r23 === "t" || $r23 === "T") { |
2450 | $this->currPos++; |
2451 | } else { |
2452 | $r23 = self::$FAILED; |
2453 | $this->currPos = $p19; |
2454 | $r18 = self::$FAILED; |
2455 | goto seq_6; |
2456 | } |
2457 | $r18 = true; |
2458 | seq_6: |
2459 | // free $p19 |
2460 | choice_3: |
2461 | if ($r18===self::$FAILED) { |
2462 | $this->currPos = $p16; |
2463 | $r15 = self::$FAILED; |
2464 | goto seq_4; |
2465 | } |
2466 | if (($this->input[$this->currPos] ?? null) === ";") { |
2467 | $this->currPos++; |
2468 | $r24 = ";"; |
2469 | } else { |
2470 | $r24 = self::$FAILED; |
2471 | $this->currPos = $p16; |
2472 | $r15 = self::$FAILED; |
2473 | goto seq_4; |
2474 | } |
2475 | $r15 = true; |
2476 | seq_4: |
2477 | // free $p16 |
2478 | if ($r15 === self::$FAILED) { |
2479 | $r15 = false; |
2480 | } else { |
2481 | $r15 = self::$FAILED; |
2482 | $this->currPos = $p14; |
2483 | $r12 = self::$FAILED; |
2484 | goto seq_3; |
2485 | } |
2486 | // free $p14 |
2487 | // start choice_4 |
2488 | $p14 = $this->currPos; |
2489 | // start seq_7 |
2490 | $p16 = $this->currPos; |
2491 | $p19 = $this->currPos; |
2492 | if (($this->input[$this->currPos] ?? null) === "&") { |
2493 | $this->currPos++; |
2494 | $r26 = "&"; |
2495 | $r26 = false; |
2496 | $this->currPos = $p19; |
2497 | } else { |
2498 | $r26 = self::$FAILED; |
2499 | $r25 = self::$FAILED; |
2500 | goto seq_7; |
2501 | } |
2502 | // free $p19 |
2503 | $r27 = $this->parsehtmlentity($silence); |
2504 | // he <- $r27 |
2505 | if ($r27===self::$FAILED) { |
2506 | $this->currPos = $p16; |
2507 | $r25 = self::$FAILED; |
2508 | goto seq_7; |
2509 | } |
2510 | $r25 = true; |
2511 | seq_7: |
2512 | if ($r25!==self::$FAILED) { |
2513 | $this->savedPos = $p14; |
2514 | $r25 = $this->a9($r4, $r5, $r27); |
2515 | goto choice_4; |
2516 | } |
2517 | // free $p16 |
2518 | if (($this->input[$this->currPos] ?? null) === "&") { |
2519 | $this->currPos++; |
2520 | $r25 = "&"; |
2521 | } else { |
2522 | if (!$silence) {$this->fail(4);} |
2523 | $r25 = self::$FAILED; |
2524 | } |
2525 | choice_4: |
2526 | // r <- $r25 |
2527 | if ($r25===self::$FAILED) { |
2528 | $this->currPos = $p13; |
2529 | $r12 = self::$FAILED; |
2530 | goto seq_3; |
2531 | } |
2532 | $r12 = true; |
2533 | seq_3: |
2534 | if ($r12!==self::$FAILED) { |
2535 | $this->savedPos = $p10; |
2536 | $r12 = $this->a10($r4, $r5, $r25); |
2537 | } |
2538 | // free $p13 |
2539 | choice_2: |
2540 | // c <- $r12 |
2541 | if ($r12===self::$FAILED) { |
2542 | $this->currPos = $p9; |
2543 | $r7 = self::$FAILED; |
2544 | goto seq_2; |
2545 | } |
2546 | $r7 = true; |
2547 | seq_2: |
2548 | if ($r7!==self::$FAILED) { |
2549 | $this->savedPos = $p8; |
2550 | $r7 = $this->a11($r4, $r5, $r12); |
2551 | $r6[] = $r7; |
2552 | } else { |
2553 | break; |
2554 | } |
2555 | // free $p9 |
2556 | } |
2557 | // path <- $r6 |
2558 | // free $r7 |
2559 | $this->savedPos = $this->currPos; |
2560 | $r7 = $this->a12($r4, $r5, $r6); |
2561 | if ($r7) { |
2562 | $r7 = false; |
2563 | } else { |
2564 | $r7 = self::$FAILED; |
2565 | $this->currPos = $p3; |
2566 | $r1 = self::$FAILED; |
2567 | goto seq_1; |
2568 | } |
2569 | $r1 = true; |
2570 | seq_1: |
2571 | if ($r1!==self::$FAILED) { |
2572 | $this->savedPos = $p2; |
2573 | $r1 = $this->a13($r4, $r5, $r6); |
2574 | } |
2575 | // free $p3 |
2576 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
2577 | $this->currPos, |
2578 | $r1, |
2579 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
2580 | self::$UNDEFINED |
2581 | ); |
2582 | return $r1; |
2583 | }, "url", ["\$silence", "&\$param_preproc"], [$silence, &$param_preproc]); |
2584 | |
2585 | } |
2586 | private function parserow_syntax_table_args($silence, $boolParams, &$param_preproc, &$param_th) { |
2587 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
2588 | $key = json_encode([520, $boolParams & 0x1eff, $param_preproc, $param_th]); |
2589 | $bucket = $this->currPos; |
2590 | $cached = $this->cache[$bucket][$key] ?? null; |
2591 | if ($cached) { |
2592 | $this->currPos = $cached->nextPos; |
2593 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
2594 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
2595 | return $cached->result; |
2596 | } |
2597 | $saved_preproc=$param_preproc; |
2598 | $saved_th=$param_th; |
2599 | $p2 = $this->currPos; |
2600 | // start seq_1 |
2601 | $p3 = $this->currPos; |
2602 | $r4 = $this->parsetable_attributes($silence, $boolParams | 0x100, $param_preproc, $param_th); |
2603 | // as <- $r4 |
2604 | if ($r4===self::$FAILED) { |
2605 | $r1 = self::$FAILED; |
2606 | goto seq_1; |
2607 | } |
2608 | $r5 = $this->parseoptional_spaces($silence); |
2609 | // s <- $r5 |
2610 | if ($r5===self::$FAILED) { |
2611 | $this->currPos = $p3; |
2612 | $r1 = self::$FAILED; |
2613 | goto seq_1; |
2614 | } |
2615 | $r6 = $this->parsepipe($silence); |
2616 | // p <- $r6 |
2617 | if ($r6===self::$FAILED) { |
2618 | $this->currPos = $p3; |
2619 | $r1 = self::$FAILED; |
2620 | goto seq_1; |
2621 | } |
2622 | $p7 = $this->currPos; |
2623 | $r8 = $this->discardpipe(true); |
2624 | if ($r8 === self::$FAILED) { |
2625 | $r8 = false; |
2626 | } else { |
2627 | $r8 = self::$FAILED; |
2628 | $this->currPos = $p7; |
2629 | $this->currPos = $p3; |
2630 | $r1 = self::$FAILED; |
2631 | goto seq_1; |
2632 | } |
2633 | // free $p7 |
2634 | $r1 = true; |
2635 | seq_1: |
2636 | if ($r1!==self::$FAILED) { |
2637 | $this->savedPos = $p2; |
2638 | $r1 = $this->a14($r4, $r5, $r6); |
2639 | } |
2640 | // free $p3 |
2641 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
2642 | $this->currPos, |
2643 | $r1, |
2644 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
2645 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
2646 | ); |
2647 | return $r1; |
2648 | }, "row_syntax_table_args", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
2649 | |
2650 | } |
2651 | private function parsetable_attributes($silence, $boolParams, &$param_preproc, &$param_th) { |
2652 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
2653 | $key = json_encode([302, $boolParams & 0x1fff, $param_preproc, $param_th]); |
2654 | $bucket = $this->currPos; |
2655 | $cached = $this->cache[$bucket][$key] ?? null; |
2656 | if ($cached) { |
2657 | $this->currPos = $cached->nextPos; |
2658 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
2659 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
2660 | return $cached->result; |
2661 | } |
2662 | $saved_preproc=$param_preproc; |
2663 | $saved_th=$param_th; |
2664 | $r1 = []; |
2665 | for (;;) { |
2666 | // start choice_1 |
2667 | $r2 = $this->parsetable_attribute(true, $boolParams, $param_preproc, $param_th); |
2668 | if ($r2!==self::$FAILED) { |
2669 | goto choice_1; |
2670 | } |
2671 | $p3 = $this->currPos; |
2672 | // start seq_1 |
2673 | $p4 = $this->currPos; |
2674 | $r5 = $this->discardoptionalSpaceToken(true); |
2675 | if ($r5===self::$FAILED) { |
2676 | $r2 = self::$FAILED; |
2677 | goto seq_1; |
2678 | } |
2679 | $r6 = $this->parsebroken_table_attribute_name_char(true); |
2680 | // b <- $r6 |
2681 | if ($r6===self::$FAILED) { |
2682 | $this->currPos = $p4; |
2683 | $r2 = self::$FAILED; |
2684 | goto seq_1; |
2685 | } |
2686 | $r2 = true; |
2687 | seq_1: |
2688 | if ($r2!==self::$FAILED) { |
2689 | $this->savedPos = $p3; |
2690 | $r2 = $this->a15($r6); |
2691 | } |
2692 | // free $p4 |
2693 | choice_1: |
2694 | if ($r2!==self::$FAILED) { |
2695 | $r1[] = $r2; |
2696 | } else { |
2697 | break; |
2698 | } |
2699 | } |
2700 | // free $r2 |
2701 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
2702 | $this->currPos, |
2703 | $r1, |
2704 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
2705 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
2706 | ); |
2707 | return $r1; |
2708 | }, "table_attributes", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
2709 | |
2710 | } |
2711 | private function parsegeneric_newline_attributes($silence, $boolParams, &$param_preproc, &$param_th) { |
2712 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
2713 | $key = json_encode([300, $boolParams & 0x1fff, $param_preproc, $param_th]); |
2714 | $bucket = $this->currPos; |
2715 | $cached = $this->cache[$bucket][$key] ?? null; |
2716 | if ($cached) { |
2717 | $this->currPos = $cached->nextPos; |
2718 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
2719 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
2720 | return $cached->result; |
2721 | } |
2722 | $saved_preproc=$param_preproc; |
2723 | $saved_th=$param_th; |
2724 | $r1 = []; |
2725 | for (;;) { |
2726 | $r2 = $this->parsegeneric_newline_attribute(true, $boolParams, $param_preproc, $param_th); |
2727 | if ($r2!==self::$FAILED) { |
2728 | $r1[] = $r2; |
2729 | } else { |
2730 | break; |
2731 | } |
2732 | } |
2733 | // free $r2 |
2734 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
2735 | $this->currPos, |
2736 | $r1, |
2737 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
2738 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
2739 | ); |
2740 | return $r1; |
2741 | }, "generic_newline_attributes", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
2742 | |
2743 | } |
2744 | private function parsetplarg_or_template_or_bust($silence, &$param_preproc) { |
2745 | return $this->traceCall(function($silence, &$param_preproc) { |
2746 | $key = json_encode([368, $param_preproc]); |
2747 | $bucket = $this->currPos; |
2748 | $cached = $this->cache[$bucket][$key] ?? null; |
2749 | if ($cached) { |
2750 | $this->currPos = $cached->nextPos; |
2751 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
2752 | return $cached->result; |
2753 | } |
2754 | $saved_preproc=$param_preproc; |
2755 | $p2 = $this->currPos; |
2756 | $r3 = []; |
2757 | for (;;) { |
2758 | // start choice_1 |
2759 | $r4 = $this->parsetplarg_or_template($silence, 0x0, self::newRef(null), $param_preproc); |
2760 | if ($r4!==self::$FAILED) { |
2761 | goto choice_1; |
2762 | } |
2763 | if ($this->currPos < $this->inputLength) { |
2764 | $r4 = self::consumeChar($this->input, $this->currPos);; |
2765 | } else { |
2766 | $r4 = self::$FAILED; |
2767 | if (!$silence) {$this->fail(7);} |
2768 | } |
2769 | choice_1: |
2770 | if ($r4!==self::$FAILED) { |
2771 | $r3[] = $r4; |
2772 | } else { |
2773 | break; |
2774 | } |
2775 | } |
2776 | if (count($r3) === 0) { |
2777 | $r3 = self::$FAILED; |
2778 | } |
2779 | // r <- $r3 |
2780 | // free $r4 |
2781 | $r1 = $r3; |
2782 | if ($r1!==self::$FAILED) { |
2783 | $this->savedPos = $p2; |
2784 | $r1 = $this->a16($r3); |
2785 | } |
2786 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
2787 | $this->currPos, |
2788 | $r1, |
2789 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
2790 | self::$UNDEFINED |
2791 | ); |
2792 | return $r1; |
2793 | }, "tplarg_or_template_or_bust", ["\$silence", "&\$param_preproc"], [$silence, &$param_preproc]); |
2794 | |
2795 | } |
2796 | private function parseextlink($silence, $boolParams, &$param_preproc, &$param_th) { |
2797 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
2798 | $key = json_encode([344, $boolParams & 0x1fff, $param_preproc, $param_th]); |
2799 | $bucket = $this->currPos; |
2800 | $cached = $this->cache[$bucket][$key] ?? null; |
2801 | if ($cached) { |
2802 | $this->currPos = $cached->nextPos; |
2803 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
2804 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
2805 | return $cached->result; |
2806 | } |
2807 | $saved_preproc=$param_preproc; |
2808 | $saved_th=$param_th; |
2809 | $p2 = $this->currPos; |
2810 | // start seq_1 |
2811 | $p3 = $this->currPos; |
2812 | if (!(/*extlink*/($boolParams & 0x8) !== 0)) { |
2813 | $r4 = false; |
2814 | } else { |
2815 | $r4 = self::$FAILED; |
2816 | $r1 = self::$FAILED; |
2817 | goto seq_1; |
2818 | } |
2819 | $p6 = $this->currPos; |
2820 | // start seq_2 |
2821 | $p7 = $this->currPos; |
2822 | if (($this->input[$this->currPos] ?? null) === "[") { |
2823 | $this->currPos++; |
2824 | $r8 = "["; |
2825 | } else { |
2826 | $r8 = self::$FAILED; |
2827 | $r5 = self::$FAILED; |
2828 | goto seq_2; |
2829 | } |
2830 | $p10 = $this->currPos; |
2831 | $r9 = ''; |
2832 | // p0 <- $r9 |
2833 | if ($r9!==self::$FAILED) { |
2834 | $this->savedPos = $p10; |
2835 | $r9 = $this->a17(); |
2836 | } else { |
2837 | $this->currPos = $p7; |
2838 | $r5 = self::$FAILED; |
2839 | goto seq_2; |
2840 | } |
2841 | $p12 = $this->currPos; |
2842 | // start seq_3 |
2843 | $p13 = $this->currPos; |
2844 | // start choice_1 |
2845 | // start seq_4 |
2846 | $p15 = $this->currPos; |
2847 | $r16 = $this->parseurl_protocol(true); |
2848 | if ($r16===self::$FAILED) { |
2849 | $r14 = self::$FAILED; |
2850 | goto seq_4; |
2851 | } |
2852 | $r17 = $this->parseipv6urladdr(true); |
2853 | if ($r17===self::$FAILED) { |
2854 | $this->currPos = $p15; |
2855 | $r14 = self::$FAILED; |
2856 | goto seq_4; |
2857 | } |
2858 | $r14 = [$r16,$r17]; |
2859 | seq_4: |
2860 | if ($r14!==self::$FAILED) { |
2861 | goto choice_1; |
2862 | } |
2863 | // free $p15 |
2864 | $r14 = ''; |
2865 | choice_1: |
2866 | // addr <- $r14 |
2867 | if ($r14===self::$FAILED) { |
2868 | $r11 = self::$FAILED; |
2869 | goto seq_3; |
2870 | } |
2871 | // start choice_2 |
2872 | $r18 = $this->parseextlink_nonipv6url(true, $boolParams | 0x8, $param_preproc, $param_th); |
2873 | if ($r18!==self::$FAILED) { |
2874 | goto choice_2; |
2875 | } |
2876 | $r18 = ''; |
2877 | choice_2: |
2878 | // target <- $r18 |
2879 | if ($r18===self::$FAILED) { |
2880 | $this->currPos = $p13; |
2881 | $r11 = self::$FAILED; |
2882 | goto seq_3; |
2883 | } |
2884 | $r11 = true; |
2885 | seq_3: |
2886 | // flat <- $r11 |
2887 | if ($r11!==self::$FAILED) { |
2888 | $this->savedPos = $p12; |
2889 | $r11 = $this->a18($r9, $r14, $r18); |
2890 | } else { |
2891 | $this->currPos = $p7; |
2892 | $r5 = self::$FAILED; |
2893 | goto seq_2; |
2894 | } |
2895 | // free $p13 |
2896 | $this->savedPos = $this->currPos; |
2897 | $r19 = $this->a19($r9, $r11); |
2898 | if ($r19) { |
2899 | $r19 = false; |
2900 | } else { |
2901 | $r19 = self::$FAILED; |
2902 | $this->currPos = $p7; |
2903 | $r5 = self::$FAILED; |
2904 | goto seq_2; |
2905 | } |
2906 | $p13 = $this->currPos; |
2907 | $r20 = ''; |
2908 | // p1 <- $r20 |
2909 | if ($r20!==self::$FAILED) { |
2910 | $this->savedPos = $p13; |
2911 | $r20 = $this->a20($r9, $r11); |
2912 | } else { |
2913 | $this->currPos = $p7; |
2914 | $r5 = self::$FAILED; |
2915 | goto seq_2; |
2916 | } |
2917 | $p15 = $this->currPos; |
2918 | for (;;) { |
2919 | // start choice_3 |
2920 | $r22 = $this->discardspace(true); |
2921 | if ($r22!==self::$FAILED) { |
2922 | goto choice_3; |
2923 | } |
2924 | $r22 = $this->discardunispace(true); |
2925 | choice_3: |
2926 | if ($r22===self::$FAILED) { |
2927 | break; |
2928 | } |
2929 | } |
2930 | // free $r22 |
2931 | $r21 = true; |
2932 | // sp <- $r21 |
2933 | if ($r21!==self::$FAILED) { |
2934 | $r21 = substr($this->input, $p15, $this->currPos - $p15); |
2935 | } else { |
2936 | $r21 = self::$FAILED; |
2937 | $this->currPos = $p7; |
2938 | $r5 = self::$FAILED; |
2939 | goto seq_2; |
2940 | } |
2941 | // free $p15 |
2942 | $p15 = $this->currPos; |
2943 | $r22 = ''; |
2944 | // p2 <- $r22 |
2945 | if ($r22!==self::$FAILED) { |
2946 | $this->savedPos = $p15; |
2947 | $r22 = $this->a21($r9, $r11, $r20, $r21); |
2948 | } else { |
2949 | $this->currPos = $p7; |
2950 | $r5 = self::$FAILED; |
2951 | goto seq_2; |
2952 | } |
2953 | $r23 = $this->parseinlineline(true, $boolParams | 0x8, $param_preproc, $param_th); |
2954 | if ($r23===self::$FAILED) { |
2955 | $r23 = null; |
2956 | } |
2957 | // content <- $r23 |
2958 | $p25 = $this->currPos; |
2959 | $r24 = ''; |
2960 | // p3 <- $r24 |
2961 | if ($r24!==self::$FAILED) { |
2962 | $this->savedPos = $p25; |
2963 | $r24 = $this->a22($r9, $r11, $r20, $r21, $r22, $r23); |
2964 | } else { |
2965 | $this->currPos = $p7; |
2966 | $r5 = self::$FAILED; |
2967 | goto seq_2; |
2968 | } |
2969 | if (($this->input[$this->currPos] ?? null) === "]") { |
2970 | $this->currPos++; |
2971 | $r26 = "]"; |
2972 | } else { |
2973 | $r26 = self::$FAILED; |
2974 | $this->currPos = $p7; |
2975 | $r5 = self::$FAILED; |
2976 | goto seq_2; |
2977 | } |
2978 | $r5 = true; |
2979 | seq_2: |
2980 | // r <- $r5 |
2981 | if ($r5!==self::$FAILED) { |
2982 | $this->savedPos = $p6; |
2983 | $r5 = $this->a23($r9, $r11, $r20, $r21, $r22, $r23, $r24); |
2984 | } else { |
2985 | $this->currPos = $p3; |
2986 | $r1 = self::$FAILED; |
2987 | goto seq_1; |
2988 | } |
2989 | // free $p7 |
2990 | $r1 = true; |
2991 | seq_1: |
2992 | if ($r1!==self::$FAILED) { |
2993 | $this->savedPos = $p2; |
2994 | $r1 = $this->a24($r5); |
2995 | } else { |
2996 | if (!$silence) {$this->fail(8);} |
2997 | } |
2998 | // free $p3 |
2999 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
3000 | $this->currPos, |
3001 | $r1, |
3002 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
3003 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
3004 | ); |
3005 | return $r1; |
3006 | }, "extlink", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
3007 | |
3008 | } |
3009 | private function parselist_item($silence, $boolParams, &$param_preproc, &$param_th) { |
3010 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
3011 | $key = json_encode([476, $boolParams & 0x1fff, $param_preproc, $param_th]); |
3012 | $bucket = $this->currPos; |
3013 | $cached = $this->cache[$bucket][$key] ?? null; |
3014 | if ($cached) { |
3015 | $this->currPos = $cached->nextPos; |
3016 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
3017 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
3018 | return $cached->result; |
3019 | } |
3020 | $saved_preproc=$param_preproc; |
3021 | $saved_th=$param_th; |
3022 | // start choice_1 |
3023 | $r1 = $this->parsedtdd($silence, $boolParams, $param_preproc, $param_th); |
3024 | if ($r1!==self::$FAILED) { |
3025 | goto choice_1; |
3026 | } |
3027 | $r1 = $this->parsehacky_dl_uses($silence, $boolParams, $param_preproc, $param_th); |
3028 | if ($r1!==self::$FAILED) { |
3029 | goto choice_1; |
3030 | } |
3031 | $r1 = $this->parseli($silence, $boolParams, $param_preproc, $param_th); |
3032 | choice_1: |
3033 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
3034 | $this->currPos, |
3035 | $r1, |
3036 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
3037 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
3038 | ); |
3039 | return $r1; |
3040 | }, "list_item", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
3041 | |
3042 | } |
3043 | private function parsetlb($silence, &$param_preproc) { |
3044 | return $this->traceCall(function($silence, &$param_preproc) { |
3045 | $key = json_encode([306, $param_preproc]); |
3046 | $bucket = $this->currPos; |
3047 | $cached = $this->cache[$bucket][$key] ?? null; |
3048 | if ($cached) { |
3049 | $this->currPos = $cached->nextPos; |
3050 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
3051 | return $cached->result; |
3052 | } |
3053 | $saved_preproc=$param_preproc; |
3054 | $p2 = $this->currPos; |
3055 | // start seq_1 |
3056 | $p3 = $this->currPos; |
3057 | $p4 = $this->currPos; |
3058 | $r5 = $this->discardeof(true); |
3059 | if ($r5 === self::$FAILED) { |
3060 | $r5 = false; |
3061 | } else { |
3062 | $r5 = self::$FAILED; |
3063 | $this->currPos = $p4; |
3064 | $r1 = self::$FAILED; |
3065 | goto seq_1; |
3066 | } |
3067 | // free $p4 |
3068 | $r6 = $this->parseblock(true, 0x0, self::newRef(null), $param_preproc); |
3069 | // b <- $r6 |
3070 | if ($r6===self::$FAILED) { |
3071 | $this->currPos = $p3; |
3072 | $r1 = self::$FAILED; |
3073 | goto seq_1; |
3074 | } |
3075 | $r1 = true; |
3076 | seq_1: |
3077 | if ($r1!==self::$FAILED) { |
3078 | $this->savedPos = $p2; |
3079 | $r1 = $this->a25($r6); |
3080 | } else { |
3081 | if (!$silence) {$this->fail(9);} |
3082 | } |
3083 | // free $p3 |
3084 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
3085 | $this->currPos, |
3086 | $r1, |
3087 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
3088 | self::$UNDEFINED |
3089 | ); |
3090 | return $r1; |
3091 | }, "tlb", ["\$silence", "&\$param_preproc"], [$silence, &$param_preproc]); |
3092 | |
3093 | } |
3094 | private function parsenewlineToken($silence) { |
3095 | return $this->traceCall(function($silence) { |
3096 | $key = 568; |
3097 | $bucket = $this->currPos; |
3098 | $cached = $this->cache[$bucket][$key] ?? null; |
3099 | if ($cached) { |
3100 | $this->currPos = $cached->nextPos; |
3101 | |
3102 | return $cached->result; |
3103 | } |
3104 | |
3105 | $p2 = $this->currPos; |
3106 | $r1 = $this->discardnewline($silence); |
3107 | if ($r1!==self::$FAILED) { |
3108 | $this->savedPos = $p2; |
3109 | $r1 = $this->a26(); |
3110 | } |
3111 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
3112 | $this->currPos, |
3113 | $r1, |
3114 | self::$UNDEFINED, |
3115 | self::$UNDEFINED |
3116 | ); |
3117 | return $r1; |
3118 | }, "newlineToken", ["\$silence"], [$silence]); |
3119 | |
3120 | } |
3121 | private function parsespace($silence) { |
3122 | return $this->traceCall(function($silence) { |
3123 | $key = 558; |
3124 | $bucket = $this->currPos; |
3125 | $cached = $this->cache[$bucket][$key] ?? null; |
3126 | if ($cached) { |
3127 | $this->currPos = $cached->nextPos; |
3128 | |
3129 | return $cached->result; |
3130 | } |
3131 | |
3132 | $r1 = $this->input[$this->currPos] ?? ''; |
3133 | if ($r1 === " " || $r1 === "\x09") { |
3134 | $this->currPos++; |
3135 | } else { |
3136 | $r1 = self::$FAILED; |
3137 | if (!$silence) {$this->fail(10);} |
3138 | } |
3139 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
3140 | $this->currPos, |
3141 | $r1, |
3142 | self::$UNDEFINED, |
3143 | self::$UNDEFINED |
3144 | ); |
3145 | return $r1; |
3146 | }, "space", ["\$silence"], [$silence]); |
3147 | |
3148 | } |
3149 | private function parsecomment($silence) { |
3150 | return $this->traceCall(function($silence) { |
3151 | $key = 572; |
3152 | $bucket = $this->currPos; |
3153 | $cached = $this->cache[$bucket][$key] ?? null; |
3154 | if ($cached) { |
3155 | $this->currPos = $cached->nextPos; |
3156 | |
3157 | return $cached->result; |
3158 | } |
3159 | |
3160 | $p2 = $this->currPos; |
3161 | // start seq_1 |
3162 | $p3 = $this->currPos; |
3163 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "<!--", $this->currPos, 4, false) === 0) { |
3164 | $r4 = "<!--"; |
3165 | $this->currPos += 4; |
3166 | } else { |
3167 | if (!$silence) {$this->fail(11);} |
3168 | $r4 = self::$FAILED; |
3169 | $r1 = self::$FAILED; |
3170 | goto seq_1; |
3171 | } |
3172 | $p6 = $this->currPos; |
3173 | for (;;) { |
3174 | // start seq_2 |
3175 | $p8 = $this->currPos; |
3176 | $p9 = $this->currPos; |
3177 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "-->", $this->currPos, 3, false) === 0) { |
3178 | $r10 = "-->"; |
3179 | $this->currPos += 3; |
3180 | } else { |
3181 | $r10 = self::$FAILED; |
3182 | } |
3183 | if ($r10 === self::$FAILED) { |
3184 | $r10 = false; |
3185 | } else { |
3186 | $r10 = self::$FAILED; |
3187 | $this->currPos = $p9; |
3188 | $r7 = self::$FAILED; |
3189 | goto seq_2; |
3190 | } |
3191 | // free $p9 |
3192 | if ($this->currPos < $this->inputLength) { |
3193 | $r11 = self::consumeChar($this->input, $this->currPos);; |
3194 | } else { |
3195 | $r11 = self::$FAILED; |
3196 | if (!$silence) {$this->fail(7);} |
3197 | $this->currPos = $p8; |
3198 | $r7 = self::$FAILED; |
3199 | goto seq_2; |
3200 | } |
3201 | $r7 = true; |
3202 | seq_2: |
3203 | if ($r7===self::$FAILED) { |
3204 | break; |
3205 | } |
3206 | // free $p8 |
3207 | } |
3208 | // free $r7 |
3209 | $r5 = true; |
3210 | // c <- $r5 |
3211 | if ($r5!==self::$FAILED) { |
3212 | $r5 = substr($this->input, $p6, $this->currPos - $p6); |
3213 | } else { |
3214 | $r5 = self::$FAILED; |
3215 | $this->currPos = $p3; |
3216 | $r1 = self::$FAILED; |
3217 | goto seq_1; |
3218 | } |
3219 | // free $p6 |
3220 | $p6 = $this->currPos; |
3221 | // start choice_1 |
3222 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "-->", $this->currPos, 3, false) === 0) { |
3223 | $r7 = "-->"; |
3224 | $this->currPos += 3; |
3225 | goto choice_1; |
3226 | } else { |
3227 | if (!$silence) {$this->fail(12);} |
3228 | $r7 = self::$FAILED; |
3229 | } |
3230 | $r7 = $this->discardeof($silence); |
3231 | choice_1: |
3232 | // cEnd <- $r7 |
3233 | if ($r7!==self::$FAILED) { |
3234 | $r7 = substr($this->input, $p6, $this->currPos - $p6); |
3235 | } else { |
3236 | $r7 = self::$FAILED; |
3237 | $this->currPos = $p3; |
3238 | $r1 = self::$FAILED; |
3239 | goto seq_1; |
3240 | } |
3241 | // free $p6 |
3242 | $r1 = true; |
3243 | seq_1: |
3244 | if ($r1!==self::$FAILED) { |
3245 | $this->savedPos = $p2; |
3246 | $r1 = $this->a27($r5, $r7); |
3247 | } |
3248 | // free $p3 |
3249 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
3250 | $this->currPos, |
3251 | $r1, |
3252 | self::$UNDEFINED, |
3253 | self::$UNDEFINED |
3254 | ); |
3255 | return $r1; |
3256 | }, "comment", ["\$silence"], [$silence]); |
3257 | |
3258 | } |
3259 | private function parsepipe($silence) { |
3260 | return $this->traceCall(function($silence) { |
3261 | $key = 554; |
3262 | $bucket = $this->currPos; |
3263 | $cached = $this->cache[$bucket][$key] ?? null; |
3264 | if ($cached) { |
3265 | $this->currPos = $cached->nextPos; |
3266 | |
3267 | return $cached->result; |
3268 | } |
3269 | |
3270 | // start choice_1 |
3271 | if (($this->input[$this->currPos] ?? null) === "|") { |
3272 | $this->currPos++; |
3273 | $r1 = "|"; |
3274 | goto choice_1; |
3275 | } else { |
3276 | if (!$silence) {$this->fail(13);} |
3277 | $r1 = self::$FAILED; |
3278 | } |
3279 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "{{!}}", $this->currPos, 5, false) === 0) { |
3280 | $r1 = "{{!}}"; |
3281 | $this->currPos += 5; |
3282 | } else { |
3283 | if (!$silence) {$this->fail(14);} |
3284 | $r1 = self::$FAILED; |
3285 | } |
3286 | choice_1: |
3287 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
3288 | $this->currPos, |
3289 | $r1, |
3290 | self::$UNDEFINED, |
3291 | self::$UNDEFINED |
3292 | ); |
3293 | return $r1; |
3294 | }, "pipe", ["\$silence"], [$silence]); |
3295 | |
3296 | } |
3297 | private function parseurl_protocol($silence) { |
3298 | return $this->traceCall(function($silence) { |
3299 | $key = 354; |
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 | $p2 = $this->currPos; |
3309 | // start seq_1 |
3310 | $p3 = $this->currPos; |
3311 | $p5 = $this->currPos; |
3312 | // start choice_1 |
3313 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "//", $this->currPos, 2, false) === 0) { |
3314 | $r4 = "//"; |
3315 | $this->currPos += 2; |
3316 | goto choice_1; |
3317 | } else { |
3318 | if (!$silence) {$this->fail(15);} |
3319 | $r4 = self::$FAILED; |
3320 | } |
3321 | // start seq_2 |
3322 | $p6 = $this->currPos; |
3323 | $r7 = $this->input[$this->currPos] ?? ''; |
3324 | if (preg_match("/^[A-Za-z]/", $r7)) { |
3325 | $this->currPos++; |
3326 | } else { |
3327 | $r7 = self::$FAILED; |
3328 | if (!$silence) {$this->fail(16);} |
3329 | $r4 = self::$FAILED; |
3330 | goto seq_2; |
3331 | } |
3332 | for (;;) { |
3333 | $r9 = $this->input[$this->currPos] ?? ''; |
3334 | if (preg_match("/^[\\-A-Za-z0-9+.]/", $r9)) { |
3335 | $this->currPos++; |
3336 | } else { |
3337 | $r9 = self::$FAILED; |
3338 | if (!$silence) {$this->fail(17);} |
3339 | break; |
3340 | } |
3341 | } |
3342 | // free $r9 |
3343 | $r8 = true; |
3344 | if ($r8===self::$FAILED) { |
3345 | $this->currPos = $p6; |
3346 | $r4 = self::$FAILED; |
3347 | goto seq_2; |
3348 | } |
3349 | // free $r8 |
3350 | if (($this->input[$this->currPos] ?? null) === ":") { |
3351 | $this->currPos++; |
3352 | $r8 = ":"; |
3353 | } else { |
3354 | if (!$silence) {$this->fail(18);} |
3355 | $r8 = self::$FAILED; |
3356 | $this->currPos = $p6; |
3357 | $r4 = self::$FAILED; |
3358 | goto seq_2; |
3359 | } |
3360 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "//", $this->currPos, 2, false) === 0) { |
3361 | $r9 = "//"; |
3362 | $this->currPos += 2; |
3363 | } else { |
3364 | if (!$silence) {$this->fail(15);} |
3365 | $r9 = self::$FAILED; |
3366 | $r9 = null; |
3367 | } |
3368 | $r4 = true; |
3369 | seq_2: |
3370 | // free $p6 |
3371 | choice_1: |
3372 | // p <- $r4 |
3373 | if ($r4!==self::$FAILED) { |
3374 | $r4 = substr($this->input, $p5, $this->currPos - $p5); |
3375 | } else { |
3376 | $r4 = self::$FAILED; |
3377 | $r1 = self::$FAILED; |
3378 | goto seq_1; |
3379 | } |
3380 | // free $p5 |
3381 | $this->savedPos = $this->currPos; |
3382 | $r10 = $this->a28($r4); |
3383 | if ($r10) { |
3384 | $r10 = false; |
3385 | } else { |
3386 | $r10 = self::$FAILED; |
3387 | $this->currPos = $p3; |
3388 | $r1 = self::$FAILED; |
3389 | goto seq_1; |
3390 | } |
3391 | $r1 = true; |
3392 | seq_1: |
3393 | if ($r1!==self::$FAILED) { |
3394 | $this->savedPos = $p2; |
3395 | $r1 = $this->a29($r4); |
3396 | } |
3397 | // free $p3 |
3398 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
3399 | $this->currPos, |
3400 | $r1, |
3401 | self::$UNDEFINED, |
3402 | self::$UNDEFINED |
3403 | ); |
3404 | return $r1; |
3405 | }, "url_protocol", ["\$silence"], [$silence]); |
3406 | |
3407 | } |
3408 | private function parseipv6urladdr($silence) { |
3409 | return $this->traceCall(function($silence) { |
3410 | $key = 362; |
3411 | $bucket = $this->currPos; |
3412 | $cached = $this->cache[$bucket][$key] ?? null; |
3413 | if ($cached) { |
3414 | $this->currPos = $cached->nextPos; |
3415 | |
3416 | return $cached->result; |
3417 | } |
3418 | |
3419 | $p1 = $this->currPos; |
3420 | // start seq_1 |
3421 | $p3 = $this->currPos; |
3422 | if (($this->input[$this->currPos] ?? null) === "[") { |
3423 | $this->currPos++; |
3424 | $r4 = "["; |
3425 | } else { |
3426 | if (!$silence) {$this->fail(19);} |
3427 | $r4 = self::$FAILED; |
3428 | $r2 = self::$FAILED; |
3429 | goto seq_1; |
3430 | } |
3431 | $r5 = self::$FAILED; |
3432 | for (;;) { |
3433 | $r6 = $this->input[$this->currPos] ?? ''; |
3434 | if (preg_match("/^[0-9A-Fa-f:.]/", $r6)) { |
3435 | $this->currPos++; |
3436 | $r5 = true; |
3437 | } else { |
3438 | $r6 = self::$FAILED; |
3439 | if (!$silence) {$this->fail(20);} |
3440 | break; |
3441 | } |
3442 | } |
3443 | if ($r5===self::$FAILED) { |
3444 | $this->currPos = $p3; |
3445 | $r2 = self::$FAILED; |
3446 | goto seq_1; |
3447 | } |
3448 | // free $r6 |
3449 | if (($this->input[$this->currPos] ?? null) === "]") { |
3450 | $this->currPos++; |
3451 | $r6 = "]"; |
3452 | } else { |
3453 | if (!$silence) {$this->fail(21);} |
3454 | $r6 = self::$FAILED; |
3455 | $this->currPos = $p3; |
3456 | $r2 = self::$FAILED; |
3457 | goto seq_1; |
3458 | } |
3459 | $r2 = true; |
3460 | seq_1: |
3461 | if ($r2!==self::$FAILED) { |
3462 | $r2 = substr($this->input, $p1, $this->currPos - $p1); |
3463 | } else { |
3464 | $r2 = self::$FAILED; |
3465 | } |
3466 | // free $p3 |
3467 | // free $p1 |
3468 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
3469 | $this->currPos, |
3470 | $r2, |
3471 | self::$UNDEFINED, |
3472 | self::$UNDEFINED |
3473 | ); |
3474 | return $r2; |
3475 | }, "ipv6urladdr", ["\$silence"], [$silence]); |
3476 | |
3477 | } |
3478 | private function discardinline_breaks($silence, $boolParams, &$param_preproc, &$param_th) { |
3479 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
3480 | $key = json_encode([327, $boolParams & 0x1ffe, $param_preproc, $param_th]); |
3481 | $bucket = $this->currPos; |
3482 | $cached = $this->cache[$bucket][$key] ?? null; |
3483 | if ($cached) { |
3484 | $this->currPos = $cached->nextPos; |
3485 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
3486 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
3487 | return $cached->result; |
3488 | } |
3489 | $saved_preproc=$param_preproc; |
3490 | $saved_th=$param_th; |
3491 | // start seq_1 |
3492 | $p1 = $this->currPos; |
3493 | $p3 = $this->currPos; |
3494 | if (strspn($this->input, "=|!{}:;\x0d\x0a[]-", $this->currPos, 1) !== 0) { |
3495 | $r4 = $this->input[$this->currPos++]; |
3496 | $r4 = false; |
3497 | $this->currPos = $p3; |
3498 | } else { |
3499 | $r4 = self::$FAILED; |
3500 | $r2 = self::$FAILED; |
3501 | goto seq_1; |
3502 | } |
3503 | // free $p3 |
3504 | // start seq_2 |
3505 | $p3 = $this->currPos; |
3506 | $this->savedPos = $this->currPos; |
3507 | $r6 = $this->a30(/*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); |
3508 | if ($r6) { |
3509 | $r6 = false; |
3510 | } else { |
3511 | $r6 = self::$FAILED; |
3512 | $this->currPos = $p3; |
3513 | $r5 = self::$FAILED; |
3514 | goto seq_2; |
3515 | } |
3516 | $r5 = true; |
3517 | seq_2: |
3518 | if ($r5===self::$FAILED) { |
3519 | $this->currPos = $p1; |
3520 | $r2 = self::$FAILED; |
3521 | goto seq_1; |
3522 | } |
3523 | // free $r5,$p3 |
3524 | $r2 = true; |
3525 | seq_1: |
3526 | // free $r2,$p1 |
3527 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
3528 | $this->currPos, |
3529 | $r2, |
3530 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
3531 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
3532 | ); |
3533 | return $r2; |
3534 | }, "inline_breaks", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
3535 | |
3536 | } |
3537 | private function parseno_punctuation_char($silence) { |
3538 | return $this->traceCall(function($silence) { |
3539 | $key = 356; |
3540 | $bucket = $this->currPos; |
3541 | $cached = $this->cache[$bucket][$key] ?? null; |
3542 | if ($cached) { |
3543 | $this->currPos = $cached->nextPos; |
3544 | |
3545 | return $cached->result; |
3546 | } |
3547 | |
3548 | $r1 = self::charAt($this->input, $this->currPos); |
3549 | 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)) { |
3550 | $this->currPos += strlen($r1); |
3551 | } else { |
3552 | $r1 = self::$FAILED; |
3553 | if (!$silence) {$this->fail(22);} |
3554 | } |
3555 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
3556 | $this->currPos, |
3557 | $r1, |
3558 | self::$UNDEFINED, |
3559 | self::$UNDEFINED |
3560 | ); |
3561 | return $r1; |
3562 | }, "no_punctuation_char", ["\$silence"], [$silence]); |
3563 | |
3564 | } |
3565 | private function parsetplarg_or_template($silence, $boolParams, &$param_th, &$param_preproc) { |
3566 | return $this->traceCall(function($silence, $boolParams, &$param_th, &$param_preproc) { |
3567 | $key = json_encode([364, $boolParams & 0x1fef, $param_th, $param_preproc]); |
3568 | $bucket = $this->currPos; |
3569 | $cached = $this->cache[$bucket][$key] ?? null; |
3570 | if ($cached) { |
3571 | $this->currPos = $cached->nextPos; |
3572 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
3573 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
3574 | return $cached->result; |
3575 | } |
3576 | $saved_th=$param_th; |
3577 | $saved_preproc=$param_preproc; |
3578 | $p2 = $this->currPos; |
3579 | // start seq_1 |
3580 | $p3 = $this->currPos; |
3581 | $p4 = $this->currPos; |
3582 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "{{", $this->currPos, 2, false) === 0) { |
3583 | $r5 = "{{"; |
3584 | $this->currPos += 2; |
3585 | $r5 = false; |
3586 | $this->currPos = $p4; |
3587 | } else { |
3588 | $r5 = self::$FAILED; |
3589 | $r1 = self::$FAILED; |
3590 | goto seq_1; |
3591 | } |
3592 | // free $p4 |
3593 | $r6 = $this->parsetplarg_or_template_guarded($silence, $boolParams | 0x10, $param_th, $param_preproc); |
3594 | // t <- $r6 |
3595 | if ($r6===self::$FAILED) { |
3596 | $this->currPos = $p3; |
3597 | $r1 = self::$FAILED; |
3598 | goto seq_1; |
3599 | } |
3600 | $r1 = true; |
3601 | seq_1: |
3602 | if ($r1!==self::$FAILED) { |
3603 | $this->savedPos = $p2; |
3604 | $r1 = $this->a31($r6); |
3605 | } |
3606 | // free $p3 |
3607 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
3608 | $this->currPos, |
3609 | $r1, |
3610 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
3611 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
3612 | ); |
3613 | return $r1; |
3614 | }, "tplarg_or_template", ["\$silence", "\$boolParams", "&\$param_th", "&\$param_preproc"], [$silence, $boolParams, &$param_th, &$param_preproc]); |
3615 | |
3616 | } |
3617 | private function parsehtmlentity($silence) { |
3618 | return $this->traceCall(function($silence) { |
3619 | $key = 528; |
3620 | $bucket = $this->currPos; |
3621 | $cached = $this->cache[$bucket][$key] ?? null; |
3622 | if ($cached) { |
3623 | $this->currPos = $cached->nextPos; |
3624 | |
3625 | return $cached->result; |
3626 | } |
3627 | |
3628 | $p2 = $this->currPos; |
3629 | $r3 = $this->parseraw_htmlentity($silence); |
3630 | // cc <- $r3 |
3631 | $r1 = $r3; |
3632 | if ($r1!==self::$FAILED) { |
3633 | $this->savedPos = $p2; |
3634 | $r1 = $this->a32($r3); |
3635 | } |
3636 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
3637 | $this->currPos, |
3638 | $r1, |
3639 | self::$UNDEFINED, |
3640 | self::$UNDEFINED |
3641 | ); |
3642 | return $r1; |
3643 | }, "htmlentity", ["\$silence"], [$silence]); |
3644 | |
3645 | } |
3646 | private function parseoptional_spaces($silence) { |
3647 | return $this->traceCall(function($silence) { |
3648 | $key = 560; |
3649 | $bucket = $this->currPos; |
3650 | $cached = $this->cache[$bucket][$key] ?? null; |
3651 | if ($cached) { |
3652 | $this->currPos = $cached->nextPos; |
3653 | |
3654 | return $cached->result; |
3655 | } |
3656 | |
3657 | $p1 = $this->currPos; |
3658 | for (;;) { |
3659 | $r3 = $this->input[$this->currPos] ?? ''; |
3660 | if ($r3 === " " || $r3 === "\x09") { |
3661 | $this->currPos++; |
3662 | } else { |
3663 | $r3 = self::$FAILED; |
3664 | if (!$silence) {$this->fail(10);} |
3665 | break; |
3666 | } |
3667 | } |
3668 | // free $r3 |
3669 | $r2 = true; |
3670 | if ($r2!==self::$FAILED) { |
3671 | $r2 = substr($this->input, $p1, $this->currPos - $p1); |
3672 | } else { |
3673 | $r2 = self::$FAILED; |
3674 | } |
3675 | // free $p1 |
3676 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
3677 | $this->currPos, |
3678 | $r2, |
3679 | self::$UNDEFINED, |
3680 | self::$UNDEFINED |
3681 | ); |
3682 | return $r2; |
3683 | }, "optional_spaces", ["\$silence"], [$silence]); |
3684 | |
3685 | } |
3686 | private function discardpipe($silence) { |
3687 | return $this->traceCall(function($silence) { |
3688 | $key = 555; |
3689 | $bucket = $this->currPos; |
3690 | $cached = $this->cache[$bucket][$key] ?? null; |
3691 | if ($cached) { |
3692 | $this->currPos = $cached->nextPos; |
3693 | |
3694 | return $cached->result; |
3695 | } |
3696 | |
3697 | // start choice_1 |
3698 | if (($this->input[$this->currPos] ?? null) === "|") { |
3699 | $this->currPos++; |
3700 | $r1 = "|"; |
3701 | goto choice_1; |
3702 | } else { |
3703 | if (!$silence) {$this->fail(13);} |
3704 | $r1 = self::$FAILED; |
3705 | } |
3706 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "{{!}}", $this->currPos, 5, false) === 0) { |
3707 | $r1 = "{{!}}"; |
3708 | $this->currPos += 5; |
3709 | } else { |
3710 | if (!$silence) {$this->fail(14);} |
3711 | $r1 = self::$FAILED; |
3712 | } |
3713 | choice_1: |
3714 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
3715 | $this->currPos, |
3716 | $r1, |
3717 | self::$UNDEFINED, |
3718 | self::$UNDEFINED |
3719 | ); |
3720 | return $r1; |
3721 | }, "pipe", ["\$silence"], [$silence]); |
3722 | |
3723 | } |
3724 | private function parsetable_attribute($silence, $boolParams, &$param_preproc, &$param_th) { |
3725 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
3726 | $key = json_encode([462, $boolParams & 0x1fff, $param_preproc, $param_th]); |
3727 | $bucket = $this->currPos; |
3728 | $cached = $this->cache[$bucket][$key] ?? null; |
3729 | if ($cached) { |
3730 | $this->currPos = $cached->nextPos; |
3731 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
3732 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
3733 | return $cached->result; |
3734 | } |
3735 | $saved_preproc=$param_preproc; |
3736 | $saved_th=$param_th; |
3737 | $p2 = $this->currPos; |
3738 | // start seq_1 |
3739 | $p3 = $this->currPos; |
3740 | $r4 = $this->parseoptionalSpaceToken($silence); |
3741 | // s <- $r4 |
3742 | if ($r4===self::$FAILED) { |
3743 | $r1 = self::$FAILED; |
3744 | goto seq_1; |
3745 | } |
3746 | $p6 = $this->currPos; |
3747 | $r5 = ''; |
3748 | // namePos0 <- $r5 |
3749 | if ($r5!==self::$FAILED) { |
3750 | $this->savedPos = $p6; |
3751 | $r5 = $this->a33($r4); |
3752 | } else { |
3753 | $this->currPos = $p3; |
3754 | $r1 = self::$FAILED; |
3755 | goto seq_1; |
3756 | } |
3757 | $r7 = $this->parsetable_attribute_name($silence, $boolParams, $param_preproc, $param_th); |
3758 | // name <- $r7 |
3759 | if ($r7===self::$FAILED) { |
3760 | $this->currPos = $p3; |
3761 | $r1 = self::$FAILED; |
3762 | goto seq_1; |
3763 | } |
3764 | $p9 = $this->currPos; |
3765 | $r8 = ''; |
3766 | // namePos1 <- $r8 |
3767 | if ($r8!==self::$FAILED) { |
3768 | $this->savedPos = $p9; |
3769 | $r8 = $this->a34($r4, $r5, $r7); |
3770 | } else { |
3771 | $this->currPos = $p3; |
3772 | $r1 = self::$FAILED; |
3773 | goto seq_1; |
3774 | } |
3775 | $p11 = $this->currPos; |
3776 | // start seq_2 |
3777 | $p12 = $this->currPos; |
3778 | $r13 = $this->discardoptionalSpaceToken($silence); |
3779 | if ($r13===self::$FAILED) { |
3780 | $r10 = self::$FAILED; |
3781 | goto seq_2; |
3782 | } |
3783 | if (($this->input[$this->currPos] ?? null) === "=") { |
3784 | $this->currPos++; |
3785 | $r14 = "="; |
3786 | } else { |
3787 | if (!$silence) {$this->fail(23);} |
3788 | $r14 = self::$FAILED; |
3789 | $this->currPos = $p12; |
3790 | $r10 = self::$FAILED; |
3791 | goto seq_2; |
3792 | } |
3793 | $r15 = $this->parsetable_att_value($silence, $boolParams, $param_preproc, $param_th); |
3794 | if ($r15===self::$FAILED) { |
3795 | $r15 = null; |
3796 | } |
3797 | // v <- $r15 |
3798 | $r10 = true; |
3799 | seq_2: |
3800 | if ($r10!==self::$FAILED) { |
3801 | $this->savedPos = $p11; |
3802 | $r10 = $this->a35($r4, $r5, $r7, $r8, $r15); |
3803 | } else { |
3804 | $r10 = null; |
3805 | } |
3806 | // free $p12 |
3807 | // vd <- $r10 |
3808 | $r1 = true; |
3809 | seq_1: |
3810 | if ($r1!==self::$FAILED) { |
3811 | $this->savedPos = $p2; |
3812 | $r1 = $this->a36($r4, $r5, $r7, $r8, $r10); |
3813 | } |
3814 | // free $p3 |
3815 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
3816 | $this->currPos, |
3817 | $r1, |
3818 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
3819 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
3820 | ); |
3821 | return $r1; |
3822 | }, "table_attribute", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
3823 | |
3824 | } |
3825 | private function discardoptionalSpaceToken($silence) { |
3826 | return $this->traceCall(function($silence) { |
3827 | $key = 577; |
3828 | $bucket = $this->currPos; |
3829 | $cached = $this->cache[$bucket][$key] ?? null; |
3830 | if ($cached) { |
3831 | $this->currPos = $cached->nextPos; |
3832 | |
3833 | return $cached->result; |
3834 | } |
3835 | |
3836 | $p2 = $this->currPos; |
3837 | $r3 = $this->parseoptional_spaces($silence); |
3838 | // s <- $r3 |
3839 | $r1 = $r3; |
3840 | if ($r1!==self::$FAILED) { |
3841 | $this->savedPos = $p2; |
3842 | $r1 = $this->a37($r3); |
3843 | } |
3844 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
3845 | $this->currPos, |
3846 | $r1, |
3847 | self::$UNDEFINED, |
3848 | self::$UNDEFINED |
3849 | ); |
3850 | return $r1; |
3851 | }, "optionalSpaceToken", ["\$silence"], [$silence]); |
3852 | |
3853 | } |
3854 | private function parsebroken_table_attribute_name_char($silence) { |
3855 | return $this->traceCall(function($silence) { |
3856 | $key = 468; |
3857 | $bucket = $this->currPos; |
3858 | $cached = $this->cache[$bucket][$key] ?? null; |
3859 | if ($cached) { |
3860 | $this->currPos = $cached->nextPos; |
3861 | |
3862 | return $cached->result; |
3863 | } |
3864 | |
3865 | $p2 = $this->currPos; |
3866 | // c <- $r3 |
3867 | if (strspn($this->input, "\x00/=>", $this->currPos, 1) !== 0) { |
3868 | $r3 = $this->input[$this->currPos++]; |
3869 | } else { |
3870 | $r3 = self::$FAILED; |
3871 | if (!$silence) {$this->fail(24);} |
3872 | } |
3873 | $r1 = $r3; |
3874 | if ($r1!==self::$FAILED) { |
3875 | $this->savedPos = $p2; |
3876 | $r1 = $this->a38($r3); |
3877 | } |
3878 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
3879 | $this->currPos, |
3880 | $r1, |
3881 | self::$UNDEFINED, |
3882 | self::$UNDEFINED |
3883 | ); |
3884 | return $r1; |
3885 | }, "broken_table_attribute_name_char", ["\$silence"], [$silence]); |
3886 | |
3887 | } |
3888 | private function parsegeneric_newline_attribute($silence, $boolParams, &$param_preproc, &$param_th) { |
3889 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
3890 | $key = json_encode([460, $boolParams & 0x1fff, $param_preproc, $param_th]); |
3891 | $bucket = $this->currPos; |
3892 | $cached = $this->cache[$bucket][$key] ?? null; |
3893 | if ($cached) { |
3894 | $this->currPos = $cached->nextPos; |
3895 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
3896 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
3897 | return $cached->result; |
3898 | } |
3899 | $saved_preproc=$param_preproc; |
3900 | $saved_th=$param_th; |
3901 | $p2 = $this->currPos; |
3902 | // start seq_1 |
3903 | $p3 = $this->currPos; |
3904 | for (;;) { |
3905 | $r5 = $this->discardspace_or_newline_or_solidus($silence); |
3906 | if ($r5===self::$FAILED) { |
3907 | break; |
3908 | } |
3909 | } |
3910 | // free $r5 |
3911 | $r4 = true; |
3912 | if ($r4===self::$FAILED) { |
3913 | $r1 = self::$FAILED; |
3914 | goto seq_1; |
3915 | } |
3916 | // free $r4 |
3917 | $p6 = $this->currPos; |
3918 | $r4 = ''; |
3919 | // namePos0 <- $r4 |
3920 | if ($r4!==self::$FAILED) { |
3921 | $this->savedPos = $p6; |
3922 | $r4 = $this->a17(); |
3923 | } else { |
3924 | $this->currPos = $p3; |
3925 | $r1 = self::$FAILED; |
3926 | goto seq_1; |
3927 | } |
3928 | $r5 = $this->parsegeneric_attribute_name($silence, $boolParams, $param_preproc, $param_th); |
3929 | // name <- $r5 |
3930 | if ($r5===self::$FAILED) { |
3931 | $this->currPos = $p3; |
3932 | $r1 = self::$FAILED; |
3933 | goto seq_1; |
3934 | } |
3935 | $p8 = $this->currPos; |
3936 | $r7 = ''; |
3937 | // namePos1 <- $r7 |
3938 | if ($r7!==self::$FAILED) { |
3939 | $this->savedPos = $p8; |
3940 | $r7 = $this->a39($r4, $r5); |
3941 | } else { |
3942 | $this->currPos = $p3; |
3943 | $r1 = self::$FAILED; |
3944 | goto seq_1; |
3945 | } |
3946 | $p10 = $this->currPos; |
3947 | // start seq_2 |
3948 | $p11 = $this->currPos; |
3949 | for (;;) { |
3950 | $r13 = $this->discardspace_or_newline($silence); |
3951 | if ($r13===self::$FAILED) { |
3952 | break; |
3953 | } |
3954 | } |
3955 | // free $r13 |
3956 | $r12 = true; |
3957 | if ($r12===self::$FAILED) { |
3958 | $r9 = self::$FAILED; |
3959 | goto seq_2; |
3960 | } |
3961 | // free $r12 |
3962 | if (($this->input[$this->currPos] ?? null) === "=") { |
3963 | $this->currPos++; |
3964 | $r12 = "="; |
3965 | } else { |
3966 | if (!$silence) {$this->fail(23);} |
3967 | $r12 = self::$FAILED; |
3968 | $this->currPos = $p11; |
3969 | $r9 = self::$FAILED; |
3970 | goto seq_2; |
3971 | } |
3972 | $r13 = $this->parsegeneric_att_value($silence, $boolParams, $param_preproc, $param_th); |
3973 | if ($r13===self::$FAILED) { |
3974 | $r13 = null; |
3975 | } |
3976 | // v <- $r13 |
3977 | $r9 = true; |
3978 | seq_2: |
3979 | if ($r9!==self::$FAILED) { |
3980 | $this->savedPos = $p10; |
3981 | $r9 = $this->a40($r4, $r5, $r7, $r13); |
3982 | } else { |
3983 | $r9 = null; |
3984 | } |
3985 | // free $p11 |
3986 | // vd <- $r9 |
3987 | $r1 = true; |
3988 | seq_1: |
3989 | if ($r1!==self::$FAILED) { |
3990 | $this->savedPos = $p2; |
3991 | $r1 = $this->a41($r4, $r5, $r7, $r9); |
3992 | } |
3993 | // free $p3 |
3994 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
3995 | $this->currPos, |
3996 | $r1, |
3997 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
3998 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
3999 | ); |
4000 | return $r1; |
4001 | }, "generic_newline_attribute", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
4002 | |
4003 | } |
4004 | private function parseextlink_nonipv6url($silence, $boolParams, &$param_preproc, &$param_th) { |
4005 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
4006 | $key = json_encode([538, $boolParams & 0x17ff, $param_preproc, $param_th]); |
4007 | $bucket = $this->currPos; |
4008 | $cached = $this->cache[$bucket][$key] ?? null; |
4009 | if ($cached) { |
4010 | $this->currPos = $cached->nextPos; |
4011 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
4012 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
4013 | return $cached->result; |
4014 | } |
4015 | $saved_preproc=$param_preproc; |
4016 | $saved_th=$param_th; |
4017 | $r1 = $this->parseextlink_nonipv6url_parameterized($silence, $boolParams & ~0x800, $param_preproc, $param_th); |
4018 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
4019 | $this->currPos, |
4020 | $r1, |
4021 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
4022 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
4023 | ); |
4024 | return $r1; |
4025 | }, "extlink_nonipv6url", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
4026 | |
4027 | } |
4028 | private function discardspace($silence) { |
4029 | return $this->traceCall(function($silence) { |
4030 | $key = 559; |
4031 | $bucket = $this->currPos; |
4032 | $cached = $this->cache[$bucket][$key] ?? null; |
4033 | if ($cached) { |
4034 | $this->currPos = $cached->nextPos; |
4035 | |
4036 | return $cached->result; |
4037 | } |
4038 | |
4039 | $r1 = $this->input[$this->currPos] ?? ''; |
4040 | if ($r1 === " " || $r1 === "\x09") { |
4041 | $this->currPos++; |
4042 | } else { |
4043 | $r1 = self::$FAILED; |
4044 | if (!$silence) {$this->fail(10);} |
4045 | } |
4046 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
4047 | $this->currPos, |
4048 | $r1, |
4049 | self::$UNDEFINED, |
4050 | self::$UNDEFINED |
4051 | ); |
4052 | return $r1; |
4053 | }, "space", ["\$silence"], [$silence]); |
4054 | |
4055 | } |
4056 | private function discardunispace($silence) { |
4057 | return $this->traceCall(function($silence) { |
4058 | $key = 583; |
4059 | $bucket = $this->currPos; |
4060 | $cached = $this->cache[$bucket][$key] ?? null; |
4061 | if ($cached) { |
4062 | $this->currPos = $cached->nextPos; |
4063 | |
4064 | return $cached->result; |
4065 | } |
4066 | |
4067 | $r1 = self::charAt($this->input, $this->currPos); |
4068 | if (preg_match("/^[ \\x{a0}\\x{1680}\\x{2000}-\\x{200a}\\x{202f}\\x{205f}\\x{3000}]/u", $r1)) { |
4069 | $this->currPos += strlen($r1); |
4070 | } else { |
4071 | $r1 = self::$FAILED; |
4072 | if (!$silence) {$this->fail(25);} |
4073 | } |
4074 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
4075 | $this->currPos, |
4076 | $r1, |
4077 | self::$UNDEFINED, |
4078 | self::$UNDEFINED |
4079 | ); |
4080 | return $r1; |
4081 | }, "unispace", ["\$silence"], [$silence]); |
4082 | |
4083 | } |
4084 | private function parseinlineline($silence, $boolParams, &$param_preproc, &$param_th) { |
4085 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
4086 | $key = json_encode([328, $boolParams & 0x1fff, $param_preproc, $param_th]); |
4087 | $bucket = $this->currPos; |
4088 | $cached = $this->cache[$bucket][$key] ?? null; |
4089 | if ($cached) { |
4090 | $this->currPos = $cached->nextPos; |
4091 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
4092 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
4093 | return $cached->result; |
4094 | } |
4095 | $saved_preproc=$param_preproc; |
4096 | $saved_th=$param_th; |
4097 | $p2 = $this->currPos; |
4098 | $r3 = []; |
4099 | for (;;) { |
4100 | // start choice_1 |
4101 | $r4 = $this->parseurltext($silence, $boolParams, $param_preproc, $param_th); |
4102 | if ($r4!==self::$FAILED) { |
4103 | goto choice_1; |
4104 | } |
4105 | $p5 = $this->currPos; |
4106 | // start seq_1 |
4107 | $p6 = $this->currPos; |
4108 | $p7 = $this->currPos; |
4109 | $r8 = $this->discardinline_breaks(true, $boolParams, $param_preproc, $param_th); |
4110 | if ($r8 === self::$FAILED) { |
4111 | $r8 = false; |
4112 | } else { |
4113 | $r8 = self::$FAILED; |
4114 | $this->currPos = $p7; |
4115 | $r4 = self::$FAILED; |
4116 | goto seq_1; |
4117 | } |
4118 | // free $p7 |
4119 | // start choice_2 |
4120 | $r9 = $this->parseinline_element($silence, $boolParams, $param_preproc, $param_th); |
4121 | if ($r9!==self::$FAILED) { |
4122 | goto choice_2; |
4123 | } |
4124 | $p7 = $this->currPos; |
4125 | // start seq_2 |
4126 | $p10 = $this->currPos; |
4127 | $p11 = $this->currPos; |
4128 | $r12 = $this->discardnewline(true); |
4129 | if ($r12 === self::$FAILED) { |
4130 | $r12 = false; |
4131 | } else { |
4132 | $r12 = self::$FAILED; |
4133 | $this->currPos = $p11; |
4134 | $r9 = self::$FAILED; |
4135 | goto seq_2; |
4136 | } |
4137 | // free $p11 |
4138 | // s <- $r13 |
4139 | if ($this->currPos < $this->inputLength) { |
4140 | $r13 = self::consumeChar($this->input, $this->currPos);; |
4141 | } else { |
4142 | $r13 = self::$FAILED; |
4143 | if (!$silence) {$this->fail(7);} |
4144 | $this->currPos = $p10; |
4145 | $r9 = self::$FAILED; |
4146 | goto seq_2; |
4147 | } |
4148 | $r9 = true; |
4149 | seq_2: |
4150 | if ($r9!==self::$FAILED) { |
4151 | $this->savedPos = $p7; |
4152 | $r9 = $this->a42($r13); |
4153 | } |
4154 | // free $p10 |
4155 | choice_2: |
4156 | // r <- $r9 |
4157 | if ($r9===self::$FAILED) { |
4158 | $this->currPos = $p6; |
4159 | $r4 = self::$FAILED; |
4160 | goto seq_1; |
4161 | } |
4162 | $r4 = true; |
4163 | seq_1: |
4164 | if ($r4!==self::$FAILED) { |
4165 | $this->savedPos = $p5; |
4166 | $r4 = $this->a24($r9); |
4167 | } |
4168 | // free $p6 |
4169 | choice_1: |
4170 | if ($r4!==self::$FAILED) { |
4171 | $r3[] = $r4; |
4172 | } else { |
4173 | break; |
4174 | } |
4175 | } |
4176 | if (count($r3) === 0) { |
4177 | $r3 = self::$FAILED; |
4178 | } |
4179 | // c <- $r3 |
4180 | // free $r4 |
4181 | $r1 = $r3; |
4182 | if ($r1!==self::$FAILED) { |
4183 | $this->savedPos = $p2; |
4184 | $r1 = $this->a43($r3); |
4185 | } |
4186 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
4187 | $this->currPos, |
4188 | $r1, |
4189 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
4190 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
4191 | ); |
4192 | return $r1; |
4193 | }, "inlineline", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
4194 | |
4195 | } |
4196 | private function parsedtdd($silence, $boolParams, &$param_preproc, &$param_th) { |
4197 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
4198 | $key = json_encode([484, $boolParams & 0x1fff, $param_preproc, $param_th]); |
4199 | $bucket = $this->currPos; |
4200 | $cached = $this->cache[$bucket][$key] ?? null; |
4201 | if ($cached) { |
4202 | $this->currPos = $cached->nextPos; |
4203 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
4204 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
4205 | return $cached->result; |
4206 | } |
4207 | $saved_preproc=$param_preproc; |
4208 | $saved_th=$param_th; |
4209 | $p2 = $this->currPos; |
4210 | // start seq_1 |
4211 | $p3 = $this->currPos; |
4212 | $r4 = []; |
4213 | for (;;) { |
4214 | $p6 = $this->currPos; |
4215 | // start seq_2 |
4216 | $p7 = $this->currPos; |
4217 | $p8 = $this->currPos; |
4218 | // start seq_3 |
4219 | $p10 = $this->currPos; |
4220 | if (($this->input[$this->currPos] ?? null) === ";") { |
4221 | $this->currPos++; |
4222 | $r11 = ";"; |
4223 | } else { |
4224 | $r11 = self::$FAILED; |
4225 | $r9 = self::$FAILED; |
4226 | goto seq_3; |
4227 | } |
4228 | $p12 = $this->currPos; |
4229 | $r13 = $this->discardlist_char(true); |
4230 | if ($r13 === self::$FAILED) { |
4231 | $r13 = false; |
4232 | } else { |
4233 | $r13 = self::$FAILED; |
4234 | $this->currPos = $p12; |
4235 | $this->currPos = $p10; |
4236 | $r9 = self::$FAILED; |
4237 | goto seq_3; |
4238 | } |
4239 | // free $p12 |
4240 | $r9 = true; |
4241 | seq_3: |
4242 | // free $p10 |
4243 | if ($r9 === self::$FAILED) { |
4244 | $r9 = false; |
4245 | } else { |
4246 | $r9 = self::$FAILED; |
4247 | $this->currPos = $p8; |
4248 | $r5 = self::$FAILED; |
4249 | goto seq_2; |
4250 | } |
4251 | // free $p8 |
4252 | $r14 = $this->parselist_char($silence); |
4253 | // lc <- $r14 |
4254 | if ($r14===self::$FAILED) { |
4255 | $this->currPos = $p7; |
4256 | $r5 = self::$FAILED; |
4257 | goto seq_2; |
4258 | } |
4259 | $r5 = true; |
4260 | seq_2: |
4261 | if ($r5!==self::$FAILED) { |
4262 | $this->savedPos = $p6; |
4263 | $r5 = $this->a44($r14); |
4264 | $r4[] = $r5; |
4265 | } else { |
4266 | break; |
4267 | } |
4268 | // free $p7 |
4269 | } |
4270 | // bullets <- $r4 |
4271 | // free $r5 |
4272 | if (($this->input[$this->currPos] ?? null) === ";") { |
4273 | $this->currPos++; |
4274 | $r5 = ";"; |
4275 | } else { |
4276 | if (!$silence) {$this->fail(26);} |
4277 | $r5 = self::$FAILED; |
4278 | $this->currPos = $p3; |
4279 | $r1 = self::$FAILED; |
4280 | goto seq_1; |
4281 | } |
4282 | $r15 = []; |
4283 | for (;;) { |
4284 | $r16 = $this->parsedtdd_colon($silence, $boolParams, $param_preproc, $param_th); |
4285 | if ($r16!==self::$FAILED) { |
4286 | $r15[] = $r16; |
4287 | } else { |
4288 | break; |
4289 | } |
4290 | } |
4291 | // colons <- $r15 |
4292 | // free $r16 |
4293 | $r16 = $this->parseinlineline($silence, $boolParams, $param_preproc, $param_th); |
4294 | if ($r16===self::$FAILED) { |
4295 | $r16 = null; |
4296 | } |
4297 | // d <- $r16 |
4298 | $p7 = $this->currPos; |
4299 | $r17 = $this->discardeolf(true); |
4300 | if ($r17!==self::$FAILED) { |
4301 | $r17 = false; |
4302 | $this->currPos = $p7; |
4303 | } else { |
4304 | $this->currPos = $p3; |
4305 | $r1 = self::$FAILED; |
4306 | goto seq_1; |
4307 | } |
4308 | // free $p7 |
4309 | $r1 = true; |
4310 | seq_1: |
4311 | if ($r1!==self::$FAILED) { |
4312 | $this->savedPos = $p2; |
4313 | $r1 = $this->a45($r4, $r15, $r16); |
4314 | } |
4315 | // free $p3 |
4316 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
4317 | $this->currPos, |
4318 | $r1, |
4319 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
4320 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
4321 | ); |
4322 | return $r1; |
4323 | }, "dtdd", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
4324 | |
4325 | } |
4326 | private function parsehacky_dl_uses($silence, $boolParams, &$param_preproc, &$param_th) { |
4327 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
4328 | $key = json_encode([480, $boolParams & 0x1fff, $param_preproc, $param_th]); |
4329 | $bucket = $this->currPos; |
4330 | $cached = $this->cache[$bucket][$key] ?? null; |
4331 | if ($cached) { |
4332 | $this->currPos = $cached->nextPos; |
4333 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
4334 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
4335 | return $cached->result; |
4336 | } |
4337 | $saved_preproc=$param_preproc; |
4338 | $saved_th=$param_th; |
4339 | $p2 = $this->currPos; |
4340 | // start seq_1 |
4341 | $p3 = $this->currPos; |
4342 | $r4 = []; |
4343 | for (;;) { |
4344 | if (($this->input[$this->currPos] ?? null) === ":") { |
4345 | $this->currPos++; |
4346 | $r5 = ":"; |
4347 | $r4[] = $r5; |
4348 | } else { |
4349 | if (!$silence) {$this->fail(18);} |
4350 | $r5 = self::$FAILED; |
4351 | break; |
4352 | } |
4353 | } |
4354 | if (count($r4) === 0) { |
4355 | $r4 = self::$FAILED; |
4356 | } |
4357 | // bullets <- $r4 |
4358 | if ($r4===self::$FAILED) { |
4359 | $r1 = self::$FAILED; |
4360 | goto seq_1; |
4361 | } |
4362 | // free $r5 |
4363 | // start seq_2 |
4364 | $p6 = $this->currPos; |
4365 | $r7 = $this->parsetable_line($silence, $boolParams, $param_preproc, $param_th); |
4366 | if ($r7===self::$FAILED) { |
4367 | $r5 = self::$FAILED; |
4368 | goto seq_2; |
4369 | } |
4370 | $r8 = []; |
4371 | for (;;) { |
4372 | // start seq_3 |
4373 | $p10 = $this->currPos; |
4374 | $r11 = []; |
4375 | for (;;) { |
4376 | $r12 = $this->parsesol($silence, $boolParams, $param_preproc, $param_th); |
4377 | if ($r12!==self::$FAILED) { |
4378 | $r11[] = $r12; |
4379 | } else { |
4380 | break; |
4381 | } |
4382 | } |
4383 | if (count($r11) === 0) { |
4384 | $r11 = self::$FAILED; |
4385 | } |
4386 | if ($r11===self::$FAILED) { |
4387 | $r9 = self::$FAILED; |
4388 | goto seq_3; |
4389 | } |
4390 | // free $r12 |
4391 | $r12 = $this->parsetable_line($silence, $boolParams, $param_preproc, $param_th); |
4392 | if ($r12===self::$FAILED) { |
4393 | $this->currPos = $p10; |
4394 | $r9 = self::$FAILED; |
4395 | goto seq_3; |
4396 | } |
4397 | $r9 = [$r11,$r12]; |
4398 | seq_3: |
4399 | if ($r9!==self::$FAILED) { |
4400 | $r8[] = $r9; |
4401 | } else { |
4402 | break; |
4403 | } |
4404 | // free $p10 |
4405 | } |
4406 | // free $r9 |
4407 | $r5 = [$r7,$r8]; |
4408 | seq_2: |
4409 | // tbl <- $r5 |
4410 | if ($r5===self::$FAILED) { |
4411 | $this->currPos = $p3; |
4412 | $r1 = self::$FAILED; |
4413 | goto seq_1; |
4414 | } |
4415 | // free $p6 |
4416 | $r9 = $this->parseinlineline($silence, $boolParams, $param_preproc, $param_th); |
4417 | if ($r9===self::$FAILED) { |
4418 | $r9 = null; |
4419 | } |
4420 | // line <- $r9 |
4421 | $p6 = $this->currPos; |
4422 | // start seq_4 |
4423 | $p10 = $this->currPos; |
4424 | for (;;) { |
4425 | // start choice_1 |
4426 | $r15 = $this->discardspace(true); |
4427 | if ($r15!==self::$FAILED) { |
4428 | goto choice_1; |
4429 | } |
4430 | $r15 = $this->discardcomment(true); |
4431 | choice_1: |
4432 | if ($r15===self::$FAILED) { |
4433 | break; |
4434 | } |
4435 | } |
4436 | // free $r15 |
4437 | $r14 = true; |
4438 | if ($r14===self::$FAILED) { |
4439 | $r13 = self::$FAILED; |
4440 | goto seq_4; |
4441 | } |
4442 | // free $r14 |
4443 | $r14 = $this->discardeolf(true); |
4444 | if ($r14===self::$FAILED) { |
4445 | $this->currPos = $p10; |
4446 | $r13 = self::$FAILED; |
4447 | goto seq_4; |
4448 | } |
4449 | $r13 = true; |
4450 | seq_4: |
4451 | if ($r13!==self::$FAILED) { |
4452 | $r13 = false; |
4453 | $this->currPos = $p6; |
4454 | } else { |
4455 | $this->currPos = $p3; |
4456 | $r1 = self::$FAILED; |
4457 | goto seq_1; |
4458 | } |
4459 | // free $p10 |
4460 | // free $p6 |
4461 | $r1 = true; |
4462 | seq_1: |
4463 | if ($r1!==self::$FAILED) { |
4464 | $this->savedPos = $p2; |
4465 | $r1 = $this->a46($r4, $r5, $r9); |
4466 | } |
4467 | // free $p3 |
4468 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
4469 | $this->currPos, |
4470 | $r1, |
4471 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
4472 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
4473 | ); |
4474 | return $r1; |
4475 | }, "hacky_dl_uses", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
4476 | |
4477 | } |
4478 | private function parseli($silence, $boolParams, &$param_preproc, &$param_th) { |
4479 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
4480 | $key = json_encode([478, $boolParams & 0x1fff, $param_preproc, $param_th]); |
4481 | $bucket = $this->currPos; |
4482 | $cached = $this->cache[$bucket][$key] ?? null; |
4483 | if ($cached) { |
4484 | $this->currPos = $cached->nextPos; |
4485 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
4486 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
4487 | return $cached->result; |
4488 | } |
4489 | $saved_preproc=$param_preproc; |
4490 | $saved_th=$param_th; |
4491 | $p2 = $this->currPos; |
4492 | // start seq_1 |
4493 | $p3 = $this->currPos; |
4494 | $r4 = []; |
4495 | for (;;) { |
4496 | $r5 = $this->parselist_char($silence); |
4497 | if ($r5!==self::$FAILED) { |
4498 | $r4[] = $r5; |
4499 | } else { |
4500 | break; |
4501 | } |
4502 | } |
4503 | if (count($r4) === 0) { |
4504 | $r4 = self::$FAILED; |
4505 | } |
4506 | // bullets <- $r4 |
4507 | if ($r4===self::$FAILED) { |
4508 | $r1 = self::$FAILED; |
4509 | goto seq_1; |
4510 | } |
4511 | // free $r5 |
4512 | $r5 = $this->parseinlineline($silence, $boolParams, $param_preproc, $param_th); |
4513 | if ($r5===self::$FAILED) { |
4514 | $r5 = null; |
4515 | } |
4516 | // c <- $r5 |
4517 | $p6 = $this->currPos; |
4518 | // start choice_1 |
4519 | $r7 = $this->discardeolf(true); |
4520 | if ($r7!==self::$FAILED) { |
4521 | goto choice_1; |
4522 | } |
4523 | $r7 = $this->discardinline_breaks(true, $boolParams, $param_preproc, $param_th); |
4524 | choice_1: |
4525 | if ($r7!==self::$FAILED) { |
4526 | $r7 = false; |
4527 | $this->currPos = $p6; |
4528 | } else { |
4529 | $this->currPos = $p3; |
4530 | $r1 = self::$FAILED; |
4531 | goto seq_1; |
4532 | } |
4533 | // free $p6 |
4534 | $r1 = true; |
4535 | seq_1: |
4536 | if ($r1!==self::$FAILED) { |
4537 | $this->savedPos = $p2; |
4538 | $r1 = $this->a47($r4, $r5); |
4539 | } |
4540 | // free $p3 |
4541 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
4542 | $this->currPos, |
4543 | $r1, |
4544 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
4545 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
4546 | ); |
4547 | return $r1; |
4548 | }, "li", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
4549 | |
4550 | } |
4551 | private function discardeof($silence) { |
4552 | return $this->traceCall(function($silence) { |
4553 | $key = 565; |
4554 | $bucket = $this->currPos; |
4555 | $cached = $this->cache[$bucket][$key] ?? null; |
4556 | if ($cached) { |
4557 | $this->currPos = $cached->nextPos; |
4558 | |
4559 | return $cached->result; |
4560 | } |
4561 | |
4562 | $this->savedPos = $this->currPos; |
4563 | $r1 = $this->a48(); |
4564 | if ($r1) { |
4565 | $r1 = false; |
4566 | } else { |
4567 | $r1 = self::$FAILED; |
4568 | } |
4569 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
4570 | $this->currPos, |
4571 | $r1, |
4572 | self::$UNDEFINED, |
4573 | self::$UNDEFINED |
4574 | ); |
4575 | return $r1; |
4576 | }, "eof", ["\$silence"], [$silence]); |
4577 | |
4578 | } |
4579 | private function parseblock($silence, $boolParams, &$param_th, &$param_preproc) { |
4580 | return $this->traceCall(function($silence, $boolParams, &$param_th, &$param_preproc) { |
4581 | $key = json_encode([312, $boolParams & 0x1fff, $param_th, $param_preproc]); |
4582 | $bucket = $this->currPos; |
4583 | $cached = $this->cache[$bucket][$key] ?? null; |
4584 | if ($cached) { |
4585 | $this->currPos = $cached->nextPos; |
4586 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
4587 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
4588 | return $cached->result; |
4589 | } |
4590 | $saved_th=$param_th; |
4591 | $saved_preproc=$param_preproc; |
4592 | // start choice_1 |
4593 | $p2 = $this->currPos; |
4594 | // start seq_1 |
4595 | $p3 = $this->currPos; |
4596 | $p4 = $this->currPos; |
4597 | $r5 = $this->discardsof(true); |
4598 | if ($r5!==self::$FAILED) { |
4599 | $r5 = false; |
4600 | $this->currPos = $p4; |
4601 | } else { |
4602 | $r1 = self::$FAILED; |
4603 | goto seq_1; |
4604 | } |
4605 | // free $p4 |
4606 | $r6 = $this->parseredirect($silence, $boolParams, $param_th, $param_preproc); |
4607 | // r <- $r6 |
4608 | if ($r6===self::$FAILED) { |
4609 | $this->currPos = $p3; |
4610 | $r1 = self::$FAILED; |
4611 | goto seq_1; |
4612 | } |
4613 | $r7 = []; |
4614 | for (;;) { |
4615 | $r8 = $this->parsesol_transparent($silence, $boolParams, $param_preproc, $param_th); |
4616 | if ($r8!==self::$FAILED) { |
4617 | $r7[] = $r8; |
4618 | } else { |
4619 | break; |
4620 | } |
4621 | } |
4622 | // cil <- $r7 |
4623 | // free $r8 |
4624 | $r8 = $this->parseblock_line($silence, $boolParams, $param_preproc, $param_th); |
4625 | if ($r8===self::$FAILED) { |
4626 | $r8 = null; |
4627 | } |
4628 | // bl <- $r8 |
4629 | $r1 = true; |
4630 | seq_1: |
4631 | if ($r1!==self::$FAILED) { |
4632 | $this->savedPos = $p2; |
4633 | $r1 = $this->a49($r6, $r7, $r8); |
4634 | goto choice_1; |
4635 | } |
4636 | // free $p3 |
4637 | $r1 = $this->parseblock_lines($silence, $boolParams, $param_preproc, $param_th); |
4638 | if ($r1!==self::$FAILED) { |
4639 | goto choice_1; |
4640 | } |
4641 | $r1 = $this->parseinlineline($silence, $boolParams, $param_preproc, $param_th); |
4642 | if ($r1!==self::$FAILED) { |
4643 | goto choice_1; |
4644 | } |
4645 | $p3 = $this->currPos; |
4646 | // start seq_2 |
4647 | $p4 = $this->currPos; |
4648 | $r9 = $this->parsesol($silence, $boolParams, $param_preproc, $param_th); |
4649 | // s <- $r9 |
4650 | if ($r9===self::$FAILED) { |
4651 | $r1 = self::$FAILED; |
4652 | goto seq_2; |
4653 | } |
4654 | $p10 = $this->currPos; |
4655 | $r11 = $this->discardsof(true); |
4656 | if ($r11 === self::$FAILED) { |
4657 | $r11 = false; |
4658 | } else { |
4659 | $r11 = self::$FAILED; |
4660 | $this->currPos = $p10; |
4661 | $this->currPos = $p4; |
4662 | $r1 = self::$FAILED; |
4663 | goto seq_2; |
4664 | } |
4665 | // free $p10 |
4666 | $p10 = $this->currPos; |
4667 | $r12 = $this->discardinline_breaks(true, $boolParams, $param_preproc, $param_th); |
4668 | if ($r12 === self::$FAILED) { |
4669 | $r12 = false; |
4670 | } else { |
4671 | $r12 = self::$FAILED; |
4672 | $this->currPos = $p10; |
4673 | $this->currPos = $p4; |
4674 | $r1 = self::$FAILED; |
4675 | goto seq_2; |
4676 | } |
4677 | // free $p10 |
4678 | $r1 = true; |
4679 | seq_2: |
4680 | if ($r1!==self::$FAILED) { |
4681 | $this->savedPos = $p3; |
4682 | $r1 = $this->a42($r9); |
4683 | } |
4684 | // free $p4 |
4685 | choice_1: |
4686 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
4687 | $this->currPos, |
4688 | $r1, |
4689 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
4690 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
4691 | ); |
4692 | return $r1; |
4693 | }, "block", ["\$silence", "\$boolParams", "&\$param_th", "&\$param_preproc"], [$silence, $boolParams, &$param_th, &$param_preproc]); |
4694 | |
4695 | } |
4696 | private function discardnewline($silence) { |
4697 | return $this->traceCall(function($silence) { |
4698 | $key = 567; |
4699 | $bucket = $this->currPos; |
4700 | $cached = $this->cache[$bucket][$key] ?? null; |
4701 | if ($cached) { |
4702 | $this->currPos = $cached->nextPos; |
4703 | |
4704 | return $cached->result; |
4705 | } |
4706 | |
4707 | // start choice_1 |
4708 | if (($this->input[$this->currPos] ?? null) === "\x0a") { |
4709 | $this->currPos++; |
4710 | $r1 = "\x0a"; |
4711 | goto choice_1; |
4712 | } else { |
4713 | if (!$silence) {$this->fail(27);} |
4714 | $r1 = self::$FAILED; |
4715 | } |
4716 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "\x0d\x0a", $this->currPos, 2, false) === 0) { |
4717 | $r1 = "\x0d\x0a"; |
4718 | $this->currPos += 2; |
4719 | } else { |
4720 | if (!$silence) {$this->fail(28);} |
4721 | $r1 = self::$FAILED; |
4722 | } |
4723 | choice_1: |
4724 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
4725 | $this->currPos, |
4726 | $r1, |
4727 | self::$UNDEFINED, |
4728 | self::$UNDEFINED |
4729 | ); |
4730 | return $r1; |
4731 | }, "newline", ["\$silence"], [$silence]); |
4732 | |
4733 | } |
4734 | private function parsetplarg_or_template_guarded($silence, $boolParams, &$param_th, &$param_preproc) { |
4735 | return $this->traceCall(function($silence, $boolParams, &$param_th, &$param_preproc) { |
4736 | $key = json_encode([366, $boolParams & 0x1fff, $param_th, $param_preproc]); |
4737 | $bucket = $this->currPos; |
4738 | $cached = $this->cache[$bucket][$key] ?? null; |
4739 | if ($cached) { |
4740 | $this->currPos = $cached->nextPos; |
4741 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
4742 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
4743 | return $cached->result; |
4744 | } |
4745 | $saved_th=$param_th; |
4746 | $saved_preproc=$param_preproc; |
4747 | // start choice_1 |
4748 | $p2 = $this->currPos; |
4749 | // start seq_1 |
4750 | $p3 = $this->currPos; |
4751 | $p4 = $this->currPos; |
4752 | // start seq_2 |
4753 | $p6 = $this->currPos; |
4754 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "{{", $this->currPos, 2, false) === 0) { |
4755 | $r7 = "{{"; |
4756 | $this->currPos += 2; |
4757 | } else { |
4758 | $r7 = self::$FAILED; |
4759 | $r5 = self::$FAILED; |
4760 | goto seq_2; |
4761 | } |
4762 | $p8 = $this->currPos; |
4763 | // start seq_3 |
4764 | $p10 = $this->currPos; |
4765 | $r11 = self::$FAILED; |
4766 | for (;;) { |
4767 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "{{{", $this->currPos, 3, false) === 0) { |
4768 | $r12 = "{{{"; |
4769 | $this->currPos += 3; |
4770 | $r11 = true; |
4771 | } else { |
4772 | $r12 = self::$FAILED; |
4773 | break; |
4774 | } |
4775 | } |
4776 | if ($r11===self::$FAILED) { |
4777 | $r9 = self::$FAILED; |
4778 | goto seq_3; |
4779 | } |
4780 | // free $r12 |
4781 | $p13 = $this->currPos; |
4782 | if (($this->input[$this->currPos] ?? null) === "{") { |
4783 | $this->currPos++; |
4784 | $r12 = "{"; |
4785 | } else { |
4786 | $r12 = self::$FAILED; |
4787 | } |
4788 | if ($r12 === self::$FAILED) { |
4789 | $r12 = false; |
4790 | } else { |
4791 | $r12 = self::$FAILED; |
4792 | $this->currPos = $p13; |
4793 | $this->currPos = $p10; |
4794 | $r9 = self::$FAILED; |
4795 | goto seq_3; |
4796 | } |
4797 | // free $p13 |
4798 | $r9 = true; |
4799 | seq_3: |
4800 | if ($r9!==self::$FAILED) { |
4801 | $r9 = false; |
4802 | $this->currPos = $p8; |
4803 | } else { |
4804 | $this->currPos = $p6; |
4805 | $r5 = self::$FAILED; |
4806 | goto seq_2; |
4807 | } |
4808 | // free $p10 |
4809 | // free $p8 |
4810 | $r14 = $this->discardtplarg(true, $boolParams, $param_th); |
4811 | if ($r14===self::$FAILED) { |
4812 | $this->currPos = $p6; |
4813 | $r5 = self::$FAILED; |
4814 | goto seq_2; |
4815 | } |
4816 | $r5 = true; |
4817 | seq_2: |
4818 | if ($r5!==self::$FAILED) { |
4819 | $r5 = false; |
4820 | $this->currPos = $p4; |
4821 | } else { |
4822 | $r1 = self::$FAILED; |
4823 | goto seq_1; |
4824 | } |
4825 | // free $p6 |
4826 | // free $p4 |
4827 | // start choice_2 |
4828 | $r15 = $this->parsetemplate($silence, $boolParams, $param_th); |
4829 | if ($r15!==self::$FAILED) { |
4830 | goto choice_2; |
4831 | } |
4832 | $r15 = $this->parsebroken_template($silence, $param_preproc); |
4833 | choice_2: |
4834 | // a <- $r15 |
4835 | if ($r15===self::$FAILED) { |
4836 | $this->currPos = $p3; |
4837 | $r1 = self::$FAILED; |
4838 | goto seq_1; |
4839 | } |
4840 | $r1 = true; |
4841 | seq_1: |
4842 | if ($r1!==self::$FAILED) { |
4843 | $this->savedPos = $p2; |
4844 | $r1 = $this->a50($r15); |
4845 | goto choice_1; |
4846 | } |
4847 | // free $p3 |
4848 | $p3 = $this->currPos; |
4849 | // start seq_4 |
4850 | $p4 = $this->currPos; |
4851 | $p6 = $this->currPos; |
4852 | // start seq_5 |
4853 | $p8 = $this->currPos; |
4854 | if (($this->input[$this->currPos] ?? null) === "{") { |
4855 | $this->currPos++; |
4856 | $r17 = "{"; |
4857 | } else { |
4858 | if (!$silence) {$this->fail(29);} |
4859 | $r17 = self::$FAILED; |
4860 | $r16 = self::$FAILED; |
4861 | goto seq_5; |
4862 | } |
4863 | $p10 = $this->currPos; |
4864 | // start seq_6 |
4865 | $p13 = $this->currPos; |
4866 | $r19 = self::$FAILED; |
4867 | for (;;) { |
4868 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "{{{", $this->currPos, 3, false) === 0) { |
4869 | $r20 = "{{{"; |
4870 | $this->currPos += 3; |
4871 | $r19 = true; |
4872 | } else { |
4873 | $r20 = self::$FAILED; |
4874 | break; |
4875 | } |
4876 | } |
4877 | if ($r19===self::$FAILED) { |
4878 | $r18 = self::$FAILED; |
4879 | goto seq_6; |
4880 | } |
4881 | // free $r20 |
4882 | $p21 = $this->currPos; |
4883 | if (($this->input[$this->currPos] ?? null) === "{") { |
4884 | $this->currPos++; |
4885 | $r20 = "{"; |
4886 | } else { |
4887 | $r20 = self::$FAILED; |
4888 | } |
4889 | if ($r20 === self::$FAILED) { |
4890 | $r20 = false; |
4891 | } else { |
4892 | $r20 = self::$FAILED; |
4893 | $this->currPos = $p21; |
4894 | $this->currPos = $p13; |
4895 | $r18 = self::$FAILED; |
4896 | goto seq_6; |
4897 | } |
4898 | // free $p21 |
4899 | $r18 = true; |
4900 | seq_6: |
4901 | if ($r18!==self::$FAILED) { |
4902 | $r18 = false; |
4903 | $this->currPos = $p10; |
4904 | } else { |
4905 | $this->currPos = $p8; |
4906 | $r16 = self::$FAILED; |
4907 | goto seq_5; |
4908 | } |
4909 | // free $p13 |
4910 | // free $p10 |
4911 | $r16 = true; |
4912 | seq_5: |
4913 | if ($r16===self::$FAILED) { |
4914 | $r16 = null; |
4915 | } |
4916 | // free $p8 |
4917 | // a <- $r16 |
4918 | $r16 = substr($this->input, $p6, $this->currPos - $p6); |
4919 | // free $p6 |
4920 | $r22 = $this->parsetplarg($silence, $boolParams, $param_th); |
4921 | // b <- $r22 |
4922 | if ($r22===self::$FAILED) { |
4923 | $this->currPos = $p4; |
4924 | $r1 = self::$FAILED; |
4925 | goto seq_4; |
4926 | } |
4927 | $r1 = true; |
4928 | seq_4: |
4929 | if ($r1!==self::$FAILED) { |
4930 | $this->savedPos = $p3; |
4931 | $r1 = $this->a51($r16, $r22); |
4932 | goto choice_1; |
4933 | } |
4934 | // free $p4 |
4935 | $p4 = $this->currPos; |
4936 | // start seq_7 |
4937 | $p6 = $this->currPos; |
4938 | $p8 = $this->currPos; |
4939 | // start seq_8 |
4940 | $p10 = $this->currPos; |
4941 | if (($this->input[$this->currPos] ?? null) === "{") { |
4942 | $this->currPos++; |
4943 | $r24 = "{"; |
4944 | } else { |
4945 | if (!$silence) {$this->fail(29);} |
4946 | $r24 = self::$FAILED; |
4947 | $r23 = self::$FAILED; |
4948 | goto seq_8; |
4949 | } |
4950 | $p13 = $this->currPos; |
4951 | // start seq_9 |
4952 | $p21 = $this->currPos; |
4953 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "{{", $this->currPos, 2, false) === 0) { |
4954 | $r26 = "{{"; |
4955 | $this->currPos += 2; |
4956 | } else { |
4957 | $r26 = self::$FAILED; |
4958 | $r25 = self::$FAILED; |
4959 | goto seq_9; |
4960 | } |
4961 | $p27 = $this->currPos; |
4962 | if (($this->input[$this->currPos] ?? null) === "{") { |
4963 | $this->currPos++; |
4964 | $r28 = "{"; |
4965 | } else { |
4966 | $r28 = self::$FAILED; |
4967 | } |
4968 | if ($r28 === self::$FAILED) { |
4969 | $r28 = false; |
4970 | } else { |
4971 | $r28 = self::$FAILED; |
4972 | $this->currPos = $p27; |
4973 | $this->currPos = $p21; |
4974 | $r25 = self::$FAILED; |
4975 | goto seq_9; |
4976 | } |
4977 | // free $p27 |
4978 | $r25 = true; |
4979 | seq_9: |
4980 | if ($r25!==self::$FAILED) { |
4981 | $r25 = false; |
4982 | $this->currPos = $p13; |
4983 | } else { |
4984 | $this->currPos = $p10; |
4985 | $r23 = self::$FAILED; |
4986 | goto seq_8; |
4987 | } |
4988 | // free $p21 |
4989 | // free $p13 |
4990 | $r23 = true; |
4991 | seq_8: |
4992 | if ($r23===self::$FAILED) { |
4993 | $r23 = null; |
4994 | } |
4995 | // free $p10 |
4996 | // a <- $r23 |
4997 | $r23 = substr($this->input, $p8, $this->currPos - $p8); |
4998 | // free $p8 |
4999 | $r29 = $this->parsetemplate($silence, $boolParams, $param_th); |
5000 | // b <- $r29 |
5001 | if ($r29===self::$FAILED) { |
5002 | $this->currPos = $p6; |
5003 | $r1 = self::$FAILED; |
5004 | goto seq_7; |
5005 | } |
5006 | $r1 = true; |
5007 | seq_7: |
5008 | if ($r1!==self::$FAILED) { |
5009 | $this->savedPos = $p4; |
5010 | $r1 = $this->a51($r23, $r29); |
5011 | goto choice_1; |
5012 | } |
5013 | // free $p6 |
5014 | $r1 = $this->parsebroken_template($silence, $param_preproc); |
5015 | choice_1: |
5016 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
5017 | $this->currPos, |
5018 | $r1, |
5019 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
5020 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
5021 | ); |
5022 | return $r1; |
5023 | }, "tplarg_or_template_guarded", ["\$silence", "\$boolParams", "&\$param_th", "&\$param_preproc"], [$silence, $boolParams, &$param_th, &$param_preproc]); |
5024 | |
5025 | } |
5026 | private function parseraw_htmlentity($silence) { |
5027 | return $this->traceCall(function($silence) { |
5028 | $key = 526; |
5029 | $bucket = $this->currPos; |
5030 | $cached = $this->cache[$bucket][$key] ?? null; |
5031 | if ($cached) { |
5032 | $this->currPos = $cached->nextPos; |
5033 | |
5034 | return $cached->result; |
5035 | } |
5036 | |
5037 | $p2 = $this->currPos; |
5038 | $p4 = $this->currPos; |
5039 | // start seq_1 |
5040 | $p5 = $this->currPos; |
5041 | if (($this->input[$this->currPos] ?? null) === "&") { |
5042 | $this->currPos++; |
5043 | $r6 = "&"; |
5044 | } else { |
5045 | if (!$silence) {$this->fail(4);} |
5046 | $r6 = self::$FAILED; |
5047 | $r3 = self::$FAILED; |
5048 | goto seq_1; |
5049 | } |
5050 | $r7 = self::$FAILED; |
5051 | for (;;) { |
5052 | $r8 = self::charAt($this->input, $this->currPos); |
5053 | if (preg_match("/^[#0-9a-zA-Z\\x{5e8}\\x{5dc}\\x{5de}\\x{631}\\x{644}\\x{645}]/u", $r8)) { |
5054 | $this->currPos += strlen($r8); |
5055 | $r7 = true; |
5056 | } else { |
5057 | $r8 = self::$FAILED; |
5058 | if (!$silence) {$this->fail(30);} |
5059 | break; |
5060 | } |
5061 | } |
5062 | if ($r7===self::$FAILED) { |
5063 | $this->currPos = $p5; |
5064 | $r3 = self::$FAILED; |
5065 | goto seq_1; |
5066 | } |
5067 | // free $r8 |
5068 | if (($this->input[$this->currPos] ?? null) === ";") { |
5069 | $this->currPos++; |
5070 | $r8 = ";"; |
5071 | } else { |
5072 | if (!$silence) {$this->fail(26);} |
5073 | $r8 = self::$FAILED; |
5074 | $this->currPos = $p5; |
5075 | $r3 = self::$FAILED; |
5076 | goto seq_1; |
5077 | } |
5078 | $r3 = true; |
5079 | seq_1: |
5080 | // m <- $r3 |
5081 | if ($r3!==self::$FAILED) { |
5082 | $r3 = substr($this->input, $p4, $this->currPos - $p4); |
5083 | } else { |
5084 | $r3 = self::$FAILED; |
5085 | } |
5086 | // free $p5 |
5087 | // free $p4 |
5088 | $r1 = $r3; |
5089 | if ($r1!==self::$FAILED) { |
5090 | $this->savedPos = $p2; |
5091 | $r1 = $this->a52($r3); |
5092 | } |
5093 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
5094 | $this->currPos, |
5095 | $r1, |
5096 | self::$UNDEFINED, |
5097 | self::$UNDEFINED |
5098 | ); |
5099 | return $r1; |
5100 | }, "raw_htmlentity", ["\$silence"], [$silence]); |
5101 | |
5102 | } |
5103 | private function parseoptionalSpaceToken($silence) { |
5104 | return $this->traceCall(function($silence) { |
5105 | $key = 576; |
5106 | $bucket = $this->currPos; |
5107 | $cached = $this->cache[$bucket][$key] ?? null; |
5108 | if ($cached) { |
5109 | $this->currPos = $cached->nextPos; |
5110 | |
5111 | return $cached->result; |
5112 | } |
5113 | |
5114 | $p2 = $this->currPos; |
5115 | $r3 = $this->parseoptional_spaces($silence); |
5116 | // s <- $r3 |
5117 | $r1 = $r3; |
5118 | if ($r1!==self::$FAILED) { |
5119 | $this->savedPos = $p2; |
5120 | $r1 = $this->a37($r3); |
5121 | } |
5122 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
5123 | $this->currPos, |
5124 | $r1, |
5125 | self::$UNDEFINED, |
5126 | self::$UNDEFINED |
5127 | ); |
5128 | return $r1; |
5129 | }, "optionalSpaceToken", ["\$silence"], [$silence]); |
5130 | |
5131 | } |
5132 | private function parsetable_attribute_name($silence, $boolParams, &$param_preproc, &$param_th) { |
5133 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
5134 | $key = json_encode([470, $boolParams & 0x1fff, $param_preproc, $param_th]); |
5135 | $bucket = $this->currPos; |
5136 | $cached = $this->cache[$bucket][$key] ?? null; |
5137 | if ($cached) { |
5138 | $this->currPos = $cached->nextPos; |
5139 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
5140 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
5141 | return $cached->result; |
5142 | } |
5143 | $saved_preproc=$param_preproc; |
5144 | $saved_th=$param_th; |
5145 | $p2 = $this->currPos; |
5146 | // start seq_1 |
5147 | $p3 = $this->currPos; |
5148 | $p5 = $this->currPos; |
5149 | if (strspn($this->input, "\"'=", $this->currPos, 1) !== 0) { |
5150 | $r4 = $this->input[$this->currPos++]; |
5151 | } else { |
5152 | $r4 = self::$FAILED; |
5153 | if (!$silence) {$this->fail(31);} |
5154 | $r4 = null; |
5155 | } |
5156 | // q <- $r4 |
5157 | $r4 = substr($this->input, $p5, $this->currPos - $p5); |
5158 | // free $p5 |
5159 | $r6 = []; |
5160 | for (;;) { |
5161 | // start choice_1 |
5162 | $p5 = $this->currPos; |
5163 | $r7 = self::$FAILED; |
5164 | for (;;) { |
5165 | if (strcspn($this->input, " \x09\x0d\x0a\x00/=><&{}-!|[", $this->currPos, 1) !== 0) { |
5166 | $r8 = self::consumeChar($this->input, $this->currPos); |
5167 | $r7 = true; |
5168 | } else { |
5169 | $r8 = self::$FAILED; |
5170 | if (!$silence) {$this->fail(32);} |
5171 | break; |
5172 | } |
5173 | } |
5174 | if ($r7!==self::$FAILED) { |
5175 | $r7 = substr($this->input, $p5, $this->currPos - $p5); |
5176 | goto choice_1; |
5177 | } else { |
5178 | $r7 = self::$FAILED; |
5179 | } |
5180 | // free $r8 |
5181 | // free $p5 |
5182 | $p5 = $this->currPos; |
5183 | // start seq_2 |
5184 | $p9 = $this->currPos; |
5185 | $p10 = $this->currPos; |
5186 | $r8 = $this->discardinline_breaks(true, $boolParams, $param_preproc, $param_th); |
5187 | if ($r8 === self::$FAILED) { |
5188 | $r8 = false; |
5189 | } else { |
5190 | $r8 = self::$FAILED; |
5191 | $this->currPos = $p10; |
5192 | $r7 = self::$FAILED; |
5193 | goto seq_2; |
5194 | } |
5195 | // free $p10 |
5196 | // start choice_2 |
5197 | $p10 = $this->currPos; |
5198 | $r11 = $this->discardwikilink($silence, $boolParams, $param_th, $param_preproc); |
5199 | if ($r11!==self::$FAILED) { |
5200 | $r11 = substr($this->input, $p10, $this->currPos - $p10); |
5201 | goto choice_2; |
5202 | } else { |
5203 | $r11 = self::$FAILED; |
5204 | } |
5205 | // free $p10 |
5206 | $r11 = $this->parsedirective($silence, $boolParams, $param_preproc, $param_th); |
5207 | if ($r11!==self::$FAILED) { |
5208 | goto choice_2; |
5209 | } |
5210 | $p10 = $this->currPos; |
5211 | // start seq_3 |
5212 | $p12 = $this->currPos; |
5213 | $p13 = $this->currPos; |
5214 | if (($this->input[$this->currPos] ?? null) === "<") { |
5215 | $this->currPos++; |
5216 | $r14 = "<"; |
5217 | $r14 = false; |
5218 | $this->currPos = $p13; |
5219 | } else { |
5220 | $r14 = self::$FAILED; |
5221 | $r11 = self::$FAILED; |
5222 | goto seq_3; |
5223 | } |
5224 | // free $p13 |
5225 | $r15 = $this->parsehtml_tag($silence, $boolParams, $param_preproc, $param_th); |
5226 | // x <- $r15 |
5227 | if ($r15===self::$FAILED) { |
5228 | $this->currPos = $p12; |
5229 | $r11 = self::$FAILED; |
5230 | goto seq_3; |
5231 | } |
5232 | $r16 = $this->parseinlineline($silence, $boolParams, $param_preproc, $param_th); |
5233 | if ($r16===self::$FAILED) { |
5234 | $r16 = null; |
5235 | } |
5236 | // ill <- $r16 |
5237 | $r11 = true; |
5238 | seq_3: |
5239 | if ($r11!==self::$FAILED) { |
5240 | $this->savedPos = $p10; |
5241 | $r11 = $this->a53($r4, $r15, $r16); |
5242 | goto choice_2; |
5243 | } |
5244 | // free $p12 |
5245 | $p12 = $this->currPos; |
5246 | // start seq_4 |
5247 | $p13 = $this->currPos; |
5248 | $p17 = $this->currPos; |
5249 | // start choice_3 |
5250 | $r18 = $this->discardspace_or_newline(true); |
5251 | if ($r18!==self::$FAILED) { |
5252 | goto choice_3; |
5253 | } |
5254 | if (strspn($this->input, "\x00/=>", $this->currPos, 1) !== 0) { |
5255 | $r18 = $this->input[$this->currPos++]; |
5256 | } else { |
5257 | $r18 = self::$FAILED; |
5258 | } |
5259 | choice_3: |
5260 | if ($r18 === self::$FAILED) { |
5261 | $r18 = false; |
5262 | } else { |
5263 | $r18 = self::$FAILED; |
5264 | $this->currPos = $p17; |
5265 | $r11 = self::$FAILED; |
5266 | goto seq_4; |
5267 | } |
5268 | // free $p17 |
5269 | if ($this->currPos < $this->inputLength) { |
5270 | $r19 = self::consumeChar($this->input, $this->currPos);; |
5271 | } else { |
5272 | $r19 = self::$FAILED; |
5273 | if (!$silence) {$this->fail(7);} |
5274 | $this->currPos = $p13; |
5275 | $r11 = self::$FAILED; |
5276 | goto seq_4; |
5277 | } |
5278 | $r11 = true; |
5279 | seq_4: |
5280 | if ($r11!==self::$FAILED) { |
5281 | $r11 = substr($this->input, $p12, $this->currPos - $p12); |
5282 | } else { |
5283 | $r11 = self::$FAILED; |
5284 | } |
5285 | // free $p13 |
5286 | // free $p12 |
5287 | choice_2: |
5288 | // t <- $r11 |
5289 | if ($r11===self::$FAILED) { |
5290 | $this->currPos = $p9; |
5291 | $r7 = self::$FAILED; |
5292 | goto seq_2; |
5293 | } |
5294 | $r7 = true; |
5295 | seq_2: |
5296 | if ($r7!==self::$FAILED) { |
5297 | $this->savedPos = $p5; |
5298 | $r7 = $this->a54($r4, $r11); |
5299 | } |
5300 | // free $p9 |
5301 | choice_1: |
5302 | if ($r7!==self::$FAILED) { |
5303 | $r6[] = $r7; |
5304 | } else { |
5305 | break; |
5306 | } |
5307 | } |
5308 | // r <- $r6 |
5309 | // free $r7 |
5310 | $this->savedPos = $this->currPos; |
5311 | $r7 = $this->a55($r4, $r6); |
5312 | if ($r7) { |
5313 | $r7 = false; |
5314 | } else { |
5315 | $r7 = self::$FAILED; |
5316 | $this->currPos = $p3; |
5317 | $r1 = self::$FAILED; |
5318 | goto seq_1; |
5319 | } |
5320 | $r1 = true; |
5321 | seq_1: |
5322 | if ($r1!==self::$FAILED) { |
5323 | $this->savedPos = $p2; |
5324 | $r1 = $this->a56($r4, $r6); |
5325 | } |
5326 | // free $p3 |
5327 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
5328 | $this->currPos, |
5329 | $r1, |
5330 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
5331 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
5332 | ); |
5333 | return $r1; |
5334 | }, "table_attribute_name", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
5335 | |
5336 | } |
5337 | private function parsetable_att_value($silence, $boolParams, &$param_preproc, &$param_th) { |
5338 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
5339 | $key = json_encode([474, $boolParams & 0x1fff, $param_preproc, $param_th]); |
5340 | $bucket = $this->currPos; |
5341 | $cached = $this->cache[$bucket][$key] ?? null; |
5342 | if ($cached) { |
5343 | $this->currPos = $cached->nextPos; |
5344 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
5345 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
5346 | return $cached->result; |
5347 | } |
5348 | $saved_preproc=$param_preproc; |
5349 | $saved_th=$param_th; |
5350 | // start choice_1 |
5351 | $p2 = $this->currPos; |
5352 | // start seq_1 |
5353 | $p3 = $this->currPos; |
5354 | $p5 = $this->currPos; |
5355 | // start seq_2 |
5356 | $p6 = $this->currPos; |
5357 | for (;;) { |
5358 | $r8 = $this->discardspace($silence); |
5359 | if ($r8===self::$FAILED) { |
5360 | break; |
5361 | } |
5362 | } |
5363 | // free $r8 |
5364 | $r7 = true; |
5365 | if ($r7===self::$FAILED) { |
5366 | $r4 = self::$FAILED; |
5367 | goto seq_2; |
5368 | } |
5369 | // free $r7 |
5370 | if (($this->input[$this->currPos] ?? null) === "'") { |
5371 | $this->currPos++; |
5372 | $r7 = "'"; |
5373 | } else { |
5374 | if (!$silence) {$this->fail(33);} |
5375 | $r7 = self::$FAILED; |
5376 | $this->currPos = $p6; |
5377 | $r4 = self::$FAILED; |
5378 | goto seq_2; |
5379 | } |
5380 | $r4 = true; |
5381 | seq_2: |
5382 | // s <- $r4 |
5383 | if ($r4!==self::$FAILED) { |
5384 | $r4 = substr($this->input, $p5, $this->currPos - $p5); |
5385 | } else { |
5386 | $r4 = self::$FAILED; |
5387 | $r1 = self::$FAILED; |
5388 | goto seq_1; |
5389 | } |
5390 | // free $p6 |
5391 | // free $p5 |
5392 | $r8 = $this->parsetable_attribute_preprocessor_text_single($silence, $boolParams, $param_preproc, $param_th); |
5393 | if ($r8===self::$FAILED) { |
5394 | $r8 = null; |
5395 | } |
5396 | // t <- $r8 |
5397 | $p5 = $this->currPos; |
5398 | // start choice_2 |
5399 | if (($this->input[$this->currPos] ?? null) === "'") { |
5400 | $this->currPos++; |
5401 | $r9 = "'"; |
5402 | goto choice_2; |
5403 | } else { |
5404 | if (!$silence) {$this->fail(33);} |
5405 | $r9 = self::$FAILED; |
5406 | } |
5407 | $p6 = $this->currPos; |
5408 | // start choice_3 |
5409 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "!!", $this->currPos, 2, false) === 0) { |
5410 | $r9 = "!!"; |
5411 | $this->currPos += 2; |
5412 | goto choice_3; |
5413 | } else { |
5414 | $r9 = self::$FAILED; |
5415 | } |
5416 | if (strspn($this->input, "|\x0d\x0a", $this->currPos, 1) !== 0) { |
5417 | $r9 = $this->input[$this->currPos++]; |
5418 | } else { |
5419 | $r9 = self::$FAILED; |
5420 | } |
5421 | choice_3: |
5422 | if ($r9!==self::$FAILED) { |
5423 | $r9 = false; |
5424 | $this->currPos = $p6; |
5425 | } |
5426 | // free $p6 |
5427 | choice_2: |
5428 | // q <- $r9 |
5429 | if ($r9!==self::$FAILED) { |
5430 | $r9 = substr($this->input, $p5, $this->currPos - $p5); |
5431 | } else { |
5432 | $r9 = self::$FAILED; |
5433 | $this->currPos = $p3; |
5434 | $r1 = self::$FAILED; |
5435 | goto seq_1; |
5436 | } |
5437 | // free $p5 |
5438 | $r1 = true; |
5439 | seq_1: |
5440 | if ($r1!==self::$FAILED) { |
5441 | $this->savedPos = $p2; |
5442 | $r1 = $this->a57($r4, $r8, $r9); |
5443 | goto choice_1; |
5444 | } |
5445 | // free $p3 |
5446 | $p3 = $this->currPos; |
5447 | // start seq_3 |
5448 | $p5 = $this->currPos; |
5449 | $p6 = $this->currPos; |
5450 | // start seq_4 |
5451 | $p11 = $this->currPos; |
5452 | for (;;) { |
5453 | $r13 = $this->discardspace($silence); |
5454 | if ($r13===self::$FAILED) { |
5455 | break; |
5456 | } |
5457 | } |
5458 | // free $r13 |
5459 | $r12 = true; |
5460 | if ($r12===self::$FAILED) { |
5461 | $r10 = self::$FAILED; |
5462 | goto seq_4; |
5463 | } |
5464 | // free $r12 |
5465 | if (($this->input[$this->currPos] ?? null) === "\"") { |
5466 | $this->currPos++; |
5467 | $r12 = "\""; |
5468 | } else { |
5469 | if (!$silence) {$this->fail(34);} |
5470 | $r12 = self::$FAILED; |
5471 | $this->currPos = $p11; |
5472 | $r10 = self::$FAILED; |
5473 | goto seq_4; |
5474 | } |
5475 | $r10 = true; |
5476 | seq_4: |
5477 | // s <- $r10 |
5478 | if ($r10!==self::$FAILED) { |
5479 | $r10 = substr($this->input, $p6, $this->currPos - $p6); |
5480 | } else { |
5481 | $r10 = self::$FAILED; |
5482 | $r1 = self::$FAILED; |
5483 | goto seq_3; |
5484 | } |
5485 | // free $p11 |
5486 | // free $p6 |
5487 | $r13 = $this->parsetable_attribute_preprocessor_text_double($silence, $boolParams, $param_preproc, $param_th); |
5488 | if ($r13===self::$FAILED) { |
5489 | $r13 = null; |
5490 | } |
5491 | // t <- $r13 |
5492 | $p6 = $this->currPos; |
5493 | // start choice_4 |
5494 | if (($this->input[$this->currPos] ?? null) === "\"") { |
5495 | $this->currPos++; |
5496 | $r14 = "\""; |
5497 | goto choice_4; |
5498 | } else { |
5499 | if (!$silence) {$this->fail(34);} |
5500 | $r14 = self::$FAILED; |
5501 | } |
5502 | $p11 = $this->currPos; |
5503 | // start choice_5 |
5504 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "!!", $this->currPos, 2, false) === 0) { |
5505 | $r14 = "!!"; |
5506 | $this->currPos += 2; |
5507 | goto choice_5; |
5508 | } else { |
5509 | $r14 = self::$FAILED; |
5510 | } |
5511 | if (strspn($this->input, "|\x0d\x0a", $this->currPos, 1) !== 0) { |
5512 | $r14 = $this->input[$this->currPos++]; |
5513 | } else { |
5514 | $r14 = self::$FAILED; |
5515 | } |
5516 | choice_5: |
5517 | if ($r14!==self::$FAILED) { |
5518 | $r14 = false; |
5519 | $this->currPos = $p11; |
5520 | } |
5521 | // free $p11 |
5522 | choice_4: |
5523 | // q <- $r14 |
5524 | if ($r14!==self::$FAILED) { |
5525 | $r14 = substr($this->input, $p6, $this->currPos - $p6); |
5526 | } else { |
5527 | $r14 = self::$FAILED; |
5528 | $this->currPos = $p5; |
5529 | $r1 = self::$FAILED; |
5530 | goto seq_3; |
5531 | } |
5532 | // free $p6 |
5533 | $r1 = true; |
5534 | seq_3: |
5535 | if ($r1!==self::$FAILED) { |
5536 | $this->savedPos = $p3; |
5537 | $r1 = $this->a57($r10, $r13, $r14); |
5538 | goto choice_1; |
5539 | } |
5540 | // free $p5 |
5541 | $p5 = $this->currPos; |
5542 | // start seq_5 |
5543 | $p6 = $this->currPos; |
5544 | $p11 = $this->currPos; |
5545 | for (;;) { |
5546 | $r16 = $this->discardspace($silence); |
5547 | if ($r16===self::$FAILED) { |
5548 | break; |
5549 | } |
5550 | } |
5551 | // free $r16 |
5552 | $r15 = true; |
5553 | // s <- $r15 |
5554 | if ($r15!==self::$FAILED) { |
5555 | $r15 = substr($this->input, $p11, $this->currPos - $p11); |
5556 | } else { |
5557 | $r15 = self::$FAILED; |
5558 | $r1 = self::$FAILED; |
5559 | goto seq_5; |
5560 | } |
5561 | // free $p11 |
5562 | $r16 = $this->parsetable_attribute_preprocessor_text($silence, $boolParams, $param_preproc, $param_th); |
5563 | // t <- $r16 |
5564 | if ($r16===self::$FAILED) { |
5565 | $this->currPos = $p6; |
5566 | $r1 = self::$FAILED; |
5567 | goto seq_5; |
5568 | } |
5569 | $p11 = $this->currPos; |
5570 | // start choice_6 |
5571 | $r17 = $this->discardspace_or_newline(true); |
5572 | if ($r17!==self::$FAILED) { |
5573 | goto choice_6; |
5574 | } |
5575 | $r17 = $this->discardeof(true); |
5576 | if ($r17!==self::$FAILED) { |
5577 | goto choice_6; |
5578 | } |
5579 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "!!", $this->currPos, 2, false) === 0) { |
5580 | $r17 = "!!"; |
5581 | $this->currPos += 2; |
5582 | goto choice_6; |
5583 | } else { |
5584 | $r17 = self::$FAILED; |
5585 | } |
5586 | if (($this->input[$this->currPos] ?? null) === "|") { |
5587 | $this->currPos++; |
5588 | $r17 = "|"; |
5589 | } else { |
5590 | $r17 = self::$FAILED; |
5591 | } |
5592 | choice_6: |
5593 | if ($r17!==self::$FAILED) { |
5594 | $r17 = false; |
5595 | $this->currPos = $p11; |
5596 | } else { |
5597 | $this->currPos = $p6; |
5598 | $r1 = self::$FAILED; |
5599 | goto seq_5; |
5600 | } |
5601 | // free $p11 |
5602 | $r1 = true; |
5603 | seq_5: |
5604 | if ($r1!==self::$FAILED) { |
5605 | $this->savedPos = $p5; |
5606 | $r1 = $this->a58($r15, $r16); |
5607 | } |
5608 | // free $p6 |
5609 | choice_1: |
5610 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
5611 | $this->currPos, |
5612 | $r1, |
5613 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
5614 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
5615 | ); |
5616 | return $r1; |
5617 | }, "table_att_value", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
5618 | |
5619 | } |
5620 | private function discardspace_or_newline_or_solidus($silence) { |
5621 | return $this->traceCall(function($silence) { |
5622 | $key = 455; |
5623 | $bucket = $this->currPos; |
5624 | $cached = $this->cache[$bucket][$key] ?? null; |
5625 | if ($cached) { |
5626 | $this->currPos = $cached->nextPos; |
5627 | |
5628 | return $cached->result; |
5629 | } |
5630 | |
5631 | // start choice_1 |
5632 | $r1 = $this->discardspace_or_newline($silence); |
5633 | if ($r1!==self::$FAILED) { |
5634 | goto choice_1; |
5635 | } |
5636 | $p2 = $this->currPos; |
5637 | // start seq_1 |
5638 | $p3 = $this->currPos; |
5639 | // s <- $r4 |
5640 | if (($this->input[$this->currPos] ?? null) === "/") { |
5641 | $this->currPos++; |
5642 | $r4 = "/"; |
5643 | } else { |
5644 | if (!$silence) {$this->fail(35);} |
5645 | $r4 = self::$FAILED; |
5646 | $r1 = self::$FAILED; |
5647 | goto seq_1; |
5648 | } |
5649 | $p5 = $this->currPos; |
5650 | if (($this->input[$this->currPos] ?? null) === ">") { |
5651 | $this->currPos++; |
5652 | $r6 = ">"; |
5653 | } else { |
5654 | $r6 = self::$FAILED; |
5655 | } |
5656 | if ($r6 === self::$FAILED) { |
5657 | $r6 = false; |
5658 | } else { |
5659 | $r6 = self::$FAILED; |
5660 | $this->currPos = $p5; |
5661 | $this->currPos = $p3; |
5662 | $r1 = self::$FAILED; |
5663 | goto seq_1; |
5664 | } |
5665 | // free $p5 |
5666 | $r1 = true; |
5667 | seq_1: |
5668 | if ($r1!==self::$FAILED) { |
5669 | $this->savedPos = $p2; |
5670 | $r1 = $this->a42($r4); |
5671 | } |
5672 | // free $p3 |
5673 | choice_1: |
5674 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
5675 | $this->currPos, |
5676 | $r1, |
5677 | self::$UNDEFINED, |
5678 | self::$UNDEFINED |
5679 | ); |
5680 | return $r1; |
5681 | }, "space_or_newline_or_solidus", ["\$silence"], [$silence]); |
5682 | |
5683 | } |
5684 | private function parsegeneric_attribute_name($silence, $boolParams, &$param_preproc, &$param_th) { |
5685 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
5686 | $key = json_encode([466, $boolParams & 0x1fff, $param_preproc, $param_th]); |
5687 | $bucket = $this->currPos; |
5688 | $cached = $this->cache[$bucket][$key] ?? null; |
5689 | if ($cached) { |
5690 | $this->currPos = $cached->nextPos; |
5691 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
5692 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
5693 | return $cached->result; |
5694 | } |
5695 | $saved_preproc=$param_preproc; |
5696 | $saved_th=$param_th; |
5697 | $p2 = $this->currPos; |
5698 | // start seq_1 |
5699 | $p3 = $this->currPos; |
5700 | $p5 = $this->currPos; |
5701 | if (strspn($this->input, "\"'=", $this->currPos, 1) !== 0) { |
5702 | $r4 = $this->input[$this->currPos++]; |
5703 | } else { |
5704 | $r4 = self::$FAILED; |
5705 | if (!$silence) {$this->fail(31);} |
5706 | $r4 = null; |
5707 | } |
5708 | // q <- $r4 |
5709 | $r4 = substr($this->input, $p5, $this->currPos - $p5); |
5710 | // free $p5 |
5711 | $r6 = []; |
5712 | for (;;) { |
5713 | // start choice_1 |
5714 | $p5 = $this->currPos; |
5715 | $r7 = self::$FAILED; |
5716 | for (;;) { |
5717 | if (strcspn($this->input, " \x09\x0d\x0a\x00/=><&{}-!|", $this->currPos, 1) !== 0) { |
5718 | $r8 = self::consumeChar($this->input, $this->currPos); |
5719 | $r7 = true; |
5720 | } else { |
5721 | $r8 = self::$FAILED; |
5722 | if (!$silence) {$this->fail(36);} |
5723 | break; |
5724 | } |
5725 | } |
5726 | if ($r7!==self::$FAILED) { |
5727 | $r7 = substr($this->input, $p5, $this->currPos - $p5); |
5728 | goto choice_1; |
5729 | } else { |
5730 | $r7 = self::$FAILED; |
5731 | } |
5732 | // free $r8 |
5733 | // free $p5 |
5734 | $p5 = $this->currPos; |
5735 | // start seq_2 |
5736 | $p9 = $this->currPos; |
5737 | $p10 = $this->currPos; |
5738 | $r8 = $this->discardinline_breaks(true, $boolParams, $param_preproc, $param_th); |
5739 | if ($r8 === self::$FAILED) { |
5740 | $r8 = false; |
5741 | } else { |
5742 | $r8 = self::$FAILED; |
5743 | $this->currPos = $p10; |
5744 | $r7 = self::$FAILED; |
5745 | goto seq_2; |
5746 | } |
5747 | // free $p10 |
5748 | // start choice_2 |
5749 | $r11 = $this->parsedirective($silence, $boolParams, $param_preproc, $param_th); |
5750 | if ($r11!==self::$FAILED) { |
5751 | goto choice_2; |
5752 | } |
5753 | $r11 = $this->parseless_than($silence, $boolParams); |
5754 | if ($r11!==self::$FAILED) { |
5755 | goto choice_2; |
5756 | } |
5757 | $p10 = $this->currPos; |
5758 | // start seq_3 |
5759 | $p12 = $this->currPos; |
5760 | $p13 = $this->currPos; |
5761 | // start choice_3 |
5762 | $r14 = $this->discardspace_or_newline(true); |
5763 | if ($r14!==self::$FAILED) { |
5764 | goto choice_3; |
5765 | } |
5766 | if (strspn($this->input, "\x00/=><", $this->currPos, 1) !== 0) { |
5767 | $r14 = $this->input[$this->currPos++]; |
5768 | } else { |
5769 | $r14 = self::$FAILED; |
5770 | } |
5771 | choice_3: |
5772 | if ($r14 === self::$FAILED) { |
5773 | $r14 = false; |
5774 | } else { |
5775 | $r14 = self::$FAILED; |
5776 | $this->currPos = $p13; |
5777 | $r11 = self::$FAILED; |
5778 | goto seq_3; |
5779 | } |
5780 | // free $p13 |
5781 | if ($this->currPos < $this->inputLength) { |
5782 | $r15 = self::consumeChar($this->input, $this->currPos);; |
5783 | } else { |
5784 | $r15 = self::$FAILED; |
5785 | if (!$silence) {$this->fail(7);} |
5786 | $this->currPos = $p12; |
5787 | $r11 = self::$FAILED; |
5788 | goto seq_3; |
5789 | } |
5790 | $r11 = true; |
5791 | seq_3: |
5792 | if ($r11!==self::$FAILED) { |
5793 | $r11 = substr($this->input, $p10, $this->currPos - $p10); |
5794 | } else { |
5795 | $r11 = self::$FAILED; |
5796 | } |
5797 | // free $p12 |
5798 | // free $p10 |
5799 | choice_2: |
5800 | // t <- $r11 |
5801 | if ($r11===self::$FAILED) { |
5802 | $this->currPos = $p9; |
5803 | $r7 = self::$FAILED; |
5804 | goto seq_2; |
5805 | } |
5806 | $r7 = true; |
5807 | seq_2: |
5808 | if ($r7!==self::$FAILED) { |
5809 | $this->savedPos = $p5; |
5810 | $r7 = $this->a54($r4, $r11); |
5811 | } |
5812 | // free $p9 |
5813 | choice_1: |
5814 | if ($r7!==self::$FAILED) { |
5815 | $r6[] = $r7; |
5816 | } else { |
5817 | break; |
5818 | } |
5819 | } |
5820 | // r <- $r6 |
5821 | // free $r7 |
5822 | $this->savedPos = $this->currPos; |
5823 | $r7 = $this->a55($r4, $r6); |
5824 | if ($r7) { |
5825 | $r7 = false; |
5826 | } else { |
5827 | $r7 = self::$FAILED; |
5828 | $this->currPos = $p3; |
5829 | $r1 = self::$FAILED; |
5830 | goto seq_1; |
5831 | } |
5832 | $r1 = true; |
5833 | seq_1: |
5834 | if ($r1!==self::$FAILED) { |
5835 | $this->savedPos = $p2; |
5836 | $r1 = $this->a56($r4, $r6); |
5837 | } |
5838 | // free $p3 |
5839 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
5840 | $this->currPos, |
5841 | $r1, |
5842 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
5843 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
5844 | ); |
5845 | return $r1; |
5846 | }, "generic_attribute_name", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
5847 | |
5848 | } |
5849 | private function discardspace_or_newline($silence) { |
5850 | return $this->traceCall(function($silence) { |
5851 | $key = 579; |
5852 | $bucket = $this->currPos; |
5853 | $cached = $this->cache[$bucket][$key] ?? null; |
5854 | if ($cached) { |
5855 | $this->currPos = $cached->nextPos; |
5856 | |
5857 | return $cached->result; |
5858 | } |
5859 | |
5860 | if (strspn($this->input, " \x09\x0a\x0d\x0c", $this->currPos, 1) !== 0) { |
5861 | $r1 = $this->input[$this->currPos++]; |
5862 | } else { |
5863 | $r1 = self::$FAILED; |
5864 | if (!$silence) {$this->fail(37);} |
5865 | } |
5866 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
5867 | $this->currPos, |
5868 | $r1, |
5869 | self::$UNDEFINED, |
5870 | self::$UNDEFINED |
5871 | ); |
5872 | return $r1; |
5873 | }, "space_or_newline", ["\$silence"], [$silence]); |
5874 | |
5875 | } |
5876 | private function parsegeneric_att_value($silence, $boolParams, &$param_preproc, &$param_th) { |
5877 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
5878 | $key = json_encode([472, $boolParams & 0x1fff, $param_preproc, $param_th]); |
5879 | $bucket = $this->currPos; |
5880 | $cached = $this->cache[$bucket][$key] ?? null; |
5881 | if ($cached) { |
5882 | $this->currPos = $cached->nextPos; |
5883 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
5884 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
5885 | return $cached->result; |
5886 | } |
5887 | $saved_preproc=$param_preproc; |
5888 | $saved_th=$param_th; |
5889 | // start choice_1 |
5890 | $p2 = $this->currPos; |
5891 | // start seq_1 |
5892 | $p3 = $this->currPos; |
5893 | $p5 = $this->currPos; |
5894 | // start seq_2 |
5895 | $p6 = $this->currPos; |
5896 | for (;;) { |
5897 | $r8 = $this->discardspace_or_newline($silence); |
5898 | if ($r8===self::$FAILED) { |
5899 | break; |
5900 | } |
5901 | } |
5902 | // free $r8 |
5903 | $r7 = true; |
5904 | if ($r7===self::$FAILED) { |
5905 | $r4 = self::$FAILED; |
5906 | goto seq_2; |
5907 | } |
5908 | // free $r7 |
5909 | if (($this->input[$this->currPos] ?? null) === "'") { |
5910 | $this->currPos++; |
5911 | $r7 = "'"; |
5912 | } else { |
5913 | if (!$silence) {$this->fail(33);} |
5914 | $r7 = self::$FAILED; |
5915 | $this->currPos = $p6; |
5916 | $r4 = self::$FAILED; |
5917 | goto seq_2; |
5918 | } |
5919 | $r4 = true; |
5920 | seq_2: |
5921 | // s <- $r4 |
5922 | if ($r4!==self::$FAILED) { |
5923 | $r4 = substr($this->input, $p5, $this->currPos - $p5); |
5924 | } else { |
5925 | $r4 = self::$FAILED; |
5926 | $r1 = self::$FAILED; |
5927 | goto seq_1; |
5928 | } |
5929 | // free $p6 |
5930 | // free $p5 |
5931 | $r8 = $this->parseattribute_preprocessor_text_single($silence, $boolParams, $param_preproc, $param_th); |
5932 | if ($r8===self::$FAILED) { |
5933 | $r8 = null; |
5934 | } |
5935 | // t <- $r8 |
5936 | $p5 = $this->currPos; |
5937 | // start choice_2 |
5938 | if (($this->input[$this->currPos] ?? null) === "'") { |
5939 | $this->currPos++; |
5940 | $r9 = "'"; |
5941 | goto choice_2; |
5942 | } else { |
5943 | if (!$silence) {$this->fail(33);} |
5944 | $r9 = self::$FAILED; |
5945 | } |
5946 | $p6 = $this->currPos; |
5947 | // start seq_3 |
5948 | $p10 = $this->currPos; |
5949 | if (($this->input[$this->currPos] ?? null) === "/") { |
5950 | $this->currPos++; |
5951 | $r11 = "/"; |
5952 | } else { |
5953 | $r11 = self::$FAILED; |
5954 | $r11 = null; |
5955 | } |
5956 | if (($this->input[$this->currPos] ?? null) === ">") { |
5957 | $this->currPos++; |
5958 | $r12 = ">"; |
5959 | } else { |
5960 | $r12 = self::$FAILED; |
5961 | $this->currPos = $p10; |
5962 | $r9 = self::$FAILED; |
5963 | goto seq_3; |
5964 | } |
5965 | $r9 = true; |
5966 | seq_3: |
5967 | if ($r9!==self::$FAILED) { |
5968 | $r9 = false; |
5969 | $this->currPos = $p6; |
5970 | } |
5971 | // free $p10 |
5972 | // free $p6 |
5973 | choice_2: |
5974 | // q <- $r9 |
5975 | if ($r9!==self::$FAILED) { |
5976 | $r9 = substr($this->input, $p5, $this->currPos - $p5); |
5977 | } else { |
5978 | $r9 = self::$FAILED; |
5979 | $this->currPos = $p3; |
5980 | $r1 = self::$FAILED; |
5981 | goto seq_1; |
5982 | } |
5983 | // free $p5 |
5984 | $r1 = true; |
5985 | seq_1: |
5986 | if ($r1!==self::$FAILED) { |
5987 | $this->savedPos = $p2; |
5988 | $r1 = $this->a57($r4, $r8, $r9); |
5989 | goto choice_1; |
5990 | } |
5991 | // free $p3 |
5992 | $p3 = $this->currPos; |
5993 | // start seq_4 |
5994 | $p5 = $this->currPos; |
5995 | $p6 = $this->currPos; |
5996 | // start seq_5 |
5997 | $p10 = $this->currPos; |
5998 | for (;;) { |
5999 | $r15 = $this->discardspace_or_newline($silence); |
6000 | if ($r15===self::$FAILED) { |
6001 | break; |
6002 | } |
6003 | } |
6004 | // free $r15 |
6005 | $r14 = true; |
6006 | if ($r14===self::$FAILED) { |
6007 | $r13 = self::$FAILED; |
6008 | goto seq_5; |
6009 | } |
6010 | // free $r14 |
6011 | if (($this->input[$this->currPos] ?? null) === "\"") { |
6012 | $this->currPos++; |
6013 | $r14 = "\""; |
6014 | } else { |
6015 | if (!$silence) {$this->fail(34);} |
6016 | $r14 = self::$FAILED; |
6017 | $this->currPos = $p10; |
6018 | $r13 = self::$FAILED; |
6019 | goto seq_5; |
6020 | } |
6021 | $r13 = true; |
6022 | seq_5: |
6023 | // s <- $r13 |
6024 | if ($r13!==self::$FAILED) { |
6025 | $r13 = substr($this->input, $p6, $this->currPos - $p6); |
6026 | } else { |
6027 | $r13 = self::$FAILED; |
6028 | $r1 = self::$FAILED; |
6029 | goto seq_4; |
6030 | } |
6031 | // free $p10 |
6032 | // free $p6 |
6033 | $r15 = $this->parseattribute_preprocessor_text_double($silence, $boolParams, $param_preproc, $param_th); |
6034 | if ($r15===self::$FAILED) { |
6035 | $r15 = null; |
6036 | } |
6037 | // t <- $r15 |
6038 | $p6 = $this->currPos; |
6039 | // start choice_3 |
6040 | if (($this->input[$this->currPos] ?? null) === "\"") { |
6041 | $this->currPos++; |
6042 | $r16 = "\""; |
6043 | goto choice_3; |
6044 | } else { |
6045 | if (!$silence) {$this->fail(34);} |
6046 | $r16 = self::$FAILED; |
6047 | } |
6048 | $p10 = $this->currPos; |
6049 | // start seq_6 |
6050 | $p17 = $this->currPos; |
6051 | if (($this->input[$this->currPos] ?? null) === "/") { |
6052 | $this->currPos++; |
6053 | $r18 = "/"; |
6054 | } else { |
6055 | $r18 = self::$FAILED; |
6056 | $r18 = null; |
6057 | } |
6058 | if (($this->input[$this->currPos] ?? null) === ">") { |
6059 | $this->currPos++; |
6060 | $r19 = ">"; |
6061 | } else { |
6062 | $r19 = self::$FAILED; |
6063 | $this->currPos = $p17; |
6064 | $r16 = self::$FAILED; |
6065 | goto seq_6; |
6066 | } |
6067 | $r16 = true; |
6068 | seq_6: |
6069 | if ($r16!==self::$FAILED) { |
6070 | $r16 = false; |
6071 | $this->currPos = $p10; |
6072 | } |
6073 | // free $p17 |
6074 | // free $p10 |
6075 | choice_3: |
6076 | // q <- $r16 |
6077 | if ($r16!==self::$FAILED) { |
6078 | $r16 = substr($this->input, $p6, $this->currPos - $p6); |
6079 | } else { |
6080 | $r16 = self::$FAILED; |
6081 | $this->currPos = $p5; |
6082 | $r1 = self::$FAILED; |
6083 | goto seq_4; |
6084 | } |
6085 | // free $p6 |
6086 | $r1 = true; |
6087 | seq_4: |
6088 | if ($r1!==self::$FAILED) { |
6089 | $this->savedPos = $p3; |
6090 | $r1 = $this->a57($r13, $r15, $r16); |
6091 | goto choice_1; |
6092 | } |
6093 | // free $p5 |
6094 | $p5 = $this->currPos; |
6095 | // start seq_7 |
6096 | $p6 = $this->currPos; |
6097 | $p10 = $this->currPos; |
6098 | for (;;) { |
6099 | $r21 = $this->discardspace_or_newline($silence); |
6100 | if ($r21===self::$FAILED) { |
6101 | break; |
6102 | } |
6103 | } |
6104 | // free $r21 |
6105 | $r20 = true; |
6106 | // s <- $r20 |
6107 | if ($r20!==self::$FAILED) { |
6108 | $r20 = substr($this->input, $p10, $this->currPos - $p10); |
6109 | } else { |
6110 | $r20 = self::$FAILED; |
6111 | $r1 = self::$FAILED; |
6112 | goto seq_7; |
6113 | } |
6114 | // free $p10 |
6115 | $r21 = $this->parseattribute_preprocessor_text($silence, $boolParams, $param_preproc, $param_th); |
6116 | // t <- $r21 |
6117 | if ($r21===self::$FAILED) { |
6118 | $this->currPos = $p6; |
6119 | $r1 = self::$FAILED; |
6120 | goto seq_7; |
6121 | } |
6122 | $p10 = $this->currPos; |
6123 | // start choice_4 |
6124 | $r22 = $this->discardspace_or_newline(true); |
6125 | if ($r22!==self::$FAILED) { |
6126 | goto choice_4; |
6127 | } |
6128 | $r22 = $this->discardeof(true); |
6129 | if ($r22!==self::$FAILED) { |
6130 | goto choice_4; |
6131 | } |
6132 | // start seq_8 |
6133 | $p17 = $this->currPos; |
6134 | if (($this->input[$this->currPos] ?? null) === "/") { |
6135 | $this->currPos++; |
6136 | $r23 = "/"; |
6137 | } else { |
6138 | $r23 = self::$FAILED; |
6139 | $r23 = null; |
6140 | } |
6141 | if (($this->input[$this->currPos] ?? null) === ">") { |
6142 | $this->currPos++; |
6143 | $r24 = ">"; |
6144 | } else { |
6145 | $r24 = self::$FAILED; |
6146 | $this->currPos = $p17; |
6147 | $r22 = self::$FAILED; |
6148 | goto seq_8; |
6149 | } |
6150 | $r22 = true; |
6151 | seq_8: |
6152 | // free $p17 |
6153 | choice_4: |
6154 | if ($r22!==self::$FAILED) { |
6155 | $r22 = false; |
6156 | $this->currPos = $p10; |
6157 | } else { |
6158 | $this->currPos = $p6; |
6159 | $r1 = self::$FAILED; |
6160 | goto seq_7; |
6161 | } |
6162 | // free $p10 |
6163 | $r1 = true; |
6164 | seq_7: |
6165 | if ($r1!==self::$FAILED) { |
6166 | $this->savedPos = $p5; |
6167 | $r1 = $this->a58($r20, $r21); |
6168 | } |
6169 | // free $p6 |
6170 | choice_1: |
6171 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
6172 | $this->currPos, |
6173 | $r1, |
6174 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
6175 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
6176 | ); |
6177 | return $r1; |
6178 | }, "generic_att_value", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
6179 | |
6180 | } |
6181 | private function parseextlink_nonipv6url_parameterized($silence, $boolParams, &$param_preproc, &$param_th) { |
6182 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
6183 | $key = json_encode([540, $boolParams & 0x1fff, $param_preproc, $param_th]); |
6184 | $bucket = $this->currPos; |
6185 | $cached = $this->cache[$bucket][$key] ?? null; |
6186 | if ($cached) { |
6187 | $this->currPos = $cached->nextPos; |
6188 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
6189 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
6190 | return $cached->result; |
6191 | } |
6192 | $saved_preproc=$param_preproc; |
6193 | $saved_th=$param_th; |
6194 | $p2 = $this->currPos; |
6195 | $r3 = []; |
6196 | for (;;) { |
6197 | // start choice_1 |
6198 | $p5 = $this->currPos; |
6199 | $r4 = self::$FAILED; |
6200 | for (;;) { |
6201 | $r6 = self::charAt($this->input, $this->currPos); |
6202 | if (preg_match("/^[^<\\[{\\x0a\\x0d|!\\]}\\-\\x09&=\"' \\x{a0}\\x{1680}\\x{180e}\\x{2000}-\\x{200a}\\x{202f}\\x{205f}\\x{3000}]/u", $r6)) { |
6203 | $this->currPos += strlen($r6); |
6204 | $r4 = true; |
6205 | } else { |
6206 | $r6 = self::$FAILED; |
6207 | if (!$silence) {$this->fail(38);} |
6208 | break; |
6209 | } |
6210 | } |
6211 | if ($r4!==self::$FAILED) { |
6212 | $r4 = substr($this->input, $p5, $this->currPos - $p5); |
6213 | goto choice_1; |
6214 | } else { |
6215 | $r4 = self::$FAILED; |
6216 | } |
6217 | // free $r6 |
6218 | // free $p5 |
6219 | $p5 = $this->currPos; |
6220 | // start seq_1 |
6221 | $p7 = $this->currPos; |
6222 | $p8 = $this->currPos; |
6223 | $r6 = $this->discardinline_breaks(true, $boolParams, $param_preproc, $param_th); |
6224 | if ($r6 === self::$FAILED) { |
6225 | $r6 = false; |
6226 | } else { |
6227 | $r6 = self::$FAILED; |
6228 | $this->currPos = $p8; |
6229 | $r4 = self::$FAILED; |
6230 | goto seq_1; |
6231 | } |
6232 | // free $p8 |
6233 | // start choice_2 |
6234 | $r9 = $this->parsedirective($silence, $boolParams, $param_preproc, $param_th); |
6235 | if ($r9!==self::$FAILED) { |
6236 | goto choice_2; |
6237 | } |
6238 | if (strspn($this->input, "&|{-!}=", $this->currPos, 1) !== 0) { |
6239 | $r9 = $this->input[$this->currPos++]; |
6240 | } else { |
6241 | $r9 = self::$FAILED; |
6242 | if (!$silence) {$this->fail(39);} |
6243 | } |
6244 | choice_2: |
6245 | // s <- $r9 |
6246 | if ($r9===self::$FAILED) { |
6247 | $this->currPos = $p7; |
6248 | $r4 = self::$FAILED; |
6249 | goto seq_1; |
6250 | } |
6251 | $r4 = true; |
6252 | seq_1: |
6253 | if ($r4!==self::$FAILED) { |
6254 | $this->savedPos = $p5; |
6255 | $r4 = $this->a42($r9); |
6256 | goto choice_1; |
6257 | } |
6258 | // free $p7 |
6259 | $p7 = $this->currPos; |
6260 | // start seq_2 |
6261 | $p8 = $this->currPos; |
6262 | $r10 = $this->input[$this->currPos] ?? ''; |
6263 | if ($r10 === "'") { |
6264 | $this->currPos++; |
6265 | } else { |
6266 | $r10 = self::$FAILED; |
6267 | if (!$silence) {$this->fail(40);} |
6268 | $r4 = self::$FAILED; |
6269 | goto seq_2; |
6270 | } |
6271 | $p11 = $this->currPos; |
6272 | $r12 = $this->input[$this->currPos] ?? ''; |
6273 | if ($r12 === "'") { |
6274 | $this->currPos++; |
6275 | } else { |
6276 | $r12 = self::$FAILED; |
6277 | } |
6278 | if ($r12 === self::$FAILED) { |
6279 | $r12 = false; |
6280 | } else { |
6281 | $r12 = self::$FAILED; |
6282 | $this->currPos = $p11; |
6283 | $this->currPos = $p8; |
6284 | $r4 = self::$FAILED; |
6285 | goto seq_2; |
6286 | } |
6287 | // free $p11 |
6288 | $r4 = true; |
6289 | seq_2: |
6290 | if ($r4!==self::$FAILED) { |
6291 | $r4 = substr($this->input, $p7, $this->currPos - $p7); |
6292 | } else { |
6293 | $r4 = self::$FAILED; |
6294 | } |
6295 | // free $p8 |
6296 | // free $p7 |
6297 | choice_1: |
6298 | if ($r4!==self::$FAILED) { |
6299 | $r3[] = $r4; |
6300 | } else { |
6301 | break; |
6302 | } |
6303 | } |
6304 | if (count($r3) === 0) { |
6305 | $r3 = self::$FAILED; |
6306 | } |
6307 | // r <- $r3 |
6308 | // free $r4 |
6309 | $r1 = $r3; |
6310 | if ($r1!==self::$FAILED) { |
6311 | $this->savedPos = $p2; |
6312 | $r1 = $this->a59($r3); |
6313 | } |
6314 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
6315 | $this->currPos, |
6316 | $r1, |
6317 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
6318 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
6319 | ); |
6320 | return $r1; |
6321 | }, "extlink_nonipv6url_parameterized", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
6322 | |
6323 | } |
6324 | private function parseurltext($silence, $boolParams, &$param_preproc, &$param_th) { |
6325 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
6326 | $key = json_encode([524, $boolParams & 0x1fff, $param_preproc, $param_th]); |
6327 | $bucket = $this->currPos; |
6328 | $cached = $this->cache[$bucket][$key] ?? null; |
6329 | if ($cached) { |
6330 | $this->currPos = $cached->nextPos; |
6331 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
6332 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
6333 | return $cached->result; |
6334 | } |
6335 | $saved_preproc=$param_preproc; |
6336 | $saved_th=$param_th; |
6337 | $r1 = []; |
6338 | for (;;) { |
6339 | // start choice_1 |
6340 | $p3 = $this->currPos; |
6341 | // start seq_1 |
6342 | $p4 = $this->currPos; |
6343 | $this->savedPos = $this->currPos; |
6344 | $r5 = $this->a60(); |
6345 | if ($r5) { |
6346 | $r5 = false; |
6347 | } else { |
6348 | $r5 = self::$FAILED; |
6349 | $r2 = self::$FAILED; |
6350 | goto seq_1; |
6351 | } |
6352 | $r2 = true; |
6353 | seq_1: |
6354 | if ($r2!==self::$FAILED) { |
6355 | $this->savedPos = $p3; |
6356 | $r2 = $this->a61(); |
6357 | goto choice_1; |
6358 | } |
6359 | // free $p4 |
6360 | $p4 = $this->currPos; |
6361 | // start seq_2 |
6362 | $p6 = $this->currPos; |
6363 | $this->savedPos = $this->currPos; |
6364 | $r7 = $this->a62(); |
6365 | if ($r7) { |
6366 | $r7 = false; |
6367 | } else { |
6368 | $r7 = self::$FAILED; |
6369 | $r2 = self::$FAILED; |
6370 | goto seq_2; |
6371 | } |
6372 | $r8 = $this->parseautolink($silence, $boolParams, $param_preproc, $param_th); |
6373 | // al <- $r8 |
6374 | if ($r8===self::$FAILED) { |
6375 | $this->currPos = $p6; |
6376 | $r2 = self::$FAILED; |
6377 | goto seq_2; |
6378 | } |
6379 | $r2 = true; |
6380 | seq_2: |
6381 | if ($r2!==self::$FAILED) { |
6382 | $this->savedPos = $p4; |
6383 | $r2 = $this->a63($r8); |
6384 | goto choice_1; |
6385 | } |
6386 | // free $p6 |
6387 | $p6 = $this->currPos; |
6388 | // start seq_3 |
6389 | $p9 = $this->currPos; |
6390 | $p10 = $this->currPos; |
6391 | if (($this->input[$this->currPos] ?? null) === "&") { |
6392 | $this->currPos++; |
6393 | $r11 = "&"; |
6394 | $r11 = false; |
6395 | $this->currPos = $p10; |
6396 | } else { |
6397 | $r11 = self::$FAILED; |
6398 | $r2 = self::$FAILED; |
6399 | goto seq_3; |
6400 | } |
6401 | // free $p10 |
6402 | $r12 = $this->parsehtmlentity($silence); |
6403 | // he <- $r12 |
6404 | if ($r12===self::$FAILED) { |
6405 | $this->currPos = $p9; |
6406 | $r2 = self::$FAILED; |
6407 | goto seq_3; |
6408 | } |
6409 | $r2 = true; |
6410 | seq_3: |
6411 | if ($r2!==self::$FAILED) { |
6412 | $this->savedPos = $p6; |
6413 | $r2 = $this->a64($r12); |
6414 | goto choice_1; |
6415 | } |
6416 | // free $p9 |
6417 | $p9 = $this->currPos; |
6418 | // start seq_4 |
6419 | $p10 = $this->currPos; |
6420 | $p13 = $this->currPos; |
6421 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "__", $this->currPos, 2, false) === 0) { |
6422 | $r14 = "__"; |
6423 | $this->currPos += 2; |
6424 | $r14 = false; |
6425 | $this->currPos = $p13; |
6426 | } else { |
6427 | $r14 = self::$FAILED; |
6428 | $r2 = self::$FAILED; |
6429 | goto seq_4; |
6430 | } |
6431 | // free $p13 |
6432 | $r15 = $this->parsebehavior_switch($silence); |
6433 | // bs <- $r15 |
6434 | if ($r15===self::$FAILED) { |
6435 | $this->currPos = $p10; |
6436 | $r2 = self::$FAILED; |
6437 | goto seq_4; |
6438 | } |
6439 | $r2 = true; |
6440 | seq_4: |
6441 | if ($r2!==self::$FAILED) { |
6442 | $this->savedPos = $p9; |
6443 | $r2 = $this->a65($r15); |
6444 | goto choice_1; |
6445 | } |
6446 | // free $p10 |
6447 | $r2 = $this->parsetext_char($silence); |
6448 | choice_1: |
6449 | if ($r2!==self::$FAILED) { |
6450 | $r1[] = $r2; |
6451 | } else { |
6452 | break; |
6453 | } |
6454 | } |
6455 | if (count($r1) === 0) { |
6456 | $r1 = self::$FAILED; |
6457 | } |
6458 | // free $r2 |
6459 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
6460 | $this->currPos, |
6461 | $r1, |
6462 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
6463 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
6464 | ); |
6465 | return $r1; |
6466 | }, "urltext", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
6467 | |
6468 | } |
6469 | private function parseinline_element($silence, $boolParams, &$param_preproc, &$param_th) { |
6470 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
6471 | $key = json_encode([334, $boolParams & 0x1fff, $param_preproc, $param_th]); |
6472 | $bucket = $this->currPos; |
6473 | $cached = $this->cache[$bucket][$key] ?? null; |
6474 | if ($cached) { |
6475 | $this->currPos = $cached->nextPos; |
6476 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
6477 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
6478 | return $cached->result; |
6479 | } |
6480 | $saved_preproc=$param_preproc; |
6481 | $saved_th=$param_th; |
6482 | // start choice_1 |
6483 | $p2 = $this->currPos; |
6484 | // start seq_1 |
6485 | $p3 = $this->currPos; |
6486 | $p4 = $this->currPos; |
6487 | if (($this->input[$this->currPos] ?? null) === "<") { |
6488 | $this->currPos++; |
6489 | $r5 = "<"; |
6490 | $r5 = false; |
6491 | $this->currPos = $p4; |
6492 | } else { |
6493 | $r5 = self::$FAILED; |
6494 | $r1 = self::$FAILED; |
6495 | goto seq_1; |
6496 | } |
6497 | // free $p4 |
6498 | $r6 = $this->parseangle_bracket_markup($silence, $boolParams, $param_preproc, $param_th); |
6499 | // r <- $r6 |
6500 | if ($r6===self::$FAILED) { |
6501 | $this->currPos = $p3; |
6502 | $r1 = self::$FAILED; |
6503 | goto seq_1; |
6504 | } |
6505 | $r1 = true; |
6506 | seq_1: |
6507 | if ($r1!==self::$FAILED) { |
6508 | $this->savedPos = $p2; |
6509 | $r1 = $this->a24($r6); |
6510 | goto choice_1; |
6511 | } |
6512 | // free $p3 |
6513 | $p3 = $this->currPos; |
6514 | // start seq_2 |
6515 | $p4 = $this->currPos; |
6516 | $p7 = $this->currPos; |
6517 | if (($this->input[$this->currPos] ?? null) === "{") { |
6518 | $this->currPos++; |
6519 | $r8 = "{"; |
6520 | $r8 = false; |
6521 | $this->currPos = $p7; |
6522 | } else { |
6523 | $r8 = self::$FAILED; |
6524 | $r1 = self::$FAILED; |
6525 | goto seq_2; |
6526 | } |
6527 | // free $p7 |
6528 | $r9 = $this->parsetplarg_or_template($silence, $boolParams, $param_th, $param_preproc); |
6529 | // r <- $r9 |
6530 | if ($r9===self::$FAILED) { |
6531 | $this->currPos = $p4; |
6532 | $r1 = self::$FAILED; |
6533 | goto seq_2; |
6534 | } |
6535 | $r1 = true; |
6536 | seq_2: |
6537 | if ($r1!==self::$FAILED) { |
6538 | $this->savedPos = $p3; |
6539 | $r1 = $this->a24($r9); |
6540 | goto choice_1; |
6541 | } |
6542 | // free $p4 |
6543 | $p4 = $this->currPos; |
6544 | // start seq_3 |
6545 | $p7 = $this->currPos; |
6546 | $p10 = $this->currPos; |
6547 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "-{", $this->currPos, 2, false) === 0) { |
6548 | $r11 = "-{"; |
6549 | $this->currPos += 2; |
6550 | $r11 = false; |
6551 | $this->currPos = $p10; |
6552 | } else { |
6553 | $r11 = self::$FAILED; |
6554 | $r1 = self::$FAILED; |
6555 | goto seq_3; |
6556 | } |
6557 | // free $p10 |
6558 | $r12 = $this->parselang_variant_or_tpl($silence, $boolParams, $param_th, $param_preproc); |
6559 | // r <- $r12 |
6560 | if ($r12===self::$FAILED) { |
6561 | $this->currPos = $p7; |
6562 | $r1 = self::$FAILED; |
6563 | goto seq_3; |
6564 | } |
6565 | $r1 = true; |
6566 | seq_3: |
6567 | if ($r1!==self::$FAILED) { |
6568 | $this->savedPos = $p4; |
6569 | $r1 = $this->a24($r12); |
6570 | goto choice_1; |
6571 | } |
6572 | // free $p7 |
6573 | $p7 = $this->currPos; |
6574 | $r1 = self::$FAILED; |
6575 | for (;;) { |
6576 | // start seq_4 |
6577 | $p10 = $this->currPos; |
6578 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "[[", $this->currPos, 2, false) === 0) { |
6579 | $r14 = "[["; |
6580 | $this->currPos += 2; |
6581 | } else { |
6582 | if (!$silence) {$this->fail(41);} |
6583 | $r14 = self::$FAILED; |
6584 | $r13 = self::$FAILED; |
6585 | goto seq_4; |
6586 | } |
6587 | $p15 = $this->currPos; |
6588 | if (($this->input[$this->currPos] ?? null) === "[") { |
6589 | $this->currPos++; |
6590 | $r16 = "["; |
6591 | $r16 = false; |
6592 | $this->currPos = $p15; |
6593 | } else { |
6594 | $r16 = self::$FAILED; |
6595 | $this->currPos = $p10; |
6596 | $r13 = self::$FAILED; |
6597 | goto seq_4; |
6598 | } |
6599 | // free $p15 |
6600 | $r13 = true; |
6601 | seq_4: |
6602 | if ($r13!==self::$FAILED) { |
6603 | $r1 = true; |
6604 | } else { |
6605 | break; |
6606 | } |
6607 | // free $p10 |
6608 | } |
6609 | if ($r1!==self::$FAILED) { |
6610 | $r1 = substr($this->input, $p7, $this->currPos - $p7); |
6611 | goto choice_1; |
6612 | } else { |
6613 | $r1 = self::$FAILED; |
6614 | } |
6615 | // free $r13 |
6616 | // free $p7 |
6617 | $p7 = $this->currPos; |
6618 | // start seq_5 |
6619 | $p10 = $this->currPos; |
6620 | $p15 = $this->currPos; |
6621 | if (($this->input[$this->currPos] ?? null) === "[") { |
6622 | $this->currPos++; |
6623 | $r13 = "["; |
6624 | $r13 = false; |
6625 | $this->currPos = $p15; |
6626 | } else { |
6627 | $r13 = self::$FAILED; |
6628 | $r1 = self::$FAILED; |
6629 | goto seq_5; |
6630 | } |
6631 | // free $p15 |
6632 | // start choice_2 |
6633 | $r17 = $this->parsewikilink($silence, $boolParams, $param_th, $param_preproc); |
6634 | if ($r17!==self::$FAILED) { |
6635 | goto choice_2; |
6636 | } |
6637 | $r17 = $this->parseextlink($silence, $boolParams, $param_preproc, $param_th); |
6638 | choice_2: |
6639 | // r <- $r17 |
6640 | if ($r17===self::$FAILED) { |
6641 | $this->currPos = $p10; |
6642 | $r1 = self::$FAILED; |
6643 | goto seq_5; |
6644 | } |
6645 | $r1 = true; |
6646 | seq_5: |
6647 | if ($r1!==self::$FAILED) { |
6648 | $this->savedPos = $p7; |
6649 | $r1 = $this->a24($r17); |
6650 | goto choice_1; |
6651 | } |
6652 | // free $p10 |
6653 | $p10 = $this->currPos; |
6654 | // start seq_6 |
6655 | $p15 = $this->currPos; |
6656 | $p18 = $this->currPos; |
6657 | if (($this->input[$this->currPos] ?? null) === "'") { |
6658 | $this->currPos++; |
6659 | $r19 = "'"; |
6660 | $r19 = false; |
6661 | $this->currPos = $p18; |
6662 | } else { |
6663 | $r19 = self::$FAILED; |
6664 | $r1 = self::$FAILED; |
6665 | goto seq_6; |
6666 | } |
6667 | // free $p18 |
6668 | $r20 = $this->parsequote($silence); |
6669 | // r <- $r20 |
6670 | if ($r20===self::$FAILED) { |
6671 | $this->currPos = $p15; |
6672 | $r1 = self::$FAILED; |
6673 | goto seq_6; |
6674 | } |
6675 | $r1 = true; |
6676 | seq_6: |
6677 | if ($r1!==self::$FAILED) { |
6678 | $this->savedPos = $p10; |
6679 | $r1 = $this->a24($r20); |
6680 | } |
6681 | // free $p15 |
6682 | choice_1: |
6683 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
6684 | $this->currPos, |
6685 | $r1, |
6686 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
6687 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
6688 | ); |
6689 | return $r1; |
6690 | }, "inline_element", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
6691 | |
6692 | } |
6693 | private function discardlist_char($silence) { |
6694 | return $this->traceCall(function($silence) { |
6695 | $key = 487; |
6696 | $bucket = $this->currPos; |
6697 | $cached = $this->cache[$bucket][$key] ?? null; |
6698 | if ($cached) { |
6699 | $this->currPos = $cached->nextPos; |
6700 | |
6701 | return $cached->result; |
6702 | } |
6703 | |
6704 | if (strspn($this->input, "*#:;", $this->currPos, 1) !== 0) { |
6705 | $r1 = $this->input[$this->currPos++]; |
6706 | } else { |
6707 | $r1 = self::$FAILED; |
6708 | if (!$silence) {$this->fail(42);} |
6709 | } |
6710 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
6711 | $this->currPos, |
6712 | $r1, |
6713 | self::$UNDEFINED, |
6714 | self::$UNDEFINED |
6715 | ); |
6716 | return $r1; |
6717 | }, "list_char", ["\$silence"], [$silence]); |
6718 | |
6719 | } |
6720 | private function parselist_char($silence) { |
6721 | return $this->traceCall(function($silence) { |
6722 | $key = 486; |
6723 | $bucket = $this->currPos; |
6724 | $cached = $this->cache[$bucket][$key] ?? null; |
6725 | if ($cached) { |
6726 | $this->currPos = $cached->nextPos; |
6727 | |
6728 | return $cached->result; |
6729 | } |
6730 | |
6731 | if (strspn($this->input, "*#:;", $this->currPos, 1) !== 0) { |
6732 | $r1 = $this->input[$this->currPos++]; |
6733 | } else { |
6734 | $r1 = self::$FAILED; |
6735 | if (!$silence) {$this->fail(42);} |
6736 | } |
6737 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
6738 | $this->currPos, |
6739 | $r1, |
6740 | self::$UNDEFINED, |
6741 | self::$UNDEFINED |
6742 | ); |
6743 | return $r1; |
6744 | }, "list_char", ["\$silence"], [$silence]); |
6745 | |
6746 | } |
6747 | private function parsedtdd_colon($silence, $boolParams, &$param_preproc, &$param_th) { |
6748 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
6749 | $key = json_encode([482, $boolParams & 0xfff, $param_preproc, $param_th]); |
6750 | $bucket = $this->currPos; |
6751 | $cached = $this->cache[$bucket][$key] ?? null; |
6752 | if ($cached) { |
6753 | $this->currPos = $cached->nextPos; |
6754 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
6755 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
6756 | return $cached->result; |
6757 | } |
6758 | $saved_preproc=$param_preproc; |
6759 | $saved_th=$param_th; |
6760 | $p2 = $this->currPos; |
6761 | // start seq_1 |
6762 | $p3 = $this->currPos; |
6763 | $r4 = $this->parseinlineline_break_on_colon($silence, $boolParams, $param_preproc, $param_th); |
6764 | if ($r4===self::$FAILED) { |
6765 | $r4 = null; |
6766 | } |
6767 | // c <- $r4 |
6768 | $p6 = $this->currPos; |
6769 | // cpos <- $r5 |
6770 | if (($this->input[$this->currPos] ?? null) === ":") { |
6771 | $this->currPos++; |
6772 | $r5 = ":"; |
6773 | $this->savedPos = $p6; |
6774 | $r5 = $this->a66($r4); |
6775 | } else { |
6776 | if (!$silence) {$this->fail(18);} |
6777 | $r5 = self::$FAILED; |
6778 | $this->currPos = $p3; |
6779 | $r1 = self::$FAILED; |
6780 | goto seq_1; |
6781 | } |
6782 | $r1 = true; |
6783 | seq_1: |
6784 | if ($r1!==self::$FAILED) { |
6785 | $this->savedPos = $p2; |
6786 | $r1 = $this->a67($r4, $r5); |
6787 | } |
6788 | // free $p3 |
6789 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
6790 | $this->currPos, |
6791 | $r1, |
6792 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
6793 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
6794 | ); |
6795 | return $r1; |
6796 | }, "dtdd_colon", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
6797 | |
6798 | } |
6799 | private function discardeolf($silence) { |
6800 | return $this->traceCall(function($silence) { |
6801 | $key = 571; |
6802 | $bucket = $this->currPos; |
6803 | $cached = $this->cache[$bucket][$key] ?? null; |
6804 | if ($cached) { |
6805 | $this->currPos = $cached->nextPos; |
6806 | |
6807 | return $cached->result; |
6808 | } |
6809 | |
6810 | // start choice_1 |
6811 | $r1 = $this->discardnewline($silence); |
6812 | if ($r1!==self::$FAILED) { |
6813 | goto choice_1; |
6814 | } |
6815 | $r1 = $this->discardeof($silence); |
6816 | choice_1: |
6817 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
6818 | $this->currPos, |
6819 | $r1, |
6820 | self::$UNDEFINED, |
6821 | self::$UNDEFINED |
6822 | ); |
6823 | return $r1; |
6824 | }, "eolf", ["\$silence"], [$silence]); |
6825 | |
6826 | } |
6827 | private function parsetable_line($silence, $boolParams, &$param_preproc, &$param_th) { |
6828 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
6829 | $key = json_encode([494, $boolParams & 0x1fff, $param_preproc, $param_th]); |
6830 | $bucket = $this->currPos; |
6831 | $cached = $this->cache[$bucket][$key] ?? null; |
6832 | if ($cached) { |
6833 | $this->currPos = $cached->nextPos; |
6834 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
6835 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
6836 | return $cached->result; |
6837 | } |
6838 | $saved_preproc=$param_preproc; |
6839 | $saved_th=$param_th; |
6840 | $p2 = $this->currPos; |
6841 | // start seq_1 |
6842 | $p3 = $this->currPos; |
6843 | // start choice_1 |
6844 | $p5 = $this->currPos; |
6845 | $r4 = $this->discardinline_breaks(true, $boolParams, $param_preproc, $param_th); |
6846 | if ($r4 === self::$FAILED) { |
6847 | $r4 = false; |
6848 | goto choice_1; |
6849 | } else { |
6850 | $r4 = self::$FAILED; |
6851 | $this->currPos = $p5; |
6852 | } |
6853 | // free $p5 |
6854 | $p5 = $this->currPos; |
6855 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "{{!}}", $this->currPos, 5, false) === 0) { |
6856 | $r4 = "{{!}}"; |
6857 | $this->currPos += 5; |
6858 | $r4 = false; |
6859 | $this->currPos = $p5; |
6860 | } else { |
6861 | $r4 = self::$FAILED; |
6862 | } |
6863 | // free $p5 |
6864 | choice_1: |
6865 | if ($r4===self::$FAILED) { |
6866 | $r1 = self::$FAILED; |
6867 | goto seq_1; |
6868 | } |
6869 | // start choice_2 |
6870 | $r6 = $this->parsetable_start_tag($silence, $boolParams, $param_preproc, $param_th); |
6871 | if ($r6!==self::$FAILED) { |
6872 | goto choice_2; |
6873 | } |
6874 | $r6 = $this->parsetable_content_line($silence, $boolParams | 0x40, $param_preproc, $param_th); |
6875 | if ($r6!==self::$FAILED) { |
6876 | goto choice_2; |
6877 | } |
6878 | $r6 = $this->parsetable_end_tag($silence); |
6879 | choice_2: |
6880 | // tl <- $r6 |
6881 | if ($r6===self::$FAILED) { |
6882 | $this->currPos = $p3; |
6883 | $r1 = self::$FAILED; |
6884 | goto seq_1; |
6885 | } |
6886 | $r1 = true; |
6887 | seq_1: |
6888 | if ($r1!==self::$FAILED) { |
6889 | $this->savedPos = $p2; |
6890 | $r1 = $this->a68($r6); |
6891 | } |
6892 | // free $p3 |
6893 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
6894 | $this->currPos, |
6895 | $r1, |
6896 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
6897 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
6898 | ); |
6899 | return $r1; |
6900 | }, "table_line", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
6901 | |
6902 | } |
6903 | private function parsesol($silence, $boolParams, &$param_preproc, &$param_th) { |
6904 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
6905 | $key = json_encode([590, $boolParams & 0x1ebf, $param_preproc, $param_th]); |
6906 | $bucket = $this->currPos; |
6907 | $cached = $this->cache[$bucket][$key] ?? null; |
6908 | if ($cached) { |
6909 | $this->currPos = $cached->nextPos; |
6910 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
6911 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
6912 | return $cached->result; |
6913 | } |
6914 | $saved_preproc=$param_preproc; |
6915 | $saved_th=$param_th; |
6916 | $p2 = $this->currPos; |
6917 | // start seq_1 |
6918 | $p3 = $this->currPos; |
6919 | $r4 = $this->parsesol_prefix($silence); |
6920 | // sp <- $r4 |
6921 | if ($r4===self::$FAILED) { |
6922 | $r1 = self::$FAILED; |
6923 | goto seq_1; |
6924 | } |
6925 | $r5 = $this->parseempty_lines_with_comments($silence); |
6926 | if ($r5===self::$FAILED) { |
6927 | $r5 = null; |
6928 | } |
6929 | // elc <- $r5 |
6930 | $r6 = []; |
6931 | for (;;) { |
6932 | $r7 = $this->parsesol_transparent($silence, $boolParams, $param_preproc, $param_th); |
6933 | if ($r7!==self::$FAILED) { |
6934 | $r6[] = $r7; |
6935 | } else { |
6936 | break; |
6937 | } |
6938 | } |
6939 | // st <- $r6 |
6940 | // free $r7 |
6941 | $r1 = true; |
6942 | seq_1: |
6943 | if ($r1!==self::$FAILED) { |
6944 | $this->savedPos = $p2; |
6945 | $r1 = $this->a69($r4, $r5, $r6); |
6946 | } |
6947 | // free $p3 |
6948 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
6949 | $this->currPos, |
6950 | $r1, |
6951 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
6952 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
6953 | ); |
6954 | return $r1; |
6955 | }, "sol", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
6956 | |
6957 | } |
6958 | private function discardcomment($silence) { |
6959 | return $this->traceCall(function($silence) { |
6960 | $key = 573; |
6961 | $bucket = $this->currPos; |
6962 | $cached = $this->cache[$bucket][$key] ?? null; |
6963 | if ($cached) { |
6964 | $this->currPos = $cached->nextPos; |
6965 | |
6966 | return $cached->result; |
6967 | } |
6968 | |
6969 | $p2 = $this->currPos; |
6970 | // start seq_1 |
6971 | $p3 = $this->currPos; |
6972 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "<!--", $this->currPos, 4, false) === 0) { |
6973 | $r4 = "<!--"; |
6974 | $this->currPos += 4; |
6975 | } else { |
6976 | if (!$silence) {$this->fail(11);} |
6977 | $r4 = self::$FAILED; |
6978 | $r1 = self::$FAILED; |
6979 | goto seq_1; |
6980 | } |
6981 | $p6 = $this->currPos; |
6982 | for (;;) { |
6983 | // start seq_2 |
6984 | $p8 = $this->currPos; |
6985 | $p9 = $this->currPos; |
6986 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "-->", $this->currPos, 3, false) === 0) { |
6987 | $r10 = "-->"; |
6988 | $this->currPos += 3; |
6989 | } else { |
6990 | $r10 = self::$FAILED; |
6991 | } |
6992 | if ($r10 === self::$FAILED) { |
6993 | $r10 = false; |
6994 | } else { |
6995 | $r10 = self::$FAILED; |
6996 | $this->currPos = $p9; |
6997 | $r7 = self::$FAILED; |
6998 | goto seq_2; |
6999 | } |
7000 | // free $p9 |
7001 | if ($this->currPos < $this->inputLength) { |
7002 | $r11 = self::consumeChar($this->input, $this->currPos);; |
7003 | } else { |
7004 | $r11 = self::$FAILED; |
7005 | if (!$silence) {$this->fail(7);} |
7006 | $this->currPos = $p8; |
7007 | $r7 = self::$FAILED; |
7008 | goto seq_2; |
7009 | } |
7010 | $r7 = true; |
7011 | seq_2: |
7012 | if ($r7===self::$FAILED) { |
7013 | break; |
7014 | } |
7015 | // free $p8 |
7016 | } |
7017 | // free $r7 |
7018 | $r5 = true; |
7019 | // c <- $r5 |
7020 | if ($r5!==self::$FAILED) { |
7021 | $r5 = substr($this->input, $p6, $this->currPos - $p6); |
7022 | } else { |
7023 | $r5 = self::$FAILED; |
7024 | $this->currPos = $p3; |
7025 | $r1 = self::$FAILED; |
7026 | goto seq_1; |
7027 | } |
7028 | // free $p6 |
7029 | $p6 = $this->currPos; |
7030 | // start choice_1 |
7031 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "-->", $this->currPos, 3, false) === 0) { |
7032 | $r7 = "-->"; |
7033 | $this->currPos += 3; |
7034 | goto choice_1; |
7035 | } else { |
7036 | if (!$silence) {$this->fail(12);} |
7037 | $r7 = self::$FAILED; |
7038 | } |
7039 | $r7 = $this->discardeof($silence); |
7040 | choice_1: |
7041 | // cEnd <- $r7 |
7042 | if ($r7!==self::$FAILED) { |
7043 | $r7 = substr($this->input, $p6, $this->currPos - $p6); |
7044 | } else { |
7045 | $r7 = self::$FAILED; |
7046 | $this->currPos = $p3; |
7047 | $r1 = self::$FAILED; |
7048 | goto seq_1; |
7049 | } |
7050 | // free $p6 |
7051 | $r1 = true; |
7052 | seq_1: |
7053 | if ($r1!==self::$FAILED) { |
7054 | $this->savedPos = $p2; |
7055 | $r1 = $this->a27($r5, $r7); |
7056 | } |
7057 | // free $p3 |
7058 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
7059 | $this->currPos, |
7060 | $r1, |
7061 | self::$UNDEFINED, |
7062 | self::$UNDEFINED |
7063 | ); |
7064 | return $r1; |
7065 | }, "comment", ["\$silence"], [$silence]); |
7066 | |
7067 | } |
7068 | private function discardsof($silence) { |
7069 | return $this->traceCall(function($silence) { |
7070 | $key = 563; |
7071 | $bucket = $this->currPos; |
7072 | $cached = $this->cache[$bucket][$key] ?? null; |
7073 | if ($cached) { |
7074 | $this->currPos = $cached->nextPos; |
7075 | |
7076 | return $cached->result; |
7077 | } |
7078 | |
7079 | $this->savedPos = $this->currPos; |
7080 | $r1 = $this->a70(); |
7081 | if ($r1) { |
7082 | $r1 = false; |
7083 | } else { |
7084 | $r1 = self::$FAILED; |
7085 | } |
7086 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
7087 | $this->currPos, |
7088 | $r1, |
7089 | self::$UNDEFINED, |
7090 | self::$UNDEFINED |
7091 | ); |
7092 | return $r1; |
7093 | }, "sof", ["\$silence"], [$silence]); |
7094 | |
7095 | } |
7096 | private function parseredirect($silence, $boolParams, &$param_th, &$param_preproc) { |
7097 | return $this->traceCall(function($silence, $boolParams, &$param_th, &$param_preproc) { |
7098 | $key = json_encode([308, $boolParams & 0x1fff, $param_th, $param_preproc]); |
7099 | $bucket = $this->currPos; |
7100 | $cached = $this->cache[$bucket][$key] ?? null; |
7101 | if ($cached) { |
7102 | $this->currPos = $cached->nextPos; |
7103 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
7104 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
7105 | return $cached->result; |
7106 | } |
7107 | $saved_th=$param_th; |
7108 | $saved_preproc=$param_preproc; |
7109 | $p2 = $this->currPos; |
7110 | // start seq_1 |
7111 | $p3 = $this->currPos; |
7112 | $r4 = $this->parseredirect_word($silence); |
7113 | // rw <- $r4 |
7114 | if ($r4===self::$FAILED) { |
7115 | $r1 = self::$FAILED; |
7116 | goto seq_1; |
7117 | } |
7118 | $p6 = $this->currPos; |
7119 | for (;;) { |
7120 | $r7 = $this->discardspace_or_newline($silence); |
7121 | if ($r7===self::$FAILED) { |
7122 | break; |
7123 | } |
7124 | } |
7125 | // free $r7 |
7126 | $r5 = true; |
7127 | // sp <- $r5 |
7128 | if ($r5!==self::$FAILED) { |
7129 | $r5 = substr($this->input, $p6, $this->currPos - $p6); |
7130 | } else { |
7131 | $r5 = self::$FAILED; |
7132 | $this->currPos = $p3; |
7133 | $r1 = self::$FAILED; |
7134 | goto seq_1; |
7135 | } |
7136 | // free $p6 |
7137 | $p6 = $this->currPos; |
7138 | // start seq_2 |
7139 | $p8 = $this->currPos; |
7140 | if (($this->input[$this->currPos] ?? null) === ":") { |
7141 | $this->currPos++; |
7142 | $r9 = ":"; |
7143 | } else { |
7144 | if (!$silence) {$this->fail(18);} |
7145 | $r9 = self::$FAILED; |
7146 | $r7 = self::$FAILED; |
7147 | goto seq_2; |
7148 | } |
7149 | for (;;) { |
7150 | $r11 = $this->discardspace_or_newline($silence); |
7151 | if ($r11===self::$FAILED) { |
7152 | break; |
7153 | } |
7154 | } |
7155 | // free $r11 |
7156 | $r10 = true; |
7157 | if ($r10===self::$FAILED) { |
7158 | $this->currPos = $p8; |
7159 | $r7 = self::$FAILED; |
7160 | goto seq_2; |
7161 | } |
7162 | // free $r10 |
7163 | $r7 = true; |
7164 | seq_2: |
7165 | if ($r7===self::$FAILED) { |
7166 | $r7 = null; |
7167 | } |
7168 | // free $p8 |
7169 | // c <- $r7 |
7170 | $r7 = substr($this->input, $p6, $this->currPos - $p6); |
7171 | // free $p6 |
7172 | $r10 = $this->parsewikilink($silence, $boolParams, $param_th, $param_preproc); |
7173 | // wl <- $r10 |
7174 | if ($r10===self::$FAILED) { |
7175 | $this->currPos = $p3; |
7176 | $r1 = self::$FAILED; |
7177 | goto seq_1; |
7178 | } |
7179 | $this->savedPos = $this->currPos; |
7180 | $r11 = $this->a71($r4, $r5, $r7, $r10); |
7181 | if ($r11) { |
7182 | $r11 = false; |
7183 | } else { |
7184 | $r11 = self::$FAILED; |
7185 | $this->currPos = $p3; |
7186 | $r1 = self::$FAILED; |
7187 | goto seq_1; |
7188 | } |
7189 | $r1 = true; |
7190 | seq_1: |
7191 | if ($r1!==self::$FAILED) { |
7192 | $this->savedPos = $p2; |
7193 | $r1 = $this->a72($r4, $r5, $r7, $r10); |
7194 | } |
7195 | // free $p3 |
7196 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
7197 | $this->currPos, |
7198 | $r1, |
7199 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
7200 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
7201 | ); |
7202 | return $r1; |
7203 | }, "redirect", ["\$silence", "\$boolParams", "&\$param_th", "&\$param_preproc"], [$silence, $boolParams, &$param_th, &$param_preproc]); |
7204 | |
7205 | } |
7206 | private function parsesol_transparent($silence, $boolParams, &$param_preproc, &$param_th) { |
7207 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
7208 | $key = json_encode([588, $boolParams & 0x1ebf, $param_preproc, $param_th]); |
7209 | $bucket = $this->currPos; |
7210 | $cached = $this->cache[$bucket][$key] ?? null; |
7211 | if ($cached) { |
7212 | $this->currPos = $cached->nextPos; |
7213 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
7214 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
7215 | return $cached->result; |
7216 | } |
7217 | $saved_preproc=$param_preproc; |
7218 | $saved_th=$param_th; |
7219 | // start choice_1 |
7220 | $r1 = $this->parsecomment($silence); |
7221 | if ($r1!==self::$FAILED) { |
7222 | goto choice_1; |
7223 | } |
7224 | $r1 = $this->parseinclude_limits($silence, $boolParams, $param_preproc, $param_th); |
7225 | if ($r1!==self::$FAILED) { |
7226 | goto choice_1; |
7227 | } |
7228 | $r1 = $this->parseannotation_tag($silence, $boolParams, $param_preproc, $param_th); |
7229 | if ($r1!==self::$FAILED) { |
7230 | goto choice_1; |
7231 | } |
7232 | $r1 = $this->parsebehavior_switch($silence); |
7233 | choice_1: |
7234 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
7235 | $this->currPos, |
7236 | $r1, |
7237 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
7238 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
7239 | ); |
7240 | return $r1; |
7241 | }, "sol_transparent", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
7242 | |
7243 | } |
7244 | private function parseblock_line($silence, $boolParams, &$param_preproc, &$param_th) { |
7245 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
7246 | $key = json_encode([322, $boolParams & 0x1fff, $param_preproc, $param_th]); |
7247 | $bucket = $this->currPos; |
7248 | $cached = $this->cache[$bucket][$key] ?? null; |
7249 | if ($cached) { |
7250 | $this->currPos = $cached->nextPos; |
7251 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
7252 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
7253 | return $cached->result; |
7254 | } |
7255 | $saved_preproc=$param_preproc; |
7256 | $saved_th=$param_th; |
7257 | // start choice_1 |
7258 | $r1 = $this->parseheading($silence, $boolParams, $param_preproc, $param_th); |
7259 | if ($r1!==self::$FAILED) { |
7260 | goto choice_1; |
7261 | } |
7262 | $r1 = $this->parselist_item($silence, $boolParams, $param_preproc, $param_th); |
7263 | if ($r1!==self::$FAILED) { |
7264 | goto choice_1; |
7265 | } |
7266 | $r1 = $this->parsehr($silence, $boolParams, $param_preproc, $param_th); |
7267 | if ($r1!==self::$FAILED) { |
7268 | goto choice_1; |
7269 | } |
7270 | $p2 = $this->currPos; |
7271 | // start seq_1 |
7272 | $p3 = $this->currPos; |
7273 | $r4 = $this->parseoptionalSpaceToken($silence); |
7274 | // st <- $r4 |
7275 | if ($r4===self::$FAILED) { |
7276 | $r1 = self::$FAILED; |
7277 | goto seq_1; |
7278 | } |
7279 | $p5 = $this->currPos; |
7280 | if (strspn($this->input, " <{}|!", $this->currPos, 1) !== 0) { |
7281 | $r6 = $this->input[$this->currPos++]; |
7282 | $r6 = false; |
7283 | $this->currPos = $p5; |
7284 | } else { |
7285 | $r6 = self::$FAILED; |
7286 | $this->currPos = $p3; |
7287 | $r1 = self::$FAILED; |
7288 | goto seq_1; |
7289 | } |
7290 | // free $p5 |
7291 | $r7 = $this->parsetable_line($silence, $boolParams, $param_preproc, $param_th); |
7292 | // tl <- $r7 |
7293 | if ($r7===self::$FAILED) { |
7294 | $this->currPos = $p3; |
7295 | $r1 = self::$FAILED; |
7296 | goto seq_1; |
7297 | } |
7298 | $r1 = true; |
7299 | seq_1: |
7300 | if ($r1!==self::$FAILED) { |
7301 | $this->savedPos = $p2; |
7302 | $r1 = $this->a73($r4, $r7); |
7303 | } |
7304 | // free $p3 |
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 | }, "block_line", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
7314 | |
7315 | } |
7316 | private function parseblock_lines($silence, $boolParams, &$param_preproc, &$param_th) { |
7317 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
7318 | $key = json_encode([318, $boolParams & 0x1fff, $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 | $p2 = $this->currPos; |
7330 | // start seq_1 |
7331 | $p3 = $this->currPos; |
7332 | $r4 = $this->parsesol($silence, $boolParams, $param_preproc, $param_th); |
7333 | // s <- $r4 |
7334 | if ($r4===self::$FAILED) { |
7335 | $r1 = self::$FAILED; |
7336 | goto seq_1; |
7337 | } |
7338 | $p6 = $this->currPos; |
7339 | // start seq_2 |
7340 | $p7 = $this->currPos; |
7341 | $r8 = $this->parseoptionalSpaceToken($silence); |
7342 | // os <- $r8 |
7343 | if ($r8===self::$FAILED) { |
7344 | $r5 = self::$FAILED; |
7345 | goto seq_2; |
7346 | } |
7347 | $r9 = $this->parsesol($silence, $boolParams, $param_preproc, $param_th); |
7348 | // so <- $r9 |
7349 | if ($r9===self::$FAILED) { |
7350 | $this->currPos = $p7; |
7351 | $r5 = self::$FAILED; |
7352 | goto seq_2; |
7353 | } |
7354 | $r5 = true; |
7355 | seq_2: |
7356 | if ($r5!==self::$FAILED) { |
7357 | $this->savedPos = $p6; |
7358 | $r5 = $this->a74($r4, $r8, $r9); |
7359 | } else { |
7360 | $r5 = null; |
7361 | } |
7362 | // free $p7 |
7363 | // s2 <- $r5 |
7364 | $r10 = $this->parseblock_line($silence, $boolParams, $param_preproc, $param_th); |
7365 | // bl <- $r10 |
7366 | if ($r10===self::$FAILED) { |
7367 | $this->currPos = $p3; |
7368 | $r1 = self::$FAILED; |
7369 | goto seq_1; |
7370 | } |
7371 | $r1 = true; |
7372 | seq_1: |
7373 | if ($r1!==self::$FAILED) { |
7374 | $this->savedPos = $p2; |
7375 | $r1 = $this->a75($r4, $r5, $r10); |
7376 | } |
7377 | // free $p3 |
7378 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
7379 | $this->currPos, |
7380 | $r1, |
7381 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
7382 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
7383 | ); |
7384 | return $r1; |
7385 | }, "block_lines", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
7386 | |
7387 | } |
7388 | private function discardtplarg($silence, $boolParams, &$param_th) { |
7389 | return $this->traceCall(function($silence, $boolParams, &$param_th) { |
7390 | $key = json_encode([379, $boolParams & 0x1fff, $param_th]); |
7391 | $bucket = $this->currPos; |
7392 | $cached = $this->cache[$bucket][$key] ?? null; |
7393 | if ($cached) { |
7394 | $this->currPos = $cached->nextPos; |
7395 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
7396 | return $cached->result; |
7397 | } |
7398 | $saved_th=$param_th; |
7399 | $r1 = $this->discardtplarg_preproc($silence, $boolParams, self::newRef("}}"), $param_th); |
7400 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
7401 | $this->currPos, |
7402 | $r1, |
7403 | self::$UNDEFINED, |
7404 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
7405 | ); |
7406 | return $r1; |
7407 | }, "tplarg", ["\$silence", "\$boolParams", "&\$param_th"], [$silence, $boolParams, &$param_th]); |
7408 | |
7409 | } |
7410 | private function parsetemplate($silence, $boolParams, &$param_th) { |
7411 | return $this->traceCall(function($silence, $boolParams, &$param_th) { |
7412 | $key = json_encode([370, $boolParams & 0x1fff, $param_th]); |
7413 | $bucket = $this->currPos; |
7414 | $cached = $this->cache[$bucket][$key] ?? null; |
7415 | if ($cached) { |
7416 | $this->currPos = $cached->nextPos; |
7417 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
7418 | return $cached->result; |
7419 | } |
7420 | $saved_th=$param_th; |
7421 | $r1 = $this->parsetemplate_preproc($silence, $boolParams, self::newRef("}}"), $param_th); |
7422 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
7423 | $this->currPos, |
7424 | $r1, |
7425 | self::$UNDEFINED, |
7426 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
7427 | ); |
7428 | return $r1; |
7429 | }, "template", ["\$silence", "\$boolParams", "&\$param_th"], [$silence, $boolParams, &$param_th]); |
7430 | |
7431 | } |
7432 | private function parsebroken_template($silence, &$param_preproc) { |
7433 | return $this->traceCall(function($silence, &$param_preproc) { |
7434 | $key = json_encode([372, $param_preproc]); |
7435 | $bucket = $this->currPos; |
7436 | $cached = $this->cache[$bucket][$key] ?? null; |
7437 | if ($cached) { |
7438 | $this->currPos = $cached->nextPos; |
7439 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
7440 | return $cached->result; |
7441 | } |
7442 | $saved_preproc=$param_preproc; |
7443 | $p2 = $this->currPos; |
7444 | // start seq_1 |
7445 | $p3 = $this->currPos; |
7446 | // t <- $r4 |
7447 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "{{", $this->currPos, 2, false) === 0) { |
7448 | $r4 = "{{"; |
7449 | $this->currPos += 2; |
7450 | } else { |
7451 | if (!$silence) {$this->fail(43);} |
7452 | $r4 = self::$FAILED; |
7453 | $this->currPos = $p3; |
7454 | $r1 = self::$FAILED; |
7455 | goto seq_1; |
7456 | } |
7457 | $r1 = true; |
7458 | seq_1: |
7459 | if ($r1!==self::$FAILED) { |
7460 | $this->savedPos = $p2; |
7461 | $r1 = $this->a76($param_preproc, $r4); |
7462 | } |
7463 | // free $p3 |
7464 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
7465 | $this->currPos, |
7466 | $r1, |
7467 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
7468 | self::$UNDEFINED |
7469 | ); |
7470 | return $r1; |
7471 | }, "broken_template", ["\$silence", "&\$param_preproc"], [$silence, &$param_preproc]); |
7472 | |
7473 | } |
7474 | private function parsetplarg($silence, $boolParams, &$param_th) { |
7475 | return $this->traceCall(function($silence, $boolParams, &$param_th) { |
7476 | $key = json_encode([378, $boolParams & 0x1fff, $param_th]); |
7477 | $bucket = $this->currPos; |
7478 | $cached = $this->cache[$bucket][$key] ?? null; |
7479 | if ($cached) { |
7480 | $this->currPos = $cached->nextPos; |
7481 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
7482 | return $cached->result; |
7483 | } |
7484 | $saved_th=$param_th; |
7485 | $r1 = $this->parsetplarg_preproc($silence, $boolParams, self::newRef("}}"), $param_th); |
7486 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
7487 | $this->currPos, |
7488 | $r1, |
7489 | self::$UNDEFINED, |
7490 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
7491 | ); |
7492 | return $r1; |
7493 | }, "tplarg", ["\$silence", "\$boolParams", "&\$param_th"], [$silence, $boolParams, &$param_th]); |
7494 | |
7495 | } |
7496 | private function discardwikilink($silence, $boolParams, &$param_th, &$param_preproc) { |
7497 | return $this->traceCall(function($silence, $boolParams, &$param_th, &$param_preproc) { |
7498 | $key = json_encode([423, $boolParams & 0x1fff, $param_th, $param_preproc]); |
7499 | $bucket = $this->currPos; |
7500 | $cached = $this->cache[$bucket][$key] ?? null; |
7501 | if ($cached) { |
7502 | $this->currPos = $cached->nextPos; |
7503 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
7504 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
7505 | return $cached->result; |
7506 | } |
7507 | $saved_th=$param_th; |
7508 | $saved_preproc=$param_preproc; |
7509 | // start choice_1 |
7510 | $r1 = $this->discardwikilink_preproc($silence, $boolParams, self::newRef("]]"), $param_th); |
7511 | if ($r1!==self::$FAILED) { |
7512 | goto choice_1; |
7513 | } |
7514 | $r1 = $this->discardbroken_wikilink($silence, $boolParams, $param_preproc, $param_th); |
7515 | choice_1: |
7516 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
7517 | $this->currPos, |
7518 | $r1, |
7519 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
7520 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
7521 | ); |
7522 | return $r1; |
7523 | }, "wikilink", ["\$silence", "\$boolParams", "&\$param_th", "&\$param_preproc"], [$silence, $boolParams, &$param_th, &$param_preproc]); |
7524 | |
7525 | } |
7526 | private function parsedirective($silence, $boolParams, &$param_preproc, &$param_th) { |
7527 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
7528 | $key = json_encode([534, $boolParams & 0x1fff, $param_preproc, $param_th]); |
7529 | $bucket = $this->currPos; |
7530 | $cached = $this->cache[$bucket][$key] ?? null; |
7531 | if ($cached) { |
7532 | $this->currPos = $cached->nextPos; |
7533 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
7534 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
7535 | return $cached->result; |
7536 | } |
7537 | $saved_preproc=$param_preproc; |
7538 | $saved_th=$param_th; |
7539 | // start choice_1 |
7540 | $r1 = $this->parsecomment($silence); |
7541 | if ($r1!==self::$FAILED) { |
7542 | goto choice_1; |
7543 | } |
7544 | $r1 = $this->parseannotation_tag($silence, $boolParams, $param_preproc, $param_th); |
7545 | if ($r1!==self::$FAILED) { |
7546 | goto choice_1; |
7547 | } |
7548 | $r1 = $this->parsewellformed_extension_tag($silence, $boolParams, $param_preproc, $param_th); |
7549 | if ($r1!==self::$FAILED) { |
7550 | goto choice_1; |
7551 | } |
7552 | $r1 = $this->parsetplarg_or_template($silence, $boolParams, $param_th, $param_preproc); |
7553 | if ($r1!==self::$FAILED) { |
7554 | goto choice_1; |
7555 | } |
7556 | $p2 = $this->currPos; |
7557 | // start seq_1 |
7558 | $p3 = $this->currPos; |
7559 | $p4 = $this->currPos; |
7560 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "-{", $this->currPos, 2, false) === 0) { |
7561 | $r5 = "-{"; |
7562 | $this->currPos += 2; |
7563 | $r5 = false; |
7564 | $this->currPos = $p4; |
7565 | } else { |
7566 | $r5 = self::$FAILED; |
7567 | $r1 = self::$FAILED; |
7568 | goto seq_1; |
7569 | } |
7570 | // free $p4 |
7571 | $r6 = $this->parselang_variant_or_tpl($silence, $boolParams, $param_th, $param_preproc); |
7572 | // v <- $r6 |
7573 | if ($r6===self::$FAILED) { |
7574 | $this->currPos = $p3; |
7575 | $r1 = self::$FAILED; |
7576 | goto seq_1; |
7577 | } |
7578 | $r1 = true; |
7579 | seq_1: |
7580 | if ($r1!==self::$FAILED) { |
7581 | $this->savedPos = $p2; |
7582 | $r1 = $this->a77($r6); |
7583 | goto choice_1; |
7584 | } |
7585 | // free $p3 |
7586 | $p3 = $this->currPos; |
7587 | // start seq_2 |
7588 | $p4 = $this->currPos; |
7589 | $p7 = $this->currPos; |
7590 | if (($this->input[$this->currPos] ?? null) === "&") { |
7591 | $this->currPos++; |
7592 | $r8 = "&"; |
7593 | $r8 = false; |
7594 | $this->currPos = $p7; |
7595 | } else { |
7596 | $r8 = self::$FAILED; |
7597 | $r1 = self::$FAILED; |
7598 | goto seq_2; |
7599 | } |
7600 | // free $p7 |
7601 | $r9 = $this->parsehtmlentity($silence); |
7602 | // e <- $r9 |
7603 | if ($r9===self::$FAILED) { |
7604 | $this->currPos = $p4; |
7605 | $r1 = self::$FAILED; |
7606 | goto seq_2; |
7607 | } |
7608 | $r1 = true; |
7609 | seq_2: |
7610 | if ($r1!==self::$FAILED) { |
7611 | $this->savedPos = $p3; |
7612 | $r1 = $this->a78($r9); |
7613 | goto choice_1; |
7614 | } |
7615 | // free $p4 |
7616 | $r1 = $this->parseinclude_limits($silence, $boolParams, $param_preproc, $param_th); |
7617 | choice_1: |
7618 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
7619 | $this->currPos, |
7620 | $r1, |
7621 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
7622 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
7623 | ); |
7624 | return $r1; |
7625 | }, "directive", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
7626 | |
7627 | } |
7628 | private function parsehtml_tag($silence, $boolParams, &$param_preproc, &$param_th) { |
7629 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
7630 | $key = json_encode([330, $boolParams & 0x1ebd, $param_preproc, $param_th]); |
7631 | $bucket = $this->currPos; |
7632 | $cached = $this->cache[$bucket][$key] ?? null; |
7633 | if ($cached) { |
7634 | $this->currPos = $cached->nextPos; |
7635 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
7636 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
7637 | return $cached->result; |
7638 | } |
7639 | $saved_preproc=$param_preproc; |
7640 | $saved_th=$param_th; |
7641 | $r1 = $this->parsexmlish_tag($silence, $boolParams & ~0x2, $param_preproc, $param_th); |
7642 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
7643 | $this->currPos, |
7644 | $r1, |
7645 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
7646 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
7647 | ); |
7648 | return $r1; |
7649 | }, "html_tag", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
7650 | |
7651 | } |
7652 | private function parsetable_attribute_preprocessor_text_single($silence, $boolParams, &$param_preproc, &$param_th) { |
7653 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
7654 | $key = json_encode([550, $boolParams & 0x1fff, $param_preproc, $param_th]); |
7655 | $bucket = $this->currPos; |
7656 | $cached = $this->cache[$bucket][$key] ?? null; |
7657 | if ($cached) { |
7658 | $this->currPos = $cached->nextPos; |
7659 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
7660 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
7661 | return $cached->result; |
7662 | } |
7663 | $saved_preproc=$param_preproc; |
7664 | $saved_th=$param_th; |
7665 | $p2 = $this->currPos; |
7666 | $r3 = []; |
7667 | for (;;) { |
7668 | // start choice_1 |
7669 | $p5 = $this->currPos; |
7670 | $r4 = self::$FAILED; |
7671 | for (;;) { |
7672 | if (strcspn($this->input, "{}&<-!['\x0d\x0a|", $this->currPos, 1) !== 0) { |
7673 | $r6 = self::consumeChar($this->input, $this->currPos); |
7674 | $r4 = true; |
7675 | } else { |
7676 | $r6 = self::$FAILED; |
7677 | if (!$silence) {$this->fail(44);} |
7678 | break; |
7679 | } |
7680 | } |
7681 | if ($r4!==self::$FAILED) { |
7682 | $r4 = substr($this->input, $p5, $this->currPos - $p5); |
7683 | goto choice_1; |
7684 | } else { |
7685 | $r4 = self::$FAILED; |
7686 | } |
7687 | // free $r6 |
7688 | // free $p5 |
7689 | $p5 = $this->currPos; |
7690 | // start seq_1 |
7691 | $p7 = $this->currPos; |
7692 | $p8 = $this->currPos; |
7693 | $r6 = $this->discardinline_breaks(true, $boolParams, $param_preproc, $param_th); |
7694 | if ($r6 === self::$FAILED) { |
7695 | $r6 = false; |
7696 | } else { |
7697 | $r6 = self::$FAILED; |
7698 | $this->currPos = $p8; |
7699 | $r4 = self::$FAILED; |
7700 | goto seq_1; |
7701 | } |
7702 | // free $p8 |
7703 | // start choice_2 |
7704 | $r9 = $this->parsedirective($silence, $boolParams, $param_preproc, $param_th); |
7705 | if ($r9!==self::$FAILED) { |
7706 | goto choice_2; |
7707 | } |
7708 | if (strspn($this->input, "{}&<-![", $this->currPos, 1) !== 0) { |
7709 | $r9 = $this->input[$this->currPos++]; |
7710 | } else { |
7711 | $r9 = self::$FAILED; |
7712 | if (!$silence) {$this->fail(45);} |
7713 | } |
7714 | choice_2: |
7715 | // s <- $r9 |
7716 | if ($r9===self::$FAILED) { |
7717 | $this->currPos = $p7; |
7718 | $r4 = self::$FAILED; |
7719 | goto seq_1; |
7720 | } |
7721 | $r4 = true; |
7722 | seq_1: |
7723 | if ($r4!==self::$FAILED) { |
7724 | $this->savedPos = $p5; |
7725 | $r4 = $this->a42($r9); |
7726 | } |
7727 | // free $p7 |
7728 | choice_1: |
7729 | if ($r4!==self::$FAILED) { |
7730 | $r3[] = $r4; |
7731 | } else { |
7732 | break; |
7733 | } |
7734 | } |
7735 | // r <- $r3 |
7736 | // free $r4 |
7737 | $r1 = $r3; |
7738 | if ($r1!==self::$FAILED) { |
7739 | $this->savedPos = $p2; |
7740 | $r1 = $this->a59($r3); |
7741 | } |
7742 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
7743 | $this->currPos, |
7744 | $r1, |
7745 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
7746 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
7747 | ); |
7748 | return $r1; |
7749 | }, "table_attribute_preprocessor_text_single", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
7750 | |
7751 | } |
7752 | private function parsetable_attribute_preprocessor_text_double($silence, $boolParams, &$param_preproc, &$param_th) { |
7753 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
7754 | $key = json_encode([552, $boolParams & 0x1fff, $param_preproc, $param_th]); |
7755 | $bucket = $this->currPos; |
7756 | $cached = $this->cache[$bucket][$key] ?? null; |
7757 | if ($cached) { |
7758 | $this->currPos = $cached->nextPos; |
7759 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
7760 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
7761 | return $cached->result; |
7762 | } |
7763 | $saved_preproc=$param_preproc; |
7764 | $saved_th=$param_th; |
7765 | $p2 = $this->currPos; |
7766 | $r3 = []; |
7767 | for (;;) { |
7768 | // start choice_1 |
7769 | $p5 = $this->currPos; |
7770 | $r4 = self::$FAILED; |
7771 | for (;;) { |
7772 | if (strcspn($this->input, "{}&<-![\"\x0d\x0a|", $this->currPos, 1) !== 0) { |
7773 | $r6 = self::consumeChar($this->input, $this->currPos); |
7774 | $r4 = true; |
7775 | } else { |
7776 | $r6 = self::$FAILED; |
7777 | if (!$silence) {$this->fail(46);} |
7778 | break; |
7779 | } |
7780 | } |
7781 | if ($r4!==self::$FAILED) { |
7782 | $r4 = substr($this->input, $p5, $this->currPos - $p5); |
7783 | goto choice_1; |
7784 | } else { |
7785 | $r4 = self::$FAILED; |
7786 | } |
7787 | // free $r6 |
7788 | // free $p5 |
7789 | $p5 = $this->currPos; |
7790 | // start seq_1 |
7791 | $p7 = $this->currPos; |
7792 | $p8 = $this->currPos; |
7793 | $r6 = $this->discardinline_breaks(true, $boolParams, $param_preproc, $param_th); |
7794 | if ($r6 === self::$FAILED) { |
7795 | $r6 = false; |
7796 | } else { |
7797 | $r6 = self::$FAILED; |
7798 | $this->currPos = $p8; |
7799 | $r4 = self::$FAILED; |
7800 | goto seq_1; |
7801 | } |
7802 | // free $p8 |
7803 | // start choice_2 |
7804 | $r9 = $this->parsedirective($silence, $boolParams, $param_preproc, $param_th); |
7805 | if ($r9!==self::$FAILED) { |
7806 | goto choice_2; |
7807 | } |
7808 | if (strspn($this->input, "{}&<-![", $this->currPos, 1) !== 0) { |
7809 | $r9 = $this->input[$this->currPos++]; |
7810 | } else { |
7811 | $r9 = self::$FAILED; |
7812 | if (!$silence) {$this->fail(45);} |
7813 | } |
7814 | choice_2: |
7815 | // s <- $r9 |
7816 | if ($r9===self::$FAILED) { |
7817 | $this->currPos = $p7; |
7818 | $r4 = self::$FAILED; |
7819 | goto seq_1; |
7820 | } |
7821 | $r4 = true; |
7822 | seq_1: |
7823 | if ($r4!==self::$FAILED) { |
7824 | $this->savedPos = $p5; |
7825 | $r4 = $this->a42($r9); |
7826 | } |
7827 | // free $p7 |
7828 | choice_1: |
7829 | if ($r4!==self::$FAILED) { |
7830 | $r3[] = $r4; |
7831 | } else { |
7832 | break; |
7833 | } |
7834 | } |
7835 | // r <- $r3 |
7836 | // free $r4 |
7837 | $r1 = $r3; |
7838 | if ($r1!==self::$FAILED) { |
7839 | $this->savedPos = $p2; |
7840 | $r1 = $this->a59($r3); |
7841 | } |
7842 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
7843 | $this->currPos, |
7844 | $r1, |
7845 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
7846 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
7847 | ); |
7848 | return $r1; |
7849 | }, "table_attribute_preprocessor_text_double", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
7850 | |
7851 | } |
7852 | private function parsetable_attribute_preprocessor_text($silence, $boolParams, &$param_preproc, &$param_th) { |
7853 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
7854 | $key = json_encode([548, $boolParams & 0x1fff, $param_preproc, $param_th]); |
7855 | $bucket = $this->currPos; |
7856 | $cached = $this->cache[$bucket][$key] ?? null; |
7857 | if ($cached) { |
7858 | $this->currPos = $cached->nextPos; |
7859 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
7860 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
7861 | return $cached->result; |
7862 | } |
7863 | $saved_preproc=$param_preproc; |
7864 | $saved_th=$param_th; |
7865 | $p2 = $this->currPos; |
7866 | $r3 = []; |
7867 | for (;;) { |
7868 | // start choice_1 |
7869 | $p5 = $this->currPos; |
7870 | $r4 = self::$FAILED; |
7871 | for (;;) { |
7872 | if (strcspn($this->input, "{}&<-![ \x09\x0a\x0d\x0c|", $this->currPos, 1) !== 0) { |
7873 | $r6 = self::consumeChar($this->input, $this->currPos); |
7874 | $r4 = true; |
7875 | } else { |
7876 | $r6 = self::$FAILED; |
7877 | if (!$silence) {$this->fail(47);} |
7878 | break; |
7879 | } |
7880 | } |
7881 | if ($r4!==self::$FAILED) { |
7882 | $r4 = substr($this->input, $p5, $this->currPos - $p5); |
7883 | goto choice_1; |
7884 | } else { |
7885 | $r4 = self::$FAILED; |
7886 | } |
7887 | // free $r6 |
7888 | // free $p5 |
7889 | $p5 = $this->currPos; |
7890 | // start seq_1 |
7891 | $p7 = $this->currPos; |
7892 | $p8 = $this->currPos; |
7893 | $r6 = $this->discardinline_breaks(true, $boolParams, $param_preproc, $param_th); |
7894 | if ($r6 === self::$FAILED) { |
7895 | $r6 = false; |
7896 | } else { |
7897 | $r6 = self::$FAILED; |
7898 | $this->currPos = $p8; |
7899 | $r4 = self::$FAILED; |
7900 | goto seq_1; |
7901 | } |
7902 | // free $p8 |
7903 | // start choice_2 |
7904 | $r9 = $this->parsedirective($silence, $boolParams, $param_preproc, $param_th); |
7905 | if ($r9!==self::$FAILED) { |
7906 | goto choice_2; |
7907 | } |
7908 | if (strspn($this->input, "{}&<-![", $this->currPos, 1) !== 0) { |
7909 | $r9 = $this->input[$this->currPos++]; |
7910 | } else { |
7911 | $r9 = self::$FAILED; |
7912 | if (!$silence) {$this->fail(45);} |
7913 | } |
7914 | choice_2: |
7915 | // s <- $r9 |
7916 | if ($r9===self::$FAILED) { |
7917 | $this->currPos = $p7; |
7918 | $r4 = self::$FAILED; |
7919 | goto seq_1; |
7920 | } |
7921 | $r4 = true; |
7922 | seq_1: |
7923 | if ($r4!==self::$FAILED) { |
7924 | $this->savedPos = $p5; |
7925 | $r4 = $this->a42($r9); |
7926 | } |
7927 | // free $p7 |
7928 | choice_1: |
7929 | if ($r4!==self::$FAILED) { |
7930 | $r3[] = $r4; |
7931 | } else { |
7932 | break; |
7933 | } |
7934 | } |
7935 | if (count($r3) === 0) { |
7936 | $r3 = self::$FAILED; |
7937 | } |
7938 | // r <- $r3 |
7939 | // free $r4 |
7940 | $r1 = $r3; |
7941 | if ($r1!==self::$FAILED) { |
7942 | $this->savedPos = $p2; |
7943 | $r1 = $this->a59($r3); |
7944 | } |
7945 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
7946 | $this->currPos, |
7947 | $r1, |
7948 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
7949 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
7950 | ); |
7951 | return $r1; |
7952 | }, "table_attribute_preprocessor_text", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
7953 | |
7954 | } |
7955 | private function parseless_than($silence, $boolParams) { |
7956 | return $this->traceCall(function($silence, $boolParams) { |
7957 | $key = json_encode([464, $boolParams & 0x2]); |
7958 | $bucket = $this->currPos; |
7959 | $cached = $this->cache[$bucket][$key] ?? null; |
7960 | if ($cached) { |
7961 | $this->currPos = $cached->nextPos; |
7962 | |
7963 | return $cached->result; |
7964 | } |
7965 | |
7966 | $p1 = $this->currPos; |
7967 | // start seq_1 |
7968 | $p3 = $this->currPos; |
7969 | if (/*annOrExtTag*/($boolParams & 0x2) !== 0) { |
7970 | $r4 = false; |
7971 | } else { |
7972 | $r4 = self::$FAILED; |
7973 | $r2 = self::$FAILED; |
7974 | goto seq_1; |
7975 | } |
7976 | if (($this->input[$this->currPos] ?? null) === "<") { |
7977 | $this->currPos++; |
7978 | $r5 = "<"; |
7979 | } else { |
7980 | if (!$silence) {$this->fail(48);} |
7981 | $r5 = self::$FAILED; |
7982 | $this->currPos = $p3; |
7983 | $r2 = self::$FAILED; |
7984 | goto seq_1; |
7985 | } |
7986 | $r2 = true; |
7987 | seq_1: |
7988 | if ($r2!==self::$FAILED) { |
7989 | $r2 = substr($this->input, $p1, $this->currPos - $p1); |
7990 | } else { |
7991 | $r2 = self::$FAILED; |
7992 | } |
7993 | // free $p3 |
7994 | // free $p1 |
7995 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
7996 | $this->currPos, |
7997 | $r2, |
7998 | self::$UNDEFINED, |
7999 | self::$UNDEFINED |
8000 | ); |
8001 | return $r2; |
8002 | }, "less_than", ["\$silence", "\$boolParams"], [$silence, $boolParams]); |
8003 | |
8004 | } |
8005 | private function parseattribute_preprocessor_text_single($silence, $boolParams, &$param_preproc, &$param_th) { |
8006 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
8007 | $key = json_encode([544, $boolParams & 0x1fff, $param_preproc, $param_th]); |
8008 | $bucket = $this->currPos; |
8009 | $cached = $this->cache[$bucket][$key] ?? null; |
8010 | if ($cached) { |
8011 | $this->currPos = $cached->nextPos; |
8012 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
8013 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
8014 | return $cached->result; |
8015 | } |
8016 | $saved_preproc=$param_preproc; |
8017 | $saved_th=$param_th; |
8018 | $p2 = $this->currPos; |
8019 | $r3 = []; |
8020 | for (;;) { |
8021 | // start choice_1 |
8022 | $p5 = $this->currPos; |
8023 | $r4 = self::$FAILED; |
8024 | for (;;) { |
8025 | if (strcspn($this->input, "{}&<-|/'>", $this->currPos, 1) !== 0) { |
8026 | $r6 = self::consumeChar($this->input, $this->currPos); |
8027 | $r4 = true; |
8028 | } else { |
8029 | $r6 = self::$FAILED; |
8030 | if (!$silence) {$this->fail(49);} |
8031 | break; |
8032 | } |
8033 | } |
8034 | if ($r4!==self::$FAILED) { |
8035 | $r4 = substr($this->input, $p5, $this->currPos - $p5); |
8036 | goto choice_1; |
8037 | } else { |
8038 | $r4 = self::$FAILED; |
8039 | } |
8040 | // free $r6 |
8041 | // free $p5 |
8042 | $p5 = $this->currPos; |
8043 | // start seq_1 |
8044 | $p7 = $this->currPos; |
8045 | $p8 = $this->currPos; |
8046 | $r6 = $this->discardinline_breaks(true, $boolParams, $param_preproc, $param_th); |
8047 | if ($r6 === self::$FAILED) { |
8048 | $r6 = false; |
8049 | } else { |
8050 | $r6 = self::$FAILED; |
8051 | $this->currPos = $p8; |
8052 | $r4 = self::$FAILED; |
8053 | goto seq_1; |
8054 | } |
8055 | // free $p8 |
8056 | $p8 = $this->currPos; |
8057 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "/>", $this->currPos, 2, false) === 0) { |
8058 | $r9 = "/>"; |
8059 | $this->currPos += 2; |
8060 | } else { |
8061 | $r9 = self::$FAILED; |
8062 | } |
8063 | if ($r9 === self::$FAILED) { |
8064 | $r9 = false; |
8065 | } else { |
8066 | $r9 = self::$FAILED; |
8067 | $this->currPos = $p8; |
8068 | $this->currPos = $p7; |
8069 | $r4 = self::$FAILED; |
8070 | goto seq_1; |
8071 | } |
8072 | // free $p8 |
8073 | // start choice_2 |
8074 | $r10 = $this->parsedirective($silence, $boolParams, $param_preproc, $param_th); |
8075 | if ($r10!==self::$FAILED) { |
8076 | goto choice_2; |
8077 | } |
8078 | $r10 = $this->parseless_than($silence, $boolParams); |
8079 | if ($r10!==self::$FAILED) { |
8080 | goto choice_2; |
8081 | } |
8082 | if (strspn($this->input, "{}&-|/", $this->currPos, 1) !== 0) { |
8083 | $r10 = $this->input[$this->currPos++]; |
8084 | } else { |
8085 | $r10 = self::$FAILED; |
8086 | if (!$silence) {$this->fail(50);} |
8087 | } |
8088 | choice_2: |
8089 | // s <- $r10 |
8090 | if ($r10===self::$FAILED) { |
8091 | $this->currPos = $p7; |
8092 | $r4 = self::$FAILED; |
8093 | goto seq_1; |
8094 | } |
8095 | $r4 = true; |
8096 | seq_1: |
8097 | if ($r4!==self::$FAILED) { |
8098 | $this->savedPos = $p5; |
8099 | $r4 = $this->a42($r10); |
8100 | } |
8101 | // free $p7 |
8102 | choice_1: |
8103 | if ($r4!==self::$FAILED) { |
8104 | $r3[] = $r4; |
8105 | } else { |
8106 | break; |
8107 | } |
8108 | } |
8109 | // r <- $r3 |
8110 | // free $r4 |
8111 | $r1 = $r3; |
8112 | if ($r1!==self::$FAILED) { |
8113 | $this->savedPos = $p2; |
8114 | $r1 = $this->a59($r3); |
8115 | } |
8116 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
8117 | $this->currPos, |
8118 | $r1, |
8119 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
8120 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
8121 | ); |
8122 | return $r1; |
8123 | }, "attribute_preprocessor_text_single", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
8124 | |
8125 | } |
8126 | private function parseattribute_preprocessor_text_double($silence, $boolParams, &$param_preproc, &$param_th) { |
8127 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
8128 | $key = json_encode([546, $boolParams & 0x1fff, $param_preproc, $param_th]); |
8129 | $bucket = $this->currPos; |
8130 | $cached = $this->cache[$bucket][$key] ?? null; |
8131 | if ($cached) { |
8132 | $this->currPos = $cached->nextPos; |
8133 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
8134 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
8135 | return $cached->result; |
8136 | } |
8137 | $saved_preproc=$param_preproc; |
8138 | $saved_th=$param_th; |
8139 | $p2 = $this->currPos; |
8140 | $r3 = []; |
8141 | for (;;) { |
8142 | // start choice_1 |
8143 | $p5 = $this->currPos; |
8144 | $r4 = self::$FAILED; |
8145 | for (;;) { |
8146 | if (strcspn($this->input, "{}&<-|/\">", $this->currPos, 1) !== 0) { |
8147 | $r6 = self::consumeChar($this->input, $this->currPos); |
8148 | $r4 = true; |
8149 | } else { |
8150 | $r6 = self::$FAILED; |
8151 | if (!$silence) {$this->fail(51);} |
8152 | break; |
8153 | } |
8154 | } |
8155 | if ($r4!==self::$FAILED) { |
8156 | $r4 = substr($this->input, $p5, $this->currPos - $p5); |
8157 | goto choice_1; |
8158 | } else { |
8159 | $r4 = self::$FAILED; |
8160 | } |
8161 | // free $r6 |
8162 | // free $p5 |
8163 | $p5 = $this->currPos; |
8164 | // start seq_1 |
8165 | $p7 = $this->currPos; |
8166 | $p8 = $this->currPos; |
8167 | $r6 = $this->discardinline_breaks(true, $boolParams, $param_preproc, $param_th); |
8168 | if ($r6 === self::$FAILED) { |
8169 | $r6 = false; |
8170 | } else { |
8171 | $r6 = self::$FAILED; |
8172 | $this->currPos = $p8; |
8173 | $r4 = self::$FAILED; |
8174 | goto seq_1; |
8175 | } |
8176 | // free $p8 |
8177 | $p8 = $this->currPos; |
8178 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "/>", $this->currPos, 2, false) === 0) { |
8179 | $r9 = "/>"; |
8180 | $this->currPos += 2; |
8181 | } else { |
8182 | $r9 = self::$FAILED; |
8183 | } |
8184 | if ($r9 === self::$FAILED) { |
8185 | $r9 = false; |
8186 | } else { |
8187 | $r9 = self::$FAILED; |
8188 | $this->currPos = $p8; |
8189 | $this->currPos = $p7; |
8190 | $r4 = self::$FAILED; |
8191 | goto seq_1; |
8192 | } |
8193 | // free $p8 |
8194 | // start choice_2 |
8195 | $r10 = $this->parsedirective($silence, $boolParams, $param_preproc, $param_th); |
8196 | if ($r10!==self::$FAILED) { |
8197 | goto choice_2; |
8198 | } |
8199 | $r10 = $this->parseless_than($silence, $boolParams); |
8200 | if ($r10!==self::$FAILED) { |
8201 | goto choice_2; |
8202 | } |
8203 | if (strspn($this->input, "{}&-|/", $this->currPos, 1) !== 0) { |
8204 | $r10 = $this->input[$this->currPos++]; |
8205 | } else { |
8206 | $r10 = self::$FAILED; |
8207 | if (!$silence) {$this->fail(50);} |
8208 | } |
8209 | choice_2: |
8210 | // s <- $r10 |
8211 | if ($r10===self::$FAILED) { |
8212 | $this->currPos = $p7; |
8213 | $r4 = self::$FAILED; |
8214 | goto seq_1; |
8215 | } |
8216 | $r4 = true; |
8217 | seq_1: |
8218 | if ($r4!==self::$FAILED) { |
8219 | $this->savedPos = $p5; |
8220 | $r4 = $this->a42($r10); |
8221 | } |
8222 | // free $p7 |
8223 | choice_1: |
8224 | if ($r4!==self::$FAILED) { |
8225 | $r3[] = $r4; |
8226 | } else { |
8227 | break; |
8228 | } |
8229 | } |
8230 | // r <- $r3 |
8231 | // free $r4 |
8232 | $r1 = $r3; |
8233 | if ($r1!==self::$FAILED) { |
8234 | $this->savedPos = $p2; |
8235 | $r1 = $this->a59($r3); |
8236 | } |
8237 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
8238 | $this->currPos, |
8239 | $r1, |
8240 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
8241 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
8242 | ); |
8243 | return $r1; |
8244 | }, "attribute_preprocessor_text_double", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
8245 | |
8246 | } |
8247 | private function parseattribute_preprocessor_text($silence, $boolParams, &$param_preproc, &$param_th) { |
8248 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
8249 | $key = json_encode([542, $boolParams & 0x1fff, $param_preproc, $param_th]); |
8250 | $bucket = $this->currPos; |
8251 | $cached = $this->cache[$bucket][$key] ?? null; |
8252 | if ($cached) { |
8253 | $this->currPos = $cached->nextPos; |
8254 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
8255 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
8256 | return $cached->result; |
8257 | } |
8258 | $saved_preproc=$param_preproc; |
8259 | $saved_th=$param_th; |
8260 | $p2 = $this->currPos; |
8261 | $r3 = []; |
8262 | for (;;) { |
8263 | // start choice_1 |
8264 | $p5 = $this->currPos; |
8265 | $r4 = self::$FAILED; |
8266 | for (;;) { |
8267 | if (strcspn($this->input, "{}&<-|/ \x09\x0a\x0d\x0c>", $this->currPos, 1) !== 0) { |
8268 | $r6 = self::consumeChar($this->input, $this->currPos); |
8269 | $r4 = true; |
8270 | } else { |
8271 | $r6 = self::$FAILED; |
8272 | if (!$silence) {$this->fail(52);} |
8273 | break; |
8274 | } |
8275 | } |
8276 | if ($r4!==self::$FAILED) { |
8277 | $r4 = substr($this->input, $p5, $this->currPos - $p5); |
8278 | goto choice_1; |
8279 | } else { |
8280 | $r4 = self::$FAILED; |
8281 | } |
8282 | // free $r6 |
8283 | // free $p5 |
8284 | $p5 = $this->currPos; |
8285 | // start seq_1 |
8286 | $p7 = $this->currPos; |
8287 | $p8 = $this->currPos; |
8288 | $r6 = $this->discardinline_breaks(true, $boolParams, $param_preproc, $param_th); |
8289 | if ($r6 === self::$FAILED) { |
8290 | $r6 = false; |
8291 | } else { |
8292 | $r6 = self::$FAILED; |
8293 | $this->currPos = $p8; |
8294 | $r4 = self::$FAILED; |
8295 | goto seq_1; |
8296 | } |
8297 | // free $p8 |
8298 | $p8 = $this->currPos; |
8299 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "/>", $this->currPos, 2, false) === 0) { |
8300 | $r9 = "/>"; |
8301 | $this->currPos += 2; |
8302 | } else { |
8303 | $r9 = self::$FAILED; |
8304 | } |
8305 | if ($r9 === self::$FAILED) { |
8306 | $r9 = false; |
8307 | } else { |
8308 | $r9 = self::$FAILED; |
8309 | $this->currPos = $p8; |
8310 | $this->currPos = $p7; |
8311 | $r4 = self::$FAILED; |
8312 | goto seq_1; |
8313 | } |
8314 | // free $p8 |
8315 | // start choice_2 |
8316 | $r10 = $this->parsedirective($silence, $boolParams, $param_preproc, $param_th); |
8317 | if ($r10!==self::$FAILED) { |
8318 | goto choice_2; |
8319 | } |
8320 | $r10 = $this->parseless_than($silence, $boolParams); |
8321 | if ($r10!==self::$FAILED) { |
8322 | goto choice_2; |
8323 | } |
8324 | if (strspn($this->input, "{}&-|/", $this->currPos, 1) !== 0) { |
8325 | $r10 = $this->input[$this->currPos++]; |
8326 | } else { |
8327 | $r10 = self::$FAILED; |
8328 | if (!$silence) {$this->fail(50);} |
8329 | } |
8330 | choice_2: |
8331 | // s <- $r10 |
8332 | if ($r10===self::$FAILED) { |
8333 | $this->currPos = $p7; |
8334 | $r4 = self::$FAILED; |
8335 | goto seq_1; |
8336 | } |
8337 | $r4 = true; |
8338 | seq_1: |
8339 | if ($r4!==self::$FAILED) { |
8340 | $this->savedPos = $p5; |
8341 | $r4 = $this->a42($r10); |
8342 | } |
8343 | // free $p7 |
8344 | choice_1: |
8345 | if ($r4!==self::$FAILED) { |
8346 | $r3[] = $r4; |
8347 | } else { |
8348 | break; |
8349 | } |
8350 | } |
8351 | if (count($r3) === 0) { |
8352 | $r3 = self::$FAILED; |
8353 | } |
8354 | // r <- $r3 |
8355 | // free $r4 |
8356 | $r1 = $r3; |
8357 | if ($r1!==self::$FAILED) { |
8358 | $this->savedPos = $p2; |
8359 | $r1 = $this->a59($r3); |
8360 | } |
8361 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
8362 | $this->currPos, |
8363 | $r1, |
8364 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
8365 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
8366 | ); |
8367 | return $r1; |
8368 | }, "attribute_preprocessor_text", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
8369 | |
8370 | } |
8371 | private function parseautolink($silence, $boolParams, &$param_preproc, &$param_th) { |
8372 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
8373 | $key = json_encode([342, $boolParams & 0x1fff, $param_preproc, $param_th]); |
8374 | $bucket = $this->currPos; |
8375 | $cached = $this->cache[$bucket][$key] ?? null; |
8376 | if ($cached) { |
8377 | $this->currPos = $cached->nextPos; |
8378 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
8379 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
8380 | return $cached->result; |
8381 | } |
8382 | $saved_preproc=$param_preproc; |
8383 | $saved_th=$param_th; |
8384 | $p2 = $this->currPos; |
8385 | // start seq_1 |
8386 | $p3 = $this->currPos; |
8387 | if (!(/*extlink*/($boolParams & 0x8) !== 0)) { |
8388 | $r4 = false; |
8389 | } else { |
8390 | $r4 = self::$FAILED; |
8391 | $r1 = self::$FAILED; |
8392 | goto seq_1; |
8393 | } |
8394 | $this->savedPos = $this->currPos; |
8395 | $r5 = $this->a79(); |
8396 | if (!$r5) { |
8397 | $r5 = false; |
8398 | } else { |
8399 | $r5 = self::$FAILED; |
8400 | $this->currPos = $p3; |
8401 | $r1 = self::$FAILED; |
8402 | goto seq_1; |
8403 | } |
8404 | // start choice_1 |
8405 | $r6 = $this->parseautourl($silence, $boolParams, $param_preproc, $param_th); |
8406 | if ($r6!==self::$FAILED) { |
8407 | goto choice_1; |
8408 | } |
8409 | $r6 = $this->parseautoref($silence); |
8410 | if ($r6!==self::$FAILED) { |
8411 | goto choice_1; |
8412 | } |
8413 | $r6 = $this->parseisbn($silence); |
8414 | choice_1: |
8415 | // r <- $r6 |
8416 | if ($r6===self::$FAILED) { |
8417 | $this->currPos = $p3; |
8418 | $r1 = self::$FAILED; |
8419 | goto seq_1; |
8420 | } |
8421 | $r1 = true; |
8422 | seq_1: |
8423 | if ($r1!==self::$FAILED) { |
8424 | $this->savedPos = $p2; |
8425 | $r1 = $this->a24($r6); |
8426 | } |
8427 | // free $p3 |
8428 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
8429 | $this->currPos, |
8430 | $r1, |
8431 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
8432 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
8433 | ); |
8434 | return $r1; |
8435 | }, "autolink", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
8436 | |
8437 | } |
8438 | private function parsebehavior_switch($silence) { |
8439 | return $this->traceCall(function($silence) { |
8440 | $key = 338; |
8441 | $bucket = $this->currPos; |
8442 | $cached = $this->cache[$bucket][$key] ?? null; |
8443 | if ($cached) { |
8444 | $this->currPos = $cached->nextPos; |
8445 | |
8446 | return $cached->result; |
8447 | } |
8448 | |
8449 | $p2 = $this->currPos; |
8450 | $p4 = $this->currPos; |
8451 | // start seq_1 |
8452 | $p5 = $this->currPos; |
8453 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "__", $this->currPos, 2, false) === 0) { |
8454 | $r6 = "__"; |
8455 | $this->currPos += 2; |
8456 | } else { |
8457 | if (!$silence) {$this->fail(53);} |
8458 | $r6 = self::$FAILED; |
8459 | $r3 = self::$FAILED; |
8460 | goto seq_1; |
8461 | } |
8462 | $r7 = $this->discardbehavior_text($silence); |
8463 | if ($r7===self::$FAILED) { |
8464 | $this->currPos = $p5; |
8465 | $r3 = self::$FAILED; |
8466 | goto seq_1; |
8467 | } |
8468 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "__", $this->currPos, 2, false) === 0) { |
8469 | $r8 = "__"; |
8470 | $this->currPos += 2; |
8471 | } else { |
8472 | if (!$silence) {$this->fail(53);} |
8473 | $r8 = self::$FAILED; |
8474 | $this->currPos = $p5; |
8475 | $r3 = self::$FAILED; |
8476 | goto seq_1; |
8477 | } |
8478 | $r3 = true; |
8479 | seq_1: |
8480 | // bs <- $r3 |
8481 | if ($r3!==self::$FAILED) { |
8482 | $r3 = substr($this->input, $p4, $this->currPos - $p4); |
8483 | } else { |
8484 | $r3 = self::$FAILED; |
8485 | } |
8486 | // free $p5 |
8487 | // free $p4 |
8488 | $r1 = $r3; |
8489 | if ($r1!==self::$FAILED) { |
8490 | $this->savedPos = $p2; |
8491 | $r1 = $this->a80($r3); |
8492 | } |
8493 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
8494 | $this->currPos, |
8495 | $r1, |
8496 | self::$UNDEFINED, |
8497 | self::$UNDEFINED |
8498 | ); |
8499 | return $r1; |
8500 | }, "behavior_switch", ["\$silence"], [$silence]); |
8501 | |
8502 | } |
8503 | private function parsetext_char($silence) { |
8504 | return $this->traceCall(function($silence) { |
8505 | $key = 522; |
8506 | $bucket = $this->currPos; |
8507 | $cached = $this->cache[$bucket][$key] ?? null; |
8508 | if ($cached) { |
8509 | $this->currPos = $cached->nextPos; |
8510 | |
8511 | return $cached->result; |
8512 | } |
8513 | |
8514 | if (strcspn($this->input, "-'<[{\x0a\x0d:;]}|!=", $this->currPos, 1) !== 0) { |
8515 | $r1 = self::consumeChar($this->input, $this->currPos); |
8516 | } else { |
8517 | $r1 = self::$FAILED; |
8518 | if (!$silence) {$this->fail(54);} |
8519 | } |
8520 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
8521 | $this->currPos, |
8522 | $r1, |
8523 | self::$UNDEFINED, |
8524 | self::$UNDEFINED |
8525 | ); |
8526 | return $r1; |
8527 | }, "text_char", ["\$silence"], [$silence]); |
8528 | |
8529 | } |
8530 | private function parseangle_bracket_markup($silence, $boolParams, &$param_preproc, &$param_th) { |
8531 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
8532 | $key = json_encode([332, $boolParams & 0x1ebf, $param_preproc, $param_th]); |
8533 | $bucket = $this->currPos; |
8534 | $cached = $this->cache[$bucket][$key] ?? null; |
8535 | if ($cached) { |
8536 | $this->currPos = $cached->nextPos; |
8537 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
8538 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
8539 | return $cached->result; |
8540 | } |
8541 | $saved_preproc=$param_preproc; |
8542 | $saved_th=$param_th; |
8543 | // start choice_1 |
8544 | $r1 = $this->parseannotation_tag($silence, $boolParams, $param_preproc, $param_th); |
8545 | if ($r1!==self::$FAILED) { |
8546 | goto choice_1; |
8547 | } |
8548 | $r1 = $this->parsemaybe_extension_tag($silence, $boolParams, $param_preproc, $param_th); |
8549 | if ($r1!==self::$FAILED) { |
8550 | goto choice_1; |
8551 | } |
8552 | $r1 = $this->parseinclude_limits($silence, $boolParams, $param_preproc, $param_th); |
8553 | if ($r1!==self::$FAILED) { |
8554 | goto choice_1; |
8555 | } |
8556 | $r1 = $this->parsehtml_tag($silence, $boolParams, $param_preproc, $param_th); |
8557 | if ($r1!==self::$FAILED) { |
8558 | goto choice_1; |
8559 | } |
8560 | $r1 = $this->parsecomment($silence); |
8561 | choice_1: |
8562 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
8563 | $this->currPos, |
8564 | $r1, |
8565 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
8566 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
8567 | ); |
8568 | return $r1; |
8569 | }, "angle_bracket_markup", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
8570 | |
8571 | } |
8572 | private function parselang_variant_or_tpl($silence, $boolParams, &$param_th, &$param_preproc) { |
8573 | return $this->traceCall(function($silence, $boolParams, &$param_th, &$param_preproc) { |
8574 | $key = json_encode([390, $boolParams & 0x1fff, $param_th, $param_preproc]); |
8575 | $bucket = $this->currPos; |
8576 | $cached = $this->cache[$bucket][$key] ?? null; |
8577 | if ($cached) { |
8578 | $this->currPos = $cached->nextPos; |
8579 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
8580 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
8581 | return $cached->result; |
8582 | } |
8583 | $saved_th=$param_th; |
8584 | $saved_preproc=$param_preproc; |
8585 | // start choice_1 |
8586 | $p2 = $this->currPos; |
8587 | // start seq_1 |
8588 | $p3 = $this->currPos; |
8589 | $p4 = $this->currPos; |
8590 | // start seq_2 |
8591 | $p6 = $this->currPos; |
8592 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "-{", $this->currPos, 2, false) === 0) { |
8593 | $r7 = "-{"; |
8594 | $this->currPos += 2; |
8595 | } else { |
8596 | $r7 = self::$FAILED; |
8597 | $r5 = self::$FAILED; |
8598 | goto seq_2; |
8599 | } |
8600 | $p8 = $this->currPos; |
8601 | // start seq_3 |
8602 | $p10 = $this->currPos; |
8603 | $r11 = self::$FAILED; |
8604 | for (;;) { |
8605 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "{{{", $this->currPos, 3, false) === 0) { |
8606 | $r12 = "{{{"; |
8607 | $this->currPos += 3; |
8608 | $r11 = true; |
8609 | } else { |
8610 | $r12 = self::$FAILED; |
8611 | break; |
8612 | } |
8613 | } |
8614 | if ($r11===self::$FAILED) { |
8615 | $r9 = self::$FAILED; |
8616 | goto seq_3; |
8617 | } |
8618 | // free $r12 |
8619 | $p13 = $this->currPos; |
8620 | if (($this->input[$this->currPos] ?? null) === "{") { |
8621 | $this->currPos++; |
8622 | $r12 = "{"; |
8623 | } else { |
8624 | $r12 = self::$FAILED; |
8625 | } |
8626 | if ($r12 === self::$FAILED) { |
8627 | $r12 = false; |
8628 | } else { |
8629 | $r12 = self::$FAILED; |
8630 | $this->currPos = $p13; |
8631 | $this->currPos = $p10; |
8632 | $r9 = self::$FAILED; |
8633 | goto seq_3; |
8634 | } |
8635 | // free $p13 |
8636 | $r9 = true; |
8637 | seq_3: |
8638 | if ($r9!==self::$FAILED) { |
8639 | $r9 = false; |
8640 | $this->currPos = $p8; |
8641 | } else { |
8642 | $this->currPos = $p6; |
8643 | $r5 = self::$FAILED; |
8644 | goto seq_2; |
8645 | } |
8646 | // free $p10 |
8647 | // free $p8 |
8648 | $r14 = $this->discardtplarg(true, $boolParams, $param_th); |
8649 | if ($r14===self::$FAILED) { |
8650 | $this->currPos = $p6; |
8651 | $r5 = self::$FAILED; |
8652 | goto seq_2; |
8653 | } |
8654 | $r5 = true; |
8655 | seq_2: |
8656 | if ($r5!==self::$FAILED) { |
8657 | $r5 = false; |
8658 | $this->currPos = $p4; |
8659 | } else { |
8660 | $r1 = self::$FAILED; |
8661 | goto seq_1; |
8662 | } |
8663 | // free $p6 |
8664 | // free $p4 |
8665 | $r15 = $this->parselang_variant($silence, $boolParams, $param_th, $param_preproc); |
8666 | // a <- $r15 |
8667 | if ($r15===self::$FAILED) { |
8668 | $this->currPos = $p3; |
8669 | $r1 = self::$FAILED; |
8670 | goto seq_1; |
8671 | } |
8672 | $r1 = true; |
8673 | seq_1: |
8674 | if ($r1!==self::$FAILED) { |
8675 | $this->savedPos = $p2; |
8676 | $r1 = $this->a50($r15); |
8677 | goto choice_1; |
8678 | } |
8679 | // free $p3 |
8680 | $p3 = $this->currPos; |
8681 | // start seq_4 |
8682 | $p4 = $this->currPos; |
8683 | $p6 = $this->currPos; |
8684 | // start seq_5 |
8685 | $p8 = $this->currPos; |
8686 | if (($this->input[$this->currPos] ?? null) === "-") { |
8687 | $this->currPos++; |
8688 | $r17 = "-"; |
8689 | } else { |
8690 | if (!$silence) {$this->fail(55);} |
8691 | $r17 = self::$FAILED; |
8692 | $r16 = self::$FAILED; |
8693 | goto seq_5; |
8694 | } |
8695 | $p10 = $this->currPos; |
8696 | // start seq_6 |
8697 | $p13 = $this->currPos; |
8698 | $r19 = self::$FAILED; |
8699 | for (;;) { |
8700 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "{{{", $this->currPos, 3, false) === 0) { |
8701 | $r20 = "{{{"; |
8702 | $this->currPos += 3; |
8703 | $r19 = true; |
8704 | } else { |
8705 | $r20 = self::$FAILED; |
8706 | break; |
8707 | } |
8708 | } |
8709 | if ($r19===self::$FAILED) { |
8710 | $r18 = self::$FAILED; |
8711 | goto seq_6; |
8712 | } |
8713 | // free $r20 |
8714 | $p21 = $this->currPos; |
8715 | if (($this->input[$this->currPos] ?? null) === "{") { |
8716 | $this->currPos++; |
8717 | $r20 = "{"; |
8718 | } else { |
8719 | $r20 = self::$FAILED; |
8720 | } |
8721 | if ($r20 === self::$FAILED) { |
8722 | $r20 = false; |
8723 | } else { |
8724 | $r20 = self::$FAILED; |
8725 | $this->currPos = $p21; |
8726 | $this->currPos = $p13; |
8727 | $r18 = self::$FAILED; |
8728 | goto seq_6; |
8729 | } |
8730 | // free $p21 |
8731 | $r18 = true; |
8732 | seq_6: |
8733 | if ($r18!==self::$FAILED) { |
8734 | $r18 = false; |
8735 | $this->currPos = $p10; |
8736 | } else { |
8737 | $this->currPos = $p8; |
8738 | $r16 = self::$FAILED; |
8739 | goto seq_5; |
8740 | } |
8741 | // free $p13 |
8742 | // free $p10 |
8743 | $r16 = true; |
8744 | seq_5: |
8745 | // a <- $r16 |
8746 | if ($r16!==self::$FAILED) { |
8747 | $r16 = substr($this->input, $p6, $this->currPos - $p6); |
8748 | } else { |
8749 | $r16 = self::$FAILED; |
8750 | $r1 = self::$FAILED; |
8751 | goto seq_4; |
8752 | } |
8753 | // free $p8 |
8754 | // free $p6 |
8755 | $r22 = $this->parsetplarg($silence, $boolParams, $param_th); |
8756 | // b <- $r22 |
8757 | if ($r22===self::$FAILED) { |
8758 | $this->currPos = $p4; |
8759 | $r1 = self::$FAILED; |
8760 | goto seq_4; |
8761 | } |
8762 | $r1 = true; |
8763 | seq_4: |
8764 | if ($r1!==self::$FAILED) { |
8765 | $this->savedPos = $p3; |
8766 | $r1 = $this->a51($r16, $r22); |
8767 | goto choice_1; |
8768 | } |
8769 | // free $p4 |
8770 | $p4 = $this->currPos; |
8771 | // start seq_7 |
8772 | $p6 = $this->currPos; |
8773 | $p8 = $this->currPos; |
8774 | // start seq_8 |
8775 | $p10 = $this->currPos; |
8776 | if (($this->input[$this->currPos] ?? null) === "-") { |
8777 | $this->currPos++; |
8778 | $r24 = "-"; |
8779 | } else { |
8780 | if (!$silence) {$this->fail(55);} |
8781 | $r24 = self::$FAILED; |
8782 | $r23 = self::$FAILED; |
8783 | goto seq_8; |
8784 | } |
8785 | $p13 = $this->currPos; |
8786 | // start seq_9 |
8787 | $p21 = $this->currPos; |
8788 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "{{", $this->currPos, 2, false) === 0) { |
8789 | $r26 = "{{"; |
8790 | $this->currPos += 2; |
8791 | } else { |
8792 | $r26 = self::$FAILED; |
8793 | $r25 = self::$FAILED; |
8794 | goto seq_9; |
8795 | } |
8796 | for (;;) { |
8797 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "{{{", $this->currPos, 3, false) === 0) { |
8798 | $r28 = "{{{"; |
8799 | $this->currPos += 3; |
8800 | } else { |
8801 | $r28 = self::$FAILED; |
8802 | break; |
8803 | } |
8804 | } |
8805 | // free $r28 |
8806 | $r27 = true; |
8807 | if ($r27===self::$FAILED) { |
8808 | $this->currPos = $p21; |
8809 | $r25 = self::$FAILED; |
8810 | goto seq_9; |
8811 | } |
8812 | // free $r27 |
8813 | $p29 = $this->currPos; |
8814 | if (($this->input[$this->currPos] ?? null) === "{") { |
8815 | $this->currPos++; |
8816 | $r27 = "{"; |
8817 | } else { |
8818 | $r27 = self::$FAILED; |
8819 | } |
8820 | if ($r27 === self::$FAILED) { |
8821 | $r27 = false; |
8822 | } else { |
8823 | $r27 = self::$FAILED; |
8824 | $this->currPos = $p29; |
8825 | $this->currPos = $p21; |
8826 | $r25 = self::$FAILED; |
8827 | goto seq_9; |
8828 | } |
8829 | // free $p29 |
8830 | $r25 = true; |
8831 | seq_9: |
8832 | if ($r25!==self::$FAILED) { |
8833 | $r25 = false; |
8834 | $this->currPos = $p13; |
8835 | } else { |
8836 | $this->currPos = $p10; |
8837 | $r23 = self::$FAILED; |
8838 | goto seq_8; |
8839 | } |
8840 | // free $p21 |
8841 | // free $p13 |
8842 | $r23 = true; |
8843 | seq_8: |
8844 | // a <- $r23 |
8845 | if ($r23!==self::$FAILED) { |
8846 | $r23 = substr($this->input, $p8, $this->currPos - $p8); |
8847 | } else { |
8848 | $r23 = self::$FAILED; |
8849 | $r1 = self::$FAILED; |
8850 | goto seq_7; |
8851 | } |
8852 | // free $p10 |
8853 | // free $p8 |
8854 | $r28 = $this->parsetemplate($silence, $boolParams, $param_th); |
8855 | // b <- $r28 |
8856 | if ($r28===self::$FAILED) { |
8857 | $this->currPos = $p6; |
8858 | $r1 = self::$FAILED; |
8859 | goto seq_7; |
8860 | } |
8861 | $r1 = true; |
8862 | seq_7: |
8863 | if ($r1!==self::$FAILED) { |
8864 | $this->savedPos = $p4; |
8865 | $r1 = $this->a51($r23, $r28); |
8866 | goto choice_1; |
8867 | } |
8868 | // free $p6 |
8869 | $p6 = $this->currPos; |
8870 | // start seq_10 |
8871 | $p8 = $this->currPos; |
8872 | $p10 = $this->currPos; |
8873 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "-{", $this->currPos, 2, false) === 0) { |
8874 | $r30 = "-{"; |
8875 | $this->currPos += 2; |
8876 | $r30 = false; |
8877 | $this->currPos = $p10; |
8878 | } else { |
8879 | $r30 = self::$FAILED; |
8880 | $r1 = self::$FAILED; |
8881 | goto seq_10; |
8882 | } |
8883 | // free $p10 |
8884 | $r31 = $this->parselang_variant($silence, $boolParams, $param_th, $param_preproc); |
8885 | // a <- $r31 |
8886 | if ($r31===self::$FAILED) { |
8887 | $this->currPos = $p8; |
8888 | $r1 = self::$FAILED; |
8889 | goto seq_10; |
8890 | } |
8891 | $r1 = true; |
8892 | seq_10: |
8893 | if ($r1!==self::$FAILED) { |
8894 | $this->savedPos = $p6; |
8895 | $r1 = $this->a50($r31); |
8896 | } |
8897 | // free $p8 |
8898 | choice_1: |
8899 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
8900 | $this->currPos, |
8901 | $r1, |
8902 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
8903 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
8904 | ); |
8905 | return $r1; |
8906 | }, "lang_variant_or_tpl", ["\$silence", "\$boolParams", "&\$param_th", "&\$param_preproc"], [$silence, $boolParams, &$param_th, &$param_preproc]); |
8907 | |
8908 | } |
8909 | private function parsewikilink($silence, $boolParams, &$param_th, &$param_preproc) { |
8910 | return $this->traceCall(function($silence, $boolParams, &$param_th, &$param_preproc) { |
8911 | $key = json_encode([422, $boolParams & 0x1fff, $param_th, $param_preproc]); |
8912 | $bucket = $this->currPos; |
8913 | $cached = $this->cache[$bucket][$key] ?? null; |
8914 | if ($cached) { |
8915 | $this->currPos = $cached->nextPos; |
8916 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
8917 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
8918 | return $cached->result; |
8919 | } |
8920 | $saved_th=$param_th; |
8921 | $saved_preproc=$param_preproc; |
8922 | // start choice_1 |
8923 | $r1 = $this->parsewikilink_preproc($silence, $boolParams, self::newRef("]]"), $param_th); |
8924 | if ($r1!==self::$FAILED) { |
8925 | goto choice_1; |
8926 | } |
8927 | $r1 = $this->parsebroken_wikilink($silence, $boolParams, $param_preproc, $param_th); |
8928 | choice_1: |
8929 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
8930 | $this->currPos, |
8931 | $r1, |
8932 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
8933 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
8934 | ); |
8935 | return $r1; |
8936 | }, "wikilink", ["\$silence", "\$boolParams", "&\$param_th", "&\$param_preproc"], [$silence, $boolParams, &$param_th, &$param_preproc]); |
8937 | |
8938 | } |
8939 | private function parsequote($silence) { |
8940 | return $this->traceCall(function($silence) { |
8941 | $key = 432; |
8942 | $bucket = $this->currPos; |
8943 | $cached = $this->cache[$bucket][$key] ?? null; |
8944 | if ($cached) { |
8945 | $this->currPos = $cached->nextPos; |
8946 | |
8947 | return $cached->result; |
8948 | } |
8949 | |
8950 | $p2 = $this->currPos; |
8951 | $p4 = $this->currPos; |
8952 | // start seq_1 |
8953 | $p5 = $this->currPos; |
8954 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "''", $this->currPos, 2, false) === 0) { |
8955 | $r6 = "''"; |
8956 | $this->currPos += 2; |
8957 | } else { |
8958 | if (!$silence) {$this->fail(56);} |
8959 | $r6 = self::$FAILED; |
8960 | $r3 = self::$FAILED; |
8961 | goto seq_1; |
8962 | } |
8963 | for (;;) { |
8964 | if (($this->input[$this->currPos] ?? null) === "'") { |
8965 | $this->currPos++; |
8966 | $r8 = "'"; |
8967 | } else { |
8968 | if (!$silence) {$this->fail(33);} |
8969 | $r8 = self::$FAILED; |
8970 | break; |
8971 | } |
8972 | } |
8973 | // free $r8 |
8974 | $r7 = true; |
8975 | if ($r7===self::$FAILED) { |
8976 | $this->currPos = $p5; |
8977 | $r3 = self::$FAILED; |
8978 | goto seq_1; |
8979 | } |
8980 | // free $r7 |
8981 | $r3 = true; |
8982 | seq_1: |
8983 | // quotes <- $r3 |
8984 | if ($r3!==self::$FAILED) { |
8985 | $r3 = substr($this->input, $p4, $this->currPos - $p4); |
8986 | } else { |
8987 | $r3 = self::$FAILED; |
8988 | } |
8989 | // free $p5 |
8990 | // free $p4 |
8991 | $r1 = $r3; |
8992 | if ($r1!==self::$FAILED) { |
8993 | $this->savedPos = $p2; |
8994 | $r1 = $this->a81($r3); |
8995 | } |
8996 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
8997 | $this->currPos, |
8998 | $r1, |
8999 | self::$UNDEFINED, |
9000 | self::$UNDEFINED |
9001 | ); |
9002 | return $r1; |
9003 | }, "quote", ["\$silence"], [$silence]); |
9004 | |
9005 | } |
9006 | private function parseinlineline_break_on_colon($silence, $boolParams, &$param_preproc, &$param_th) { |
9007 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
9008 | $key = json_encode([488, $boolParams & 0xfff, $param_preproc, $param_th]); |
9009 | $bucket = $this->currPos; |
9010 | $cached = $this->cache[$bucket][$key] ?? null; |
9011 | if ($cached) { |
9012 | $this->currPos = $cached->nextPos; |
9013 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
9014 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
9015 | return $cached->result; |
9016 | } |
9017 | $saved_preproc=$param_preproc; |
9018 | $saved_th=$param_th; |
9019 | $r1 = $this->parseinlineline($silence, $boolParams | 0x1000, $param_preproc, $param_th); |
9020 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
9021 | $this->currPos, |
9022 | $r1, |
9023 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
9024 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
9025 | ); |
9026 | return $r1; |
9027 | }, "inlineline_break_on_colon", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
9028 | |
9029 | } |
9030 | private function parsetable_content_line($silence, $boolParams, &$param_preproc, &$param_th) { |
9031 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
9032 | $key = json_encode([496, $boolParams & 0x1fff, $param_preproc, $param_th]); |
9033 | $bucket = $this->currPos; |
9034 | $cached = $this->cache[$bucket][$key] ?? null; |
9035 | if ($cached) { |
9036 | $this->currPos = $cached->nextPos; |
9037 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
9038 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
9039 | return $cached->result; |
9040 | } |
9041 | $saved_preproc=$param_preproc; |
9042 | $saved_th=$param_th; |
9043 | // start seq_1 |
9044 | $p1 = $this->currPos; |
9045 | $r3 = []; |
9046 | for (;;) { |
9047 | // start choice_1 |
9048 | $r4 = $this->parsespace($silence); |
9049 | if ($r4!==self::$FAILED) { |
9050 | goto choice_1; |
9051 | } |
9052 | $r4 = $this->parsecomment($silence); |
9053 | choice_1: |
9054 | if ($r4!==self::$FAILED) { |
9055 | $r3[] = $r4; |
9056 | } else { |
9057 | break; |
9058 | } |
9059 | } |
9060 | // free $r4 |
9061 | // start choice_2 |
9062 | $r4 = $this->parsetable_heading_tags($silence, $boolParams, $param_preproc); |
9063 | if ($r4!==self::$FAILED) { |
9064 | goto choice_2; |
9065 | } |
9066 | $r4 = $this->parsetable_row_tag($silence, $boolParams, $param_preproc, $param_th); |
9067 | if ($r4!==self::$FAILED) { |
9068 | goto choice_2; |
9069 | } |
9070 | $r4 = $this->parsetable_data_tags($silence, $boolParams, $param_preproc, $param_th); |
9071 | if ($r4!==self::$FAILED) { |
9072 | goto choice_2; |
9073 | } |
9074 | $r4 = $this->parsetable_caption_tag($silence, $boolParams, $param_preproc, $param_th); |
9075 | choice_2: |
9076 | if ($r4===self::$FAILED) { |
9077 | $this->currPos = $p1; |
9078 | $r2 = self::$FAILED; |
9079 | goto seq_1; |
9080 | } |
9081 | $r2 = [$r3,$r4]; |
9082 | seq_1: |
9083 | // free $r2,$p1 |
9084 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
9085 | $this->currPos, |
9086 | $r2, |
9087 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
9088 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
9089 | ); |
9090 | return $r2; |
9091 | }, "table_content_line", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
9092 | |
9093 | } |
9094 | private function parsetable_end_tag($silence) { |
9095 | return $this->traceCall(function($silence) { |
9096 | $key = 518; |
9097 | $bucket = $this->currPos; |
9098 | $cached = $this->cache[$bucket][$key] ?? null; |
9099 | if ($cached) { |
9100 | $this->currPos = $cached->nextPos; |
9101 | |
9102 | return $cached->result; |
9103 | } |
9104 | |
9105 | $p2 = $this->currPos; |
9106 | // start seq_1 |
9107 | $p3 = $this->currPos; |
9108 | $r4 = []; |
9109 | for (;;) { |
9110 | // start choice_1 |
9111 | $r5 = $this->parsespace($silence); |
9112 | if ($r5!==self::$FAILED) { |
9113 | goto choice_1; |
9114 | } |
9115 | $r5 = $this->parsecomment($silence); |
9116 | choice_1: |
9117 | if ($r5!==self::$FAILED) { |
9118 | $r4[] = $r5; |
9119 | } else { |
9120 | break; |
9121 | } |
9122 | } |
9123 | // sc <- $r4 |
9124 | // free $r5 |
9125 | $p6 = $this->currPos; |
9126 | $r5 = ''; |
9127 | // startPos <- $r5 |
9128 | if ($r5!==self::$FAILED) { |
9129 | $this->savedPos = $p6; |
9130 | $r5 = $this->a5($r4); |
9131 | } else { |
9132 | $this->currPos = $p3; |
9133 | $r1 = self::$FAILED; |
9134 | goto seq_1; |
9135 | } |
9136 | $r7 = $this->parsepipe($silence); |
9137 | // p <- $r7 |
9138 | if ($r7===self::$FAILED) { |
9139 | $this->currPos = $p3; |
9140 | $r1 = self::$FAILED; |
9141 | goto seq_1; |
9142 | } |
9143 | // b <- $r8 |
9144 | if (($this->input[$this->currPos] ?? null) === "}") { |
9145 | $this->currPos++; |
9146 | $r8 = "}"; |
9147 | } else { |
9148 | if (!$silence) {$this->fail(57);} |
9149 | $r8 = self::$FAILED; |
9150 | $this->currPos = $p3; |
9151 | $r1 = self::$FAILED; |
9152 | goto seq_1; |
9153 | } |
9154 | $r1 = true; |
9155 | seq_1: |
9156 | if ($r1!==self::$FAILED) { |
9157 | $this->savedPos = $p2; |
9158 | $r1 = $this->a82($r4, $r5, $r7, $r8); |
9159 | } |
9160 | // free $p3 |
9161 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
9162 | $this->currPos, |
9163 | $r1, |
9164 | self::$UNDEFINED, |
9165 | self::$UNDEFINED |
9166 | ); |
9167 | return $r1; |
9168 | }, "table_end_tag", ["\$silence"], [$silence]); |
9169 | |
9170 | } |
9171 | private function parsesol_prefix($silence) { |
9172 | return $this->traceCall(function($silence) { |
9173 | $key = 592; |
9174 | $bucket = $this->currPos; |
9175 | $cached = $this->cache[$bucket][$key] ?? null; |
9176 | if ($cached) { |
9177 | $this->currPos = $cached->nextPos; |
9178 | |
9179 | return $cached->result; |
9180 | } |
9181 | |
9182 | // start choice_1 |
9183 | $r1 = $this->parsenewlineToken($silence); |
9184 | if ($r1!==self::$FAILED) { |
9185 | goto choice_1; |
9186 | } |
9187 | $p2 = $this->currPos; |
9188 | $this->savedPos = $this->currPos; |
9189 | $r1 = $this->a83(); |
9190 | if ($r1) { |
9191 | $r1 = false; |
9192 | $this->savedPos = $p2; |
9193 | $r1 = $this->a84(); |
9194 | } else { |
9195 | $r1 = self::$FAILED; |
9196 | } |
9197 | choice_1: |
9198 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
9199 | $this->currPos, |
9200 | $r1, |
9201 | self::$UNDEFINED, |
9202 | self::$UNDEFINED |
9203 | ); |
9204 | return $r1; |
9205 | }, "sol_prefix", ["\$silence"], [$silence]); |
9206 | |
9207 | } |
9208 | private function parseempty_lines_with_comments($silence) { |
9209 | return $this->traceCall(function($silence) { |
9210 | $key = 594; |
9211 | $bucket = $this->currPos; |
9212 | $cached = $this->cache[$bucket][$key] ?? null; |
9213 | if ($cached) { |
9214 | $this->currPos = $cached->nextPos; |
9215 | |
9216 | return $cached->result; |
9217 | } |
9218 | |
9219 | $p2 = $this->currPos; |
9220 | // start seq_1 |
9221 | $p3 = $this->currPos; |
9222 | $p5 = $this->currPos; |
9223 | $r4 = ''; |
9224 | // p <- $r4 |
9225 | if ($r4!==self::$FAILED) { |
9226 | $this->savedPos = $p5; |
9227 | $r4 = $this->a17(); |
9228 | } else { |
9229 | $r1 = self::$FAILED; |
9230 | goto seq_1; |
9231 | } |
9232 | $r6 = []; |
9233 | for (;;) { |
9234 | // start seq_2 |
9235 | $p8 = $this->currPos; |
9236 | $r9 = []; |
9237 | for (;;) { |
9238 | $r10 = $this->parsespace($silence); |
9239 | if ($r10!==self::$FAILED) { |
9240 | $r9[] = $r10; |
9241 | } else { |
9242 | break; |
9243 | } |
9244 | } |
9245 | // free $r10 |
9246 | $r10 = $this->parsecomment($silence); |
9247 | if ($r10===self::$FAILED) { |
9248 | $this->currPos = $p8; |
9249 | $r7 = self::$FAILED; |
9250 | goto seq_2; |
9251 | } |
9252 | $r11 = []; |
9253 | for (;;) { |
9254 | // start choice_1 |
9255 | $r12 = $this->parsespace($silence); |
9256 | if ($r12!==self::$FAILED) { |
9257 | goto choice_1; |
9258 | } |
9259 | $r12 = $this->parsecomment($silence); |
9260 | choice_1: |
9261 | if ($r12!==self::$FAILED) { |
9262 | $r11[] = $r12; |
9263 | } else { |
9264 | break; |
9265 | } |
9266 | } |
9267 | // free $r12 |
9268 | $r12 = $this->parsenewline($silence); |
9269 | if ($r12===self::$FAILED) { |
9270 | $this->currPos = $p8; |
9271 | $r7 = self::$FAILED; |
9272 | goto seq_2; |
9273 | } |
9274 | $r7 = [$r9,$r10,$r11,$r12]; |
9275 | seq_2: |
9276 | if ($r7!==self::$FAILED) { |
9277 | $r6[] = $r7; |
9278 | } else { |
9279 | break; |
9280 | } |
9281 | // free $p8 |
9282 | } |
9283 | if (count($r6) === 0) { |
9284 | $r6 = self::$FAILED; |
9285 | } |
9286 | // c <- $r6 |
9287 | if ($r6===self::$FAILED) { |
9288 | $this->currPos = $p3; |
9289 | $r1 = self::$FAILED; |
9290 | goto seq_1; |
9291 | } |
9292 | // free $r7 |
9293 | $r1 = true; |
9294 | seq_1: |
9295 | if ($r1!==self::$FAILED) { |
9296 | $this->savedPos = $p2; |
9297 | $r1 = $this->a85($r4, $r6); |
9298 | } |
9299 | // free $p3 |
9300 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
9301 | $this->currPos, |
9302 | $r1, |
9303 | self::$UNDEFINED, |
9304 | self::$UNDEFINED |
9305 | ); |
9306 | return $r1; |
9307 | }, "empty_lines_with_comments", ["\$silence"], [$silence]); |
9308 | |
9309 | } |
9310 | private function parseredirect_word($silence) { |
9311 | return $this->traceCall(function($silence) { |
9312 | $key = 310; |
9313 | $bucket = $this->currPos; |
9314 | $cached = $this->cache[$bucket][$key] ?? null; |
9315 | if ($cached) { |
9316 | $this->currPos = $cached->nextPos; |
9317 | |
9318 | return $cached->result; |
9319 | } |
9320 | |
9321 | $p1 = $this->currPos; |
9322 | // start seq_1 |
9323 | $p3 = $this->currPos; |
9324 | for (;;) { |
9325 | if (strspn($this->input, " \x09\x0a\x0d\x00\x0b", $this->currPos, 1) !== 0) { |
9326 | $r5 = $this->input[$this->currPos++]; |
9327 | } else { |
9328 | $r5 = self::$FAILED; |
9329 | if (!$silence) {$this->fail(58);} |
9330 | break; |
9331 | } |
9332 | } |
9333 | // free $r5 |
9334 | $r4 = true; |
9335 | if ($r4===self::$FAILED) { |
9336 | $r2 = self::$FAILED; |
9337 | goto seq_1; |
9338 | } |
9339 | // free $r4 |
9340 | $p6 = $this->currPos; |
9341 | $r4 = self::$FAILED; |
9342 | for (;;) { |
9343 | // start seq_2 |
9344 | $p7 = $this->currPos; |
9345 | $p8 = $this->currPos; |
9346 | $r9 = $this->discardspace_or_newline(true); |
9347 | if ($r9 === self::$FAILED) { |
9348 | $r9 = false; |
9349 | } else { |
9350 | $r9 = self::$FAILED; |
9351 | $this->currPos = $p8; |
9352 | $r5 = self::$FAILED; |
9353 | goto seq_2; |
9354 | } |
9355 | // free $p8 |
9356 | $p8 = $this->currPos; |
9357 | $r10 = $this->input[$this->currPos] ?? ''; |
9358 | if ($r10 === ":" || $r10 === "[") { |
9359 | $this->currPos++; |
9360 | } else { |
9361 | $r10 = self::$FAILED; |
9362 | } |
9363 | if ($r10 === self::$FAILED) { |
9364 | $r10 = false; |
9365 | } else { |
9366 | $r10 = self::$FAILED; |
9367 | $this->currPos = $p8; |
9368 | $this->currPos = $p7; |
9369 | $r5 = self::$FAILED; |
9370 | goto seq_2; |
9371 | } |
9372 | // free $p8 |
9373 | if ($this->currPos < $this->inputLength) { |
9374 | $r11 = self::consumeChar($this->input, $this->currPos);; |
9375 | } else { |
9376 | $r11 = self::$FAILED; |
9377 | if (!$silence) {$this->fail(7);} |
9378 | $this->currPos = $p7; |
9379 | $r5 = self::$FAILED; |
9380 | goto seq_2; |
9381 | } |
9382 | $r5 = true; |
9383 | seq_2: |
9384 | if ($r5!==self::$FAILED) { |
9385 | $r4 = true; |
9386 | } else { |
9387 | break; |
9388 | } |
9389 | // free $p7 |
9390 | } |
9391 | // rw <- $r4 |
9392 | if ($r4!==self::$FAILED) { |
9393 | $r4 = substr($this->input, $p6, $this->currPos - $p6); |
9394 | } else { |
9395 | $r4 = self::$FAILED; |
9396 | $this->currPos = $p3; |
9397 | $r2 = self::$FAILED; |
9398 | goto seq_1; |
9399 | } |
9400 | // free $r5 |
9401 | // free $p6 |
9402 | $this->savedPos = $this->currPos; |
9403 | $r5 = $this->a86($r4); |
9404 | if ($r5) { |
9405 | $r5 = false; |
9406 | } else { |
9407 | $r5 = self::$FAILED; |
9408 | $this->currPos = $p3; |
9409 | $r2 = self::$FAILED; |
9410 | goto seq_1; |
9411 | } |
9412 | $r2 = true; |
9413 | seq_1: |
9414 | if ($r2!==self::$FAILED) { |
9415 | $r2 = substr($this->input, $p1, $this->currPos - $p1); |
9416 | } else { |
9417 | $r2 = self::$FAILED; |
9418 | } |
9419 | // free $p3 |
9420 | // free $p1 |
9421 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
9422 | $this->currPos, |
9423 | $r2, |
9424 | self::$UNDEFINED, |
9425 | self::$UNDEFINED |
9426 | ); |
9427 | return $r2; |
9428 | }, "redirect_word", ["\$silence"], [$silence]); |
9429 | |
9430 | } |
9431 | private function parseinclude_limits($silence, $boolParams, &$param_preproc, &$param_th) { |
9432 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
9433 | $key = json_encode([532, $boolParams & 0x1ebf, $param_preproc, $param_th]); |
9434 | $bucket = $this->currPos; |
9435 | $cached = $this->cache[$bucket][$key] ?? null; |
9436 | if ($cached) { |
9437 | $this->currPos = $cached->nextPos; |
9438 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
9439 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
9440 | return $cached->result; |
9441 | } |
9442 | $saved_preproc=$param_preproc; |
9443 | $saved_th=$param_th; |
9444 | $p2 = $this->currPos; |
9445 | // start seq_1 |
9446 | $p3 = $this->currPos; |
9447 | $p4 = $this->currPos; |
9448 | $r5 = $this->discardinclude_check(true, $boolParams); |
9449 | if ($r5!==self::$FAILED) { |
9450 | $r5 = false; |
9451 | $this->currPos = $p4; |
9452 | } else { |
9453 | $r1 = self::$FAILED; |
9454 | goto seq_1; |
9455 | } |
9456 | // free $p4 |
9457 | $r6 = $this->parsexmlish_tag($silence, $boolParams | 0x2, $param_preproc, $param_th); |
9458 | // t <- $r6 |
9459 | if ($r6===self::$FAILED) { |
9460 | $this->currPos = $p3; |
9461 | $r1 = self::$FAILED; |
9462 | goto seq_1; |
9463 | } |
9464 | $r1 = true; |
9465 | seq_1: |
9466 | if ($r1!==self::$FAILED) { |
9467 | $this->savedPos = $p2; |
9468 | $r1 = $this->a87($r6); |
9469 | } |
9470 | // free $p3 |
9471 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
9472 | $this->currPos, |
9473 | $r1, |
9474 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
9475 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
9476 | ); |
9477 | return $r1; |
9478 | }, "include_limits", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
9479 | |
9480 | } |
9481 | private function parseannotation_tag($silence, $boolParams, &$param_preproc, &$param_th) { |
9482 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
9483 | $key = json_encode([438, $boolParams & 0x1ebf, $param_preproc, $param_th]); |
9484 | $bucket = $this->currPos; |
9485 | $cached = $this->cache[$bucket][$key] ?? null; |
9486 | if ($cached) { |
9487 | $this->currPos = $cached->nextPos; |
9488 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
9489 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
9490 | return $cached->result; |
9491 | } |
9492 | $saved_preproc=$param_preproc; |
9493 | $saved_th=$param_th; |
9494 | $p2 = $this->currPos; |
9495 | // start choice_1 |
9496 | $r3 = $this->parsetvar_old_syntax_closing_HACK($silence, $boolParams); |
9497 | if ($r3!==self::$FAILED) { |
9498 | goto choice_1; |
9499 | } |
9500 | $p4 = $this->currPos; |
9501 | // start seq_1 |
9502 | $p5 = $this->currPos; |
9503 | $p6 = $this->currPos; |
9504 | $r7 = $this->discardannotation_check(true, $boolParams); |
9505 | if ($r7!==self::$FAILED) { |
9506 | $r7 = false; |
9507 | $this->currPos = $p6; |
9508 | } else { |
9509 | $r3 = self::$FAILED; |
9510 | goto seq_1; |
9511 | } |
9512 | // free $p6 |
9513 | $r8 = $this->parsexmlish_tag($silence, $boolParams | 0x2, $param_preproc, $param_th); |
9514 | // t <- $r8 |
9515 | if ($r8===self::$FAILED) { |
9516 | $this->currPos = $p5; |
9517 | $r3 = self::$FAILED; |
9518 | goto seq_1; |
9519 | } |
9520 | $r3 = true; |
9521 | seq_1: |
9522 | if ($r3!==self::$FAILED) { |
9523 | $this->savedPos = $p4; |
9524 | $r3 = $this->a88($r8); |
9525 | } |
9526 | // free $p5 |
9527 | choice_1: |
9528 | // tag <- $r3 |
9529 | $r1 = $r3; |
9530 | if ($r1!==self::$FAILED) { |
9531 | $this->savedPos = $p2; |
9532 | $r1 = $this->a89($r3); |
9533 | } |
9534 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
9535 | $this->currPos, |
9536 | $r1, |
9537 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
9538 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
9539 | ); |
9540 | return $r1; |
9541 | }, "annotation_tag", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
9542 | |
9543 | } |
9544 | private function parseheading($silence, $boolParams, &$param_preproc, &$param_th) { |
9545 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
9546 | $key = json_encode([336, $boolParams & 0x1fff, $param_preproc, $param_th]); |
9547 | $bucket = $this->currPos; |
9548 | $cached = $this->cache[$bucket][$key] ?? null; |
9549 | if ($cached) { |
9550 | $this->currPos = $cached->nextPos; |
9551 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
9552 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
9553 | return $cached->result; |
9554 | } |
9555 | $saved_preproc=$param_preproc; |
9556 | $saved_th=$param_th; |
9557 | $p2 = $this->currPos; |
9558 | // start seq_1 |
9559 | $p3 = $this->currPos; |
9560 | $p4 = $this->currPos; |
9561 | if (($this->input[$this->currPos] ?? null) === "=") { |
9562 | $this->currPos++; |
9563 | $r5 = "="; |
9564 | $r5 = false; |
9565 | $this->currPos = $p4; |
9566 | } else { |
9567 | $r5 = self::$FAILED; |
9568 | $r1 = self::$FAILED; |
9569 | goto seq_1; |
9570 | } |
9571 | // free $p4 |
9572 | $p4 = $this->currPos; |
9573 | // start seq_2 |
9574 | $p7 = $this->currPos; |
9575 | $p9 = $this->currPos; |
9576 | $r8 = self::$FAILED; |
9577 | for (;;) { |
9578 | if (($this->input[$this->currPos] ?? null) === "=") { |
9579 | $this->currPos++; |
9580 | $r10 = "="; |
9581 | $r8 = true; |
9582 | } else { |
9583 | if (!$silence) {$this->fail(23);} |
9584 | $r10 = self::$FAILED; |
9585 | break; |
9586 | } |
9587 | } |
9588 | // s <- $r8 |
9589 | if ($r8!==self::$FAILED) { |
9590 | $r8 = substr($this->input, $p9, $this->currPos - $p9); |
9591 | } else { |
9592 | $r8 = self::$FAILED; |
9593 | $r6 = self::$FAILED; |
9594 | goto seq_2; |
9595 | } |
9596 | // free $r10 |
9597 | // free $p9 |
9598 | // start seq_3 |
9599 | $p9 = $this->currPos; |
9600 | $p12 = $this->currPos; |
9601 | $r13 = $this->parseinlineline($silence, $boolParams | 0x4, $param_preproc, $param_th); |
9602 | if ($r13===self::$FAILED) { |
9603 | $r13 = null; |
9604 | } |
9605 | // ill <- $r13 |
9606 | $r11 = $r13; |
9607 | if ($r11!==self::$FAILED) { |
9608 | $this->savedPos = $p12; |
9609 | $r11 = $this->a90($r8, $r13); |
9610 | } else { |
9611 | $r10 = self::$FAILED; |
9612 | goto seq_3; |
9613 | } |
9614 | $p14 = $this->currPos; |
9615 | $r15 = self::$FAILED; |
9616 | for (;;) { |
9617 | if (($this->input[$this->currPos] ?? null) === "=") { |
9618 | $this->currPos++; |
9619 | $r16 = "="; |
9620 | $r15 = true; |
9621 | } else { |
9622 | if (!$silence) {$this->fail(23);} |
9623 | $r16 = self::$FAILED; |
9624 | break; |
9625 | } |
9626 | } |
9627 | if ($r15!==self::$FAILED) { |
9628 | $r15 = substr($this->input, $p14, $this->currPos - $p14); |
9629 | } else { |
9630 | $r15 = self::$FAILED; |
9631 | $this->currPos = $p9; |
9632 | $r10 = self::$FAILED; |
9633 | goto seq_3; |
9634 | } |
9635 | // free $r16 |
9636 | // free $p14 |
9637 | $r10 = [$r11,$r15]; |
9638 | seq_3: |
9639 | if ($r10===self::$FAILED) { |
9640 | $r10 = null; |
9641 | } |
9642 | // free $p9 |
9643 | // ce <- $r10 |
9644 | $this->savedPos = $this->currPos; |
9645 | $r16 = $this->a91($r8, $r10); |
9646 | if ($r16) { |
9647 | $r16 = false; |
9648 | } else { |
9649 | $r16 = self::$FAILED; |
9650 | $this->currPos = $p7; |
9651 | $r6 = self::$FAILED; |
9652 | goto seq_2; |
9653 | } |
9654 | $p9 = $this->currPos; |
9655 | $r17 = ''; |
9656 | // endTPos <- $r17 |
9657 | if ($r17!==self::$FAILED) { |
9658 | $this->savedPos = $p9; |
9659 | $r17 = $this->a92($r8, $r10); |
9660 | } else { |
9661 | $this->currPos = $p7; |
9662 | $r6 = self::$FAILED; |
9663 | goto seq_2; |
9664 | } |
9665 | $r18 = []; |
9666 | for (;;) { |
9667 | // start choice_1 |
9668 | $r19 = $this->parsespace($silence); |
9669 | if ($r19!==self::$FAILED) { |
9670 | goto choice_1; |
9671 | } |
9672 | $r19 = $this->parsesol_transparent($silence, $boolParams, $param_preproc, $param_th); |
9673 | choice_1: |
9674 | if ($r19!==self::$FAILED) { |
9675 | $r18[] = $r19; |
9676 | } else { |
9677 | break; |
9678 | } |
9679 | } |
9680 | // spc <- $r18 |
9681 | // free $r19 |
9682 | $p14 = $this->currPos; |
9683 | $r19 = $this->discardeolf(true); |
9684 | if ($r19!==self::$FAILED) { |
9685 | $r19 = false; |
9686 | $this->currPos = $p14; |
9687 | } else { |
9688 | $this->currPos = $p7; |
9689 | $r6 = self::$FAILED; |
9690 | goto seq_2; |
9691 | } |
9692 | // free $p14 |
9693 | $r6 = true; |
9694 | seq_2: |
9695 | // r <- $r6 |
9696 | if ($r6!==self::$FAILED) { |
9697 | $this->savedPos = $p4; |
9698 | $r6 = $this->a93($r8, $r10, $r17, $r18); |
9699 | } else { |
9700 | $this->currPos = $p3; |
9701 | $r1 = self::$FAILED; |
9702 | goto seq_1; |
9703 | } |
9704 | // free $p7 |
9705 | $r1 = true; |
9706 | seq_1: |
9707 | if ($r1!==self::$FAILED) { |
9708 | $this->savedPos = $p2; |
9709 | $r1 = $this->a24($r6); |
9710 | } |
9711 | // free $p3 |
9712 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
9713 | $this->currPos, |
9714 | $r1, |
9715 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
9716 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
9717 | ); |
9718 | return $r1; |
9719 | }, "heading", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
9720 | |
9721 | } |
9722 | private function parsehr($silence, $boolParams, &$param_preproc, &$param_th) { |
9723 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
9724 | $key = json_encode([320, $boolParams & 0x1ebf, $param_preproc, $param_th]); |
9725 | $bucket = $this->currPos; |
9726 | $cached = $this->cache[$bucket][$key] ?? null; |
9727 | if ($cached) { |
9728 | $this->currPos = $cached->nextPos; |
9729 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
9730 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
9731 | return $cached->result; |
9732 | } |
9733 | $saved_preproc=$param_preproc; |
9734 | $saved_th=$param_th; |
9735 | $p2 = $this->currPos; |
9736 | // start seq_1 |
9737 | $p3 = $this->currPos; |
9738 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "----", $this->currPos, 4, false) === 0) { |
9739 | $r4 = "----"; |
9740 | $this->currPos += 4; |
9741 | } else { |
9742 | if (!$silence) {$this->fail(59);} |
9743 | $r4 = self::$FAILED; |
9744 | $r1 = self::$FAILED; |
9745 | goto seq_1; |
9746 | } |
9747 | $p6 = $this->currPos; |
9748 | for (;;) { |
9749 | if (($this->input[$this->currPos] ?? null) === "-") { |
9750 | $this->currPos++; |
9751 | $r7 = "-"; |
9752 | } else { |
9753 | if (!$silence) {$this->fail(55);} |
9754 | $r7 = self::$FAILED; |
9755 | break; |
9756 | } |
9757 | } |
9758 | // free $r7 |
9759 | $r5 = true; |
9760 | // d <- $r5 |
9761 | if ($r5!==self::$FAILED) { |
9762 | $r5 = substr($this->input, $p6, $this->currPos - $p6); |
9763 | } else { |
9764 | $r5 = self::$FAILED; |
9765 | $this->currPos = $p3; |
9766 | $r1 = self::$FAILED; |
9767 | goto seq_1; |
9768 | } |
9769 | // free $p6 |
9770 | // start choice_1 |
9771 | $p6 = $this->currPos; |
9772 | // start seq_2 |
9773 | $p8 = $this->currPos; |
9774 | $p9 = $this->currPos; |
9775 | $r10 = $this->discardsol(true, $boolParams, $param_preproc, $param_th); |
9776 | if ($r10!==self::$FAILED) { |
9777 | $r10 = false; |
9778 | $this->currPos = $p9; |
9779 | } else { |
9780 | $r7 = self::$FAILED; |
9781 | goto seq_2; |
9782 | } |
9783 | // free $p9 |
9784 | $r7 = true; |
9785 | seq_2: |
9786 | if ($r7!==self::$FAILED) { |
9787 | $this->savedPos = $p6; |
9788 | $r7 = $this->a94($r5); |
9789 | goto choice_1; |
9790 | } |
9791 | // free $p8 |
9792 | $p8 = $this->currPos; |
9793 | $r7 = ''; |
9794 | if ($r7!==self::$FAILED) { |
9795 | $this->savedPos = $p8; |
9796 | $r7 = $this->a95($r5); |
9797 | } |
9798 | choice_1: |
9799 | // lineContent <- $r7 |
9800 | if ($r7===self::$FAILED) { |
9801 | $this->currPos = $p3; |
9802 | $r1 = self::$FAILED; |
9803 | goto seq_1; |
9804 | } |
9805 | $r1 = true; |
9806 | seq_1: |
9807 | if ($r1!==self::$FAILED) { |
9808 | $this->savedPos = $p2; |
9809 | $r1 = $this->a96($r5, $r7); |
9810 | } |
9811 | // free $p3 |
9812 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
9813 | $this->currPos, |
9814 | $r1, |
9815 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
9816 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
9817 | ); |
9818 | return $r1; |
9819 | }, "hr", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
9820 | |
9821 | } |
9822 | private function discardtplarg_preproc($silence, $boolParams, &$param_preproc, &$param_th) { |
9823 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
9824 | $key = json_encode([381, $boolParams & 0x1fff, $param_preproc, $param_th]); |
9825 | $bucket = $this->currPos; |
9826 | $cached = $this->cache[$bucket][$key] ?? null; |
9827 | if ($cached) { |
9828 | $this->currPos = $cached->nextPos; |
9829 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
9830 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
9831 | return $cached->result; |
9832 | } |
9833 | $saved_preproc=$param_preproc; |
9834 | $saved_th=$param_th; |
9835 | $p2 = $this->currPos; |
9836 | // start seq_1 |
9837 | $p3 = $this->currPos; |
9838 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "{{{", $this->currPos, 3, false) === 0) { |
9839 | $r4 = "{{{"; |
9840 | $this->currPos += 3; |
9841 | } else { |
9842 | if (!$silence) {$this->fail(60);} |
9843 | $r4 = self::$FAILED; |
9844 | $r1 = self::$FAILED; |
9845 | goto seq_1; |
9846 | } |
9847 | $p6 = $this->currPos; |
9848 | $r5 = ''; |
9849 | // p <- $r5 |
9850 | if ($r5!==self::$FAILED) { |
9851 | $this->savedPos = $p6; |
9852 | $r5 = $this->a17(); |
9853 | } else { |
9854 | $this->currPos = $p3; |
9855 | $r1 = self::$FAILED; |
9856 | goto seq_1; |
9857 | } |
9858 | $r7 = $this->parsetemplate_param_value($silence, $boolParams, $param_preproc, $param_th); |
9859 | if ($r7===self::$FAILED) { |
9860 | $r7 = null; |
9861 | } |
9862 | // target <- $r7 |
9863 | $r8 = []; |
9864 | for (;;) { |
9865 | $p10 = $this->currPos; |
9866 | // start seq_2 |
9867 | $p11 = $this->currPos; |
9868 | for (;;) { |
9869 | $r13 = $this->discardnl_comment_space($silence); |
9870 | if ($r13===self::$FAILED) { |
9871 | break; |
9872 | } |
9873 | } |
9874 | // free $r13 |
9875 | $r12 = true; |
9876 | if ($r12===self::$FAILED) { |
9877 | $r9 = self::$FAILED; |
9878 | goto seq_2; |
9879 | } |
9880 | // free $r12 |
9881 | if (($this->input[$this->currPos] ?? null) === "|") { |
9882 | $this->currPos++; |
9883 | $r12 = "|"; |
9884 | } else { |
9885 | if (!$silence) {$this->fail(13);} |
9886 | $r12 = self::$FAILED; |
9887 | $this->currPos = $p11; |
9888 | $r9 = self::$FAILED; |
9889 | goto seq_2; |
9890 | } |
9891 | // start choice_1 |
9892 | $p14 = $this->currPos; |
9893 | // start seq_3 |
9894 | $p15 = $this->currPos; |
9895 | $p17 = $this->currPos; |
9896 | $r16 = ''; |
9897 | // p0 <- $r16 |
9898 | if ($r16!==self::$FAILED) { |
9899 | $this->savedPos = $p17; |
9900 | $r16 = $this->a97($r5, $r7); |
9901 | } else { |
9902 | $r13 = self::$FAILED; |
9903 | goto seq_3; |
9904 | } |
9905 | $r18 = []; |
9906 | for (;;) { |
9907 | $r19 = $this->parsenl_comment_space($silence); |
9908 | if ($r19!==self::$FAILED) { |
9909 | $r18[] = $r19; |
9910 | } else { |
9911 | break; |
9912 | } |
9913 | } |
9914 | // v <- $r18 |
9915 | // free $r19 |
9916 | $p20 = $this->currPos; |
9917 | $r19 = ''; |
9918 | // p1 <- $r19 |
9919 | if ($r19!==self::$FAILED) { |
9920 | $this->savedPos = $p20; |
9921 | $r19 = $this->a98($r5, $r7, $r16, $r18); |
9922 | } else { |
9923 | $this->currPos = $p15; |
9924 | $r13 = self::$FAILED; |
9925 | goto seq_3; |
9926 | } |
9927 | $p21 = $this->currPos; |
9928 | // start choice_2 |
9929 | if (($this->input[$this->currPos] ?? null) === "|") { |
9930 | $this->currPos++; |
9931 | $r22 = "|"; |
9932 | goto choice_2; |
9933 | } else { |
9934 | $r22 = self::$FAILED; |
9935 | } |
9936 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "}}}", $this->currPos, 3, false) === 0) { |
9937 | $r22 = "}}}"; |
9938 | $this->currPos += 3; |
9939 | } else { |
9940 | $r22 = self::$FAILED; |
9941 | } |
9942 | choice_2: |
9943 | if ($r22!==self::$FAILED) { |
9944 | $r22 = false; |
9945 | $this->currPos = $p21; |
9946 | } else { |
9947 | $this->currPos = $p15; |
9948 | $r13 = self::$FAILED; |
9949 | goto seq_3; |
9950 | } |
9951 | // free $p21 |
9952 | $r13 = true; |
9953 | seq_3: |
9954 | if ($r13!==self::$FAILED) { |
9955 | $this->savedPos = $p14; |
9956 | $r13 = $this->a99($r5, $r7, $r16, $r18, $r19); |
9957 | goto choice_1; |
9958 | } |
9959 | // free $p15 |
9960 | $r13 = $this->parsetemplate_param_value($silence, $boolParams, $param_preproc, $param_th); |
9961 | choice_1: |
9962 | // r <- $r13 |
9963 | if ($r13===self::$FAILED) { |
9964 | $this->currPos = $p11; |
9965 | $r9 = self::$FAILED; |
9966 | goto seq_2; |
9967 | } |
9968 | $r9 = true; |
9969 | seq_2: |
9970 | if ($r9!==self::$FAILED) { |
9971 | $this->savedPos = $p10; |
9972 | $r9 = $this->a100($r5, $r7, $r13); |
9973 | $r8[] = $r9; |
9974 | } else { |
9975 | break; |
9976 | } |
9977 | // free $p11 |
9978 | } |
9979 | // params <- $r8 |
9980 | // free $r9 |
9981 | for (;;) { |
9982 | $r23 = $this->discardnl_comment_space($silence); |
9983 | if ($r23===self::$FAILED) { |
9984 | break; |
9985 | } |
9986 | } |
9987 | // free $r23 |
9988 | $r9 = true; |
9989 | if ($r9===self::$FAILED) { |
9990 | $this->currPos = $p3; |
9991 | $r1 = self::$FAILED; |
9992 | goto seq_1; |
9993 | } |
9994 | // free $r9 |
9995 | $r9 = $this->discardinline_breaks($silence, $boolParams, $param_preproc, $param_th); |
9996 | if ($r9===self::$FAILED) { |
9997 | $this->currPos = $p3; |
9998 | $r1 = self::$FAILED; |
9999 | goto seq_1; |
10000 | } |
10001 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "}}}", $this->currPos, 3, false) === 0) { |
10002 | $r23 = "}}}"; |
10003 | $this->currPos += 3; |
10004 | } else { |
10005 | if (!$silence) {$this->fail(61);} |
10006 | $r23 = self::$FAILED; |
10007 | $this->currPos = $p3; |
10008 | $r1 = self::$FAILED; |
10009 | goto seq_1; |
10010 | } |
10011 | $r1 = true; |
10012 | seq_1: |
10013 | if ($r1!==self::$FAILED) { |
10014 | $this->savedPos = $p2; |
10015 | $r1 = $this->a101($r5, $r7, $r8); |
10016 | } |
10017 | // free $p3 |
10018 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
10019 | $this->currPos, |
10020 | $r1, |
10021 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
10022 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
10023 | ); |
10024 | return $r1; |
10025 | }, "tplarg_preproc", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
10026 | |
10027 | } |
10028 | private function parsetemplate_preproc($silence, $boolParams, &$param_preproc, &$param_th) { |
10029 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
10030 | $key = json_encode([374, $boolParams & 0x1fff, $param_preproc, $param_th]); |
10031 | $bucket = $this->currPos; |
10032 | $cached = $this->cache[$bucket][$key] ?? null; |
10033 | if ($cached) { |
10034 | $this->currPos = $cached->nextPos; |
10035 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
10036 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
10037 | return $cached->result; |
10038 | } |
10039 | $saved_preproc=$param_preproc; |
10040 | $saved_th=$param_th; |
10041 | // start choice_1 |
10042 | $p2 = $this->currPos; |
10043 | // start seq_1 |
10044 | $p3 = $this->currPos; |
10045 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "{{", $this->currPos, 2, false) === 0) { |
10046 | $r4 = "{{"; |
10047 | $this->currPos += 2; |
10048 | } else { |
10049 | if (!$silence) {$this->fail(43);} |
10050 | $r4 = self::$FAILED; |
10051 | $r1 = self::$FAILED; |
10052 | goto seq_1; |
10053 | } |
10054 | $p6 = $this->currPos; |
10055 | for (;;) { |
10056 | $r7 = $this->discardnl_comment_space($silence); |
10057 | if ($r7===self::$FAILED) { |
10058 | break; |
10059 | } |
10060 | } |
10061 | // free $r7 |
10062 | $r5 = true; |
10063 | // leadWS <- $r5 |
10064 | if ($r5!==self::$FAILED) { |
10065 | $r5 = substr($this->input, $p6, $this->currPos - $p6); |
10066 | } else { |
10067 | $r5 = self::$FAILED; |
10068 | $this->currPos = $p3; |
10069 | $r1 = self::$FAILED; |
10070 | goto seq_1; |
10071 | } |
10072 | // free $p6 |
10073 | // start choice_2 |
10074 | $r7 = $this->parsetemplate_param_value($silence, $boolParams, $param_preproc, $param_th); |
10075 | if ($r7!==self::$FAILED) { |
10076 | goto choice_2; |
10077 | } |
10078 | $r7 = $this->parseparsoid_fragment_marker($silence); |
10079 | choice_2: |
10080 | // target <- $r7 |
10081 | if ($r7===self::$FAILED) { |
10082 | $this->currPos = $p3; |
10083 | $r1 = self::$FAILED; |
10084 | goto seq_1; |
10085 | } |
10086 | $r8 = []; |
10087 | for (;;) { |
10088 | $p6 = $this->currPos; |
10089 | // start seq_2 |
10090 | $p10 = $this->currPos; |
10091 | for (;;) { |
10092 | $r12 = $this->discardnl_comment_space($silence); |
10093 | if ($r12===self::$FAILED) { |
10094 | break; |
10095 | } |
10096 | } |
10097 | // free $r12 |
10098 | $r11 = true; |
10099 | if ($r11===self::$FAILED) { |
10100 | $r9 = self::$FAILED; |
10101 | goto seq_2; |
10102 | } |
10103 | // free $r11 |
10104 | if (($this->input[$this->currPos] ?? null) === "|") { |
10105 | $this->currPos++; |
10106 | $r11 = "|"; |
10107 | } else { |
10108 | if (!$silence) {$this->fail(13);} |
10109 | $r11 = self::$FAILED; |
10110 | $this->currPos = $p10; |
10111 | $r9 = self::$FAILED; |
10112 | goto seq_2; |
10113 | } |
10114 | // start choice_3 |
10115 | $p13 = $this->currPos; |
10116 | // start seq_3 |
10117 | $p14 = $this->currPos; |
10118 | $p16 = $this->currPos; |
10119 | $r15 = ''; |
10120 | // p0 <- $r15 |
10121 | if ($r15!==self::$FAILED) { |
10122 | $this->savedPos = $p16; |
10123 | $r15 = $this->a102($r5, $r7); |
10124 | } else { |
10125 | $r12 = self::$FAILED; |
10126 | goto seq_3; |
10127 | } |
10128 | $r17 = []; |
10129 | for (;;) { |
10130 | $r18 = $this->parsenl_comment_space($silence); |
10131 | if ($r18!==self::$FAILED) { |
10132 | $r17[] = $r18; |
10133 | } else { |
10134 | break; |
10135 | } |
10136 | } |
10137 | // v <- $r17 |
10138 | // free $r18 |
10139 | $p19 = $this->currPos; |
10140 | $r18 = ''; |
10141 | // p1 <- $r18 |
10142 | if ($r18!==self::$FAILED) { |
10143 | $this->savedPos = $p19; |
10144 | $r18 = $this->a103($r5, $r7, $r15, $r17); |
10145 | } else { |
10146 | $this->currPos = $p14; |
10147 | $r12 = self::$FAILED; |
10148 | goto seq_3; |
10149 | } |
10150 | $p20 = $this->currPos; |
10151 | // start choice_4 |
10152 | if (($this->input[$this->currPos] ?? null) === "|") { |
10153 | $this->currPos++; |
10154 | $r21 = "|"; |
10155 | goto choice_4; |
10156 | } else { |
10157 | $r21 = self::$FAILED; |
10158 | } |
10159 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "}}", $this->currPos, 2, false) === 0) { |
10160 | $r21 = "}}"; |
10161 | $this->currPos += 2; |
10162 | } else { |
10163 | $r21 = self::$FAILED; |
10164 | } |
10165 | choice_4: |
10166 | if ($r21!==self::$FAILED) { |
10167 | $r21 = false; |
10168 | $this->currPos = $p20; |
10169 | } else { |
10170 | $this->currPos = $p14; |
10171 | $r12 = self::$FAILED; |
10172 | goto seq_3; |
10173 | } |
10174 | // free $p20 |
10175 | $r12 = true; |
10176 | seq_3: |
10177 | if ($r12!==self::$FAILED) { |
10178 | $this->savedPos = $p13; |
10179 | $r12 = $this->a104($r5, $r7, $r15, $r17, $r18); |
10180 | goto choice_3; |
10181 | } |
10182 | // free $p14 |
10183 | $r12 = $this->parsetemplate_param($silence, $boolParams, $param_preproc, $param_th); |
10184 | choice_3: |
10185 | // r <- $r12 |
10186 | if ($r12===self::$FAILED) { |
10187 | $this->currPos = $p10; |
10188 | $r9 = self::$FAILED; |
10189 | goto seq_2; |
10190 | } |
10191 | $r9 = true; |
10192 | seq_2: |
10193 | if ($r9!==self::$FAILED) { |
10194 | $this->savedPos = $p6; |
10195 | $r9 = $this->a105($r5, $r7, $r12); |
10196 | $r8[] = $r9; |
10197 | } else { |
10198 | break; |
10199 | } |
10200 | // free $p10 |
10201 | } |
10202 | // params <- $r8 |
10203 | // free $r9 |
10204 | $p10 = $this->currPos; |
10205 | for (;;) { |
10206 | $r22 = $this->discardnl_comment_space($silence); |
10207 | if ($r22===self::$FAILED) { |
10208 | break; |
10209 | } |
10210 | } |
10211 | // free $r22 |
10212 | $r9 = true; |
10213 | // trailWS <- $r9 |
10214 | if ($r9!==self::$FAILED) { |
10215 | $r9 = substr($this->input, $p10, $this->currPos - $p10); |
10216 | } else { |
10217 | $r9 = self::$FAILED; |
10218 | $this->currPos = $p3; |
10219 | $r1 = self::$FAILED; |
10220 | goto seq_1; |
10221 | } |
10222 | // free $p10 |
10223 | $r22 = $this->discardinline_breaks($silence, $boolParams, $param_preproc, $param_th); |
10224 | if ($r22===self::$FAILED) { |
10225 | $this->currPos = $p3; |
10226 | $r1 = self::$FAILED; |
10227 | goto seq_1; |
10228 | } |
10229 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "}}", $this->currPos, 2, false) === 0) { |
10230 | $r23 = "}}"; |
10231 | $this->currPos += 2; |
10232 | } else { |
10233 | if (!$silence) {$this->fail(62);} |
10234 | $r23 = self::$FAILED; |
10235 | $this->currPos = $p3; |
10236 | $r1 = self::$FAILED; |
10237 | goto seq_1; |
10238 | } |
10239 | $r1 = true; |
10240 | seq_1: |
10241 | if ($r1!==self::$FAILED) { |
10242 | $this->savedPos = $p2; |
10243 | $r1 = $this->a106($r5, $r7, $r8, $r9); |
10244 | goto choice_1; |
10245 | } |
10246 | // free $p3 |
10247 | $p3 = $this->currPos; |
10248 | // start seq_4 |
10249 | $p10 = $this->currPos; |
10250 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "{{", $this->currPos, 2, false) === 0) { |
10251 | $r24 = "{{"; |
10252 | $this->currPos += 2; |
10253 | } else { |
10254 | if (!$silence) {$this->fail(43);} |
10255 | $r24 = self::$FAILED; |
10256 | $r1 = self::$FAILED; |
10257 | goto seq_4; |
10258 | } |
10259 | for (;;) { |
10260 | $r26 = $this->discardspace_or_newline($silence); |
10261 | if ($r26===self::$FAILED) { |
10262 | break; |
10263 | } |
10264 | } |
10265 | // free $r26 |
10266 | $r25 = true; |
10267 | if ($r25===self::$FAILED) { |
10268 | $this->currPos = $p10; |
10269 | $r1 = self::$FAILED; |
10270 | goto seq_4; |
10271 | } |
10272 | // free $r25 |
10273 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "}}", $this->currPos, 2, false) === 0) { |
10274 | $r25 = "}}"; |
10275 | $this->currPos += 2; |
10276 | } else { |
10277 | if (!$silence) {$this->fail(62);} |
10278 | $r25 = self::$FAILED; |
10279 | $this->currPos = $p10; |
10280 | $r1 = self::$FAILED; |
10281 | goto seq_4; |
10282 | } |
10283 | $r1 = true; |
10284 | seq_4: |
10285 | if ($r1!==self::$FAILED) { |
10286 | $r1 = substr($this->input, $p3, $this->currPos - $p3); |
10287 | } else { |
10288 | $r1 = self::$FAILED; |
10289 | } |
10290 | // free $p10 |
10291 | // free $p3 |
10292 | choice_1: |
10293 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
10294 | $this->currPos, |
10295 | $r1, |
10296 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
10297 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
10298 | ); |
10299 | return $r1; |
10300 | }, "template_preproc", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
10301 | |
10302 | } |
10303 | private function parsetplarg_preproc($silence, $boolParams, &$param_preproc, &$param_th) { |
10304 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
10305 | $key = json_encode([380, $boolParams & 0x1fff, $param_preproc, $param_th]); |
10306 | $bucket = $this->currPos; |
10307 | $cached = $this->cache[$bucket][$key] ?? null; |
10308 | if ($cached) { |
10309 | $this->currPos = $cached->nextPos; |
10310 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
10311 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
10312 | return $cached->result; |
10313 | } |
10314 | $saved_preproc=$param_preproc; |
10315 | $saved_th=$param_th; |
10316 | $p2 = $this->currPos; |
10317 | // start seq_1 |
10318 | $p3 = $this->currPos; |
10319 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "{{{", $this->currPos, 3, false) === 0) { |
10320 | $r4 = "{{{"; |
10321 | $this->currPos += 3; |
10322 | } else { |
10323 | if (!$silence) {$this->fail(60);} |
10324 | $r4 = self::$FAILED; |
10325 | $r1 = self::$FAILED; |
10326 | goto seq_1; |
10327 | } |
10328 | $p6 = $this->currPos; |
10329 | $r5 = ''; |
10330 | // p <- $r5 |
10331 | if ($r5!==self::$FAILED) { |
10332 | $this->savedPos = $p6; |
10333 | $r5 = $this->a17(); |
10334 | } else { |
10335 | $this->currPos = $p3; |
10336 | $r1 = self::$FAILED; |
10337 | goto seq_1; |
10338 | } |
10339 | $r7 = $this->parsetemplate_param_value($silence, $boolParams, $param_preproc, $param_th); |
10340 | if ($r7===self::$FAILED) { |
10341 | $r7 = null; |
10342 | } |
10343 | // target <- $r7 |
10344 | $r8 = []; |
10345 | for (;;) { |
10346 | $p10 = $this->currPos; |
10347 | // start seq_2 |
10348 | $p11 = $this->currPos; |
10349 | for (;;) { |
10350 | $r13 = $this->discardnl_comment_space($silence); |
10351 | if ($r13===self::$FAILED) { |
10352 | break; |
10353 | } |
10354 | } |
10355 | // free $r13 |
10356 | $r12 = true; |
10357 | if ($r12===self::$FAILED) { |
10358 | $r9 = self::$FAILED; |
10359 | goto seq_2; |
10360 | } |
10361 | // free $r12 |
10362 | if (($this->input[$this->currPos] ?? null) === "|") { |
10363 | $this->currPos++; |
10364 | $r12 = "|"; |
10365 | } else { |
10366 | if (!$silence) {$this->fail(13);} |
10367 | $r12 = self::$FAILED; |
10368 | $this->currPos = $p11; |
10369 | $r9 = self::$FAILED; |
10370 | goto seq_2; |
10371 | } |
10372 | // start choice_1 |
10373 | $p14 = $this->currPos; |
10374 | // start seq_3 |
10375 | $p15 = $this->currPos; |
10376 | $p17 = $this->currPos; |
10377 | $r16 = ''; |
10378 | // p0 <- $r16 |
10379 | if ($r16!==self::$FAILED) { |
10380 | $this->savedPos = $p17; |
10381 | $r16 = $this->a97($r5, $r7); |
10382 | } else { |
10383 | $r13 = self::$FAILED; |
10384 | goto seq_3; |
10385 | } |
10386 | $r18 = []; |
10387 | for (;;) { |
10388 | $r19 = $this->parsenl_comment_space($silence); |
10389 | if ($r19!==self::$FAILED) { |
10390 | $r18[] = $r19; |
10391 | } else { |
10392 | break; |
10393 | } |
10394 | } |
10395 | // v <- $r18 |
10396 | // free $r19 |
10397 | $p20 = $this->currPos; |
10398 | $r19 = ''; |
10399 | // p1 <- $r19 |
10400 | if ($r19!==self::$FAILED) { |
10401 | $this->savedPos = $p20; |
10402 | $r19 = $this->a98($r5, $r7, $r16, $r18); |
10403 | } else { |
10404 | $this->currPos = $p15; |
10405 | $r13 = self::$FAILED; |
10406 | goto seq_3; |
10407 | } |
10408 | $p21 = $this->currPos; |
10409 | // start choice_2 |
10410 | if (($this->input[$this->currPos] ?? null) === "|") { |
10411 | $this->currPos++; |
10412 | $r22 = "|"; |
10413 | goto choice_2; |
10414 | } else { |
10415 | $r22 = self::$FAILED; |
10416 | } |
10417 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "}}}", $this->currPos, 3, false) === 0) { |
10418 | $r22 = "}}}"; |
10419 | $this->currPos += 3; |
10420 | } else { |
10421 | $r22 = self::$FAILED; |
10422 | } |
10423 | choice_2: |
10424 | if ($r22!==self::$FAILED) { |
10425 | $r22 = false; |
10426 | $this->currPos = $p21; |
10427 | } else { |
10428 | $this->currPos = $p15; |
10429 | $r13 = self::$FAILED; |
10430 | goto seq_3; |
10431 | } |
10432 | // free $p21 |
10433 | $r13 = true; |
10434 | seq_3: |
10435 | if ($r13!==self::$FAILED) { |
10436 | $this->savedPos = $p14; |
10437 | $r13 = $this->a99($r5, $r7, $r16, $r18, $r19); |
10438 | goto choice_1; |
10439 | } |
10440 | // free $p15 |
10441 | $r13 = $this->parsetemplate_param_value($silence, $boolParams, $param_preproc, $param_th); |
10442 | choice_1: |
10443 | // r <- $r13 |
10444 | if ($r13===self::$FAILED) { |
10445 | $this->currPos = $p11; |
10446 | $r9 = self::$FAILED; |
10447 | goto seq_2; |
10448 | } |
10449 | $r9 = true; |
10450 | seq_2: |
10451 | if ($r9!==self::$FAILED) { |
10452 | $this->savedPos = $p10; |
10453 | $r9 = $this->a100($r5, $r7, $r13); |
10454 | $r8[] = $r9; |
10455 | } else { |
10456 | break; |
10457 | } |
10458 | // free $p11 |
10459 | } |
10460 | // params <- $r8 |
10461 | // free $r9 |
10462 | for (;;) { |
10463 | $r23 = $this->discardnl_comment_space($silence); |
10464 | if ($r23===self::$FAILED) { |
10465 | break; |
10466 | } |
10467 | } |
10468 | // free $r23 |
10469 | $r9 = true; |
10470 | if ($r9===self::$FAILED) { |
10471 | $this->currPos = $p3; |
10472 | $r1 = self::$FAILED; |
10473 | goto seq_1; |
10474 | } |
10475 | // free $r9 |
10476 | $r9 = $this->discardinline_breaks($silence, $boolParams, $param_preproc, $param_th); |
10477 | if ($r9===self::$FAILED) { |
10478 | $this->currPos = $p3; |
10479 | $r1 = self::$FAILED; |
10480 | goto seq_1; |
10481 | } |
10482 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "}}}", $this->currPos, 3, false) === 0) { |
10483 | $r23 = "}}}"; |
10484 | $this->currPos += 3; |
10485 | } else { |
10486 | if (!$silence) {$this->fail(61);} |
10487 | $r23 = self::$FAILED; |
10488 | $this->currPos = $p3; |
10489 | $r1 = self::$FAILED; |
10490 | goto seq_1; |
10491 | } |
10492 | $r1 = true; |
10493 | seq_1: |
10494 | if ($r1!==self::$FAILED) { |
10495 | $this->savedPos = $p2; |
10496 | $r1 = $this->a101($r5, $r7, $r8); |
10497 | } |
10498 | // free $p3 |
10499 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
10500 | $this->currPos, |
10501 | $r1, |
10502 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
10503 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
10504 | ); |
10505 | return $r1; |
10506 | }, "tplarg_preproc", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
10507 | |
10508 | } |
10509 | private function discardwikilink_preproc($silence, $boolParams, &$param_preproc, &$param_th) { |
10510 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
10511 | $key = json_encode([427, $boolParams & 0x1fff, $param_preproc, $param_th]); |
10512 | $bucket = $this->currPos; |
10513 | $cached = $this->cache[$bucket][$key] ?? null; |
10514 | if ($cached) { |
10515 | $this->currPos = $cached->nextPos; |
10516 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
10517 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
10518 | return $cached->result; |
10519 | } |
10520 | $saved_preproc=$param_preproc; |
10521 | $saved_th=$param_th; |
10522 | $p2 = $this->currPos; |
10523 | // start seq_1 |
10524 | $p3 = $this->currPos; |
10525 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "[[", $this->currPos, 2, false) === 0) { |
10526 | $r4 = "[["; |
10527 | $this->currPos += 2; |
10528 | } else { |
10529 | if (!$silence) {$this->fail(41);} |
10530 | $r4 = self::$FAILED; |
10531 | $r1 = self::$FAILED; |
10532 | goto seq_1; |
10533 | } |
10534 | $p6 = $this->currPos; |
10535 | $r5 = ''; |
10536 | // spos <- $r5 |
10537 | if ($r5!==self::$FAILED) { |
10538 | $this->savedPos = $p6; |
10539 | $r5 = $this->a17(); |
10540 | } else { |
10541 | $this->currPos = $p3; |
10542 | $r1 = self::$FAILED; |
10543 | goto seq_1; |
10544 | } |
10545 | $r7 = $this->parsewikilink_preprocessor_text($silence, $boolParams, $param_preproc, $param_th); |
10546 | if ($r7===self::$FAILED) { |
10547 | $r7 = null; |
10548 | } |
10549 | // target <- $r7 |
10550 | $p9 = $this->currPos; |
10551 | $r8 = ''; |
10552 | // tpos <- $r8 |
10553 | if ($r8!==self::$FAILED) { |
10554 | $this->savedPos = $p9; |
10555 | $r8 = $this->a107($r5, $r7); |
10556 | } else { |
10557 | $this->currPos = $p3; |
10558 | $r1 = self::$FAILED; |
10559 | goto seq_1; |
10560 | } |
10561 | $r10 = $this->parsewikilink_content($silence, $boolParams, $param_preproc, $param_th); |
10562 | // lcs <- $r10 |
10563 | if ($r10===self::$FAILED) { |
10564 | $this->currPos = $p3; |
10565 | $r1 = self::$FAILED; |
10566 | goto seq_1; |
10567 | } |
10568 | $r11 = $this->discardinline_breaks($silence, $boolParams, $param_preproc, $param_th); |
10569 | if ($r11===self::$FAILED) { |
10570 | $this->currPos = $p3; |
10571 | $r1 = self::$FAILED; |
10572 | goto seq_1; |
10573 | } |
10574 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "]]", $this->currPos, 2, false) === 0) { |
10575 | $r12 = "]]"; |
10576 | $this->currPos += 2; |
10577 | } else { |
10578 | if (!$silence) {$this->fail(63);} |
10579 | $r12 = self::$FAILED; |
10580 | $this->currPos = $p3; |
10581 | $r1 = self::$FAILED; |
10582 | goto seq_1; |
10583 | } |
10584 | $r1 = true; |
10585 | seq_1: |
10586 | if ($r1!==self::$FAILED) { |
10587 | $this->savedPos = $p2; |
10588 | $r1 = $this->a108($r5, $r7, $r8, $r10); |
10589 | } |
10590 | // free $p3 |
10591 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
10592 | $this->currPos, |
10593 | $r1, |
10594 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
10595 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
10596 | ); |
10597 | return $r1; |
10598 | }, "wikilink_preproc", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
10599 | |
10600 | } |
10601 | private function discardbroken_wikilink($silence, $boolParams, &$param_preproc, &$param_th) { |
10602 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
10603 | $key = json_encode([425, $boolParams & 0x1fff, $param_preproc, $param_th]); |
10604 | $bucket = $this->currPos; |
10605 | $cached = $this->cache[$bucket][$key] ?? null; |
10606 | if ($cached) { |
10607 | $this->currPos = $cached->nextPos; |
10608 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
10609 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
10610 | return $cached->result; |
10611 | } |
10612 | $saved_preproc=$param_preproc; |
10613 | $saved_th=$param_th; |
10614 | $p2 = $this->currPos; |
10615 | // start seq_1 |
10616 | $p3 = $this->currPos; |
10617 | $p4 = $this->currPos; |
10618 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "[[", $this->currPos, 2, false) === 0) { |
10619 | $r5 = "[["; |
10620 | $this->currPos += 2; |
10621 | $r5 = false; |
10622 | $this->currPos = $p4; |
10623 | } else { |
10624 | $r5 = self::$FAILED; |
10625 | $r1 = self::$FAILED; |
10626 | goto seq_1; |
10627 | } |
10628 | // free $p4 |
10629 | $this->savedPos = $this->currPos; |
10630 | $r6 = $this->a109($param_preproc); |
10631 | if ($r6) { |
10632 | $r6 = false; |
10633 | } else { |
10634 | $r6 = self::$FAILED; |
10635 | $this->currPos = $p3; |
10636 | $r1 = self::$FAILED; |
10637 | goto seq_1; |
10638 | } |
10639 | // start seq_2 |
10640 | $p4 = $this->currPos; |
10641 | if (($this->input[$this->currPos] ?? null) === "[") { |
10642 | $this->currPos++; |
10643 | $r8 = "["; |
10644 | } else { |
10645 | if (!$silence) {$this->fail(19);} |
10646 | $r8 = self::$FAILED; |
10647 | $r7 = self::$FAILED; |
10648 | goto seq_2; |
10649 | } |
10650 | // start choice_1 |
10651 | $r9 = $this->parseextlink($silence, $boolParams, $param_preproc, $param_th); |
10652 | if ($r9!==self::$FAILED) { |
10653 | goto choice_1; |
10654 | } |
10655 | if (($this->input[$this->currPos] ?? null) === "[") { |
10656 | $this->currPos++; |
10657 | $r9 = "["; |
10658 | } else { |
10659 | if (!$silence) {$this->fail(19);} |
10660 | $r9 = self::$FAILED; |
10661 | } |
10662 | choice_1: |
10663 | if ($r9===self::$FAILED) { |
10664 | $this->currPos = $p4; |
10665 | $r7 = self::$FAILED; |
10666 | goto seq_2; |
10667 | } |
10668 | $r7 = [$r8,$r9]; |
10669 | seq_2: |
10670 | // a <- $r7 |
10671 | if ($r7===self::$FAILED) { |
10672 | $this->currPos = $p3; |
10673 | $r1 = self::$FAILED; |
10674 | goto seq_1; |
10675 | } |
10676 | // free $p4 |
10677 | $r1 = true; |
10678 | seq_1: |
10679 | if ($r1!==self::$FAILED) { |
10680 | $this->savedPos = $p2; |
10681 | $r1 = $this->a110($param_preproc, $r7); |
10682 | } |
10683 | // free $p3 |
10684 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
10685 | $this->currPos, |
10686 | $r1, |
10687 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
10688 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
10689 | ); |
10690 | return $r1; |
10691 | }, "broken_wikilink", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
10692 | |
10693 | } |
10694 | private function parsewellformed_extension_tag($silence, $boolParams, &$param_preproc, &$param_th) { |
10695 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
10696 | $key = json_encode([444, $boolParams & 0x1ebf, $param_preproc, $param_th]); |
10697 | $bucket = $this->currPos; |
10698 | $cached = $this->cache[$bucket][$key] ?? null; |
10699 | if ($cached) { |
10700 | $this->currPos = $cached->nextPos; |
10701 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
10702 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
10703 | return $cached->result; |
10704 | } |
10705 | $saved_preproc=$param_preproc; |
10706 | $saved_th=$param_th; |
10707 | $p2 = $this->currPos; |
10708 | // start seq_1 |
10709 | $p3 = $this->currPos; |
10710 | $r4 = $this->parsemaybe_extension_tag($silence, $boolParams, $param_preproc, $param_th); |
10711 | // extToken <- $r4 |
10712 | if ($r4===self::$FAILED) { |
10713 | $r1 = self::$FAILED; |
10714 | goto seq_1; |
10715 | } |
10716 | $this->savedPos = $this->currPos; |
10717 | $r5 = $this->a111($r4); |
10718 | if ($r5) { |
10719 | $r5 = false; |
10720 | } else { |
10721 | $r5 = self::$FAILED; |
10722 | $this->currPos = $p3; |
10723 | $r1 = self::$FAILED; |
10724 | goto seq_1; |
10725 | } |
10726 | $r1 = true; |
10727 | seq_1: |
10728 | if ($r1!==self::$FAILED) { |
10729 | $this->savedPos = $p2; |
10730 | $r1 = $this->a112($r4); |
10731 | } |
10732 | // free $p3 |
10733 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
10734 | $this->currPos, |
10735 | $r1, |
10736 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
10737 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
10738 | ); |
10739 | return $r1; |
10740 | }, "wellformed_extension_tag", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
10741 | |
10742 | } |
10743 | private function parsexmlish_tag($silence, $boolParams, &$param_preproc, &$param_th) { |
10744 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
10745 | $key = json_encode([458, $boolParams & 0x1ebf, $param_preproc, $param_th]); |
10746 | $bucket = $this->currPos; |
10747 | $cached = $this->cache[$bucket][$key] ?? null; |
10748 | if ($cached) { |
10749 | $this->currPos = $cached->nextPos; |
10750 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
10751 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
10752 | return $cached->result; |
10753 | } |
10754 | $saved_preproc=$param_preproc; |
10755 | $saved_th=$param_th; |
10756 | $p2 = $this->currPos; |
10757 | // start seq_1 |
10758 | $p3 = $this->currPos; |
10759 | $r4 = $this->parsexmlish_start($silence); |
10760 | // start <- $r4 |
10761 | if ($r4===self::$FAILED) { |
10762 | $this->currPos = $p3; |
10763 | $r1 = self::$FAILED; |
10764 | goto seq_1; |
10765 | } |
10766 | $this->savedPos = $this->currPos; |
10767 | $r5 = $this->a113(/*annOrExtTag*/($boolParams & 0x2) !== 0, $r4); |
10768 | if ($r5) { |
10769 | $r5 = false; |
10770 | } else { |
10771 | $r5 = self::$FAILED; |
10772 | $this->currPos = $p3; |
10773 | $r1 = self::$FAILED; |
10774 | goto seq_1; |
10775 | } |
10776 | $r6 = $this->parsegeneric_newline_attributes($silence, $boolParams & ~0x140, $param_preproc, $param_th); |
10777 | // attribs <- $r6 |
10778 | if ($r6===self::$FAILED) { |
10779 | $this->currPos = $p3; |
10780 | $r1 = self::$FAILED; |
10781 | goto seq_1; |
10782 | } |
10783 | for (;;) { |
10784 | $r8 = $this->discardspace_or_newline_or_solidus($silence); |
10785 | if ($r8===self::$FAILED) { |
10786 | break; |
10787 | } |
10788 | } |
10789 | // free $r8 |
10790 | $r7 = true; |
10791 | if ($r7===self::$FAILED) { |
10792 | $this->currPos = $p3; |
10793 | $r1 = self::$FAILED; |
10794 | goto seq_1; |
10795 | } |
10796 | // free $r7 |
10797 | if (($this->input[$this->currPos] ?? null) === "/") { |
10798 | $this->currPos++; |
10799 | $r7 = "/"; |
10800 | } else { |
10801 | if (!$silence) {$this->fail(35);} |
10802 | $r7 = self::$FAILED; |
10803 | $r7 = null; |
10804 | } |
10805 | // selfclose <- $r7 |
10806 | for (;;) { |
10807 | $r9 = $this->discardspace($silence); |
10808 | if ($r9===self::$FAILED) { |
10809 | break; |
10810 | } |
10811 | } |
10812 | // free $r9 |
10813 | $r8 = true; |
10814 | if ($r8===self::$FAILED) { |
10815 | $this->currPos = $p3; |
10816 | $r1 = self::$FAILED; |
10817 | goto seq_1; |
10818 | } |
10819 | // free $r8 |
10820 | if (($this->input[$this->currPos] ?? null) === ">") { |
10821 | $this->currPos++; |
10822 | $r8 = ">"; |
10823 | } else { |
10824 | if (!$silence) {$this->fail(64);} |
10825 | $r8 = self::$FAILED; |
10826 | $this->currPos = $p3; |
10827 | $r1 = self::$FAILED; |
10828 | goto seq_1; |
10829 | } |
10830 | $r1 = true; |
10831 | seq_1: |
10832 | if ($r1!==self::$FAILED) { |
10833 | $this->savedPos = $p2; |
10834 | $r1 = $this->a114(/*annOrExtTag*/($boolParams & 0x2) !== 0, $r4, $r6, $r7); |
10835 | } |
10836 | // free $p3 |
10837 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
10838 | $this->currPos, |
10839 | $r1, |
10840 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
10841 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
10842 | ); |
10843 | return $r1; |
10844 | }, "xmlish_tag", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
10845 | |
10846 | } |
10847 | private function parseautourl($silence, $boolParams, &$param_preproc, &$param_th) { |
10848 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
10849 | $key = json_encode([360, $boolParams & 0x1fff, $param_preproc, $param_th]); |
10850 | $bucket = $this->currPos; |
10851 | $cached = $this->cache[$bucket][$key] ?? null; |
10852 | if ($cached) { |
10853 | $this->currPos = $cached->nextPos; |
10854 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
10855 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
10856 | return $cached->result; |
10857 | } |
10858 | $saved_preproc=$param_preproc; |
10859 | $saved_th=$param_th; |
10860 | $p2 = $this->currPos; |
10861 | // start seq_1 |
10862 | $p3 = $this->currPos; |
10863 | $p4 = $this->currPos; |
10864 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "//", $this->currPos, 2, false) === 0) { |
10865 | $r5 = "//"; |
10866 | $this->currPos += 2; |
10867 | } else { |
10868 | $r5 = self::$FAILED; |
10869 | } |
10870 | if ($r5 === self::$FAILED) { |
10871 | $r5 = false; |
10872 | } else { |
10873 | $r5 = self::$FAILED; |
10874 | $this->currPos = $p4; |
10875 | $r1 = self::$FAILED; |
10876 | goto seq_1; |
10877 | } |
10878 | // free $p4 |
10879 | $p4 = $this->currPos; |
10880 | // start seq_2 |
10881 | $p7 = $this->currPos; |
10882 | $r8 = $this->parseurl_protocol($silence); |
10883 | // proto <- $r8 |
10884 | if ($r8===self::$FAILED) { |
10885 | $r6 = self::$FAILED; |
10886 | goto seq_2; |
10887 | } |
10888 | // start choice_1 |
10889 | $r9 = $this->parseipv6urladdr($silence); |
10890 | if ($r9!==self::$FAILED) { |
10891 | goto choice_1; |
10892 | } |
10893 | $r9 = ''; |
10894 | choice_1: |
10895 | // addr <- $r9 |
10896 | if ($r9===self::$FAILED) { |
10897 | $this->currPos = $p7; |
10898 | $r6 = self::$FAILED; |
10899 | goto seq_2; |
10900 | } |
10901 | $r10 = []; |
10902 | for (;;) { |
10903 | $p12 = $this->currPos; |
10904 | // start seq_3 |
10905 | $p13 = $this->currPos; |
10906 | $p14 = $this->currPos; |
10907 | $r15 = $this->discardinline_breaks(true, $boolParams, $param_preproc, $param_th); |
10908 | if ($r15 === self::$FAILED) { |
10909 | $r15 = false; |
10910 | } else { |
10911 | $r15 = self::$FAILED; |
10912 | $this->currPos = $p14; |
10913 | $r11 = self::$FAILED; |
10914 | goto seq_3; |
10915 | } |
10916 | // free $p14 |
10917 | // start choice_2 |
10918 | $r16 = $this->parseno_punctuation_char($silence); |
10919 | if ($r16!==self::$FAILED) { |
10920 | goto choice_2; |
10921 | } |
10922 | $r16 = $this->parsecomment($silence); |
10923 | if ($r16!==self::$FAILED) { |
10924 | goto choice_2; |
10925 | } |
10926 | $r16 = $this->parsetplarg_or_template($silence, $boolParams, $param_th, $param_preproc); |
10927 | if ($r16!==self::$FAILED) { |
10928 | goto choice_2; |
10929 | } |
10930 | $p14 = $this->currPos; |
10931 | // start seq_4 |
10932 | $p17 = $this->currPos; |
10933 | if (($this->input[$this->currPos] ?? null) === "'") { |
10934 | $this->currPos++; |
10935 | $r18 = "'"; |
10936 | } else { |
10937 | if (!$silence) {$this->fail(33);} |
10938 | $r18 = self::$FAILED; |
10939 | $r16 = self::$FAILED; |
10940 | goto seq_4; |
10941 | } |
10942 | $p19 = $this->currPos; |
10943 | if (($this->input[$this->currPos] ?? null) === "'") { |
10944 | $this->currPos++; |
10945 | $r20 = "'"; |
10946 | } else { |
10947 | $r20 = self::$FAILED; |
10948 | } |
10949 | if ($r20 === self::$FAILED) { |
10950 | $r20 = false; |
10951 | } else { |
10952 | $r20 = self::$FAILED; |
10953 | $this->currPos = $p19; |
10954 | $this->currPos = $p17; |
10955 | $r16 = self::$FAILED; |
10956 | goto seq_4; |
10957 | } |
10958 | // free $p19 |
10959 | $r16 = true; |
10960 | seq_4: |
10961 | if ($r16!==self::$FAILED) { |
10962 | $r16 = substr($this->input, $p14, $this->currPos - $p14); |
10963 | goto choice_2; |
10964 | } else { |
10965 | $r16 = self::$FAILED; |
10966 | } |
10967 | // free $p17 |
10968 | // free $p14 |
10969 | if (($this->input[$this->currPos] ?? null) === "{") { |
10970 | $this->currPos++; |
10971 | $r16 = "{"; |
10972 | goto choice_2; |
10973 | } else { |
10974 | if (!$silence) {$this->fail(29);} |
10975 | $r16 = self::$FAILED; |
10976 | } |
10977 | $p14 = $this->currPos; |
10978 | // start seq_5 |
10979 | $p17 = $this->currPos; |
10980 | $p19 = $this->currPos; |
10981 | // start seq_6 |
10982 | $p22 = $this->currPos; |
10983 | $r23 = $this->parseraw_htmlentity(true); |
10984 | // rhe <- $r23 |
10985 | if ($r23===self::$FAILED) { |
10986 | $r21 = self::$FAILED; |
10987 | goto seq_6; |
10988 | } |
10989 | $this->savedPos = $this->currPos; |
10990 | $r24 = $this->a115($r8, $r9, $r23); |
10991 | if ($r24) { |
10992 | $r24 = false; |
10993 | } else { |
10994 | $r24 = self::$FAILED; |
10995 | $this->currPos = $p22; |
10996 | $r21 = self::$FAILED; |
10997 | goto seq_6; |
10998 | } |
10999 | $r21 = true; |
11000 | seq_6: |
11001 | // free $p22 |
11002 | if ($r21 === self::$FAILED) { |
11003 | $r21 = false; |
11004 | } else { |
11005 | $r21 = self::$FAILED; |
11006 | $this->currPos = $p19; |
11007 | $r16 = self::$FAILED; |
11008 | goto seq_5; |
11009 | } |
11010 | // free $p19 |
11011 | // start choice_3 |
11012 | $p19 = $this->currPos; |
11013 | // start seq_7 |
11014 | $p22 = $this->currPos; |
11015 | $p26 = $this->currPos; |
11016 | if (($this->input[$this->currPos] ?? null) === "&") { |
11017 | $this->currPos++; |
11018 | $r27 = "&"; |
11019 | $r27 = false; |
11020 | $this->currPos = $p26; |
11021 | } else { |
11022 | $r27 = self::$FAILED; |
11023 | $r25 = self::$FAILED; |
11024 | goto seq_7; |
11025 | } |
11026 | // free $p26 |
11027 | $r28 = $this->parsehtmlentity($silence); |
11028 | // he <- $r28 |
11029 | if ($r28===self::$FAILED) { |
11030 | $this->currPos = $p22; |
11031 | $r25 = self::$FAILED; |
11032 | goto seq_7; |
11033 | } |
11034 | $r25 = true; |
11035 | seq_7: |
11036 | if ($r25!==self::$FAILED) { |
11037 | $this->savedPos = $p19; |
11038 | $r25 = $this->a9($r8, $r9, $r28); |
11039 | goto choice_3; |
11040 | } |
11041 | // free $p22 |
11042 | if (($this->input[$this->currPos] ?? null) === "&") { |
11043 | $this->currPos++; |
11044 | $r25 = "&"; |
11045 | } else { |
11046 | if (!$silence) {$this->fail(4);} |
11047 | $r25 = self::$FAILED; |
11048 | } |
11049 | choice_3: |
11050 | // r <- $r25 |
11051 | if ($r25===self::$FAILED) { |
11052 | $this->currPos = $p17; |
11053 | $r16 = self::$FAILED; |
11054 | goto seq_5; |
11055 | } |
11056 | $r16 = true; |
11057 | seq_5: |
11058 | if ($r16!==self::$FAILED) { |
11059 | $this->savedPos = $p14; |
11060 | $r16 = $this->a10($r8, $r9, $r25); |
11061 | } |
11062 | // free $p17 |
11063 | choice_2: |
11064 | // c <- $r16 |
11065 | if ($r16===self::$FAILED) { |
11066 | $this->currPos = $p13; |
11067 | $r11 = self::$FAILED; |
11068 | goto seq_3; |
11069 | } |
11070 | $r11 = true; |
11071 | seq_3: |
11072 | if ($r11!==self::$FAILED) { |
11073 | $this->savedPos = $p12; |
11074 | $r11 = $this->a11($r8, $r9, $r16); |
11075 | $r10[] = $r11; |
11076 | } else { |
11077 | break; |
11078 | } |
11079 | // free $p13 |
11080 | } |
11081 | // path <- $r10 |
11082 | // free $r11 |
11083 | $r6 = true; |
11084 | seq_2: |
11085 | // r <- $r6 |
11086 | if ($r6!==self::$FAILED) { |
11087 | $this->savedPos = $p4; |
11088 | $r6 = $this->a116($r8, $r9, $r10); |
11089 | } else { |
11090 | $this->currPos = $p3; |
11091 | $r1 = self::$FAILED; |
11092 | goto seq_1; |
11093 | } |
11094 | // free $p7 |
11095 | $this->savedPos = $this->currPos; |
11096 | $r11 = $this->a117($r6); |
11097 | if ($r11) { |
11098 | $r11 = false; |
11099 | } else { |
11100 | $r11 = self::$FAILED; |
11101 | $this->currPos = $p3; |
11102 | $r1 = self::$FAILED; |
11103 | goto seq_1; |
11104 | } |
11105 | $r1 = true; |
11106 | seq_1: |
11107 | if ($r1!==self::$FAILED) { |
11108 | $this->savedPos = $p2; |
11109 | $r1 = $this->a118($r6); |
11110 | } |
11111 | // free $p3 |
11112 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
11113 | $this->currPos, |
11114 | $r1, |
11115 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
11116 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
11117 | ); |
11118 | return $r1; |
11119 | }, "autourl", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
11120 | |
11121 | } |
11122 | private function parseautoref($silence) { |
11123 | return $this->traceCall(function($silence) { |
11124 | $key = 350; |
11125 | $bucket = $this->currPos; |
11126 | $cached = $this->cache[$bucket][$key] ?? null; |
11127 | if ($cached) { |
11128 | $this->currPos = $cached->nextPos; |
11129 | |
11130 | return $cached->result; |
11131 | } |
11132 | |
11133 | $p2 = $this->currPos; |
11134 | // start seq_1 |
11135 | $p3 = $this->currPos; |
11136 | // start choice_1 |
11137 | $r4 = $this->parseRFC($silence); |
11138 | if ($r4!==self::$FAILED) { |
11139 | goto choice_1; |
11140 | } |
11141 | $r4 = $this->parsePMID($silence); |
11142 | choice_1: |
11143 | // ref <- $r4 |
11144 | if ($r4===self::$FAILED) { |
11145 | $r1 = self::$FAILED; |
11146 | goto seq_1; |
11147 | } |
11148 | $r5 = []; |
11149 | for (;;) { |
11150 | $r6 = $this->parsespace_or_nbsp($silence); |
11151 | if ($r6!==self::$FAILED) { |
11152 | $r5[] = $r6; |
11153 | } else { |
11154 | break; |
11155 | } |
11156 | } |
11157 | if (count($r5) === 0) { |
11158 | $r5 = self::$FAILED; |
11159 | } |
11160 | // sp <- $r5 |
11161 | if ($r5===self::$FAILED) { |
11162 | $this->currPos = $p3; |
11163 | $r1 = self::$FAILED; |
11164 | goto seq_1; |
11165 | } |
11166 | // free $r6 |
11167 | $p7 = $this->currPos; |
11168 | $r6 = self::$FAILED; |
11169 | for (;;) { |
11170 | $r8 = $this->input[$this->currPos] ?? ''; |
11171 | if (preg_match("/^[0-9]/", $r8)) { |
11172 | $this->currPos++; |
11173 | $r6 = true; |
11174 | } else { |
11175 | $r8 = self::$FAILED; |
11176 | if (!$silence) {$this->fail(65);} |
11177 | break; |
11178 | } |
11179 | } |
11180 | // identifier <- $r6 |
11181 | if ($r6!==self::$FAILED) { |
11182 | $r6 = substr($this->input, $p7, $this->currPos - $p7); |
11183 | } else { |
11184 | $r6 = self::$FAILED; |
11185 | $this->currPos = $p3; |
11186 | $r1 = self::$FAILED; |
11187 | goto seq_1; |
11188 | } |
11189 | // free $r8 |
11190 | // free $p7 |
11191 | $r8 = $this->discardend_of_word($silence); |
11192 | if ($r8===self::$FAILED) { |
11193 | $this->currPos = $p3; |
11194 | $r1 = self::$FAILED; |
11195 | goto seq_1; |
11196 | } |
11197 | $r1 = true; |
11198 | seq_1: |
11199 | if ($r1!==self::$FAILED) { |
11200 | $this->savedPos = $p2; |
11201 | $r1 = $this->a119($r4, $r5, $r6); |
11202 | } |
11203 | // free $p3 |
11204 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
11205 | $this->currPos, |
11206 | $r1, |
11207 | self::$UNDEFINED, |
11208 | self::$UNDEFINED |
11209 | ); |
11210 | return $r1; |
11211 | }, "autoref", ["\$silence"], [$silence]); |
11212 | |
11213 | } |
11214 | private function parseisbn($silence) { |
11215 | return $this->traceCall(function($silence) { |
11216 | $key = 352; |
11217 | $bucket = $this->currPos; |
11218 | $cached = $this->cache[$bucket][$key] ?? null; |
11219 | if ($cached) { |
11220 | $this->currPos = $cached->nextPos; |
11221 | |
11222 | return $cached->result; |
11223 | } |
11224 | |
11225 | $p2 = $this->currPos; |
11226 | // start seq_1 |
11227 | $p3 = $this->currPos; |
11228 | $this->savedPos = $this->currPos; |
11229 | $r4 = $this->a120(); |
11230 | if ($r4) { |
11231 | $r4 = false; |
11232 | } else { |
11233 | $r4 = self::$FAILED; |
11234 | $r1 = self::$FAILED; |
11235 | goto seq_1; |
11236 | } |
11237 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "ISBN", $this->currPos, 4, false) === 0) { |
11238 | $r5 = "ISBN"; |
11239 | $this->currPos += 4; |
11240 | } else { |
11241 | if (!$silence) {$this->fail(66);} |
11242 | $r5 = self::$FAILED; |
11243 | $this->currPos = $p3; |
11244 | $r1 = self::$FAILED; |
11245 | goto seq_1; |
11246 | } |
11247 | $r6 = []; |
11248 | for (;;) { |
11249 | $r7 = $this->parsespace_or_nbsp($silence); |
11250 | if ($r7!==self::$FAILED) { |
11251 | $r6[] = $r7; |
11252 | } else { |
11253 | break; |
11254 | } |
11255 | } |
11256 | if (count($r6) === 0) { |
11257 | $r6 = self::$FAILED; |
11258 | } |
11259 | // sp <- $r6 |
11260 | if ($r6===self::$FAILED) { |
11261 | $this->currPos = $p3; |
11262 | $r1 = self::$FAILED; |
11263 | goto seq_1; |
11264 | } |
11265 | // free $r7 |
11266 | // start seq_2 |
11267 | $p8 = $this->currPos; |
11268 | $r9 = $this->input[$this->currPos] ?? ''; |
11269 | if (preg_match("/^[0-9]/", $r9)) { |
11270 | $this->currPos++; |
11271 | } else { |
11272 | $r9 = self::$FAILED; |
11273 | if (!$silence) {$this->fail(65);} |
11274 | $r7 = self::$FAILED; |
11275 | goto seq_2; |
11276 | } |
11277 | $r10 = []; |
11278 | for (;;) { |
11279 | // start seq_3 |
11280 | $p12 = $this->currPos; |
11281 | // start choice_1 |
11282 | $r13 = $this->parsespace_or_nbsp_or_dash($silence); |
11283 | if ($r13!==self::$FAILED) { |
11284 | goto choice_1; |
11285 | } |
11286 | $r13 = ''; |
11287 | choice_1: |
11288 | if ($r13===self::$FAILED) { |
11289 | $r11 = self::$FAILED; |
11290 | goto seq_3; |
11291 | } |
11292 | $r14 = $this->input[$this->currPos] ?? ''; |
11293 | if (preg_match("/^[0-9]/", $r14)) { |
11294 | $this->currPos++; |
11295 | } else { |
11296 | $r14 = self::$FAILED; |
11297 | if (!$silence) {$this->fail(65);} |
11298 | $this->currPos = $p12; |
11299 | $r11 = self::$FAILED; |
11300 | goto seq_3; |
11301 | } |
11302 | $r11 = [$r13,$r14]; |
11303 | seq_3: |
11304 | if ($r11!==self::$FAILED) { |
11305 | $r10[] = $r11; |
11306 | } else { |
11307 | break; |
11308 | } |
11309 | // free $p12 |
11310 | } |
11311 | if (count($r10) === 0) { |
11312 | $r10 = self::$FAILED; |
11313 | } |
11314 | if ($r10===self::$FAILED) { |
11315 | $this->currPos = $p8; |
11316 | $r7 = self::$FAILED; |
11317 | goto seq_2; |
11318 | } |
11319 | // free $r11 |
11320 | // start choice_2 |
11321 | // start seq_4 |
11322 | $p12 = $this->currPos; |
11323 | // start choice_3 |
11324 | $r15 = $this->parsespace_or_nbsp_or_dash($silence); |
11325 | if ($r15!==self::$FAILED) { |
11326 | goto choice_3; |
11327 | } |
11328 | $r15 = ''; |
11329 | choice_3: |
11330 | if ($r15===self::$FAILED) { |
11331 | $r11 = self::$FAILED; |
11332 | goto seq_4; |
11333 | } |
11334 | $r16 = $this->input[$this->currPos] ?? ''; |
11335 | if ($r16 === "x" || $r16 === "X") { |
11336 | $this->currPos++; |
11337 | } else { |
11338 | $r16 = self::$FAILED; |
11339 | if (!$silence) {$this->fail(67);} |
11340 | $this->currPos = $p12; |
11341 | $r11 = self::$FAILED; |
11342 | goto seq_4; |
11343 | } |
11344 | $r11 = [$r15,$r16]; |
11345 | seq_4: |
11346 | if ($r11!==self::$FAILED) { |
11347 | goto choice_2; |
11348 | } |
11349 | // free $p12 |
11350 | $r11 = ''; |
11351 | choice_2: |
11352 | if ($r11===self::$FAILED) { |
11353 | $this->currPos = $p8; |
11354 | $r7 = self::$FAILED; |
11355 | goto seq_2; |
11356 | } |
11357 | $r7 = [$r9,$r10,$r11]; |
11358 | seq_2: |
11359 | // isbn <- $r7 |
11360 | if ($r7===self::$FAILED) { |
11361 | $this->currPos = $p3; |
11362 | $r1 = self::$FAILED; |
11363 | goto seq_1; |
11364 | } |
11365 | // free $p8 |
11366 | $p8 = $this->currPos; |
11367 | $r17 = $this->discardend_of_word($silence); |
11368 | // isbncode <- $r17 |
11369 | if ($r17!==self::$FAILED) { |
11370 | $this->savedPos = $p8; |
11371 | $r17 = $this->a121($r6, $r7); |
11372 | } else { |
11373 | $this->currPos = $p3; |
11374 | $r1 = self::$FAILED; |
11375 | goto seq_1; |
11376 | } |
11377 | $this->savedPos = $this->currPos; |
11378 | $r18 = $this->a122($r6, $r7, $r17); |
11379 | if ($r18) { |
11380 | $r18 = false; |
11381 | } else { |
11382 | $r18 = self::$FAILED; |
11383 | $this->currPos = $p3; |
11384 | $r1 = self::$FAILED; |
11385 | goto seq_1; |
11386 | } |
11387 | $r1 = true; |
11388 | seq_1: |
11389 | if ($r1!==self::$FAILED) { |
11390 | $this->savedPos = $p2; |
11391 | $r1 = $this->a123($r6, $r7, $r17); |
11392 | } |
11393 | // free $p3 |
11394 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
11395 | $this->currPos, |
11396 | $r1, |
11397 | self::$UNDEFINED, |
11398 | self::$UNDEFINED |
11399 | ); |
11400 | return $r1; |
11401 | }, "isbn", ["\$silence"], [$silence]); |
11402 | |
11403 | } |
11404 | private function discardbehavior_text($silence) { |
11405 | return $this->traceCall(function($silence) { |
11406 | $key = 341; |
11407 | $bucket = $this->currPos; |
11408 | $cached = $this->cache[$bucket][$key] ?? null; |
11409 | if ($cached) { |
11410 | $this->currPos = $cached->nextPos; |
11411 | |
11412 | return $cached->result; |
11413 | } |
11414 | |
11415 | $p1 = $this->currPos; |
11416 | $r2 = self::$FAILED; |
11417 | for (;;) { |
11418 | // start seq_1 |
11419 | $p4 = $this->currPos; |
11420 | $p5 = $this->currPos; |
11421 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "__", $this->currPos, 2, false) === 0) { |
11422 | $r6 = "__"; |
11423 | $this->currPos += 2; |
11424 | } else { |
11425 | $r6 = self::$FAILED; |
11426 | } |
11427 | if ($r6 === self::$FAILED) { |
11428 | $r6 = false; |
11429 | } else { |
11430 | $r6 = self::$FAILED; |
11431 | $this->currPos = $p5; |
11432 | $r3 = self::$FAILED; |
11433 | goto seq_1; |
11434 | } |
11435 | // free $p5 |
11436 | // start choice_1 |
11437 | $r7 = $this->discardtext_char($silence); |
11438 | if ($r7!==self::$FAILED) { |
11439 | goto choice_1; |
11440 | } |
11441 | if (($this->input[$this->currPos] ?? null) === "-") { |
11442 | $this->currPos++; |
11443 | $r7 = "-"; |
11444 | } else { |
11445 | if (!$silence) {$this->fail(55);} |
11446 | $r7 = self::$FAILED; |
11447 | } |
11448 | choice_1: |
11449 | if ($r7===self::$FAILED) { |
11450 | $this->currPos = $p4; |
11451 | $r3 = self::$FAILED; |
11452 | goto seq_1; |
11453 | } |
11454 | $r3 = true; |
11455 | seq_1: |
11456 | if ($r3!==self::$FAILED) { |
11457 | $r2 = true; |
11458 | } else { |
11459 | break; |
11460 | } |
11461 | // free $p4 |
11462 | } |
11463 | if ($r2!==self::$FAILED) { |
11464 | $r2 = substr($this->input, $p1, $this->currPos - $p1); |
11465 | } else { |
11466 | $r2 = self::$FAILED; |
11467 | } |
11468 | // free $r3 |
11469 | // free $p1 |
11470 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
11471 | $this->currPos, |
11472 | $r2, |
11473 | self::$UNDEFINED, |
11474 | self::$UNDEFINED |
11475 | ); |
11476 | return $r2; |
11477 | }, "behavior_text", ["\$silence"], [$silence]); |
11478 | |
11479 | } |
11480 | private function parsemaybe_extension_tag($silence, $boolParams, &$param_preproc, &$param_th) { |
11481 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
11482 | $key = json_encode([442, $boolParams & 0x1ebf, $param_preproc, $param_th]); |
11483 | $bucket = $this->currPos; |
11484 | $cached = $this->cache[$bucket][$key] ?? null; |
11485 | if ($cached) { |
11486 | $this->currPos = $cached->nextPos; |
11487 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
11488 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
11489 | return $cached->result; |
11490 | } |
11491 | $saved_preproc=$param_preproc; |
11492 | $saved_th=$param_th; |
11493 | $p2 = $this->currPos; |
11494 | // start seq_1 |
11495 | $p3 = $this->currPos; |
11496 | $p4 = $this->currPos; |
11497 | $r5 = $this->discardextension_check(true, $boolParams); |
11498 | if ($r5!==self::$FAILED) { |
11499 | $r5 = false; |
11500 | $this->currPos = $p4; |
11501 | } else { |
11502 | $r1 = self::$FAILED; |
11503 | goto seq_1; |
11504 | } |
11505 | // free $p4 |
11506 | $r6 = $this->parsexmlish_tag($silence, $boolParams | 0x2, $param_preproc, $param_th); |
11507 | // t <- $r6 |
11508 | if ($r6===self::$FAILED) { |
11509 | $this->currPos = $p3; |
11510 | $r1 = self::$FAILED; |
11511 | goto seq_1; |
11512 | } |
11513 | $r1 = true; |
11514 | seq_1: |
11515 | if ($r1!==self::$FAILED) { |
11516 | $this->savedPos = $p2; |
11517 | $r1 = $this->a124($r6); |
11518 | } |
11519 | // free $p3 |
11520 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
11521 | $this->currPos, |
11522 | $r1, |
11523 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
11524 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
11525 | ); |
11526 | return $r1; |
11527 | }, "maybe_extension_tag", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
11528 | |
11529 | } |
11530 | private function parselang_variant($silence, $boolParams, &$param_th, &$param_preproc) { |
11531 | return $this->traceCall(function($silence, $boolParams, &$param_th, &$param_preproc) { |
11532 | $key = json_encode([394, $boolParams & 0x1ff7, $param_th, $param_preproc]); |
11533 | $bucket = $this->currPos; |
11534 | $cached = $this->cache[$bucket][$key] ?? null; |
11535 | if ($cached) { |
11536 | $this->currPos = $cached->nextPos; |
11537 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
11538 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
11539 | return $cached->result; |
11540 | } |
11541 | $saved_th=$param_th; |
11542 | $saved_preproc=$param_preproc; |
11543 | // start choice_1 |
11544 | $r1 = $this->parselang_variant_preproc($silence, $boolParams & ~0x8, self::newRef("}-"), $param_th); |
11545 | if ($r1!==self::$FAILED) { |
11546 | goto choice_1; |
11547 | } |
11548 | $r1 = $this->parsebroken_lang_variant($silence, $param_preproc); |
11549 | choice_1: |
11550 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
11551 | $this->currPos, |
11552 | $r1, |
11553 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
11554 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
11555 | ); |
11556 | return $r1; |
11557 | }, "lang_variant", ["\$silence", "\$boolParams", "&\$param_th", "&\$param_preproc"], [$silence, $boolParams, &$param_th, &$param_preproc]); |
11558 | |
11559 | } |
11560 | private function parsewikilink_preproc($silence, $boolParams, &$param_preproc, &$param_th) { |
11561 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
11562 | $key = json_encode([426, $boolParams & 0x1fff, $param_preproc, $param_th]); |
11563 | $bucket = $this->currPos; |
11564 | $cached = $this->cache[$bucket][$key] ?? null; |
11565 | if ($cached) { |
11566 | $this->currPos = $cached->nextPos; |
11567 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
11568 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
11569 | return $cached->result; |
11570 | } |
11571 | $saved_preproc=$param_preproc; |
11572 | $saved_th=$param_th; |
11573 | $p2 = $this->currPos; |
11574 | // start seq_1 |
11575 | $p3 = $this->currPos; |
11576 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "[[", $this->currPos, 2, false) === 0) { |
11577 | $r4 = "[["; |
11578 | $this->currPos += 2; |
11579 | } else { |
11580 | if (!$silence) {$this->fail(41);} |
11581 | $r4 = self::$FAILED; |
11582 | $r1 = self::$FAILED; |
11583 | goto seq_1; |
11584 | } |
11585 | $p6 = $this->currPos; |
11586 | $r5 = ''; |
11587 | // spos <- $r5 |
11588 | if ($r5!==self::$FAILED) { |
11589 | $this->savedPos = $p6; |
11590 | $r5 = $this->a17(); |
11591 | } else { |
11592 | $this->currPos = $p3; |
11593 | $r1 = self::$FAILED; |
11594 | goto seq_1; |
11595 | } |
11596 | $r7 = $this->parsewikilink_preprocessor_text($silence, $boolParams, $param_preproc, $param_th); |
11597 | if ($r7===self::$FAILED) { |
11598 | $r7 = null; |
11599 | } |
11600 | // target <- $r7 |
11601 | $p9 = $this->currPos; |
11602 | $r8 = ''; |
11603 | // tpos <- $r8 |
11604 | if ($r8!==self::$FAILED) { |
11605 | $this->savedPos = $p9; |
11606 | $r8 = $this->a107($r5, $r7); |
11607 | } else { |
11608 | $this->currPos = $p3; |
11609 | $r1 = self::$FAILED; |
11610 | goto seq_1; |
11611 | } |
11612 | $r10 = $this->parsewikilink_content($silence, $boolParams, $param_preproc, $param_th); |
11613 | // lcs <- $r10 |
11614 | if ($r10===self::$FAILED) { |
11615 | $this->currPos = $p3; |
11616 | $r1 = self::$FAILED; |
11617 | goto seq_1; |
11618 | } |
11619 | $r11 = $this->discardinline_breaks($silence, $boolParams, $param_preproc, $param_th); |
11620 | if ($r11===self::$FAILED) { |
11621 | $this->currPos = $p3; |
11622 | $r1 = self::$FAILED; |
11623 | goto seq_1; |
11624 | } |
11625 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "]]", $this->currPos, 2, false) === 0) { |
11626 | $r12 = "]]"; |
11627 | $this->currPos += 2; |
11628 | } else { |
11629 | if (!$silence) {$this->fail(63);} |
11630 | $r12 = self::$FAILED; |
11631 | $this->currPos = $p3; |
11632 | $r1 = self::$FAILED; |
11633 | goto seq_1; |
11634 | } |
11635 | $r1 = true; |
11636 | seq_1: |
11637 | if ($r1!==self::$FAILED) { |
11638 | $this->savedPos = $p2; |
11639 | $r1 = $this->a108($r5, $r7, $r8, $r10); |
11640 | } |
11641 | // free $p3 |
11642 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
11643 | $this->currPos, |
11644 | $r1, |
11645 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
11646 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
11647 | ); |
11648 | return $r1; |
11649 | }, "wikilink_preproc", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
11650 | |
11651 | } |
11652 | private function parsebroken_wikilink($silence, $boolParams, &$param_preproc, &$param_th) { |
11653 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
11654 | $key = json_encode([424, $boolParams & 0x1fff, $param_preproc, $param_th]); |
11655 | $bucket = $this->currPos; |
11656 | $cached = $this->cache[$bucket][$key] ?? null; |
11657 | if ($cached) { |
11658 | $this->currPos = $cached->nextPos; |
11659 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
11660 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
11661 | return $cached->result; |
11662 | } |
11663 | $saved_preproc=$param_preproc; |
11664 | $saved_th=$param_th; |
11665 | $p2 = $this->currPos; |
11666 | // start seq_1 |
11667 | $p3 = $this->currPos; |
11668 | $p4 = $this->currPos; |
11669 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "[[", $this->currPos, 2, false) === 0) { |
11670 | $r5 = "[["; |
11671 | $this->currPos += 2; |
11672 | $r5 = false; |
11673 | $this->currPos = $p4; |
11674 | } else { |
11675 | $r5 = self::$FAILED; |
11676 | $r1 = self::$FAILED; |
11677 | goto seq_1; |
11678 | } |
11679 | // free $p4 |
11680 | $this->savedPos = $this->currPos; |
11681 | $r6 = $this->a109($param_preproc); |
11682 | if ($r6) { |
11683 | $r6 = false; |
11684 | } else { |
11685 | $r6 = self::$FAILED; |
11686 | $this->currPos = $p3; |
11687 | $r1 = self::$FAILED; |
11688 | goto seq_1; |
11689 | } |
11690 | // start seq_2 |
11691 | $p4 = $this->currPos; |
11692 | if (($this->input[$this->currPos] ?? null) === "[") { |
11693 | $this->currPos++; |
11694 | $r8 = "["; |
11695 | } else { |
11696 | if (!$silence) {$this->fail(19);} |
11697 | $r8 = self::$FAILED; |
11698 | $r7 = self::$FAILED; |
11699 | goto seq_2; |
11700 | } |
11701 | // start choice_1 |
11702 | $r9 = $this->parseextlink($silence, $boolParams, $param_preproc, $param_th); |
11703 | if ($r9!==self::$FAILED) { |
11704 | goto choice_1; |
11705 | } |
11706 | if (($this->input[$this->currPos] ?? null) === "[") { |
11707 | $this->currPos++; |
11708 | $r9 = "["; |
11709 | } else { |
11710 | if (!$silence) {$this->fail(19);} |
11711 | $r9 = self::$FAILED; |
11712 | } |
11713 | choice_1: |
11714 | if ($r9===self::$FAILED) { |
11715 | $this->currPos = $p4; |
11716 | $r7 = self::$FAILED; |
11717 | goto seq_2; |
11718 | } |
11719 | $r7 = [$r8,$r9]; |
11720 | seq_2: |
11721 | // a <- $r7 |
11722 | if ($r7===self::$FAILED) { |
11723 | $this->currPos = $p3; |
11724 | $r1 = self::$FAILED; |
11725 | goto seq_1; |
11726 | } |
11727 | // free $p4 |
11728 | $r1 = true; |
11729 | seq_1: |
11730 | if ($r1!==self::$FAILED) { |
11731 | $this->savedPos = $p2; |
11732 | $r1 = $this->a110($param_preproc, $r7); |
11733 | } |
11734 | // free $p3 |
11735 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
11736 | $this->currPos, |
11737 | $r1, |
11738 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
11739 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
11740 | ); |
11741 | return $r1; |
11742 | }, "broken_wikilink", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
11743 | |
11744 | } |
11745 | private function parsetable_heading_tags($silence, $boolParams, &$param_preproc) { |
11746 | return $this->traceCall(function($silence, $boolParams, &$param_preproc) { |
11747 | $key = json_encode([504, $boolParams & 0x1fff, $param_preproc]); |
11748 | $bucket = $this->currPos; |
11749 | $cached = $this->cache[$bucket][$key] ?? null; |
11750 | if ($cached) { |
11751 | $this->currPos = $cached->nextPos; |
11752 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
11753 | return $cached->result; |
11754 | } |
11755 | $saved_preproc=$param_preproc; |
11756 | $r1 = $this->parsetable_heading_tags_parameterized($silence, $boolParams, $param_preproc, self::newRef(true)); |
11757 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
11758 | $this->currPos, |
11759 | $r1, |
11760 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
11761 | self::$UNDEFINED |
11762 | ); |
11763 | return $r1; |
11764 | }, "table_heading_tags", ["\$silence", "\$boolParams", "&\$param_preproc"], [$silence, $boolParams, &$param_preproc]); |
11765 | |
11766 | } |
11767 | private function parsetable_row_tag($silence, $boolParams, &$param_preproc, &$param_th) { |
11768 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
11769 | $key = json_encode([502, $boolParams & 0x1fbf, $param_preproc, $param_th]); |
11770 | $bucket = $this->currPos; |
11771 | $cached = $this->cache[$bucket][$key] ?? null; |
11772 | if ($cached) { |
11773 | $this->currPos = $cached->nextPos; |
11774 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
11775 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
11776 | return $cached->result; |
11777 | } |
11778 | $saved_preproc=$param_preproc; |
11779 | $saved_th=$param_th; |
11780 | $p2 = $this->currPos; |
11781 | // start seq_1 |
11782 | $p3 = $this->currPos; |
11783 | if (!(/*tableDataBlock*/($boolParams & 0x1) !== 0)) { |
11784 | $r4 = false; |
11785 | } else { |
11786 | $r4 = self::$FAILED; |
11787 | $r1 = self::$FAILED; |
11788 | goto seq_1; |
11789 | } |
11790 | $r5 = $this->parsepipe($silence); |
11791 | // p <- $r5 |
11792 | if ($r5===self::$FAILED) { |
11793 | $this->currPos = $p3; |
11794 | $r1 = self::$FAILED; |
11795 | goto seq_1; |
11796 | } |
11797 | $p7 = $this->currPos; |
11798 | $r6 = self::$FAILED; |
11799 | for (;;) { |
11800 | if (($this->input[$this->currPos] ?? null) === "-") { |
11801 | $this->currPos++; |
11802 | $r8 = "-"; |
11803 | $r6 = true; |
11804 | } else { |
11805 | if (!$silence) {$this->fail(55);} |
11806 | $r8 = self::$FAILED; |
11807 | break; |
11808 | } |
11809 | } |
11810 | // dashes <- $r6 |
11811 | if ($r6!==self::$FAILED) { |
11812 | $r6 = substr($this->input, $p7, $this->currPos - $p7); |
11813 | } else { |
11814 | $r6 = self::$FAILED; |
11815 | $this->currPos = $p3; |
11816 | $r1 = self::$FAILED; |
11817 | goto seq_1; |
11818 | } |
11819 | // free $r8 |
11820 | // free $p7 |
11821 | // start choice_1 |
11822 | $r8 = $this->parsetable_attributes($silence, $boolParams & ~0x40, $param_preproc, $param_th); |
11823 | if ($r8!==self::$FAILED) { |
11824 | goto choice_1; |
11825 | } |
11826 | $this->savedPos = $this->currPos; |
11827 | $r8 = $this->a125($r5, $r6); |
11828 | if ($r8) { |
11829 | $r8 = false; |
11830 | } else { |
11831 | $r8 = self::$FAILED; |
11832 | } |
11833 | choice_1: |
11834 | // a <- $r8 |
11835 | if ($r8===self::$FAILED) { |
11836 | $this->currPos = $p3; |
11837 | $r1 = self::$FAILED; |
11838 | goto seq_1; |
11839 | } |
11840 | $p7 = $this->currPos; |
11841 | $r9 = ''; |
11842 | // tagEndPos <- $r9 |
11843 | if ($r9!==self::$FAILED) { |
11844 | $this->savedPos = $p7; |
11845 | $r9 = $this->a126($r5, $r6, $r8); |
11846 | } else { |
11847 | $this->currPos = $p3; |
11848 | $r1 = self::$FAILED; |
11849 | goto seq_1; |
11850 | } |
11851 | $r10 = []; |
11852 | for (;;) { |
11853 | $r11 = $this->parsespace($silence); |
11854 | if ($r11!==self::$FAILED) { |
11855 | $r10[] = $r11; |
11856 | } else { |
11857 | break; |
11858 | } |
11859 | } |
11860 | // s2 <- $r10 |
11861 | // free $r11 |
11862 | $r1 = true; |
11863 | seq_1: |
11864 | if ($r1!==self::$FAILED) { |
11865 | $this->savedPos = $p2; |
11866 | $r1 = $this->a127($r5, $r6, $r8, $r9, $r10); |
11867 | } |
11868 | // free $p3 |
11869 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
11870 | $this->currPos, |
11871 | $r1, |
11872 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
11873 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
11874 | ); |
11875 | return $r1; |
11876 | }, "table_row_tag", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
11877 | |
11878 | } |
11879 | private function parsetable_data_tags($silence, $boolParams, &$param_preproc, &$param_th) { |
11880 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
11881 | $key = json_encode([512, $boolParams & 0x1fff, $param_preproc, $param_th]); |
11882 | $bucket = $this->currPos; |
11883 | $cached = $this->cache[$bucket][$key] ?? null; |
11884 | if ($cached) { |
11885 | $this->currPos = $cached->nextPos; |
11886 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
11887 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
11888 | return $cached->result; |
11889 | } |
11890 | $saved_preproc=$param_preproc; |
11891 | $saved_th=$param_th; |
11892 | $p2 = $this->currPos; |
11893 | // start seq_1 |
11894 | $p3 = $this->currPos; |
11895 | if (!(/*tableDataBlock*/($boolParams & 0x1) !== 0)) { |
11896 | $r4 = false; |
11897 | } else { |
11898 | $r4 = self::$FAILED; |
11899 | $r1 = self::$FAILED; |
11900 | goto seq_1; |
11901 | } |
11902 | $r5 = $this->parsepipe($silence); |
11903 | // p <- $r5 |
11904 | if ($r5===self::$FAILED) { |
11905 | $this->currPos = $p3; |
11906 | $r1 = self::$FAILED; |
11907 | goto seq_1; |
11908 | } |
11909 | $p6 = $this->currPos; |
11910 | $r7 = $this->input[$this->currPos] ?? ''; |
11911 | if ($r7 === "+" || $r7 === "-") { |
11912 | $this->currPos++; |
11913 | } else { |
11914 | $r7 = self::$FAILED; |
11915 | } |
11916 | if ($r7 === self::$FAILED) { |
11917 | $r7 = false; |
11918 | } else { |
11919 | $r7 = self::$FAILED; |
11920 | $this->currPos = $p6; |
11921 | $this->currPos = $p3; |
11922 | $r1 = self::$FAILED; |
11923 | goto seq_1; |
11924 | } |
11925 | // free $p6 |
11926 | $r8 = $this->parsetable_data_tag($silence, $boolParams, $param_preproc, $param_th); |
11927 | // td <- $r8 |
11928 | if ($r8===self::$FAILED) { |
11929 | $this->currPos = $p3; |
11930 | $r1 = self::$FAILED; |
11931 | goto seq_1; |
11932 | } |
11933 | $r9 = $this->parsetds($silence, $boolParams, $param_preproc, $param_th); |
11934 | // tds <- $r9 |
11935 | if ($r9===self::$FAILED) { |
11936 | $this->currPos = $p3; |
11937 | $r1 = self::$FAILED; |
11938 | goto seq_1; |
11939 | } |
11940 | $r1 = true; |
11941 | seq_1: |
11942 | if ($r1!==self::$FAILED) { |
11943 | $this->savedPos = $p2; |
11944 | $r1 = $this->a128($r5, $r8, $r9); |
11945 | } |
11946 | // free $p3 |
11947 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
11948 | $this->currPos, |
11949 | $r1, |
11950 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
11951 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
11952 | ); |
11953 | return $r1; |
11954 | }, "table_data_tags", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
11955 | |
11956 | } |
11957 | private function parsetable_caption_tag($silence, $boolParams, &$param_preproc, &$param_th) { |
11958 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
11959 | $key = json_encode([500, $boolParams & 0x1fff, $param_preproc, $param_th]); |
11960 | $bucket = $this->currPos; |
11961 | $cached = $this->cache[$bucket][$key] ?? null; |
11962 | if ($cached) { |
11963 | $this->currPos = $cached->nextPos; |
11964 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
11965 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
11966 | return $cached->result; |
11967 | } |
11968 | $saved_preproc=$param_preproc; |
11969 | $saved_th=$param_th; |
11970 | $p2 = $this->currPos; |
11971 | // start seq_1 |
11972 | $p3 = $this->currPos; |
11973 | if (!(/*tableDataBlock*/($boolParams & 0x1) !== 0)) { |
11974 | $r4 = false; |
11975 | } else { |
11976 | $r4 = self::$FAILED; |
11977 | $r1 = self::$FAILED; |
11978 | goto seq_1; |
11979 | } |
11980 | $r5 = $this->parsepipe($silence); |
11981 | // p <- $r5 |
11982 | if ($r5===self::$FAILED) { |
11983 | $this->currPos = $p3; |
11984 | $r1 = self::$FAILED; |
11985 | goto seq_1; |
11986 | } |
11987 | if (($this->input[$this->currPos] ?? null) === "+") { |
11988 | $this->currPos++; |
11989 | $r6 = "+"; |
11990 | } else { |
11991 | if (!$silence) {$this->fail(68);} |
11992 | $r6 = self::$FAILED; |
11993 | $this->currPos = $p3; |
11994 | $r1 = self::$FAILED; |
11995 | goto seq_1; |
11996 | } |
11997 | $r7 = $this->parserow_syntax_table_args($silence, $boolParams, $param_preproc, $param_th); |
11998 | if ($r7===self::$FAILED) { |
11999 | $r7 = null; |
12000 | } |
12001 | // args <- $r7 |
12002 | $p9 = $this->currPos; |
12003 | $r8 = ''; |
12004 | // tagEndPos <- $r8 |
12005 | if ($r8!==self::$FAILED) { |
12006 | $this->savedPos = $p9; |
12007 | $r8 = $this->a129($r5, $r7); |
12008 | } else { |
12009 | $this->currPos = $p3; |
12010 | $r1 = self::$FAILED; |
12011 | goto seq_1; |
12012 | } |
12013 | $r10 = []; |
12014 | for (;;) { |
12015 | $r11 = $this->parsenested_block_in_table($silence, $boolParams, $param_preproc, $param_th); |
12016 | if ($r11!==self::$FAILED) { |
12017 | $r10[] = $r11; |
12018 | } else { |
12019 | break; |
12020 | } |
12021 | } |
12022 | // c <- $r10 |
12023 | // free $r11 |
12024 | $r1 = true; |
12025 | seq_1: |
12026 | if ($r1!==self::$FAILED) { |
12027 | $this->savedPos = $p2; |
12028 | $r1 = $this->a130($r5, $r7, $r8, $r10); |
12029 | } |
12030 | // free $p3 |
12031 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
12032 | $this->currPos, |
12033 | $r1, |
12034 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
12035 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
12036 | ); |
12037 | return $r1; |
12038 | }, "table_caption_tag", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
12039 | |
12040 | } |
12041 | private function parsenewline($silence) { |
12042 | return $this->traceCall(function($silence) { |
12043 | $key = 566; |
12044 | $bucket = $this->currPos; |
12045 | $cached = $this->cache[$bucket][$key] ?? null; |
12046 | if ($cached) { |
12047 | $this->currPos = $cached->nextPos; |
12048 | |
12049 | return $cached->result; |
12050 | } |
12051 | |
12052 | // start choice_1 |
12053 | if (($this->input[$this->currPos] ?? null) === "\x0a") { |
12054 | $this->currPos++; |
12055 | $r1 = "\x0a"; |
12056 | goto choice_1; |
12057 | } else { |
12058 | if (!$silence) {$this->fail(27);} |
12059 | $r1 = self::$FAILED; |
12060 | } |
12061 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "\x0d\x0a", $this->currPos, 2, false) === 0) { |
12062 | $r1 = "\x0d\x0a"; |
12063 | $this->currPos += 2; |
12064 | } else { |
12065 | if (!$silence) {$this->fail(28);} |
12066 | $r1 = self::$FAILED; |
12067 | } |
12068 | choice_1: |
12069 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
12070 | $this->currPos, |
12071 | $r1, |
12072 | self::$UNDEFINED, |
12073 | self::$UNDEFINED |
12074 | ); |
12075 | return $r1; |
12076 | }, "newline", ["\$silence"], [$silence]); |
12077 | |
12078 | } |
12079 | private function discardinclude_check($silence, $boolParams) { |
12080 | return $this->traceCall(function($silence, $boolParams) { |
12081 | $key = json_encode([531, $boolParams & 0x2]); |
12082 | $bucket = $this->currPos; |
12083 | $cached = $this->cache[$bucket][$key] ?? null; |
12084 | if ($cached) { |
12085 | $this->currPos = $cached->nextPos; |
12086 | |
12087 | return $cached->result; |
12088 | } |
12089 | |
12090 | // start seq_1 |
12091 | $p1 = $this->currPos; |
12092 | if (!(/*annOrExtTag*/($boolParams & 0x2) !== 0)) { |
12093 | $r3 = false; |
12094 | } else { |
12095 | $r3 = self::$FAILED; |
12096 | $r2 = self::$FAILED; |
12097 | goto seq_1; |
12098 | } |
12099 | $r4 = $this->parsexmlish_start($silence); |
12100 | // start <- $r4 |
12101 | if ($r4===self::$FAILED) { |
12102 | $this->currPos = $p1; |
12103 | $r2 = self::$FAILED; |
12104 | goto seq_1; |
12105 | } |
12106 | $this->savedPos = $this->currPos; |
12107 | $r5 = $this->a131($r4); |
12108 | if ($r5) { |
12109 | $r5 = false; |
12110 | } else { |
12111 | $r5 = self::$FAILED; |
12112 | $this->currPos = $p1; |
12113 | $r2 = self::$FAILED; |
12114 | goto seq_1; |
12115 | } |
12116 | $r2 = true; |
12117 | seq_1: |
12118 | // free $r2,$p1 |
12119 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
12120 | $this->currPos, |
12121 | $r2, |
12122 | self::$UNDEFINED, |
12123 | self::$UNDEFINED |
12124 | ); |
12125 | return $r2; |
12126 | }, "include_check", ["\$silence", "\$boolParams"], [$silence, $boolParams]); |
12127 | |
12128 | } |
12129 | private function parsetvar_old_syntax_closing_HACK($silence, $boolParams) { |
12130 | return $this->traceCall(function($silence, $boolParams) { |
12131 | $key = json_encode([434, $boolParams & 0x2]); |
12132 | $bucket = $this->currPos; |
12133 | $cached = $this->cache[$bucket][$key] ?? null; |
12134 | if ($cached) { |
12135 | $this->currPos = $cached->nextPos; |
12136 | |
12137 | return $cached->result; |
12138 | } |
12139 | |
12140 | $p2 = $this->currPos; |
12141 | // start seq_1 |
12142 | $p3 = $this->currPos; |
12143 | if (!(/*annOrExtTag*/($boolParams & 0x2) !== 0)) { |
12144 | $r4 = false; |
12145 | } else { |
12146 | $r4 = self::$FAILED; |
12147 | $r1 = self::$FAILED; |
12148 | goto seq_1; |
12149 | } |
12150 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "</>", $this->currPos, 3, false) === 0) { |
12151 | $r5 = "</>"; |
12152 | $this->currPos += 3; |
12153 | } else { |
12154 | if (!$silence) {$this->fail(69);} |
12155 | $r5 = self::$FAILED; |
12156 | $this->currPos = $p3; |
12157 | $r1 = self::$FAILED; |
12158 | goto seq_1; |
12159 | } |
12160 | $this->savedPos = $this->currPos; |
12161 | $r6 = $this->a132(); |
12162 | if ($r6) { |
12163 | $r6 = false; |
12164 | } else { |
12165 | $r6 = self::$FAILED; |
12166 | $this->currPos = $p3; |
12167 | $r1 = self::$FAILED; |
12168 | goto seq_1; |
12169 | } |
12170 | $r1 = true; |
12171 | seq_1: |
12172 | if ($r1!==self::$FAILED) { |
12173 | $this->savedPos = $p2; |
12174 | $r1 = $this->a133(); |
12175 | } |
12176 | // free $p3 |
12177 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
12178 | $this->currPos, |
12179 | $r1, |
12180 | self::$UNDEFINED, |
12181 | self::$UNDEFINED |
12182 | ); |
12183 | return $r1; |
12184 | }, "tvar_old_syntax_closing_HACK", ["\$silence", "\$boolParams"], [$silence, $boolParams]); |
12185 | |
12186 | } |
12187 | private function discardannotation_check($silence, $boolParams) { |
12188 | return $this->traceCall(function($silence, $boolParams) { |
12189 | $key = json_encode([437, $boolParams & 0x2]); |
12190 | $bucket = $this->currPos; |
12191 | $cached = $this->cache[$bucket][$key] ?? null; |
12192 | if ($cached) { |
12193 | $this->currPos = $cached->nextPos; |
12194 | |
12195 | return $cached->result; |
12196 | } |
12197 | |
12198 | // start seq_1 |
12199 | $p1 = $this->currPos; |
12200 | if (!(/*annOrExtTag*/($boolParams & 0x2) !== 0)) { |
12201 | $r3 = false; |
12202 | } else { |
12203 | $r3 = self::$FAILED; |
12204 | $r2 = self::$FAILED; |
12205 | goto seq_1; |
12206 | } |
12207 | $r4 = $this->parsexmlish_start($silence); |
12208 | // start <- $r4 |
12209 | if ($r4===self::$FAILED) { |
12210 | $this->currPos = $p1; |
12211 | $r2 = self::$FAILED; |
12212 | goto seq_1; |
12213 | } |
12214 | $this->savedPos = $this->currPos; |
12215 | $r5 = $this->a134($r4); |
12216 | if ($r5) { |
12217 | $r5 = false; |
12218 | } else { |
12219 | $r5 = self::$FAILED; |
12220 | $this->currPos = $p1; |
12221 | $r2 = self::$FAILED; |
12222 | goto seq_1; |
12223 | } |
12224 | $r2 = true; |
12225 | seq_1: |
12226 | // free $r2,$p1 |
12227 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
12228 | $this->currPos, |
12229 | $r2, |
12230 | self::$UNDEFINED, |
12231 | self::$UNDEFINED |
12232 | ); |
12233 | return $r2; |
12234 | }, "annotation_check", ["\$silence", "\$boolParams"], [$silence, $boolParams]); |
12235 | |
12236 | } |
12237 | private function discardsol($silence, $boolParams, &$param_preproc, &$param_th) { |
12238 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
12239 | $key = json_encode([591, $boolParams & 0x1ebf, $param_preproc, $param_th]); |
12240 | $bucket = $this->currPos; |
12241 | $cached = $this->cache[$bucket][$key] ?? null; |
12242 | if ($cached) { |
12243 | $this->currPos = $cached->nextPos; |
12244 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
12245 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
12246 | return $cached->result; |
12247 | } |
12248 | $saved_preproc=$param_preproc; |
12249 | $saved_th=$param_th; |
12250 | $p2 = $this->currPos; |
12251 | // start seq_1 |
12252 | $p3 = $this->currPos; |
12253 | $r4 = $this->parsesol_prefix($silence); |
12254 | // sp <- $r4 |
12255 | if ($r4===self::$FAILED) { |
12256 | $r1 = self::$FAILED; |
12257 | goto seq_1; |
12258 | } |
12259 | $r5 = $this->parseempty_lines_with_comments($silence); |
12260 | if ($r5===self::$FAILED) { |
12261 | $r5 = null; |
12262 | } |
12263 | // elc <- $r5 |
12264 | $r6 = []; |
12265 | for (;;) { |
12266 | $r7 = $this->parsesol_transparent($silence, $boolParams, $param_preproc, $param_th); |
12267 | if ($r7!==self::$FAILED) { |
12268 | $r6[] = $r7; |
12269 | } else { |
12270 | break; |
12271 | } |
12272 | } |
12273 | // st <- $r6 |
12274 | // free $r7 |
12275 | $r1 = true; |
12276 | seq_1: |
12277 | if ($r1!==self::$FAILED) { |
12278 | $this->savedPos = $p2; |
12279 | $r1 = $this->a69($r4, $r5, $r6); |
12280 | } |
12281 | // free $p3 |
12282 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
12283 | $this->currPos, |
12284 | $r1, |
12285 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
12286 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
12287 | ); |
12288 | return $r1; |
12289 | }, "sol", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
12290 | |
12291 | } |
12292 | private function parsetemplate_param_value($silence, $boolParams, &$param_preproc, &$param_th) { |
12293 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
12294 | $key = json_encode([386, $boolParams & 0x1e17, $param_preproc, $param_th]); |
12295 | $bucket = $this->currPos; |
12296 | $cached = $this->cache[$bucket][$key] ?? null; |
12297 | if ($cached) { |
12298 | $this->currPos = $cached->nextPos; |
12299 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
12300 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
12301 | return $cached->result; |
12302 | } |
12303 | $saved_preproc=$param_preproc; |
12304 | $saved_th=$param_th; |
12305 | $p2 = $this->currPos; |
12306 | $r3 = $this->parsetemplate_param_text($silence, $boolParams & ~0x20, $param_preproc, $param_th); |
12307 | // tpt <- $r3 |
12308 | $r1 = $r3; |
12309 | if ($r1!==self::$FAILED) { |
12310 | $this->savedPos = $p2; |
12311 | $r1 = $this->a135($r3); |
12312 | } |
12313 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
12314 | $this->currPos, |
12315 | $r1, |
12316 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
12317 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
12318 | ); |
12319 | return $r1; |
12320 | }, "template_param_value", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
12321 | |
12322 | } |
12323 | private function discardnl_comment_space($silence) { |
12324 | return $this->traceCall(function($silence) { |
12325 | $key = 575; |
12326 | $bucket = $this->currPos; |
12327 | $cached = $this->cache[$bucket][$key] ?? null; |
12328 | if ($cached) { |
12329 | $this->currPos = $cached->nextPos; |
12330 | |
12331 | return $cached->result; |
12332 | } |
12333 | |
12334 | // start choice_1 |
12335 | $r1 = $this->discardnewlineToken($silence); |
12336 | if ($r1!==self::$FAILED) { |
12337 | goto choice_1; |
12338 | } |
12339 | $r1 = $this->discardspace($silence); |
12340 | if ($r1!==self::$FAILED) { |
12341 | goto choice_1; |
12342 | } |
12343 | $r1 = $this->discardcomment($silence); |
12344 | choice_1: |
12345 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
12346 | $this->currPos, |
12347 | $r1, |
12348 | self::$UNDEFINED, |
12349 | self::$UNDEFINED |
12350 | ); |
12351 | return $r1; |
12352 | }, "nl_comment_space", ["\$silence"], [$silence]); |
12353 | |
12354 | } |
12355 | private function parsenl_comment_space($silence) { |
12356 | return $this->traceCall(function($silence) { |
12357 | $key = 574; |
12358 | $bucket = $this->currPos; |
12359 | $cached = $this->cache[$bucket][$key] ?? null; |
12360 | if ($cached) { |
12361 | $this->currPos = $cached->nextPos; |
12362 | |
12363 | return $cached->result; |
12364 | } |
12365 | |
12366 | // start choice_1 |
12367 | $r1 = $this->parsenewlineToken($silence); |
12368 | if ($r1!==self::$FAILED) { |
12369 | goto choice_1; |
12370 | } |
12371 | $r1 = $this->parsespace($silence); |
12372 | if ($r1!==self::$FAILED) { |
12373 | goto choice_1; |
12374 | } |
12375 | $r1 = $this->parsecomment($silence); |
12376 | choice_1: |
12377 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
12378 | $this->currPos, |
12379 | $r1, |
12380 | self::$UNDEFINED, |
12381 | self::$UNDEFINED |
12382 | ); |
12383 | return $r1; |
12384 | }, "nl_comment_space", ["\$silence"], [$silence]); |
12385 | |
12386 | } |
12387 | private function parseparsoid_fragment_marker($silence) { |
12388 | return $this->traceCall(function($silence) { |
12389 | $key = 376; |
12390 | $bucket = $this->currPos; |
12391 | $cached = $this->cache[$bucket][$key] ?? null; |
12392 | if ($cached) { |
12393 | $this->currPos = $cached->nextPos; |
12394 | |
12395 | return $cached->result; |
12396 | } |
12397 | |
12398 | $p1 = $this->currPos; |
12399 | // start seq_1 |
12400 | $p3 = $this->currPos; |
12401 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "#parsoid\x00fragment:", $this->currPos, 18, false) === 0) { |
12402 | $r4 = "#parsoid\x00fragment:"; |
12403 | $this->currPos += 18; |
12404 | } else { |
12405 | if (!$silence) {$this->fail(70);} |
12406 | $r4 = self::$FAILED; |
12407 | $r2 = self::$FAILED; |
12408 | goto seq_1; |
12409 | } |
12410 | $r5 = self::$FAILED; |
12411 | for (;;) { |
12412 | $r6 = $this->input[$this->currPos] ?? ''; |
12413 | if (preg_match("/^[0-9]/", $r6)) { |
12414 | $this->currPos++; |
12415 | $r5 = true; |
12416 | } else { |
12417 | $r6 = self::$FAILED; |
12418 | if (!$silence) {$this->fail(65);} |
12419 | break; |
12420 | } |
12421 | } |
12422 | if ($r5===self::$FAILED) { |
12423 | $this->currPos = $p3; |
12424 | $r2 = self::$FAILED; |
12425 | goto seq_1; |
12426 | } |
12427 | // free $r6 |
12428 | $r2 = true; |
12429 | seq_1: |
12430 | if ($r2!==self::$FAILED) { |
12431 | $r2 = substr($this->input, $p1, $this->currPos - $p1); |
12432 | } else { |
12433 | $r2 = self::$FAILED; |
12434 | } |
12435 | // free $p3 |
12436 | // free $p1 |
12437 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
12438 | $this->currPos, |
12439 | $r2, |
12440 | self::$UNDEFINED, |
12441 | self::$UNDEFINED |
12442 | ); |
12443 | return $r2; |
12444 | }, "parsoid_fragment_marker", ["\$silence"], [$silence]); |
12445 | |
12446 | } |
12447 | private function parsetemplate_param($silence, $boolParams, &$param_preproc, &$param_th) { |
12448 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
12449 | $key = json_encode([382, $boolParams & 0x1e17, $param_preproc, $param_th]); |
12450 | $bucket = $this->currPos; |
12451 | $cached = $this->cache[$bucket][$key] ?? null; |
12452 | if ($cached) { |
12453 | $this->currPos = $cached->nextPos; |
12454 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
12455 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
12456 | return $cached->result; |
12457 | } |
12458 | $saved_preproc=$param_preproc; |
12459 | $saved_th=$param_th; |
12460 | // start choice_1 |
12461 | $p2 = $this->currPos; |
12462 | // start seq_1 |
12463 | $p3 = $this->currPos; |
12464 | $r4 = $this->parsetemplate_param_name($silence, $boolParams, $param_preproc, $param_th); |
12465 | // name <- $r4 |
12466 | if ($r4===self::$FAILED) { |
12467 | $r1 = self::$FAILED; |
12468 | goto seq_1; |
12469 | } |
12470 | $p6 = $this->currPos; |
12471 | // start seq_2 |
12472 | $p7 = $this->currPos; |
12473 | $p9 = $this->currPos; |
12474 | $r8 = ''; |
12475 | // kEndPos <- $r8 |
12476 | if ($r8!==self::$FAILED) { |
12477 | $this->savedPos = $p9; |
12478 | $r8 = $this->a136($r4); |
12479 | } else { |
12480 | $r5 = self::$FAILED; |
12481 | goto seq_2; |
12482 | } |
12483 | if (($this->input[$this->currPos] ?? null) === "=") { |
12484 | $this->currPos++; |
12485 | $r10 = "="; |
12486 | } else { |
12487 | if (!$silence) {$this->fail(23);} |
12488 | $r10 = self::$FAILED; |
12489 | $this->currPos = $p7; |
12490 | $r5 = self::$FAILED; |
12491 | goto seq_2; |
12492 | } |
12493 | $p12 = $this->currPos; |
12494 | $r11 = ''; |
12495 | // vStartPos <- $r11 |
12496 | if ($r11!==self::$FAILED) { |
12497 | $this->savedPos = $p12; |
12498 | $r11 = $this->a137($r4, $r8); |
12499 | } else { |
12500 | $this->currPos = $p7; |
12501 | $r5 = self::$FAILED; |
12502 | goto seq_2; |
12503 | } |
12504 | $r13 = $this->parseoptionalSpaceToken($silence); |
12505 | // optSp <- $r13 |
12506 | if ($r13===self::$FAILED) { |
12507 | $this->currPos = $p7; |
12508 | $r5 = self::$FAILED; |
12509 | goto seq_2; |
12510 | } |
12511 | $r14 = $this->parsetemplate_param_value($silence, $boolParams, $param_preproc, $param_th); |
12512 | if ($r14===self::$FAILED) { |
12513 | $r14 = null; |
12514 | } |
12515 | // tpv <- $r14 |
12516 | $r5 = true; |
12517 | seq_2: |
12518 | if ($r5!==self::$FAILED) { |
12519 | $this->savedPos = $p6; |
12520 | $r5 = $this->a138($r4, $r8, $r11, $r13, $r14); |
12521 | } else { |
12522 | $r5 = null; |
12523 | } |
12524 | // free $p7 |
12525 | // val <- $r5 |
12526 | $r1 = true; |
12527 | seq_1: |
12528 | if ($r1!==self::$FAILED) { |
12529 | $this->savedPos = $p2; |
12530 | $r1 = $this->a139($r4, $r5); |
12531 | goto choice_1; |
12532 | } |
12533 | // free $p3 |
12534 | $p3 = $this->currPos; |
12535 | $p7 = $this->currPos; |
12536 | $r1 = $this->input[$this->currPos] ?? ''; |
12537 | if ($r1 === "|" || $r1 === "}") { |
12538 | $this->currPos++; |
12539 | $r1 = false; |
12540 | $this->currPos = $p7; |
12541 | $this->savedPos = $p3; |
12542 | $r1 = $this->a140(); |
12543 | } else { |
12544 | $r1 = self::$FAILED; |
12545 | } |
12546 | // free $p7 |
12547 | choice_1: |
12548 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
12549 | $this->currPos, |
12550 | $r1, |
12551 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
12552 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
12553 | ); |
12554 | return $r1; |
12555 | }, "template_param", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
12556 | |
12557 | } |
12558 | private function parsewikilink_preprocessor_text($silence, $boolParams, &$param_preproc, &$param_th) { |
12559 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
12560 | $key = json_encode([536, $boolParams & 0x1fff, $param_preproc, $param_th]); |
12561 | $bucket = $this->currPos; |
12562 | $cached = $this->cache[$bucket][$key] ?? null; |
12563 | if ($cached) { |
12564 | $this->currPos = $cached->nextPos; |
12565 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
12566 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
12567 | return $cached->result; |
12568 | } |
12569 | $saved_preproc=$param_preproc; |
12570 | $saved_th=$param_th; |
12571 | $p2 = $this->currPos; |
12572 | $r3 = []; |
12573 | for (;;) { |
12574 | // start choice_1 |
12575 | $p6 = $this->currPos; |
12576 | $r5 = self::$FAILED; |
12577 | for (;;) { |
12578 | if (strcspn($this->input, "<[{\x0a\x0d\x09|!]}{ &-", $this->currPos, 1) !== 0) { |
12579 | $r7 = self::consumeChar($this->input, $this->currPos); |
12580 | $r5 = true; |
12581 | } else { |
12582 | $r7 = self::$FAILED; |
12583 | if (!$silence) {$this->fail(71);} |
12584 | break; |
12585 | } |
12586 | } |
12587 | // t <- $r5 |
12588 | if ($r5!==self::$FAILED) { |
12589 | $r5 = substr($this->input, $p6, $this->currPos - $p6); |
12590 | } else { |
12591 | $r5 = self::$FAILED; |
12592 | } |
12593 | // free $r7 |
12594 | // free $p6 |
12595 | $r4 = $r5; |
12596 | if ($r4!==self::$FAILED) { |
12597 | goto choice_1; |
12598 | } |
12599 | $p6 = $this->currPos; |
12600 | // start seq_1 |
12601 | $p8 = $this->currPos; |
12602 | $p9 = $this->currPos; |
12603 | $r7 = $this->discardinline_breaks(true, $boolParams, $param_preproc, $param_th); |
12604 | if ($r7 === self::$FAILED) { |
12605 | $r7 = false; |
12606 | } else { |
12607 | $r7 = self::$FAILED; |
12608 | $this->currPos = $p9; |
12609 | $r4 = self::$FAILED; |
12610 | goto seq_1; |
12611 | } |
12612 | // free $p9 |
12613 | // start choice_2 |
12614 | $r10 = $this->parsedirective($silence, $boolParams, $param_preproc, $param_th); |
12615 | if ($r10!==self::$FAILED) { |
12616 | goto choice_2; |
12617 | } |
12618 | $p9 = $this->currPos; |
12619 | // start seq_2 |
12620 | $p11 = $this->currPos; |
12621 | $p12 = $this->currPos; |
12622 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "]]", $this->currPos, 2, false) === 0) { |
12623 | $r13 = "]]"; |
12624 | $this->currPos += 2; |
12625 | } else { |
12626 | $r13 = self::$FAILED; |
12627 | } |
12628 | if ($r13 === self::$FAILED) { |
12629 | $r13 = false; |
12630 | } else { |
12631 | $r13 = self::$FAILED; |
12632 | $this->currPos = $p12; |
12633 | $r10 = self::$FAILED; |
12634 | goto seq_2; |
12635 | } |
12636 | // free $p12 |
12637 | // start choice_3 |
12638 | $r14 = $this->discardtext_char($silence); |
12639 | if ($r14!==self::$FAILED) { |
12640 | goto choice_3; |
12641 | } |
12642 | if (strspn($this->input, "!<-}]\x0a\x0d", $this->currPos, 1) !== 0) { |
12643 | $r14 = $this->input[$this->currPos++]; |
12644 | } else { |
12645 | $r14 = self::$FAILED; |
12646 | if (!$silence) {$this->fail(72);} |
12647 | } |
12648 | choice_3: |
12649 | if ($r14===self::$FAILED) { |
12650 | $this->currPos = $p11; |
12651 | $r10 = self::$FAILED; |
12652 | goto seq_2; |
12653 | } |
12654 | $r10 = true; |
12655 | seq_2: |
12656 | if ($r10!==self::$FAILED) { |
12657 | $r10 = substr($this->input, $p9, $this->currPos - $p9); |
12658 | } else { |
12659 | $r10 = self::$FAILED; |
12660 | } |
12661 | // free $p11 |
12662 | // free $p9 |
12663 | choice_2: |
12664 | // wr <- $r10 |
12665 | if ($r10===self::$FAILED) { |
12666 | $this->currPos = $p8; |
12667 | $r4 = self::$FAILED; |
12668 | goto seq_1; |
12669 | } |
12670 | $r4 = true; |
12671 | seq_1: |
12672 | if ($r4!==self::$FAILED) { |
12673 | $this->savedPos = $p6; |
12674 | $r4 = $this->a141($r5, $r10); |
12675 | } |
12676 | // free $p8 |
12677 | choice_1: |
12678 | if ($r4!==self::$FAILED) { |
12679 | $r3[] = $r4; |
12680 | } else { |
12681 | break; |
12682 | } |
12683 | } |
12684 | if (count($r3) === 0) { |
12685 | $r3 = self::$FAILED; |
12686 | } |
12687 | // r <- $r3 |
12688 | // free $r4 |
12689 | $r1 = $r3; |
12690 | if ($r1!==self::$FAILED) { |
12691 | $this->savedPos = $p2; |
12692 | $r1 = $this->a142($r3); |
12693 | } |
12694 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
12695 | $this->currPos, |
12696 | $r1, |
12697 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
12698 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
12699 | ); |
12700 | return $r1; |
12701 | }, "wikilink_preprocessor_text", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
12702 | |
12703 | } |
12704 | private function parsewikilink_content($silence, $boolParams, &$param_preproc, &$param_th) { |
12705 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
12706 | $key = json_encode([420, $boolParams & 0x17df, $param_preproc, $param_th]); |
12707 | $bucket = $this->currPos; |
12708 | $cached = $this->cache[$bucket][$key] ?? null; |
12709 | if ($cached) { |
12710 | $this->currPos = $cached->nextPos; |
12711 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
12712 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
12713 | return $cached->result; |
12714 | } |
12715 | $saved_preproc=$param_preproc; |
12716 | $saved_th=$param_th; |
12717 | $r1 = []; |
12718 | for (;;) { |
12719 | $p3 = $this->currPos; |
12720 | // start seq_1 |
12721 | $p4 = $this->currPos; |
12722 | $r5 = $this->discardpipe($silence); |
12723 | if ($r5===self::$FAILED) { |
12724 | $r2 = self::$FAILED; |
12725 | goto seq_1; |
12726 | } |
12727 | $p7 = $this->currPos; |
12728 | $r6 = ''; |
12729 | // startPos <- $r6 |
12730 | if ($r6!==self::$FAILED) { |
12731 | $this->savedPos = $p7; |
12732 | $r6 = $this->a17(); |
12733 | } else { |
12734 | $this->currPos = $p4; |
12735 | $r2 = self::$FAILED; |
12736 | goto seq_1; |
12737 | } |
12738 | $r8 = $this->parselink_text($silence, $boolParams, $param_preproc, $param_th); |
12739 | if ($r8===self::$FAILED) { |
12740 | $r8 = null; |
12741 | } |
12742 | // lt <- $r8 |
12743 | $r2 = true; |
12744 | seq_1: |
12745 | if ($r2!==self::$FAILED) { |
12746 | $this->savedPos = $p3; |
12747 | $r2 = $this->a143($r6, $r8); |
12748 | $r1[] = $r2; |
12749 | } else { |
12750 | break; |
12751 | } |
12752 | // free $p4 |
12753 | } |
12754 | // free $r2 |
12755 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
12756 | $this->currPos, |
12757 | $r1, |
12758 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
12759 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
12760 | ); |
12761 | return $r1; |
12762 | }, "wikilink_content", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
12763 | |
12764 | } |
12765 | private function parsexmlish_start($silence) { |
12766 | return $this->traceCall(function($silence) { |
12767 | $key = 456; |
12768 | $bucket = $this->currPos; |
12769 | $cached = $this->cache[$bucket][$key] ?? null; |
12770 | if ($cached) { |
12771 | $this->currPos = $cached->nextPos; |
12772 | |
12773 | return $cached->result; |
12774 | } |
12775 | |
12776 | $p2 = $this->currPos; |
12777 | // start seq_1 |
12778 | $p3 = $this->currPos; |
12779 | if (($this->input[$this->currPos] ?? null) === "<") { |
12780 | $this->currPos++; |
12781 | $r4 = "<"; |
12782 | } else { |
12783 | if (!$silence) {$this->fail(48);} |
12784 | $r4 = self::$FAILED; |
12785 | $r1 = self::$FAILED; |
12786 | goto seq_1; |
12787 | } |
12788 | if (($this->input[$this->currPos] ?? null) === "/") { |
12789 | $this->currPos++; |
12790 | $r5 = "/"; |
12791 | } else { |
12792 | if (!$silence) {$this->fail(35);} |
12793 | $r5 = self::$FAILED; |
12794 | $r5 = null; |
12795 | } |
12796 | // end <- $r5 |
12797 | $r6 = $this->parsetag_name($silence); |
12798 | // name <- $r6 |
12799 | if ($r6===self::$FAILED) { |
12800 | $this->currPos = $p3; |
12801 | $r1 = self::$FAILED; |
12802 | goto seq_1; |
12803 | } |
12804 | $r1 = true; |
12805 | seq_1: |
12806 | if ($r1!==self::$FAILED) { |
12807 | $this->savedPos = $p2; |
12808 | $r1 = $this->a144($r5, $r6); |
12809 | } |
12810 | // free $p3 |
12811 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
12812 | $this->currPos, |
12813 | $r1, |
12814 | self::$UNDEFINED, |
12815 | self::$UNDEFINED |
12816 | ); |
12817 | return $r1; |
12818 | }, "xmlish_start", ["\$silence"], [$silence]); |
12819 | |
12820 | } |
12821 | private function parseRFC($silence) { |
12822 | return $this->traceCall(function($silence) { |
12823 | $key = 346; |
12824 | $bucket = $this->currPos; |
12825 | $cached = $this->cache[$bucket][$key] ?? null; |
12826 | if ($cached) { |
12827 | $this->currPos = $cached->nextPos; |
12828 | |
12829 | return $cached->result; |
12830 | } |
12831 | |
12832 | $p2 = $this->currPos; |
12833 | // start seq_1 |
12834 | $p3 = $this->currPos; |
12835 | $this->savedPos = $this->currPos; |
12836 | $r4 = $this->a145(); |
12837 | if ($r4) { |
12838 | $r4 = false; |
12839 | } else { |
12840 | $r4 = self::$FAILED; |
12841 | $r1 = self::$FAILED; |
12842 | goto seq_1; |
12843 | } |
12844 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "RFC", $this->currPos, 3, false) === 0) { |
12845 | $r5 = "RFC"; |
12846 | $this->currPos += 3; |
12847 | } else { |
12848 | if (!$silence) {$this->fail(73);} |
12849 | $r5 = self::$FAILED; |
12850 | $this->currPos = $p3; |
12851 | $r1 = self::$FAILED; |
12852 | goto seq_1; |
12853 | } |
12854 | $r1 = true; |
12855 | seq_1: |
12856 | if ($r1!==self::$FAILED) { |
12857 | $this->savedPos = $p2; |
12858 | $r1 = $this->a146(); |
12859 | } |
12860 | // free $p3 |
12861 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
12862 | $this->currPos, |
12863 | $r1, |
12864 | self::$UNDEFINED, |
12865 | self::$UNDEFINED |
12866 | ); |
12867 | return $r1; |
12868 | }, "RFC", ["\$silence"], [$silence]); |
12869 | |
12870 | } |
12871 | private function parsePMID($silence) { |
12872 | return $this->traceCall(function($silence) { |
12873 | $key = 348; |
12874 | $bucket = $this->currPos; |
12875 | $cached = $this->cache[$bucket][$key] ?? null; |
12876 | if ($cached) { |
12877 | $this->currPos = $cached->nextPos; |
12878 | |
12879 | return $cached->result; |
12880 | } |
12881 | |
12882 | $p2 = $this->currPos; |
12883 | // start seq_1 |
12884 | $p3 = $this->currPos; |
12885 | $this->savedPos = $this->currPos; |
12886 | $r4 = $this->a147(); |
12887 | if ($r4) { |
12888 | $r4 = false; |
12889 | } else { |
12890 | $r4 = self::$FAILED; |
12891 | $r1 = self::$FAILED; |
12892 | goto seq_1; |
12893 | } |
12894 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "PMID", $this->currPos, 4, false) === 0) { |
12895 | $r5 = "PMID"; |
12896 | $this->currPos += 4; |
12897 | } else { |
12898 | if (!$silence) {$this->fail(74);} |
12899 | $r5 = self::$FAILED; |
12900 | $this->currPos = $p3; |
12901 | $r1 = self::$FAILED; |
12902 | goto seq_1; |
12903 | } |
12904 | $r1 = true; |
12905 | seq_1: |
12906 | if ($r1!==self::$FAILED) { |
12907 | $this->savedPos = $p2; |
12908 | $r1 = $this->a148(); |
12909 | } |
12910 | // free $p3 |
12911 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
12912 | $this->currPos, |
12913 | $r1, |
12914 | self::$UNDEFINED, |
12915 | self::$UNDEFINED |
12916 | ); |
12917 | return $r1; |
12918 | }, "PMID", ["\$silence"], [$silence]); |
12919 | |
12920 | } |
12921 | private function parsespace_or_nbsp($silence) { |
12922 | return $this->traceCall(function($silence) { |
12923 | $key = 584; |
12924 | $bucket = $this->currPos; |
12925 | $cached = $this->cache[$bucket][$key] ?? null; |
12926 | if ($cached) { |
12927 | $this->currPos = $cached->nextPos; |
12928 | |
12929 | return $cached->result; |
12930 | } |
12931 | |
12932 | // start choice_1 |
12933 | $r1 = $this->parsespace($silence); |
12934 | if ($r1!==self::$FAILED) { |
12935 | goto choice_1; |
12936 | } |
12937 | $r1 = $this->parseunispace($silence); |
12938 | if ($r1!==self::$FAILED) { |
12939 | goto choice_1; |
12940 | } |
12941 | $p2 = $this->currPos; |
12942 | // start seq_1 |
12943 | $p3 = $this->currPos; |
12944 | $p4 = $this->currPos; |
12945 | if (($this->input[$this->currPos] ?? null) === "&") { |
12946 | $this->currPos++; |
12947 | $r5 = "&"; |
12948 | $r5 = false; |
12949 | $this->currPos = $p4; |
12950 | } else { |
12951 | $r5 = self::$FAILED; |
12952 | $r1 = self::$FAILED; |
12953 | goto seq_1; |
12954 | } |
12955 | // free $p4 |
12956 | $r6 = $this->parsehtmlentity($silence); |
12957 | // he <- $r6 |
12958 | if ($r6===self::$FAILED) { |
12959 | $this->currPos = $p3; |
12960 | $r1 = self::$FAILED; |
12961 | goto seq_1; |
12962 | } |
12963 | $this->savedPos = $this->currPos; |
12964 | $r7 = $this->a149($r6); |
12965 | if ($r7) { |
12966 | $r7 = false; |
12967 | } else { |
12968 | $r7 = self::$FAILED; |
12969 | $this->currPos = $p3; |
12970 | $r1 = self::$FAILED; |
12971 | goto seq_1; |
12972 | } |
12973 | $r1 = true; |
12974 | seq_1: |
12975 | if ($r1!==self::$FAILED) { |
12976 | $this->savedPos = $p2; |
12977 | $r1 = $this->a64($r6); |
12978 | } |
12979 | // free $p3 |
12980 | choice_1: |
12981 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
12982 | $this->currPos, |
12983 | $r1, |
12984 | self::$UNDEFINED, |
12985 | self::$UNDEFINED |
12986 | ); |
12987 | return $r1; |
12988 | }, "space_or_nbsp", ["\$silence"], [$silence]); |
12989 | |
12990 | } |
12991 | private function discardend_of_word($silence) { |
12992 | return $this->traceCall(function($silence) { |
12993 | $key = 581; |
12994 | $bucket = $this->currPos; |
12995 | $cached = $this->cache[$bucket][$key] ?? null; |
12996 | if ($cached) { |
12997 | $this->currPos = $cached->nextPos; |
12998 | |
12999 | return $cached->result; |
13000 | } |
13001 | |
13002 | // start choice_1 |
13003 | $r1 = $this->discardeof($silence); |
13004 | if ($r1!==self::$FAILED) { |
13005 | goto choice_1; |
13006 | } |
13007 | $p2 = $this->currPos; |
13008 | $r1 = $this->input[$this->currPos] ?? ''; |
13009 | if (preg_match("/^[A-Za-z0-9_]/", $r1)) { |
13010 | $this->currPos++; |
13011 | } else { |
13012 | $r1 = self::$FAILED; |
13013 | } |
13014 | if ($r1 === self::$FAILED) { |
13015 | $r1 = false; |
13016 | } else { |
13017 | $r1 = self::$FAILED; |
13018 | $this->currPos = $p2; |
13019 | } |
13020 | // free $p2 |
13021 | choice_1: |
13022 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
13023 | $this->currPos, |
13024 | $r1, |
13025 | self::$UNDEFINED, |
13026 | self::$UNDEFINED |
13027 | ); |
13028 | return $r1; |
13029 | }, "end_of_word", ["\$silence"], [$silence]); |
13030 | |
13031 | } |
13032 | private function parsespace_or_nbsp_or_dash($silence) { |
13033 | return $this->traceCall(function($silence) { |
13034 | $key = 586; |
13035 | $bucket = $this->currPos; |
13036 | $cached = $this->cache[$bucket][$key] ?? null; |
13037 | if ($cached) { |
13038 | $this->currPos = $cached->nextPos; |
13039 | |
13040 | return $cached->result; |
13041 | } |
13042 | |
13043 | // start choice_1 |
13044 | $r1 = $this->parsespace_or_nbsp($silence); |
13045 | if ($r1!==self::$FAILED) { |
13046 | goto choice_1; |
13047 | } |
13048 | if (($this->input[$this->currPos] ?? null) === "-") { |
13049 | $this->currPos++; |
13050 | $r1 = "-"; |
13051 | } else { |
13052 | if (!$silence) {$this->fail(55);} |
13053 | $r1 = self::$FAILED; |
13054 | } |
13055 | choice_1: |
13056 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
13057 | $this->currPos, |
13058 | $r1, |
13059 | self::$UNDEFINED, |
13060 | self::$UNDEFINED |
13061 | ); |
13062 | return $r1; |
13063 | }, "space_or_nbsp_or_dash", ["\$silence"], [$silence]); |
13064 | |
13065 | } |
13066 | private function discardtext_char($silence) { |
13067 | return $this->traceCall(function($silence) { |
13068 | $key = 523; |
13069 | $bucket = $this->currPos; |
13070 | $cached = $this->cache[$bucket][$key] ?? null; |
13071 | if ($cached) { |
13072 | $this->currPos = $cached->nextPos; |
13073 | |
13074 | return $cached->result; |
13075 | } |
13076 | |
13077 | if (strcspn($this->input, "-'<[{\x0a\x0d:;]}|!=", $this->currPos, 1) !== 0) { |
13078 | $r1 = self::consumeChar($this->input, $this->currPos); |
13079 | } else { |
13080 | $r1 = self::$FAILED; |
13081 | if (!$silence) {$this->fail(54);} |
13082 | } |
13083 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
13084 | $this->currPos, |
13085 | $r1, |
13086 | self::$UNDEFINED, |
13087 | self::$UNDEFINED |
13088 | ); |
13089 | return $r1; |
13090 | }, "text_char", ["\$silence"], [$silence]); |
13091 | |
13092 | } |
13093 | private function discardextension_check($silence, $boolParams) { |
13094 | return $this->traceCall(function($silence, $boolParams) { |
13095 | $key = json_encode([441, $boolParams & 0x2]); |
13096 | $bucket = $this->currPos; |
13097 | $cached = $this->cache[$bucket][$key] ?? null; |
13098 | if ($cached) { |
13099 | $this->currPos = $cached->nextPos; |
13100 | |
13101 | return $cached->result; |
13102 | } |
13103 | |
13104 | // start seq_1 |
13105 | $p1 = $this->currPos; |
13106 | if (!(/*annOrExtTag*/($boolParams & 0x2) !== 0)) { |
13107 | $r3 = false; |
13108 | } else { |
13109 | $r3 = self::$FAILED; |
13110 | $r2 = self::$FAILED; |
13111 | goto seq_1; |
13112 | } |
13113 | $r4 = $this->parsexmlish_start($silence); |
13114 | // start <- $r4 |
13115 | if ($r4===self::$FAILED) { |
13116 | $this->currPos = $p1; |
13117 | $r2 = self::$FAILED; |
13118 | goto seq_1; |
13119 | } |
13120 | $this->savedPos = $this->currPos; |
13121 | $r5 = $this->a150($r4); |
13122 | if ($r5) { |
13123 | $r5 = false; |
13124 | } else { |
13125 | $r5 = self::$FAILED; |
13126 | $this->currPos = $p1; |
13127 | $r2 = self::$FAILED; |
13128 | goto seq_1; |
13129 | } |
13130 | $r2 = true; |
13131 | seq_1: |
13132 | // free $r2,$p1 |
13133 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
13134 | $this->currPos, |
13135 | $r2, |
13136 | self::$UNDEFINED, |
13137 | self::$UNDEFINED |
13138 | ); |
13139 | return $r2; |
13140 | }, "extension_check", ["\$silence", "\$boolParams"], [$silence, $boolParams]); |
13141 | |
13142 | } |
13143 | private function parselang_variant_preproc($silence, $boolParams, &$param_preproc, &$param_th) { |
13144 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
13145 | $key = json_encode([396, $boolParams & 0x1fff, $param_preproc, $param_th]); |
13146 | $bucket = $this->currPos; |
13147 | $cached = $this->cache[$bucket][$key] ?? null; |
13148 | if ($cached) { |
13149 | $this->currPos = $cached->nextPos; |
13150 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
13151 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
13152 | return $cached->result; |
13153 | } |
13154 | $saved_preproc=$param_preproc; |
13155 | $saved_th=$param_th; |
13156 | $p2 = $this->currPos; |
13157 | // start seq_1 |
13158 | $p3 = $this->currPos; |
13159 | $p5 = $this->currPos; |
13160 | // lv0 <- $r4 |
13161 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "-{", $this->currPos, 2, false) === 0) { |
13162 | $r4 = "-{"; |
13163 | $this->currPos += 2; |
13164 | $this->savedPos = $p5; |
13165 | $r4 = $this->a151(); |
13166 | } else { |
13167 | if (!$silence) {$this->fail(75);} |
13168 | $r4 = self::$FAILED; |
13169 | $r1 = self::$FAILED; |
13170 | goto seq_1; |
13171 | } |
13172 | // start choice_1 |
13173 | $p7 = $this->currPos; |
13174 | // start seq_2 |
13175 | $p8 = $this->currPos; |
13176 | $this->savedPos = $this->currPos; |
13177 | $r9 = $this->a152($r4); |
13178 | if ($r9) { |
13179 | $r9 = false; |
13180 | } else { |
13181 | $r9 = self::$FAILED; |
13182 | $r6 = self::$FAILED; |
13183 | goto seq_2; |
13184 | } |
13185 | $r10 = $this->parseopt_lang_variant_flags($silence, $boolParams, $param_preproc, $param_th); |
13186 | // ff <- $r10 |
13187 | if ($r10===self::$FAILED) { |
13188 | $this->currPos = $p8; |
13189 | $r6 = self::$FAILED; |
13190 | goto seq_2; |
13191 | } |
13192 | $r6 = true; |
13193 | seq_2: |
13194 | if ($r6!==self::$FAILED) { |
13195 | $this->savedPos = $p7; |
13196 | $r6 = $this->a153($r4, $r10); |
13197 | goto choice_1; |
13198 | } |
13199 | // free $p8 |
13200 | $p8 = $this->currPos; |
13201 | // start seq_3 |
13202 | $p11 = $this->currPos; |
13203 | $this->savedPos = $this->currPos; |
13204 | $r12 = $this->a154($r4); |
13205 | if ($r12) { |
13206 | $r12 = false; |
13207 | } else { |
13208 | $r12 = self::$FAILED; |
13209 | $r6 = self::$FAILED; |
13210 | goto seq_3; |
13211 | } |
13212 | $r6 = true; |
13213 | seq_3: |
13214 | if ($r6!==self::$FAILED) { |
13215 | $this->savedPos = $p8; |
13216 | $r6 = $this->a155($r4); |
13217 | } |
13218 | // free $p11 |
13219 | choice_1: |
13220 | // f <- $r6 |
13221 | if ($r6===self::$FAILED) { |
13222 | $this->currPos = $p3; |
13223 | $r1 = self::$FAILED; |
13224 | goto seq_1; |
13225 | } |
13226 | // start choice_2 |
13227 | $p11 = $this->currPos; |
13228 | // start seq_4 |
13229 | $p14 = $this->currPos; |
13230 | $this->savedPos = $this->currPos; |
13231 | $r15 = $this->a156($r4, $r6); |
13232 | if ($r15) { |
13233 | $r15 = false; |
13234 | } else { |
13235 | $r15 = self::$FAILED; |
13236 | $r13 = self::$FAILED; |
13237 | goto seq_4; |
13238 | } |
13239 | $r16 = $this->parselang_variant_text($silence, $boolParams, $param_preproc, $param_th); |
13240 | // lv <- $r16 |
13241 | if ($r16===self::$FAILED) { |
13242 | $this->currPos = $p14; |
13243 | $r13 = self::$FAILED; |
13244 | goto seq_4; |
13245 | } |
13246 | $r13 = true; |
13247 | seq_4: |
13248 | if ($r13!==self::$FAILED) { |
13249 | $this->savedPos = $p11; |
13250 | $r13 = $this->a157($r4, $r6, $r16); |
13251 | goto choice_2; |
13252 | } |
13253 | // free $p14 |
13254 | $p14 = $this->currPos; |
13255 | // start seq_5 |
13256 | $p17 = $this->currPos; |
13257 | $this->savedPos = $this->currPos; |
13258 | $r18 = $this->a158($r4, $r6); |
13259 | if ($r18) { |
13260 | $r18 = false; |
13261 | } else { |
13262 | $r18 = self::$FAILED; |
13263 | $r13 = self::$FAILED; |
13264 | goto seq_5; |
13265 | } |
13266 | $r19 = $this->parselang_variant_option_list($silence, $boolParams, $param_preproc, $param_th); |
13267 | // lv <- $r19 |
13268 | if ($r19===self::$FAILED) { |
13269 | $this->currPos = $p17; |
13270 | $r13 = self::$FAILED; |
13271 | goto seq_5; |
13272 | } |
13273 | $r13 = true; |
13274 | seq_5: |
13275 | if ($r13!==self::$FAILED) { |
13276 | $this->savedPos = $p14; |
13277 | $r13 = $this->a159($r4, $r6, $r19); |
13278 | } |
13279 | // free $p17 |
13280 | choice_2: |
13281 | // ts <- $r13 |
13282 | if ($r13===self::$FAILED) { |
13283 | $this->currPos = $p3; |
13284 | $r1 = self::$FAILED; |
13285 | goto seq_1; |
13286 | } |
13287 | $r20 = $this->discardinline_breaks($silence, $boolParams, $param_preproc, $param_th); |
13288 | if ($r20===self::$FAILED) { |
13289 | $this->currPos = $p3; |
13290 | $r1 = self::$FAILED; |
13291 | goto seq_1; |
13292 | } |
13293 | $p17 = $this->currPos; |
13294 | // lv1 <- $r21 |
13295 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "}-", $this->currPos, 2, false) === 0) { |
13296 | $r21 = "}-"; |
13297 | $this->currPos += 2; |
13298 | $this->savedPos = $p17; |
13299 | $r21 = $this->a160($r4, $r6, $r13); |
13300 | } else { |
13301 | if (!$silence) {$this->fail(76);} |
13302 | $r21 = self::$FAILED; |
13303 | $this->currPos = $p3; |
13304 | $r1 = self::$FAILED; |
13305 | goto seq_1; |
13306 | } |
13307 | $r1 = true; |
13308 | seq_1: |
13309 | if ($r1!==self::$FAILED) { |
13310 | $this->savedPos = $p2; |
13311 | $r1 = $this->a161($r4, $r6, $r13, $r21); |
13312 | } |
13313 | // free $p3 |
13314 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
13315 | $this->currPos, |
13316 | $r1, |
13317 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
13318 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
13319 | ); |
13320 | return $r1; |
13321 | }, "lang_variant_preproc", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
13322 | |
13323 | } |
13324 | private function parsebroken_lang_variant($silence, &$param_preproc) { |
13325 | return $this->traceCall(function($silence, &$param_preproc) { |
13326 | $key = json_encode([392, $param_preproc]); |
13327 | $bucket = $this->currPos; |
13328 | $cached = $this->cache[$bucket][$key] ?? null; |
13329 | if ($cached) { |
13330 | $this->currPos = $cached->nextPos; |
13331 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
13332 | return $cached->result; |
13333 | } |
13334 | $saved_preproc=$param_preproc; |
13335 | $p2 = $this->currPos; |
13336 | // start seq_1 |
13337 | $p3 = $this->currPos; |
13338 | // r <- $r4 |
13339 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "-{", $this->currPos, 2, false) === 0) { |
13340 | $r4 = "-{"; |
13341 | $this->currPos += 2; |
13342 | } else { |
13343 | if (!$silence) {$this->fail(75);} |
13344 | $r4 = self::$FAILED; |
13345 | $r1 = self::$FAILED; |
13346 | goto seq_1; |
13347 | } |
13348 | $r1 = true; |
13349 | seq_1: |
13350 | if ($r1!==self::$FAILED) { |
13351 | $this->savedPos = $p2; |
13352 | $r1 = $this->a162($r4, $param_preproc); |
13353 | } |
13354 | // free $p3 |
13355 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
13356 | $this->currPos, |
13357 | $r1, |
13358 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
13359 | self::$UNDEFINED |
13360 | ); |
13361 | return $r1; |
13362 | }, "broken_lang_variant", ["\$silence", "&\$param_preproc"], [$silence, &$param_preproc]); |
13363 | |
13364 | } |
13365 | private function parsetable_heading_tags_parameterized($silence, $boolParams, &$param_preproc, &$param_th) { |
13366 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
13367 | $key = json_encode([506, $boolParams & 0x1fff, $param_preproc, $param_th]); |
13368 | $bucket = $this->currPos; |
13369 | $cached = $this->cache[$bucket][$key] ?? null; |
13370 | if ($cached) { |
13371 | $this->currPos = $cached->nextPos; |
13372 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
13373 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
13374 | return $cached->result; |
13375 | } |
13376 | $saved_preproc=$param_preproc; |
13377 | $saved_th=$param_th; |
13378 | $p2 = $this->currPos; |
13379 | // start seq_1 |
13380 | $p3 = $this->currPos; |
13381 | if (($this->input[$this->currPos] ?? null) === "!") { |
13382 | $this->currPos++; |
13383 | $r4 = "!"; |
13384 | } else { |
13385 | if (!$silence) {$this->fail(77);} |
13386 | $r4 = self::$FAILED; |
13387 | $r1 = self::$FAILED; |
13388 | goto seq_1; |
13389 | } |
13390 | $r5 = $this->parsetable_heading_tag($silence, $boolParams, $param_preproc, $param_th); |
13391 | // thTag <- $r5 |
13392 | if ($r5===self::$FAILED) { |
13393 | $this->currPos = $p3; |
13394 | $r1 = self::$FAILED; |
13395 | goto seq_1; |
13396 | } |
13397 | $r6 = $this->parseths($silence, $boolParams, $param_preproc, $param_th); |
13398 | // thTags <- $r6 |
13399 | if ($r6===self::$FAILED) { |
13400 | $this->currPos = $p3; |
13401 | $r1 = self::$FAILED; |
13402 | goto seq_1; |
13403 | } |
13404 | $r1 = true; |
13405 | seq_1: |
13406 | if ($r1!==self::$FAILED) { |
13407 | $this->savedPos = $p2; |
13408 | $r1 = $this->a163($r5, $r6); |
13409 | } |
13410 | // free $p3 |
13411 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
13412 | $this->currPos, |
13413 | $r1, |
13414 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
13415 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
13416 | ); |
13417 | return $r1; |
13418 | }, "table_heading_tags_parameterized", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
13419 | |
13420 | } |
13421 | private function parsetable_data_tag($silence, $boolParams, &$param_preproc, &$param_th) { |
13422 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
13423 | $key = json_encode([514, $boolParams & 0x1fff, $param_preproc, $param_th]); |
13424 | $bucket = $this->currPos; |
13425 | $cached = $this->cache[$bucket][$key] ?? null; |
13426 | if ($cached) { |
13427 | $this->currPos = $cached->nextPos; |
13428 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
13429 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
13430 | return $cached->result; |
13431 | } |
13432 | $saved_preproc=$param_preproc; |
13433 | $saved_th=$param_th; |
13434 | $p2 = $this->currPos; |
13435 | // start seq_1 |
13436 | $p3 = $this->currPos; |
13437 | $p4 = $this->currPos; |
13438 | if (($this->input[$this->currPos] ?? null) === "}") { |
13439 | $this->currPos++; |
13440 | $r5 = "}"; |
13441 | } else { |
13442 | $r5 = self::$FAILED; |
13443 | } |
13444 | if ($r5 === self::$FAILED) { |
13445 | $r5 = false; |
13446 | } else { |
13447 | $r5 = self::$FAILED; |
13448 | $this->currPos = $p4; |
13449 | $r1 = self::$FAILED; |
13450 | goto seq_1; |
13451 | } |
13452 | // free $p4 |
13453 | $r6 = $this->parserow_syntax_table_args($silence, $boolParams, $param_preproc, $param_th); |
13454 | if ($r6===self::$FAILED) { |
13455 | $r6 = null; |
13456 | } |
13457 | // arg <- $r6 |
13458 | $p4 = $this->currPos; |
13459 | $r7 = ''; |
13460 | // tagEndPos <- $r7 |
13461 | if ($r7!==self::$FAILED) { |
13462 | $this->savedPos = $p4; |
13463 | $r7 = $this->a164($r6); |
13464 | } else { |
13465 | $this->currPos = $p3; |
13466 | $r1 = self::$FAILED; |
13467 | goto seq_1; |
13468 | } |
13469 | $r8 = []; |
13470 | for (;;) { |
13471 | $r9 = $this->parsenested_block_in_table($silence, $boolParams, $param_preproc, $param_th); |
13472 | if ($r9!==self::$FAILED) { |
13473 | $r8[] = $r9; |
13474 | } else { |
13475 | break; |
13476 | } |
13477 | } |
13478 | // td <- $r8 |
13479 | // free $r9 |
13480 | $r1 = true; |
13481 | seq_1: |
13482 | if ($r1!==self::$FAILED) { |
13483 | $this->savedPos = $p2; |
13484 | $r1 = $this->a165($r6, $r7, $r8); |
13485 | } |
13486 | // free $p3 |
13487 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
13488 | $this->currPos, |
13489 | $r1, |
13490 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
13491 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
13492 | ); |
13493 | return $r1; |
13494 | }, "table_data_tag", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
13495 | |
13496 | } |
13497 | private function parsetds($silence, $boolParams, &$param_preproc, &$param_th) { |
13498 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
13499 | $key = json_encode([516, $boolParams & 0x1fff, $param_preproc, $param_th]); |
13500 | $bucket = $this->currPos; |
13501 | $cached = $this->cache[$bucket][$key] ?? null; |
13502 | if ($cached) { |
13503 | $this->currPos = $cached->nextPos; |
13504 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
13505 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
13506 | return $cached->result; |
13507 | } |
13508 | $saved_preproc=$param_preproc; |
13509 | $saved_th=$param_th; |
13510 | $r1 = []; |
13511 | for (;;) { |
13512 | $p3 = $this->currPos; |
13513 | // start seq_1 |
13514 | $p4 = $this->currPos; |
13515 | $r5 = $this->parsepipe_pipe($silence); |
13516 | // pp <- $r5 |
13517 | if ($r5===self::$FAILED) { |
13518 | $r2 = self::$FAILED; |
13519 | goto seq_1; |
13520 | } |
13521 | $r6 = $this->parsetable_data_tag($silence, $boolParams, $param_preproc, $param_th); |
13522 | // tdt <- $r6 |
13523 | if ($r6===self::$FAILED) { |
13524 | $this->currPos = $p4; |
13525 | $r2 = self::$FAILED; |
13526 | goto seq_1; |
13527 | } |
13528 | $r2 = true; |
13529 | seq_1: |
13530 | if ($r2!==self::$FAILED) { |
13531 | $this->savedPos = $p3; |
13532 | $r2 = $this->a166($r5, $r6); |
13533 | $r1[] = $r2; |
13534 | } else { |
13535 | break; |
13536 | } |
13537 | // free $p4 |
13538 | } |
13539 | // free $r2 |
13540 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
13541 | $this->currPos, |
13542 | $r1, |
13543 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
13544 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
13545 | ); |
13546 | return $r1; |
13547 | }, "tds", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
13548 | |
13549 | } |
13550 | private function parsenested_block_in_table($silence, $boolParams, &$param_preproc, &$param_th) { |
13551 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
13552 | $key = json_encode([316, $boolParams & 0x1fff, $param_preproc, $param_th]); |
13553 | $bucket = $this->currPos; |
13554 | $cached = $this->cache[$bucket][$key] ?? null; |
13555 | if ($cached) { |
13556 | $this->currPos = $cached->nextPos; |
13557 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
13558 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
13559 | return $cached->result; |
13560 | } |
13561 | $saved_preproc=$param_preproc; |
13562 | $saved_th=$param_th; |
13563 | $p2 = $this->currPos; |
13564 | // start seq_1 |
13565 | $p3 = $this->currPos; |
13566 | $p4 = $this->currPos; |
13567 | // start seq_2 |
13568 | $p6 = $this->currPos; |
13569 | $r7 = $this->discardsol(true, $boolParams, $param_preproc, $param_th); |
13570 | if ($r7===self::$FAILED) { |
13571 | $r5 = self::$FAILED; |
13572 | goto seq_2; |
13573 | } |
13574 | // start seq_3 |
13575 | $p9 = $this->currPos; |
13576 | for (;;) { |
13577 | $r11 = $this->discardspace(true); |
13578 | if ($r11===self::$FAILED) { |
13579 | break; |
13580 | } |
13581 | } |
13582 | // free $r11 |
13583 | $r10 = true; |
13584 | if ($r10===self::$FAILED) { |
13585 | $r8 = self::$FAILED; |
13586 | goto seq_3; |
13587 | } |
13588 | // free $r10 |
13589 | $r10 = $this->discardsol(true, $boolParams, $param_preproc, $param_th); |
13590 | if ($r10===self::$FAILED) { |
13591 | $this->currPos = $p9; |
13592 | $r8 = self::$FAILED; |
13593 | goto seq_3; |
13594 | } |
13595 | $r8 = true; |
13596 | seq_3: |
13597 | if ($r8===self::$FAILED) { |
13598 | $r8 = null; |
13599 | } |
13600 | // free $p9 |
13601 | for (;;) { |
13602 | $r12 = $this->discardspace(true); |
13603 | if ($r12===self::$FAILED) { |
13604 | break; |
13605 | } |
13606 | } |
13607 | // free $r12 |
13608 | $r11 = true; |
13609 | if ($r11===self::$FAILED) { |
13610 | $this->currPos = $p6; |
13611 | $r5 = self::$FAILED; |
13612 | goto seq_2; |
13613 | } |
13614 | // free $r11 |
13615 | // start choice_1 |
13616 | $r11 = $this->discardpipe(true); |
13617 | if ($r11!==self::$FAILED) { |
13618 | goto choice_1; |
13619 | } |
13620 | if (($this->input[$this->currPos] ?? null) === "!") { |
13621 | $this->currPos++; |
13622 | $r11 = "!"; |
13623 | } else { |
13624 | $r11 = self::$FAILED; |
13625 | } |
13626 | choice_1: |
13627 | if ($r11===self::$FAILED) { |
13628 | $this->currPos = $p6; |
13629 | $r5 = self::$FAILED; |
13630 | goto seq_2; |
13631 | } |
13632 | $r5 = true; |
13633 | seq_2: |
13634 | // free $p6 |
13635 | if ($r5 === self::$FAILED) { |
13636 | $r5 = false; |
13637 | } else { |
13638 | $r5 = self::$FAILED; |
13639 | $this->currPos = $p4; |
13640 | $r1 = self::$FAILED; |
13641 | goto seq_1; |
13642 | } |
13643 | // free $p4 |
13644 | $r12 = $this->parsenested_block($silence, $boolParams | 0x1, $param_preproc, $param_th); |
13645 | // b <- $r12 |
13646 | if ($r12===self::$FAILED) { |
13647 | $this->currPos = $p3; |
13648 | $r1 = self::$FAILED; |
13649 | goto seq_1; |
13650 | } |
13651 | $r1 = true; |
13652 | seq_1: |
13653 | if ($r1!==self::$FAILED) { |
13654 | $this->savedPos = $p2; |
13655 | $r1 = $this->a167($r12); |
13656 | } |
13657 | // free $p3 |
13658 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
13659 | $this->currPos, |
13660 | $r1, |
13661 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
13662 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
13663 | ); |
13664 | return $r1; |
13665 | }, "nested_block_in_table", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
13666 | |
13667 | } |
13668 | private function parsetemplate_param_text($silence, $boolParams, &$param_preproc, &$param_th) { |
13669 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
13670 | $key = json_encode([388, $boolParams & 0x1e37, $param_preproc, $param_th]); |
13671 | $bucket = $this->currPos; |
13672 | $cached = $this->cache[$bucket][$key] ?? null; |
13673 | if ($cached) { |
13674 | $this->currPos = $cached->nextPos; |
13675 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
13676 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
13677 | return $cached->result; |
13678 | } |
13679 | $saved_preproc=$param_preproc; |
13680 | $saved_th=$param_th; |
13681 | $p2 = $this->currPos; |
13682 | $r3 = []; |
13683 | for (;;) { |
13684 | // start choice_1 |
13685 | $r4 = $this->parsenested_block($silence, ($boolParams & ~0x148) | 0x80, $param_preproc, $param_th); |
13686 | if ($r4!==self::$FAILED) { |
13687 | goto choice_1; |
13688 | } |
13689 | $r4 = $this->parsenewlineToken($silence); |
13690 | choice_1: |
13691 | if ($r4!==self::$FAILED) { |
13692 | $r3[] = $r4; |
13693 | } else { |
13694 | break; |
13695 | } |
13696 | } |
13697 | if (count($r3) === 0) { |
13698 | $r3 = self::$FAILED; |
13699 | } |
13700 | // il <- $r3 |
13701 | // free $r4 |
13702 | $r1 = $r3; |
13703 | if ($r1!==self::$FAILED) { |
13704 | $this->savedPos = $p2; |
13705 | $r1 = $this->a168($r3); |
13706 | } |
13707 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
13708 | $this->currPos, |
13709 | $r1, |
13710 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
13711 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
13712 | ); |
13713 | return $r1; |
13714 | }, "template_param_text", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
13715 | |
13716 | } |
13717 | private function discardnewlineToken($silence) { |
13718 | return $this->traceCall(function($silence) { |
13719 | $key = 569; |
13720 | $bucket = $this->currPos; |
13721 | $cached = $this->cache[$bucket][$key] ?? null; |
13722 | if ($cached) { |
13723 | $this->currPos = $cached->nextPos; |
13724 | |
13725 | return $cached->result; |
13726 | } |
13727 | |
13728 | $p2 = $this->currPos; |
13729 | $r1 = $this->discardnewline($silence); |
13730 | if ($r1!==self::$FAILED) { |
13731 | $this->savedPos = $p2; |
13732 | $r1 = $this->a26(); |
13733 | } |
13734 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
13735 | $this->currPos, |
13736 | $r1, |
13737 | self::$UNDEFINED, |
13738 | self::$UNDEFINED |
13739 | ); |
13740 | return $r1; |
13741 | }, "newlineToken", ["\$silence"], [$silence]); |
13742 | |
13743 | } |
13744 | private function parsetemplate_param_name($silence, $boolParams, &$param_preproc, &$param_th) { |
13745 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
13746 | $key = json_encode([384, $boolParams & 0x1e17, $param_preproc, $param_th]); |
13747 | $bucket = $this->currPos; |
13748 | $cached = $this->cache[$bucket][$key] ?? null; |
13749 | if ($cached) { |
13750 | $this->currPos = $cached->nextPos; |
13751 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
13752 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
13753 | return $cached->result; |
13754 | } |
13755 | $saved_preproc=$param_preproc; |
13756 | $saved_th=$param_th; |
13757 | // start choice_1 |
13758 | $r1 = $this->parsetemplate_param_text($silence, $boolParams | 0x20, $param_preproc, $param_th); |
13759 | if ($r1!==self::$FAILED) { |
13760 | goto choice_1; |
13761 | } |
13762 | $p2 = $this->currPos; |
13763 | $p3 = $this->currPos; |
13764 | if (($this->input[$this->currPos] ?? null) === "=") { |
13765 | $this->currPos++; |
13766 | $r1 = "="; |
13767 | $r1 = false; |
13768 | $this->currPos = $p3; |
13769 | $this->savedPos = $p2; |
13770 | $r1 = $this->a169(); |
13771 | } else { |
13772 | $r1 = self::$FAILED; |
13773 | } |
13774 | // free $p3 |
13775 | choice_1: |
13776 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
13777 | $this->currPos, |
13778 | $r1, |
13779 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
13780 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
13781 | ); |
13782 | return $r1; |
13783 | }, "template_param_name", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
13784 | |
13785 | } |
13786 | private function parselink_text($silence, $boolParams, &$param_preproc, &$param_th) { |
13787 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
13788 | $key = json_encode([428, $boolParams & 0x17df, $param_preproc, $param_th]); |
13789 | $bucket = $this->currPos; |
13790 | $cached = $this->cache[$bucket][$key] ?? null; |
13791 | if ($cached) { |
13792 | $this->currPos = $cached->nextPos; |
13793 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
13794 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
13795 | return $cached->result; |
13796 | } |
13797 | $saved_preproc=$param_preproc; |
13798 | $saved_th=$param_th; |
13799 | $r1 = $this->parselink_text_parameterized($silence, ($boolParams & ~0x20) | 0x800, $param_preproc, $param_th); |
13800 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
13801 | $this->currPos, |
13802 | $r1, |
13803 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
13804 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
13805 | ); |
13806 | return $r1; |
13807 | }, "link_text", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
13808 | |
13809 | } |
13810 | private function parsetag_name($silence) { |
13811 | return $this->traceCall(function($silence) { |
13812 | $key = 452; |
13813 | $bucket = $this->currPos; |
13814 | $cached = $this->cache[$bucket][$key] ?? null; |
13815 | if ($cached) { |
13816 | $this->currPos = $cached->nextPos; |
13817 | |
13818 | return $cached->result; |
13819 | } |
13820 | |
13821 | $p1 = $this->currPos; |
13822 | $r2 = self::$FAILED; |
13823 | for (;;) { |
13824 | if (strcspn($this->input, "\x09\x0a\x0b />\x00", $this->currPos, 1) !== 0) { |
13825 | $r3 = self::consumeChar($this->input, $this->currPos); |
13826 | $r2 = true; |
13827 | } else { |
13828 | $r3 = self::$FAILED; |
13829 | if (!$silence) {$this->fail(78);} |
13830 | break; |
13831 | } |
13832 | } |
13833 | if ($r2!==self::$FAILED) { |
13834 | $r2 = substr($this->input, $p1, $this->currPos - $p1); |
13835 | } else { |
13836 | $r2 = self::$FAILED; |
13837 | } |
13838 | // free $r3 |
13839 | // free $p1 |
13840 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
13841 | $this->currPos, |
13842 | $r2, |
13843 | self::$UNDEFINED, |
13844 | self::$UNDEFINED |
13845 | ); |
13846 | return $r2; |
13847 | }, "tag_name", ["\$silence"], [$silence]); |
13848 | |
13849 | } |
13850 | private function parseunispace($silence) { |
13851 | return $this->traceCall(function($silence) { |
13852 | $key = 582; |
13853 | $bucket = $this->currPos; |
13854 | $cached = $this->cache[$bucket][$key] ?? null; |
13855 | if ($cached) { |
13856 | $this->currPos = $cached->nextPos; |
13857 | |
13858 | return $cached->result; |
13859 | } |
13860 | |
13861 | $r1 = self::charAt($this->input, $this->currPos); |
13862 | if (preg_match("/^[ \\x{a0}\\x{1680}\\x{2000}-\\x{200a}\\x{202f}\\x{205f}\\x{3000}]/u", $r1)) { |
13863 | $this->currPos += strlen($r1); |
13864 | } else { |
13865 | $r1 = self::$FAILED; |
13866 | if (!$silence) {$this->fail(25);} |
13867 | } |
13868 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
13869 | $this->currPos, |
13870 | $r1, |
13871 | self::$UNDEFINED, |
13872 | self::$UNDEFINED |
13873 | ); |
13874 | return $r1; |
13875 | }, "unispace", ["\$silence"], [$silence]); |
13876 | |
13877 | } |
13878 | private function parseopt_lang_variant_flags($silence, $boolParams, &$param_preproc, &$param_th) { |
13879 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
13880 | $key = json_encode([398, $boolParams & 0x1ebf, $param_preproc, $param_th]); |
13881 | $bucket = $this->currPos; |
13882 | $cached = $this->cache[$bucket][$key] ?? null; |
13883 | if ($cached) { |
13884 | $this->currPos = $cached->nextPos; |
13885 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
13886 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
13887 | return $cached->result; |
13888 | } |
13889 | $saved_preproc=$param_preproc; |
13890 | $saved_th=$param_th; |
13891 | $p2 = $this->currPos; |
13892 | $p4 = $this->currPos; |
13893 | // start seq_1 |
13894 | $p5 = $this->currPos; |
13895 | $r6 = $this->parselang_variant_flags($silence, $boolParams, $param_preproc, $param_th); |
13896 | // ff <- $r6 |
13897 | if ($r6===self::$FAILED) { |
13898 | $r3 = self::$FAILED; |
13899 | goto seq_1; |
13900 | } |
13901 | if (($this->input[$this->currPos] ?? null) === "|") { |
13902 | $this->currPos++; |
13903 | $r7 = "|"; |
13904 | } else { |
13905 | if (!$silence) {$this->fail(13);} |
13906 | $r7 = self::$FAILED; |
13907 | $this->currPos = $p5; |
13908 | $r3 = self::$FAILED; |
13909 | goto seq_1; |
13910 | } |
13911 | $r3 = true; |
13912 | seq_1: |
13913 | if ($r3!==self::$FAILED) { |
13914 | $this->savedPos = $p4; |
13915 | $r3 = $this->a170($r6); |
13916 | } else { |
13917 | $r3 = null; |
13918 | } |
13919 | // free $p5 |
13920 | // f <- $r3 |
13921 | $r1 = $r3; |
13922 | if ($r1!==self::$FAILED) { |
13923 | $this->savedPos = $p2; |
13924 | $r1 = $this->a171($r3); |
13925 | } |
13926 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
13927 | $this->currPos, |
13928 | $r1, |
13929 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
13930 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
13931 | ); |
13932 | return $r1; |
13933 | }, "opt_lang_variant_flags", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
13934 | |
13935 | } |
13936 | private function parselang_variant_text($silence, $boolParams, &$param_preproc, &$param_th) { |
13937 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
13938 | $key = json_encode([414, $boolParams & 0x1fff, $param_preproc, $param_th]); |
13939 | $bucket = $this->currPos; |
13940 | $cached = $this->cache[$bucket][$key] ?? null; |
13941 | if ($cached) { |
13942 | $this->currPos = $cached->nextPos; |
13943 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
13944 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
13945 | return $cached->result; |
13946 | } |
13947 | $saved_preproc=$param_preproc; |
13948 | $saved_th=$param_th; |
13949 | $p2 = $this->currPos; |
13950 | $r3 = []; |
13951 | for (;;) { |
13952 | // start choice_1 |
13953 | $r4 = $this->parseinlineline($silence, $boolParams, $param_preproc, $param_th); |
13954 | if ($r4!==self::$FAILED) { |
13955 | goto choice_1; |
13956 | } |
13957 | if (($this->input[$this->currPos] ?? null) === "|") { |
13958 | $this->currPos++; |
13959 | $r4 = "|"; |
13960 | } else { |
13961 | if (!$silence) {$this->fail(13);} |
13962 | $r4 = self::$FAILED; |
13963 | } |
13964 | choice_1: |
13965 | if ($r4!==self::$FAILED) { |
13966 | $r3[] = $r4; |
13967 | } else { |
13968 | break; |
13969 | } |
13970 | } |
13971 | // tokens <- $r3 |
13972 | // free $r4 |
13973 | $r1 = $r3; |
13974 | if ($r1!==self::$FAILED) { |
13975 | $this->savedPos = $p2; |
13976 | $r1 = $this->a172($r3); |
13977 | } |
13978 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
13979 | $this->currPos, |
13980 | $r1, |
13981 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
13982 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
13983 | ); |
13984 | return $r1; |
13985 | }, "lang_variant_text", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
13986 | |
13987 | } |
13988 | private function parselang_variant_option_list($silence, $boolParams, &$param_preproc, &$param_th) { |
13989 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
13990 | $key = json_encode([406, $boolParams & 0x1fff, $param_preproc, $param_th]); |
13991 | $bucket = $this->currPos; |
13992 | $cached = $this->cache[$bucket][$key] ?? null; |
13993 | if ($cached) { |
13994 | $this->currPos = $cached->nextPos; |
13995 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
13996 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
13997 | return $cached->result; |
13998 | } |
13999 | $saved_preproc=$param_preproc; |
14000 | $saved_th=$param_th; |
14001 | // start choice_1 |
14002 | $p2 = $this->currPos; |
14003 | // start seq_1 |
14004 | $p3 = $this->currPos; |
14005 | $r4 = $this->parselang_variant_option($silence, $boolParams, $param_preproc, $param_th); |
14006 | // o <- $r4 |
14007 | if ($r4===self::$FAILED) { |
14008 | $r1 = self::$FAILED; |
14009 | goto seq_1; |
14010 | } |
14011 | $r5 = []; |
14012 | for (;;) { |
14013 | $p7 = $this->currPos; |
14014 | // start seq_2 |
14015 | $p8 = $this->currPos; |
14016 | if (($this->input[$this->currPos] ?? null) === ";") { |
14017 | $this->currPos++; |
14018 | $r9 = ";"; |
14019 | } else { |
14020 | if (!$silence) {$this->fail(26);} |
14021 | $r9 = self::$FAILED; |
14022 | $r6 = self::$FAILED; |
14023 | goto seq_2; |
14024 | } |
14025 | $r10 = $this->parselang_variant_option($silence, $boolParams, $param_preproc, $param_th); |
14026 | // oo <- $r10 |
14027 | if ($r10===self::$FAILED) { |
14028 | $this->currPos = $p8; |
14029 | $r6 = self::$FAILED; |
14030 | goto seq_2; |
14031 | } |
14032 | $r6 = true; |
14033 | seq_2: |
14034 | if ($r6!==self::$FAILED) { |
14035 | $this->savedPos = $p7; |
14036 | $r6 = $this->a173($r4, $r10); |
14037 | $r5[] = $r6; |
14038 | } else { |
14039 | break; |
14040 | } |
14041 | // free $p8 |
14042 | } |
14043 | // rest <- $r5 |
14044 | // free $r6 |
14045 | $r6 = []; |
14046 | for (;;) { |
14047 | // start seq_3 |
14048 | $p8 = $this->currPos; |
14049 | if (($this->input[$this->currPos] ?? null) === ";") { |
14050 | $this->currPos++; |
14051 | $r12 = ";"; |
14052 | } else { |
14053 | if (!$silence) {$this->fail(26);} |
14054 | $r12 = self::$FAILED; |
14055 | $r11 = self::$FAILED; |
14056 | goto seq_3; |
14057 | } |
14058 | $p13 = $this->currPos; |
14059 | $r14 = $this->discardbogus_lang_variant_option($silence, $boolParams, $param_preproc, $param_th); |
14060 | if ($r14!==self::$FAILED) { |
14061 | $r14 = substr($this->input, $p13, $this->currPos - $p13); |
14062 | } else { |
14063 | $r14 = self::$FAILED; |
14064 | $this->currPos = $p8; |
14065 | $r11 = self::$FAILED; |
14066 | goto seq_3; |
14067 | } |
14068 | // free $p13 |
14069 | $r11 = [$r12,$r14]; |
14070 | seq_3: |
14071 | if ($r11!==self::$FAILED) { |
14072 | $r6[] = $r11; |
14073 | } else { |
14074 | break; |
14075 | } |
14076 | // free $p8 |
14077 | } |
14078 | // tr <- $r6 |
14079 | // free $r11 |
14080 | $r1 = true; |
14081 | seq_1: |
14082 | if ($r1!==self::$FAILED) { |
14083 | $this->savedPos = $p2; |
14084 | $r1 = $this->a174($r4, $r5, $r6); |
14085 | goto choice_1; |
14086 | } |
14087 | // free $p3 |
14088 | $p3 = $this->currPos; |
14089 | $r11 = $this->parselang_variant_text($silence, $boolParams, $param_preproc, $param_th); |
14090 | // lvtext <- $r11 |
14091 | $r1 = $r11; |
14092 | if ($r1!==self::$FAILED) { |
14093 | $this->savedPos = $p3; |
14094 | $r1 = $this->a175($r11); |
14095 | } |
14096 | choice_1: |
14097 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
14098 | $this->currPos, |
14099 | $r1, |
14100 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
14101 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
14102 | ); |
14103 | return $r1; |
14104 | }, "lang_variant_option_list", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
14105 | |
14106 | } |
14107 | private function parsetable_heading_tag($silence, $boolParams, &$param_preproc, &$param_th) { |
14108 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
14109 | $key = json_encode([508, $boolParams & 0x1fff, $param_preproc, $param_th]); |
14110 | $bucket = $this->currPos; |
14111 | $cached = $this->cache[$bucket][$key] ?? null; |
14112 | if ($cached) { |
14113 | $this->currPos = $cached->nextPos; |
14114 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
14115 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
14116 | return $cached->result; |
14117 | } |
14118 | $saved_preproc=$param_preproc; |
14119 | $saved_th=$param_th; |
14120 | $p2 = $this->currPos; |
14121 | // start seq_1 |
14122 | $p3 = $this->currPos; |
14123 | $r4 = $this->parserow_syntax_table_args($silence, $boolParams, $param_preproc, $param_th); |
14124 | if ($r4===self::$FAILED) { |
14125 | $r4 = null; |
14126 | } |
14127 | // arg <- $r4 |
14128 | $p6 = $this->currPos; |
14129 | $r5 = ''; |
14130 | // tagEndPos <- $r5 |
14131 | if ($r5!==self::$FAILED) { |
14132 | $this->savedPos = $p6; |
14133 | $r5 = $this->a164($r4); |
14134 | } else { |
14135 | $this->currPos = $p3; |
14136 | $r1 = self::$FAILED; |
14137 | goto seq_1; |
14138 | } |
14139 | $r7 = []; |
14140 | for (;;) { |
14141 | $p9 = $this->currPos; |
14142 | // start seq_2 |
14143 | $p10 = $this->currPos; |
14144 | $r11 = $this->parsenested_block_in_table($silence, $boolParams, $param_preproc, $param_th); |
14145 | // d <- $r11 |
14146 | if ($r11===self::$FAILED) { |
14147 | $this->currPos = $p10; |
14148 | $r8 = self::$FAILED; |
14149 | goto seq_2; |
14150 | } |
14151 | $r8 = true; |
14152 | seq_2: |
14153 | if ($r8!==self::$FAILED) { |
14154 | $this->savedPos = $p9; |
14155 | $r8 = $this->a176($r4, $r5, $param_th, $r11); |
14156 | $r7[] = $r8; |
14157 | } else { |
14158 | break; |
14159 | } |
14160 | // free $p10 |
14161 | } |
14162 | // c <- $r7 |
14163 | // free $r8 |
14164 | $r1 = true; |
14165 | seq_1: |
14166 | if ($r1!==self::$FAILED) { |
14167 | $this->savedPos = $p2; |
14168 | $r1 = $this->a177($r4, $r5, $r7); |
14169 | } |
14170 | // free $p3 |
14171 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
14172 | $this->currPos, |
14173 | $r1, |
14174 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
14175 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
14176 | ); |
14177 | return $r1; |
14178 | }, "table_heading_tag", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
14179 | |
14180 | } |
14181 | private function parseths($silence, $boolParams, &$param_preproc, &$param_th) { |
14182 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
14183 | $key = json_encode([510, $boolParams & 0x1fff, $param_preproc, $param_th]); |
14184 | $bucket = $this->currPos; |
14185 | $cached = $this->cache[$bucket][$key] ?? null; |
14186 | if ($cached) { |
14187 | $this->currPos = $cached->nextPos; |
14188 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
14189 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
14190 | return $cached->result; |
14191 | } |
14192 | $saved_preproc=$param_preproc; |
14193 | $saved_th=$param_th; |
14194 | $r1 = []; |
14195 | for (;;) { |
14196 | $p3 = $this->currPos; |
14197 | // start seq_1 |
14198 | $p4 = $this->currPos; |
14199 | // start choice_1 |
14200 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "!!", $this->currPos, 2, false) === 0) { |
14201 | $r5 = "!!"; |
14202 | $this->currPos += 2; |
14203 | goto choice_1; |
14204 | } else { |
14205 | if (!$silence) {$this->fail(79);} |
14206 | $r5 = self::$FAILED; |
14207 | } |
14208 | $r5 = $this->parsepipe_pipe($silence); |
14209 | choice_1: |
14210 | // pp <- $r5 |
14211 | if ($r5===self::$FAILED) { |
14212 | $r2 = self::$FAILED; |
14213 | goto seq_1; |
14214 | } |
14215 | $r6 = $this->parsetable_heading_tag($silence, $boolParams, $param_preproc, $param_th); |
14216 | // tht <- $r6 |
14217 | if ($r6===self::$FAILED) { |
14218 | $this->currPos = $p4; |
14219 | $r2 = self::$FAILED; |
14220 | goto seq_1; |
14221 | } |
14222 | $r2 = true; |
14223 | seq_1: |
14224 | if ($r2!==self::$FAILED) { |
14225 | $this->savedPos = $p3; |
14226 | $r2 = $this->a178($r5, $r6); |
14227 | $r1[] = $r2; |
14228 | } else { |
14229 | break; |
14230 | } |
14231 | // free $p4 |
14232 | } |
14233 | // free $r2 |
14234 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
14235 | $this->currPos, |
14236 | $r1, |
14237 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
14238 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
14239 | ); |
14240 | return $r1; |
14241 | }, "ths", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
14242 | |
14243 | } |
14244 | private function parsepipe_pipe($silence) { |
14245 | return $this->traceCall(function($silence) { |
14246 | $key = 556; |
14247 | $bucket = $this->currPos; |
14248 | $cached = $this->cache[$bucket][$key] ?? null; |
14249 | if ($cached) { |
14250 | $this->currPos = $cached->nextPos; |
14251 | |
14252 | return $cached->result; |
14253 | } |
14254 | |
14255 | // start choice_1 |
14256 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "||", $this->currPos, 2, false) === 0) { |
14257 | $r1 = "||"; |
14258 | $this->currPos += 2; |
14259 | goto choice_1; |
14260 | } else { |
14261 | if (!$silence) {$this->fail(80);} |
14262 | $r1 = self::$FAILED; |
14263 | } |
14264 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "{{!}}{{!}}", $this->currPos, 10, false) === 0) { |
14265 | $r1 = "{{!}}{{!}}"; |
14266 | $this->currPos += 10; |
14267 | } else { |
14268 | if (!$silence) {$this->fail(81);} |
14269 | $r1 = self::$FAILED; |
14270 | } |
14271 | choice_1: |
14272 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
14273 | $this->currPos, |
14274 | $r1, |
14275 | self::$UNDEFINED, |
14276 | self::$UNDEFINED |
14277 | ); |
14278 | return $r1; |
14279 | }, "pipe_pipe", ["\$silence"], [$silence]); |
14280 | |
14281 | } |
14282 | private function parsenested_block($silence, $boolParams, &$param_preproc, &$param_th) { |
14283 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
14284 | $key = json_encode([314, $boolParams & 0x1fff, $param_preproc, $param_th]); |
14285 | $bucket = $this->currPos; |
14286 | $cached = $this->cache[$bucket][$key] ?? null; |
14287 | if ($cached) { |
14288 | $this->currPos = $cached->nextPos; |
14289 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
14290 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
14291 | return $cached->result; |
14292 | } |
14293 | $saved_preproc=$param_preproc; |
14294 | $saved_th=$param_th; |
14295 | $p2 = $this->currPos; |
14296 | // start seq_1 |
14297 | $p3 = $this->currPos; |
14298 | $p4 = $this->currPos; |
14299 | $r5 = $this->discardinline_breaks(true, $boolParams, $param_preproc, $param_th); |
14300 | if ($r5 === self::$FAILED) { |
14301 | $r5 = false; |
14302 | } else { |
14303 | $r5 = self::$FAILED; |
14304 | $this->currPos = $p4; |
14305 | $r1 = self::$FAILED; |
14306 | goto seq_1; |
14307 | } |
14308 | // free $p4 |
14309 | $r6 = $this->parseblock($silence, $boolParams, $param_th, $param_preproc); |
14310 | // b <- $r6 |
14311 | if ($r6===self::$FAILED) { |
14312 | $this->currPos = $p3; |
14313 | $r1 = self::$FAILED; |
14314 | goto seq_1; |
14315 | } |
14316 | $r1 = true; |
14317 | seq_1: |
14318 | if ($r1!==self::$FAILED) { |
14319 | $this->savedPos = $p2; |
14320 | $r1 = $this->a15($r6); |
14321 | } |
14322 | // free $p3 |
14323 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
14324 | $this->currPos, |
14325 | $r1, |
14326 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
14327 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
14328 | ); |
14329 | return $r1; |
14330 | }, "nested_block", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
14331 | |
14332 | } |
14333 | private function parselink_text_parameterized($silence, $boolParams, &$param_preproc, &$param_th) { |
14334 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
14335 | $key = json_encode([430, $boolParams & 0x1fff, $param_preproc, $param_th]); |
14336 | $bucket = $this->currPos; |
14337 | $cached = $this->cache[$bucket][$key] ?? null; |
14338 | if ($cached) { |
14339 | $this->currPos = $cached->nextPos; |
14340 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
14341 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
14342 | return $cached->result; |
14343 | } |
14344 | $saved_preproc=$param_preproc; |
14345 | $saved_th=$param_th; |
14346 | $p2 = $this->currPos; |
14347 | $r3 = []; |
14348 | for (;;) { |
14349 | // start choice_1 |
14350 | // start seq_1 |
14351 | $p5 = $this->currPos; |
14352 | $r6 = $this->parsesol($silence, $boolParams, $param_preproc, $param_th); |
14353 | if ($r6===self::$FAILED) { |
14354 | $r4 = self::$FAILED; |
14355 | goto seq_1; |
14356 | } |
14357 | // start choice_2 |
14358 | $r7 = $this->parseheading($silence, $boolParams, $param_preproc, $param_th); |
14359 | if ($r7!==self::$FAILED) { |
14360 | goto choice_2; |
14361 | } |
14362 | $r7 = $this->parsehr($silence, $boolParams, $param_preproc, $param_th); |
14363 | if ($r7!==self::$FAILED) { |
14364 | goto choice_2; |
14365 | } |
14366 | $r7 = $this->parsefull_table_in_link_caption($silence, $boolParams, $param_preproc, $param_th); |
14367 | choice_2: |
14368 | if ($r7===self::$FAILED) { |
14369 | $this->currPos = $p5; |
14370 | $r4 = self::$FAILED; |
14371 | goto seq_1; |
14372 | } |
14373 | $r4 = [$r6,$r7]; |
14374 | seq_1: |
14375 | if ($r4!==self::$FAILED) { |
14376 | goto choice_1; |
14377 | } |
14378 | // free $p5 |
14379 | $r4 = $this->parseurltext($silence, $boolParams, $param_preproc, $param_th); |
14380 | if ($r4!==self::$FAILED) { |
14381 | goto choice_1; |
14382 | } |
14383 | $p5 = $this->currPos; |
14384 | // start seq_2 |
14385 | $p8 = $this->currPos; |
14386 | $p9 = $this->currPos; |
14387 | $r10 = $this->discardinline_breaks(true, $boolParams, $param_preproc, $param_th); |
14388 | if ($r10 === self::$FAILED) { |
14389 | $r10 = false; |
14390 | } else { |
14391 | $r10 = self::$FAILED; |
14392 | $this->currPos = $p9; |
14393 | $r4 = self::$FAILED; |
14394 | goto seq_2; |
14395 | } |
14396 | // free $p9 |
14397 | // start choice_3 |
14398 | $r11 = $this->parseinline_element($silence, $boolParams, $param_preproc, $param_th); |
14399 | if ($r11!==self::$FAILED) { |
14400 | goto choice_3; |
14401 | } |
14402 | // start seq_3 |
14403 | $p9 = $this->currPos; |
14404 | if (($this->input[$this->currPos] ?? null) === "[") { |
14405 | $this->currPos++; |
14406 | $r12 = "["; |
14407 | } else { |
14408 | if (!$silence) {$this->fail(19);} |
14409 | $r12 = self::$FAILED; |
14410 | $r11 = self::$FAILED; |
14411 | goto seq_3; |
14412 | } |
14413 | $r13 = []; |
14414 | for (;;) { |
14415 | $r14 = $this->parsetext_char($silence); |
14416 | if ($r14!==self::$FAILED) { |
14417 | $r13[] = $r14; |
14418 | } else { |
14419 | break; |
14420 | } |
14421 | } |
14422 | if (count($r13) === 0) { |
14423 | $r13 = self::$FAILED; |
14424 | } |
14425 | if ($r13===self::$FAILED) { |
14426 | $this->currPos = $p9; |
14427 | $r11 = self::$FAILED; |
14428 | goto seq_3; |
14429 | } |
14430 | // free $r14 |
14431 | if (($this->input[$this->currPos] ?? null) === "]") { |
14432 | $this->currPos++; |
14433 | $r14 = "]"; |
14434 | } else { |
14435 | if (!$silence) {$this->fail(21);} |
14436 | $r14 = self::$FAILED; |
14437 | $this->currPos = $p9; |
14438 | $r11 = self::$FAILED; |
14439 | goto seq_3; |
14440 | } |
14441 | $p15 = $this->currPos; |
14442 | $p17 = $this->currPos; |
14443 | // start choice_4 |
14444 | $p18 = $this->currPos; |
14445 | if (($this->input[$this->currPos] ?? null) === "]") { |
14446 | $this->currPos++; |
14447 | $r16 = "]"; |
14448 | } else { |
14449 | $r16 = self::$FAILED; |
14450 | } |
14451 | if ($r16 === self::$FAILED) { |
14452 | $r16 = false; |
14453 | goto choice_4; |
14454 | } else { |
14455 | $r16 = self::$FAILED; |
14456 | $this->currPos = $p18; |
14457 | } |
14458 | // free $p18 |
14459 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "]]", $this->currPos, 2, false) === 0) { |
14460 | $r16 = "]]"; |
14461 | $this->currPos += 2; |
14462 | } else { |
14463 | $r16 = self::$FAILED; |
14464 | } |
14465 | choice_4: |
14466 | if ($r16!==self::$FAILED) { |
14467 | $r16 = false; |
14468 | $this->currPos = $p17; |
14469 | $r16 = substr($this->input, $p15, $this->currPos - $p15); |
14470 | } else { |
14471 | $r16 = self::$FAILED; |
14472 | $this->currPos = $p9; |
14473 | $r11 = self::$FAILED; |
14474 | goto seq_3; |
14475 | } |
14476 | // free $p17 |
14477 | // free $p15 |
14478 | $r11 = [$r12,$r13,$r14,$r16]; |
14479 | seq_3: |
14480 | if ($r11!==self::$FAILED) { |
14481 | goto choice_3; |
14482 | } |
14483 | // free $p9 |
14484 | if ($this->currPos < $this->inputLength) { |
14485 | $r11 = self::consumeChar($this->input, $this->currPos);; |
14486 | } else { |
14487 | $r11 = self::$FAILED; |
14488 | if (!$silence) {$this->fail(7);} |
14489 | } |
14490 | choice_3: |
14491 | // r <- $r11 |
14492 | if ($r11===self::$FAILED) { |
14493 | $this->currPos = $p8; |
14494 | $r4 = self::$FAILED; |
14495 | goto seq_2; |
14496 | } |
14497 | $r4 = true; |
14498 | seq_2: |
14499 | if ($r4!==self::$FAILED) { |
14500 | $this->savedPos = $p5; |
14501 | $r4 = $this->a24($r11); |
14502 | } |
14503 | // free $p8 |
14504 | choice_1: |
14505 | if ($r4!==self::$FAILED) { |
14506 | $r3[] = $r4; |
14507 | } else { |
14508 | break; |
14509 | } |
14510 | } |
14511 | if (count($r3) === 0) { |
14512 | $r3 = self::$FAILED; |
14513 | } |
14514 | // c <- $r3 |
14515 | // free $r4 |
14516 | $r1 = $r3; |
14517 | if ($r1!==self::$FAILED) { |
14518 | $this->savedPos = $p2; |
14519 | $r1 = $this->a43($r3); |
14520 | } |
14521 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
14522 | $this->currPos, |
14523 | $r1, |
14524 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
14525 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
14526 | ); |
14527 | return $r1; |
14528 | }, "link_text_parameterized", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
14529 | |
14530 | } |
14531 | private function parselang_variant_flags($silence, $boolParams, &$param_preproc, &$param_th) { |
14532 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
14533 | $key = json_encode([400, $boolParams & 0x1ebf, $param_preproc, $param_th]); |
14534 | $bucket = $this->currPos; |
14535 | $cached = $this->cache[$bucket][$key] ?? null; |
14536 | if ($cached) { |
14537 | $this->currPos = $cached->nextPos; |
14538 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
14539 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
14540 | return $cached->result; |
14541 | } |
14542 | $saved_preproc=$param_preproc; |
14543 | $saved_th=$param_th; |
14544 | // start choice_1 |
14545 | $p2 = $this->currPos; |
14546 | // start seq_1 |
14547 | $p3 = $this->currPos; |
14548 | $p5 = $this->currPos; |
14549 | for (;;) { |
14550 | $r6 = $this->discardspace_or_newline($silence); |
14551 | if ($r6===self::$FAILED) { |
14552 | break; |
14553 | } |
14554 | } |
14555 | // free $r6 |
14556 | $r4 = true; |
14557 | // sp1 <- $r4 |
14558 | if ($r4!==self::$FAILED) { |
14559 | $r4 = substr($this->input, $p5, $this->currPos - $p5); |
14560 | } else { |
14561 | $r4 = self::$FAILED; |
14562 | $r1 = self::$FAILED; |
14563 | goto seq_1; |
14564 | } |
14565 | // free $p5 |
14566 | $r6 = $this->parselang_variant_flag($silence, $boolParams, $param_preproc, $param_th); |
14567 | // f <- $r6 |
14568 | if ($r6===self::$FAILED) { |
14569 | $this->currPos = $p3; |
14570 | $r1 = self::$FAILED; |
14571 | goto seq_1; |
14572 | } |
14573 | $p5 = $this->currPos; |
14574 | for (;;) { |
14575 | $r8 = $this->discardspace_or_newline($silence); |
14576 | if ($r8===self::$FAILED) { |
14577 | break; |
14578 | } |
14579 | } |
14580 | // free $r8 |
14581 | $r7 = true; |
14582 | // sp2 <- $r7 |
14583 | if ($r7!==self::$FAILED) { |
14584 | $r7 = substr($this->input, $p5, $this->currPos - $p5); |
14585 | } else { |
14586 | $r7 = self::$FAILED; |
14587 | $this->currPos = $p3; |
14588 | $r1 = self::$FAILED; |
14589 | goto seq_1; |
14590 | } |
14591 | // free $p5 |
14592 | // start seq_2 |
14593 | $p5 = $this->currPos; |
14594 | if (($this->input[$this->currPos] ?? null) === ";") { |
14595 | $this->currPos++; |
14596 | $r9 = ";"; |
14597 | } else { |
14598 | if (!$silence) {$this->fail(26);} |
14599 | $r9 = self::$FAILED; |
14600 | $r8 = self::$FAILED; |
14601 | goto seq_2; |
14602 | } |
14603 | $r10 = $this->parselang_variant_flags($silence, $boolParams, $param_preproc, $param_th); |
14604 | if ($r10===self::$FAILED) { |
14605 | $r10 = null; |
14606 | } |
14607 | $r8 = [$r9,$r10]; |
14608 | seq_2: |
14609 | if ($r8===self::$FAILED) { |
14610 | $r8 = null; |
14611 | } |
14612 | // free $p5 |
14613 | // more <- $r8 |
14614 | $r1 = true; |
14615 | seq_1: |
14616 | if ($r1!==self::$FAILED) { |
14617 | $this->savedPos = $p2; |
14618 | $r1 = $this->a179($r4, $r6, $r7, $r8); |
14619 | goto choice_1; |
14620 | } |
14621 | // free $p3 |
14622 | $p3 = $this->currPos; |
14623 | $p5 = $this->currPos; |
14624 | for (;;) { |
14625 | $r12 = $this->discardspace_or_newline($silence); |
14626 | if ($r12===self::$FAILED) { |
14627 | break; |
14628 | } |
14629 | } |
14630 | // free $r12 |
14631 | $r11 = true; |
14632 | // sp <- $r11 |
14633 | if ($r11!==self::$FAILED) { |
14634 | $r11 = substr($this->input, $p5, $this->currPos - $p5); |
14635 | } else { |
14636 | $r11 = self::$FAILED; |
14637 | } |
14638 | // free $p5 |
14639 | $r1 = $r11; |
14640 | if ($r1!==self::$FAILED) { |
14641 | $this->savedPos = $p3; |
14642 | $r1 = $this->a180($r11); |
14643 | } |
14644 | choice_1: |
14645 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
14646 | $this->currPos, |
14647 | $r1, |
14648 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
14649 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
14650 | ); |
14651 | return $r1; |
14652 | }, "lang_variant_flags", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
14653 | |
14654 | } |
14655 | private function parselang_variant_option($silence, $boolParams, &$param_preproc, &$param_th) { |
14656 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
14657 | $key = json_encode([410, $boolParams & 0x1fff, $param_preproc, $param_th]); |
14658 | $bucket = $this->currPos; |
14659 | $cached = $this->cache[$bucket][$key] ?? null; |
14660 | if ($cached) { |
14661 | $this->currPos = $cached->nextPos; |
14662 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
14663 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
14664 | return $cached->result; |
14665 | } |
14666 | $saved_preproc=$param_preproc; |
14667 | $saved_th=$param_th; |
14668 | // start choice_1 |
14669 | $p2 = $this->currPos; |
14670 | // start seq_1 |
14671 | $p3 = $this->currPos; |
14672 | $p5 = $this->currPos; |
14673 | for (;;) { |
14674 | $r6 = $this->discardspace_or_newline($silence); |
14675 | if ($r6===self::$FAILED) { |
14676 | break; |
14677 | } |
14678 | } |
14679 | // free $r6 |
14680 | $r4 = true; |
14681 | // sp1 <- $r4 |
14682 | if ($r4!==self::$FAILED) { |
14683 | $r4 = substr($this->input, $p5, $this->currPos - $p5); |
14684 | } else { |
14685 | $r4 = self::$FAILED; |
14686 | $r1 = self::$FAILED; |
14687 | goto seq_1; |
14688 | } |
14689 | // free $p5 |
14690 | $r6 = $this->parselang_variant_name($silence, $boolParams, $param_preproc, $param_th); |
14691 | // lang <- $r6 |
14692 | if ($r6===self::$FAILED) { |
14693 | $this->currPos = $p3; |
14694 | $r1 = self::$FAILED; |
14695 | goto seq_1; |
14696 | } |
14697 | $p5 = $this->currPos; |
14698 | for (;;) { |
14699 | $r8 = $this->discardspace_or_newline($silence); |
14700 | if ($r8===self::$FAILED) { |
14701 | break; |
14702 | } |
14703 | } |
14704 | // free $r8 |
14705 | $r7 = true; |
14706 | // sp2 <- $r7 |
14707 | if ($r7!==self::$FAILED) { |
14708 | $r7 = substr($this->input, $p5, $this->currPos - $p5); |
14709 | } else { |
14710 | $r7 = self::$FAILED; |
14711 | $this->currPos = $p3; |
14712 | $r1 = self::$FAILED; |
14713 | goto seq_1; |
14714 | } |
14715 | // free $p5 |
14716 | if (($this->input[$this->currPos] ?? null) === ":") { |
14717 | $this->currPos++; |
14718 | $r8 = ":"; |
14719 | } else { |
14720 | if (!$silence) {$this->fail(18);} |
14721 | $r8 = self::$FAILED; |
14722 | $this->currPos = $p3; |
14723 | $r1 = self::$FAILED; |
14724 | goto seq_1; |
14725 | } |
14726 | $p5 = $this->currPos; |
14727 | for (;;) { |
14728 | $r10 = $this->discardspace_or_newline($silence); |
14729 | if ($r10===self::$FAILED) { |
14730 | break; |
14731 | } |
14732 | } |
14733 | // free $r10 |
14734 | $r9 = true; |
14735 | // sp3 <- $r9 |
14736 | if ($r9!==self::$FAILED) { |
14737 | $r9 = substr($this->input, $p5, $this->currPos - $p5); |
14738 | } else { |
14739 | $r9 = self::$FAILED; |
14740 | $this->currPos = $p3; |
14741 | $r1 = self::$FAILED; |
14742 | goto seq_1; |
14743 | } |
14744 | // free $p5 |
14745 | // start choice_2 |
14746 | $r10 = $this->parselang_variant_nowiki($silence, $boolParams, $param_preproc, $param_th); |
14747 | if ($r10!==self::$FAILED) { |
14748 | goto choice_2; |
14749 | } |
14750 | $r10 = $this->parselang_variant_text_no_semi($silence, $boolParams, $param_preproc, $param_th); |
14751 | choice_2: |
14752 | // lvtext <- $r10 |
14753 | if ($r10===self::$FAILED) { |
14754 | $this->currPos = $p3; |
14755 | $r1 = self::$FAILED; |
14756 | goto seq_1; |
14757 | } |
14758 | $r1 = true; |
14759 | seq_1: |
14760 | if ($r1!==self::$FAILED) { |
14761 | $this->savedPos = $p2; |
14762 | $r1 = $this->a181($r4, $r6, $r7, $r9, $r10); |
14763 | goto choice_1; |
14764 | } |
14765 | // free $p3 |
14766 | $p3 = $this->currPos; |
14767 | // start seq_2 |
14768 | $p5 = $this->currPos; |
14769 | $p12 = $this->currPos; |
14770 | for (;;) { |
14771 | $r13 = $this->discardspace_or_newline($silence); |
14772 | if ($r13===self::$FAILED) { |
14773 | break; |
14774 | } |
14775 | } |
14776 | // free $r13 |
14777 | $r11 = true; |
14778 | // sp1 <- $r11 |
14779 | if ($r11!==self::$FAILED) { |
14780 | $r11 = substr($this->input, $p12, $this->currPos - $p12); |
14781 | } else { |
14782 | $r11 = self::$FAILED; |
14783 | $r1 = self::$FAILED; |
14784 | goto seq_2; |
14785 | } |
14786 | // free $p12 |
14787 | // start choice_3 |
14788 | $r13 = $this->parselang_variant_nowiki($silence, $boolParams, $param_preproc, $param_th); |
14789 | if ($r13!==self::$FAILED) { |
14790 | goto choice_3; |
14791 | } |
14792 | $r13 = $this->parselang_variant_text_no_semi_or_arrow($silence, $boolParams, $param_preproc, $param_th); |
14793 | choice_3: |
14794 | // from <- $r13 |
14795 | if ($r13===self::$FAILED) { |
14796 | $this->currPos = $p5; |
14797 | $r1 = self::$FAILED; |
14798 | goto seq_2; |
14799 | } |
14800 | if ($this->currPos >= $this->inputLength ? false : substr_compare($this->input, "=>", $this->currPos, 2, false) === 0) { |
14801 | $r14 = "=>"; |
14802 | $this->currPos += 2; |
14803 | } else { |
14804 | if (!$silence) {$this->fail(82);} |
14805 | $r14 = self::$FAILED; |
14806 | $this->currPos = $p5; |
14807 | $r1 = self::$FAILED; |
14808 | goto seq_2; |
14809 | } |
14810 | $p12 = $this->currPos; |
14811 | for (;;) { |
14812 | $r16 = $this->discardspace_or_newline($silence); |
14813 | if ($r16===self::$FAILED) { |
14814 | break; |
14815 | } |
14816 | } |
14817 | // free $r16 |
14818 | $r15 = true; |
14819 | // sp2 <- $r15 |
14820 | if ($r15!==self::$FAILED) { |
14821 | $r15 = substr($this->input, $p12, $this->currPos - $p12); |
14822 | } else { |
14823 | $r15 = self::$FAILED; |
14824 | $this->currPos = $p5; |
14825 | $r1 = self::$FAILED; |
14826 | goto seq_2; |
14827 | } |
14828 | // free $p12 |
14829 | $r16 = $this->parselang_variant_name($silence, $boolParams, $param_preproc, $param_th); |
14830 | // lang <- $r16 |
14831 | if ($r16===self::$FAILED) { |
14832 | $this->currPos = $p5; |
14833 | $r1 = self::$FAILED; |
14834 | goto seq_2; |
14835 | } |
14836 | $p12 = $this->currPos; |
14837 | for (;;) { |
14838 | $r18 = $this->discardspace_or_newline($silence); |
14839 | if ($r18===self::$FAILED) { |
14840 | break; |
14841 | } |
14842 | } |
14843 | // free $r18 |
14844 | $r17 = true; |
14845 | // sp3 <- $r17 |
14846 | if ($r17!==self::$FAILED) { |
14847 | $r17 = substr($this->input, $p12, $this->currPos - $p12); |
14848 | } else { |
14849 | $r17 = self::$FAILED; |
14850 | $this->currPos = $p5; |
14851 | $r1 = self::$FAILED; |
14852 | goto seq_2; |
14853 | } |
14854 | // free $p12 |
14855 | if (($this->input[$this->currPos] ?? null) === ":") { |
14856 | $this->currPos++; |
14857 | $r18 = ":"; |
14858 | } else { |
14859 | if (!$silence) {$this->fail(18);} |
14860 | $r18 = self::$FAILED; |
14861 | $this->currPos = $p5; |
14862 | $r1 = self::$FAILED; |
14863 | goto seq_2; |
14864 | } |
14865 | $p12 = $this->currPos; |
14866 | for (;;) { |
14867 | $r20 = $this->discardspace_or_newline($silence); |
14868 | if ($r20===self::$FAILED) { |
14869 | break; |
14870 | } |
14871 | } |
14872 | // free $r20 |
14873 | $r19 = true; |
14874 | // sp4 <- $r19 |
14875 | if ($r19!==self::$FAILED) { |
14876 | $r19 = substr($this->input, $p12, $this->currPos - $p12); |
14877 | } else { |
14878 | $r19 = self::$FAILED; |
14879 | $this->currPos = $p5; |
14880 | $r1 = self::$FAILED; |
14881 | goto seq_2; |
14882 | } |
14883 | // free $p12 |
14884 | // start choice_4 |
14885 | $r20 = $this->parselang_variant_nowiki($silence, $boolParams, $param_preproc, $param_th); |
14886 | if ($r20!==self::$FAILED) { |
14887 | goto choice_4; |
14888 | } |
14889 | $r20 = $this->parselang_variant_text_no_semi($silence, $boolParams, $param_preproc, $param_th); |
14890 | choice_4: |
14891 | // to <- $r20 |
14892 | if ($r20===self::$FAILED) { |
14893 | $this->currPos = $p5; |
14894 | $r1 = self::$FAILED; |
14895 | goto seq_2; |
14896 | } |
14897 | $r1 = true; |
14898 | seq_2: |
14899 | if ($r1!==self::$FAILED) { |
14900 | $this->savedPos = $p3; |
14901 | $r1 = $this->a182($r11, $r13, $r15, $r16, $r17, $r19, $r20); |
14902 | } |
14903 | // free $p5 |
14904 | choice_1: |
14905 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
14906 | $this->currPos, |
14907 | $r1, |
14908 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
14909 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
14910 | ); |
14911 | return $r1; |
14912 | }, "lang_variant_option", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
14913 | |
14914 | } |
14915 | private function discardbogus_lang_variant_option($silence, $boolParams, &$param_preproc, &$param_th) { |
14916 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
14917 | $key = json_encode([409, $boolParams & 0x1fff, $param_preproc, $param_th]); |
14918 | $bucket = $this->currPos; |
14919 | $cached = $this->cache[$bucket][$key] ?? null; |
14920 | if ($cached) { |
14921 | $this->currPos = $cached->nextPos; |
14922 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
14923 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
14924 | return $cached->result; |
14925 | } |
14926 | $saved_preproc=$param_preproc; |
14927 | $saved_th=$param_th; |
14928 | $r1 = $this->discardlang_variant_text($silence, $boolParams, $param_preproc, $param_th); |
14929 | if ($r1===self::$FAILED) { |
14930 | $r1 = null; |
14931 | } |
14932 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
14933 | $this->currPos, |
14934 | $r1, |
14935 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
14936 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
14937 | ); |
14938 | return $r1; |
14939 | }, "bogus_lang_variant_option", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
14940 | |
14941 | } |
14942 | private function parsefull_table_in_link_caption($silence, $boolParams, &$param_preproc, &$param_th) { |
14943 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
14944 | $key = json_encode([490, $boolParams & 0x1ffe, $param_preproc, $param_th]); |
14945 | $bucket = $this->currPos; |
14946 | $cached = $this->cache[$bucket][$key] ?? null; |
14947 | if ($cached) { |
14948 | $this->currPos = $cached->nextPos; |
14949 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
14950 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
14951 | return $cached->result; |
14952 | } |
14953 | $saved_preproc=$param_preproc; |
14954 | $saved_th=$param_th; |
14955 | $p2 = $this->currPos; |
14956 | // start seq_1 |
14957 | $p3 = $this->currPos; |
14958 | $p4 = $this->currPos; |
14959 | $r5 = $this->discardinline_breaks(true, $boolParams, $param_preproc, $param_th); |
14960 | if ($r5 === self::$FAILED) { |
14961 | $r5 = false; |
14962 | } else { |
14963 | $r5 = self::$FAILED; |
14964 | $this->currPos = $p4; |
14965 | $r1 = self::$FAILED; |
14966 | goto seq_1; |
14967 | } |
14968 | // free $p4 |
14969 | $r6 = $this->parsefull_table_in_link_caption_parameterized($silence, ($boolParams & ~0x801) | 0x40, $param_preproc, $param_th); |
14970 | // r <- $r6 |
14971 | if ($r6===self::$FAILED) { |
14972 | $this->currPos = $p3; |
14973 | $r1 = self::$FAILED; |
14974 | goto seq_1; |
14975 | } |
14976 | $r1 = true; |
14977 | seq_1: |
14978 | if ($r1!==self::$FAILED) { |
14979 | $this->savedPos = $p2; |
14980 | $r1 = $this->a183($r6); |
14981 | } |
14982 | // free $p3 |
14983 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
14984 | $this->currPos, |
14985 | $r1, |
14986 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
14987 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
14988 | ); |
14989 | return $r1; |
14990 | }, "full_table_in_link_caption", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
14991 | |
14992 | } |
14993 | private function parselang_variant_flag($silence, $boolParams, &$param_preproc, &$param_th) { |
14994 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
14995 | $key = json_encode([402, $boolParams & 0x1ebf, $param_preproc, $param_th]); |
14996 | $bucket = $this->currPos; |
14997 | $cached = $this->cache[$bucket][$key] ?? null; |
14998 | if ($cached) { |
14999 | $this->currPos = $cached->nextPos; |
15000 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
15001 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
15002 | return $cached->result; |
15003 | } |
15004 | $saved_preproc=$param_preproc; |
15005 | $saved_th=$param_th; |
15006 | // start choice_1 |
15007 | $p2 = $this->currPos; |
15008 | $r3 = $this->input[$this->currPos] ?? ''; |
15009 | // f <- $r3 |
15010 | if (preg_match("/^[\\-+A-Z]/", $r3)) { |
15011 | $this->currPos++; |
15012 | } else { |
15013 | $r3 = self::$FAILED; |
15014 | if (!$silence) {$this->fail(83);} |
15015 | } |
15016 | $r1 = $r3; |
15017 | if ($r1!==self::$FAILED) { |
15018 | $this->savedPos = $p2; |
15019 | $r1 = $this->a184($r3); |
15020 | goto choice_1; |
15021 | } |
15022 | $p4 = $this->currPos; |
15023 | $r5 = $this->parselang_variant_name($silence, $boolParams, $param_preproc, $param_th); |
15024 | // v <- $r5 |
15025 | $r1 = $r5; |
15026 | if ($r1!==self::$FAILED) { |
15027 | $this->savedPos = $p4; |
15028 | $r1 = $this->a185($r5); |
15029 | goto choice_1; |
15030 | } |
15031 | $p6 = $this->currPos; |
15032 | $p8 = $this->currPos; |
15033 | $r7 = self::$FAILED; |
15034 | for (;;) { |
15035 | // start seq_1 |
15036 | $p10 = $this->currPos; |
15037 | $p11 = $this->currPos; |
15038 | $r12 = $this->discardspace_or_newline(true); |
15039 | if ($r12 === self::$FAILED) { |
15040 | $r12 = false; |
15041 | } else { |
15042 | $r12 = self::$FAILED; |
15043 | $this->currPos = $p11; |
15044 | $r9 = self::$FAILED; |
15045 | goto seq_1; |
15046 | } |
15047 | // free $p11 |
15048 | $p11 = $this->currPos; |
15049 | $r13 = $this->discardnowiki(true, $boolParams, $param_preproc, $param_th); |
15050 | if ($r13 === self::$FAILED) { |
15051 | $r13 = false; |
15052 | } else { |
15053 | $r13 = self::$FAILED; |
15054 | $this->currPos = $p11; |
15055 | $this->currPos = $p10; |
15056 | $r9 = self::$FAILED; |
15057 | goto seq_1; |
15058 | } |
15059 | // free $p11 |
15060 | if (strcspn($this->input, "{}|;", $this->currPos, 1) !== 0) { |
15061 | $r14 = self::consumeChar($this->input, $this->currPos); |
15062 | } else { |
15063 | $r14 = self::$FAILED; |
15064 | if (!$silence) {$this->fail(84);} |
15065 | $this->currPos = $p10; |
15066 | $r9 = self::$FAILED; |
15067 | goto seq_1; |
15068 | } |
15069 | $r9 = true; |
15070 | seq_1: |
15071 | if ($r9!==self::$FAILED) { |
15072 | $r7 = true; |
15073 | } else { |
15074 | break; |
15075 | } |
15076 | // free $p10 |
15077 | } |
15078 | // b <- $r7 |
15079 | if ($r7!==self::$FAILED) { |
15080 | $r7 = substr($this->input, $p8, $this->currPos - $p8); |
15081 | } else { |
15082 | $r7 = self::$FAILED; |
15083 | } |
15084 | // free $r9 |
15085 | // free $p8 |
15086 | $r1 = $r7; |
15087 | if ($r1!==self::$FAILED) { |
15088 | $this->savedPos = $p6; |
15089 | $r1 = $this->a186($r7); |
15090 | } |
15091 | choice_1: |
15092 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
15093 | $this->currPos, |
15094 | $r1, |
15095 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
15096 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
15097 | ); |
15098 | return $r1; |
15099 | }, "lang_variant_flag", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
15100 | |
15101 | } |
15102 | private function parselang_variant_name($silence, $boolParams, &$param_preproc, &$param_th) { |
15103 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
15104 | $key = json_encode([404, $boolParams & 0x1ebf, $param_preproc, $param_th]); |
15105 | $bucket = $this->currPos; |
15106 | $cached = $this->cache[$bucket][$key] ?? null; |
15107 | if ($cached) { |
15108 | $this->currPos = $cached->nextPos; |
15109 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
15110 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
15111 | return $cached->result; |
15112 | } |
15113 | $saved_preproc=$param_preproc; |
15114 | $saved_th=$param_th; |
15115 | // start choice_1 |
15116 | $p2 = $this->currPos; |
15117 | // start seq_1 |
15118 | $p3 = $this->currPos; |
15119 | $r4 = $this->input[$this->currPos] ?? ''; |
15120 | if (preg_match("/^[a-z]/", $r4)) { |
15121 | $this->currPos++; |
15122 | } else { |
15123 | $r4 = self::$FAILED; |
15124 | if (!$silence) {$this->fail(85);} |
15125 | $r1 = self::$FAILED; |
15126 | goto seq_1; |
15127 | } |
15128 | $r5 = self::$FAILED; |
15129 | for (;;) { |
15130 | $r6 = $this->input[$this->currPos] ?? ''; |
15131 | if (preg_match("/^[\\-a-zA-Z]/", $r6)) { |
15132 | $this->currPos++; |
15133 | $r5 = true; |
15134 | } else { |
15135 | $r6 = self::$FAILED; |
15136 | if (!$silence) {$this->fail(86);} |
15137 | break; |
15138 | } |
15139 | } |
15140 | if ($r5===self::$FAILED) { |
15141 | $this->currPos = $p3; |
15142 | $r1 = self::$FAILED; |
15143 | goto seq_1; |
15144 | } |
15145 | // free $r6 |
15146 | $r1 = true; |
15147 | seq_1: |
15148 | if ($r1!==self::$FAILED) { |
15149 | $r1 = substr($this->input, $p2, $this->currPos - $p2); |
15150 | goto choice_1; |
15151 | } else { |
15152 | $r1 = self::$FAILED; |
15153 | } |
15154 | // free $p3 |
15155 | // free $p2 |
15156 | $r1 = $this->parsenowiki_text($silence, $boolParams, $param_preproc, $param_th); |
15157 | choice_1: |
15158 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
15159 | $this->currPos, |
15160 | $r1, |
15161 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
15162 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
15163 | ); |
15164 | return $r1; |
15165 | }, "lang_variant_name", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
15166 | |
15167 | } |
15168 | private function parselang_variant_nowiki($silence, $boolParams, &$param_preproc, &$param_th) { |
15169 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
15170 | $key = json_encode([412, $boolParams & 0x1ebf, $param_preproc, $param_th]); |
15171 | $bucket = $this->currPos; |
15172 | $cached = $this->cache[$bucket][$key] ?? null; |
15173 | if ($cached) { |
15174 | $this->currPos = $cached->nextPos; |
15175 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
15176 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
15177 | return $cached->result; |
15178 | } |
15179 | $saved_preproc=$param_preproc; |
15180 | $saved_th=$param_th; |
15181 | $p2 = $this->currPos; |
15182 | // start seq_1 |
15183 | $p3 = $this->currPos; |
15184 | $r4 = $this->parsenowiki_text($silence, $boolParams, $param_preproc, $param_th); |
15185 | // n <- $r4 |
15186 | if ($r4===self::$FAILED) { |
15187 | $r1 = self::$FAILED; |
15188 | goto seq_1; |
15189 | } |
15190 | $p6 = $this->currPos; |
15191 | for (;;) { |
15192 | $r7 = $this->discardspace_or_newline($silence); |
15193 | if ($r7===self::$FAILED) { |
15194 | break; |
15195 | } |
15196 | } |
15197 | // free $r7 |
15198 | $r5 = true; |
15199 | // sp <- $r5 |
15200 | if ($r5!==self::$FAILED) { |
15201 | $r5 = substr($this->input, $p6, $this->currPos - $p6); |
15202 | } else { |
15203 | $r5 = self::$FAILED; |
15204 | $this->currPos = $p3; |
15205 | $r1 = self::$FAILED; |
15206 | goto seq_1; |
15207 | } |
15208 | // free $p6 |
15209 | $r1 = true; |
15210 | seq_1: |
15211 | if ($r1!==self::$FAILED) { |
15212 | $this->savedPos = $p2; |
15213 | $r1 = $this->a187($r4, $r5); |
15214 | } |
15215 | // free $p3 |
15216 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
15217 | $this->currPos, |
15218 | $r1, |
15219 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
15220 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
15221 | ); |
15222 | return $r1; |
15223 | }, "lang_variant_nowiki", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
15224 | |
15225 | } |
15226 | private function parselang_variant_text_no_semi($silence, $boolParams, &$param_preproc, &$param_th) { |
15227 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
15228 | $key = json_encode([416, $boolParams & 0x1dff, $param_preproc, $param_th]); |
15229 | $bucket = $this->currPos; |
15230 | $cached = $this->cache[$bucket][$key] ?? null; |
15231 | if ($cached) { |
15232 | $this->currPos = $cached->nextPos; |
15233 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
15234 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
15235 | return $cached->result; |
15236 | } |
15237 | $saved_preproc=$param_preproc; |
15238 | $saved_th=$param_th; |
15239 | $r1 = $this->parselang_variant_text($silence, $boolParams | 0x200, $param_preproc, $param_th); |
15240 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
15241 | $this->currPos, |
15242 | $r1, |
15243 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
15244 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
15245 | ); |
15246 | return $r1; |
15247 | }, "lang_variant_text_no_semi", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
15248 | |
15249 | } |
15250 | private function parselang_variant_text_no_semi_or_arrow($silence, $boolParams, &$param_preproc, &$param_th) { |
15251 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
15252 | $key = json_encode([418, $boolParams & 0x19ff, $param_preproc, $param_th]); |
15253 | $bucket = $this->currPos; |
15254 | $cached = $this->cache[$bucket][$key] ?? null; |
15255 | if ($cached) { |
15256 | $this->currPos = $cached->nextPos; |
15257 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
15258 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
15259 | return $cached->result; |
15260 | } |
15261 | $saved_preproc=$param_preproc; |
15262 | $saved_th=$param_th; |
15263 | $r1 = $this->parselang_variant_text_no_semi($silence, $boolParams | 0x400, $param_preproc, $param_th); |
15264 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
15265 | $this->currPos, |
15266 | $r1, |
15267 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
15268 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
15269 | ); |
15270 | return $r1; |
15271 | }, "lang_variant_text_no_semi_or_arrow", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
15272 | |
15273 | } |
15274 | private function discardlang_variant_text($silence, $boolParams, &$param_preproc, &$param_th) { |
15275 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
15276 | $key = json_encode([415, $boolParams & 0x1fff, $param_preproc, $param_th]); |
15277 | $bucket = $this->currPos; |
15278 | $cached = $this->cache[$bucket][$key] ?? null; |
15279 | if ($cached) { |
15280 | $this->currPos = $cached->nextPos; |
15281 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
15282 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
15283 | return $cached->result; |
15284 | } |
15285 | $saved_preproc=$param_preproc; |
15286 | $saved_th=$param_th; |
15287 | $p2 = $this->currPos; |
15288 | $r3 = []; |
15289 | for (;;) { |
15290 | // start choice_1 |
15291 | $r4 = $this->parseinlineline($silence, $boolParams, $param_preproc, $param_th); |
15292 | if ($r4!==self::$FAILED) { |
15293 | goto choice_1; |
15294 | } |
15295 | if (($this->input[$this->currPos] ?? null) === "|") { |
15296 | $this->currPos++; |
15297 | $r4 = "|"; |
15298 | } else { |
15299 | if (!$silence) {$this->fail(13);} |
15300 | $r4 = self::$FAILED; |
15301 | } |
15302 | choice_1: |
15303 | if ($r4!==self::$FAILED) { |
15304 | $r3[] = $r4; |
15305 | } else { |
15306 | break; |
15307 | } |
15308 | } |
15309 | // tokens <- $r3 |
15310 | // free $r4 |
15311 | $r1 = $r3; |
15312 | if ($r1!==self::$FAILED) { |
15313 | $this->savedPos = $p2; |
15314 | $r1 = $this->a172($r3); |
15315 | } |
15316 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
15317 | $this->currPos, |
15318 | $r1, |
15319 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
15320 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
15321 | ); |
15322 | return $r1; |
15323 | }, "lang_variant_text", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
15324 | |
15325 | } |
15326 | private function parsefull_table_in_link_caption_parameterized($silence, $boolParams, &$param_preproc, &$param_th) { |
15327 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
15328 | $key = json_encode([492, $boolParams & 0x1fff, $param_preproc, $param_th]); |
15329 | $bucket = $this->currPos; |
15330 | $cached = $this->cache[$bucket][$key] ?? null; |
15331 | if ($cached) { |
15332 | $this->currPos = $cached->nextPos; |
15333 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
15334 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
15335 | return $cached->result; |
15336 | } |
15337 | $saved_preproc=$param_preproc; |
15338 | $saved_th=$param_th; |
15339 | // start seq_1 |
15340 | $p1 = $this->currPos; |
15341 | $r3 = $this->parsetable_start_tag($silence, $boolParams, $param_preproc, $param_th); |
15342 | if ($r3===self::$FAILED) { |
15343 | $r2 = self::$FAILED; |
15344 | goto seq_1; |
15345 | } |
15346 | $r4 = []; |
15347 | for (;;) { |
15348 | // start seq_2 |
15349 | $p6 = $this->currPos; |
15350 | $r7 = []; |
15351 | for (;;) { |
15352 | // start seq_3 |
15353 | $p9 = $this->currPos; |
15354 | $r10 = []; |
15355 | for (;;) { |
15356 | $r11 = $this->parsesol($silence, $boolParams, $param_preproc, $param_th); |
15357 | if ($r11!==self::$FAILED) { |
15358 | $r10[] = $r11; |
15359 | } else { |
15360 | break; |
15361 | } |
15362 | } |
15363 | if (count($r10) === 0) { |
15364 | $r10 = self::$FAILED; |
15365 | } |
15366 | if ($r10===self::$FAILED) { |
15367 | $r8 = self::$FAILED; |
15368 | goto seq_3; |
15369 | } |
15370 | // free $r11 |
15371 | // start choice_1 |
15372 | $r11 = $this->parsetable_content_line($silence, $boolParams, $param_preproc, $param_th); |
15373 | if ($r11!==self::$FAILED) { |
15374 | goto choice_1; |
15375 | } |
15376 | $r11 = $this->parsetplarg_or_template($silence, $boolParams, $param_th, $param_preproc); |
15377 | choice_1: |
15378 | if ($r11===self::$FAILED) { |
15379 | $this->currPos = $p9; |
15380 | $r8 = self::$FAILED; |
15381 | goto seq_3; |
15382 | } |
15383 | $r8 = [$r10,$r11]; |
15384 | seq_3: |
15385 | if ($r8!==self::$FAILED) { |
15386 | $r7[] = $r8; |
15387 | } else { |
15388 | break; |
15389 | } |
15390 | // free $p9 |
15391 | } |
15392 | // free $r8 |
15393 | $r8 = []; |
15394 | for (;;) { |
15395 | $r12 = $this->parsesol($silence, $boolParams, $param_preproc, $param_th); |
15396 | if ($r12!==self::$FAILED) { |
15397 | $r8[] = $r12; |
15398 | } else { |
15399 | break; |
15400 | } |
15401 | } |
15402 | if (count($r8) === 0) { |
15403 | $r8 = self::$FAILED; |
15404 | } |
15405 | if ($r8===self::$FAILED) { |
15406 | $this->currPos = $p6; |
15407 | $r5 = self::$FAILED; |
15408 | goto seq_2; |
15409 | } |
15410 | // free $r12 |
15411 | $r12 = $this->parsetable_end_tag($silence); |
15412 | if ($r12===self::$FAILED) { |
15413 | $this->currPos = $p6; |
15414 | $r5 = self::$FAILED; |
15415 | goto seq_2; |
15416 | } |
15417 | $r5 = [$r7,$r8,$r12]; |
15418 | seq_2: |
15419 | if ($r5!==self::$FAILED) { |
15420 | $r4[] = $r5; |
15421 | } else { |
15422 | break; |
15423 | } |
15424 | // free $p6 |
15425 | } |
15426 | if (count($r4) === 0) { |
15427 | $r4 = self::$FAILED; |
15428 | } |
15429 | if ($r4===self::$FAILED) { |
15430 | $this->currPos = $p1; |
15431 | $r2 = self::$FAILED; |
15432 | goto seq_1; |
15433 | } |
15434 | // free $r5 |
15435 | $r2 = [$r3,$r4]; |
15436 | seq_1: |
15437 | // free $r2,$p1 |
15438 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
15439 | $this->currPos, |
15440 | $r2, |
15441 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
15442 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
15443 | ); |
15444 | return $r2; |
15445 | }, "full_table_in_link_caption_parameterized", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
15446 | |
15447 | } |
15448 | private function discardnowiki($silence, $boolParams, &$param_preproc, &$param_th) { |
15449 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
15450 | $key = json_encode([449, $boolParams & 0x1ebf, $param_preproc, $param_th]); |
15451 | $bucket = $this->currPos; |
15452 | $cached = $this->cache[$bucket][$key] ?? null; |
15453 | if ($cached) { |
15454 | $this->currPos = $cached->nextPos; |
15455 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
15456 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
15457 | return $cached->result; |
15458 | } |
15459 | $saved_preproc=$param_preproc; |
15460 | $saved_th=$param_th; |
15461 | $p2 = $this->currPos; |
15462 | // start seq_1 |
15463 | $p3 = $this->currPos; |
15464 | $p4 = $this->currPos; |
15465 | $r5 = $this->discardnowiki_check(true, $boolParams); |
15466 | if ($r5!==self::$FAILED) { |
15467 | $r5 = false; |
15468 | $this->currPos = $p4; |
15469 | } else { |
15470 | $r1 = self::$FAILED; |
15471 | goto seq_1; |
15472 | } |
15473 | // free $p4 |
15474 | $r6 = $this->parsewellformed_extension_tag($silence, $boolParams, $param_preproc, $param_th); |
15475 | // ext <- $r6 |
15476 | if ($r6===self::$FAILED) { |
15477 | $this->currPos = $p3; |
15478 | $r1 = self::$FAILED; |
15479 | goto seq_1; |
15480 | } |
15481 | $r1 = true; |
15482 | seq_1: |
15483 | if ($r1!==self::$FAILED) { |
15484 | $this->savedPos = $p2; |
15485 | $r1 = $this->a188($r6); |
15486 | } |
15487 | // free $p3 |
15488 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
15489 | $this->currPos, |
15490 | $r1, |
15491 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
15492 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
15493 | ); |
15494 | return $r1; |
15495 | }, "nowiki", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
15496 | |
15497 | } |
15498 | private function parsenowiki_text($silence, $boolParams, &$param_preproc, &$param_th) { |
15499 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
15500 | $key = json_encode([450, $boolParams & 0x1ebf, $param_preproc, $param_th]); |
15501 | $bucket = $this->currPos; |
15502 | $cached = $this->cache[$bucket][$key] ?? null; |
15503 | if ($cached) { |
15504 | $this->currPos = $cached->nextPos; |
15505 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
15506 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
15507 | return $cached->result; |
15508 | } |
15509 | $saved_preproc=$param_preproc; |
15510 | $saved_th=$param_th; |
15511 | $p2 = $this->currPos; |
15512 | $r3 = $this->parsenowiki($silence, $boolParams, $param_preproc, $param_th); |
15513 | // extToken <- $r3 |
15514 | $r1 = $r3; |
15515 | if ($r1!==self::$FAILED) { |
15516 | $this->savedPos = $p2; |
15517 | $r1 = $this->a189($r3); |
15518 | } |
15519 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
15520 | $this->currPos, |
15521 | $r1, |
15522 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
15523 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
15524 | ); |
15525 | return $r1; |
15526 | }, "nowiki_text", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
15527 | |
15528 | } |
15529 | private function discardnowiki_check($silence, $boolParams) { |
15530 | return $this->traceCall(function($silence, $boolParams) { |
15531 | $key = json_encode([447, $boolParams & 0x2]); |
15532 | $bucket = $this->currPos; |
15533 | $cached = $this->cache[$bucket][$key] ?? null; |
15534 | if ($cached) { |
15535 | $this->currPos = $cached->nextPos; |
15536 | |
15537 | return $cached->result; |
15538 | } |
15539 | |
15540 | // start seq_1 |
15541 | $p1 = $this->currPos; |
15542 | if (!(/*annOrExtTag*/($boolParams & 0x2) !== 0)) { |
15543 | $r3 = false; |
15544 | } else { |
15545 | $r3 = self::$FAILED; |
15546 | $r2 = self::$FAILED; |
15547 | goto seq_1; |
15548 | } |
15549 | $r4 = $this->parsexmlish_start($silence); |
15550 | // start <- $r4 |
15551 | if ($r4===self::$FAILED) { |
15552 | $this->currPos = $p1; |
15553 | $r2 = self::$FAILED; |
15554 | goto seq_1; |
15555 | } |
15556 | $this->savedPos = $this->currPos; |
15557 | $r5 = $this->a190($r4); |
15558 | if ($r5) { |
15559 | $r5 = false; |
15560 | } else { |
15561 | $r5 = self::$FAILED; |
15562 | $this->currPos = $p1; |
15563 | $r2 = self::$FAILED; |
15564 | goto seq_1; |
15565 | } |
15566 | $r2 = true; |
15567 | seq_1: |
15568 | // free $r2,$p1 |
15569 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
15570 | $this->currPos, |
15571 | $r2, |
15572 | self::$UNDEFINED, |
15573 | self::$UNDEFINED |
15574 | ); |
15575 | return $r2; |
15576 | }, "nowiki_check", ["\$silence", "\$boolParams"], [$silence, $boolParams]); |
15577 | |
15578 | } |
15579 | private function parsenowiki($silence, $boolParams, &$param_preproc, &$param_th) { |
15580 | return $this->traceCall(function($silence, $boolParams, &$param_preproc, &$param_th) { |
15581 | $key = json_encode([448, $boolParams & 0x1ebf, $param_preproc, $param_th]); |
15582 | $bucket = $this->currPos; |
15583 | $cached = $this->cache[$bucket][$key] ?? null; |
15584 | if ($cached) { |
15585 | $this->currPos = $cached->nextPos; |
15586 | if ($cached->preproc !== self::$UNDEFINED) { $param_preproc = $cached->preproc; } |
15587 | if ($cached->th !== self::$UNDEFINED) { $param_th = $cached->th; } |
15588 | return $cached->result; |
15589 | } |
15590 | $saved_preproc=$param_preproc; |
15591 | $saved_th=$param_th; |
15592 | $p2 = $this->currPos; |
15593 | // start seq_1 |
15594 | $p3 = $this->currPos; |
15595 | $p4 = $this->currPos; |
15596 | $r5 = $this->discardnowiki_check(true, $boolParams); |
15597 | if ($r5!==self::$FAILED) { |
15598 | $r5 = false; |
15599 | $this->currPos = $p4; |
15600 | } else { |
15601 | $r1 = self::$FAILED; |
15602 | goto seq_1; |
15603 | } |
15604 | // free $p4 |
15605 | $r6 = $this->parsewellformed_extension_tag($silence, $boolParams, $param_preproc, $param_th); |
15606 | // ext <- $r6 |
15607 | if ($r6===self::$FAILED) { |
15608 | $this->currPos = $p3; |
15609 | $r1 = self::$FAILED; |
15610 | goto seq_1; |
15611 | } |
15612 | $r1 = true; |
15613 | seq_1: |
15614 | if ($r1!==self::$FAILED) { |
15615 | $this->savedPos = $p2; |
15616 | $r1 = $this->a188($r6); |
15617 | } |
15618 | // free $p3 |
15619 | $this->cache[$bucket][$key] = new TracingGrammarCacheEntry( |
15620 | $this->currPos, |
15621 | $r1, |
15622 | $saved_preproc !== $param_preproc ? $param_preproc : self::$UNDEFINED, |
15623 | $saved_th !== $param_th ? $param_th : self::$UNDEFINED |
15624 | ); |
15625 | return $r1; |
15626 | }, "nowiki", ["\$silence", "\$boolParams", "&\$param_preproc", "&\$param_th"], [$silence, $boolParams, &$param_preproc, &$param_th]); |
15627 | |
15628 | } |
15629 | |
15630 | public function parse( $input, $options = [] ) { |
15631 | $this->initInternal( $input, $options ); |
15632 | $startRule = $options['startRule'] ?? '(DEFAULT)'; |
15633 | $result = null; |
15634 | |
15635 | if ( !empty( $options['stream'] ) ) { |
15636 | switch ( $startRule ) { |
15637 | case '(DEFAULT)': |
15638 | case "start_async": |
15639 | return $this->streamstart_async(false, self::newRef(null)); |
15640 | break; |
15641 | default: |
15642 | throw new \Wikimedia\WikiPEG\InternalError( "Can't stream rule $startRule." ); |
15643 | } |
15644 | } else { |
15645 | switch ( $startRule ) { |
15646 | case '(DEFAULT)': |
15647 | case "start": |
15648 | $result = $this->parsestart(false, self::newRef(null)); |
15649 | break; |
15650 | |
15651 | case "table_start_tag": |
15652 | $result = $this->parsetable_start_tag(false, 0, self::newRef(null), self::newRef(null)); |
15653 | break; |
15654 | |
15655 | case "url": |
15656 | $result = $this->parseurl(false, self::newRef(null)); |
15657 | break; |
15658 | |
15659 | case "row_syntax_table_args": |
15660 | $result = $this->parserow_syntax_table_args(false, 0, self::newRef(null), self::newRef(null)); |
15661 | break; |
15662 | |
15663 | case "table_attributes": |
15664 | $result = $this->parsetable_attributes(false, 0, self::newRef(null), self::newRef(null)); |
15665 | break; |
15666 | |
15667 | case "generic_newline_attributes": |
15668 | $result = $this->parsegeneric_newline_attributes(false, 0, self::newRef(null), self::newRef(null)); |
15669 | break; |
15670 | |
15671 | case "tplarg_or_template_or_bust": |
15672 | $result = $this->parsetplarg_or_template_or_bust(false, self::newRef(null)); |
15673 | break; |
15674 | |
15675 | case "extlink": |
15676 | $result = $this->parseextlink(false, 0, self::newRef(null), self::newRef(null)); |
15677 | break; |
15678 | |
15679 | case "list_item": |
15680 | $result = $this->parselist_item(false, 0, self::newRef(null), self::newRef(null)); |
15681 | break; |
15682 | default: |
15683 | throw new \Wikimedia\WikiPEG\InternalError( "Can't start parsing from rule $startRule." ); |
15684 | } |
15685 | } |
15686 | |
15687 | if ( $result !== self::$FAILED && $this->currPos === $this->inputLength ) { |
15688 | return $result; |
15689 | } else { |
15690 | if ( $result !== self::$FAILED && $this->currPos < $this->inputLength ) { |
15691 | $this->fail( 0 ); |
15692 | } |
15693 | throw $this->buildParseException(); |
15694 | } |
15695 | } |
15696 | } |