Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
73.17% |
4587 / 6269 |
|
45.00% |
135 / 300 |
CRAP | |
0.00% |
0 / 2 |
MediaWiki\Extension\Math\WikiTexVC\chr_unicode | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
MediaWiki\Extension\Math\WikiTexVC\ord_unicode | |
0.00% |
0 / 8 |
|
0.00% |
0 / 1 |
12 | |||
MediaWiki\Extension\Math\WikiTexVC\peg_regex_test | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
6 | |||
SyntaxError | |
0.00% |
0 / 7 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 7 |
|
0.00% |
0 / 1 |
2 | |||
Parser | |
73.44% |
4587 / 6246 |
|
45.61% |
135 / 296 |
68109.11 | |
0.00% |
0 / 1 |
cleanup_state | |
100.00% |
10 / 10 |
|
100.00% |
1 / 1 |
1 | |||
input_substr | |
100.00% |
7 / 7 |
|
100.00% |
1 / 1 |
4 | |||
text | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
offset | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
line | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
column | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
expected | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
2 | |||
error | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_advancePos | |
50.00% |
6 / 12 |
|
0.00% |
0 / 1 |
13.12 | |||
peg_computePosDetails | |
71.43% |
5 / 7 |
|
0.00% |
0 / 1 |
3.21 | |||
peg_fail | |
100.00% |
5 / 5 |
|
100.00% |
1 / 1 |
3 | |||
peg_buildException_expectedComparator | |
100.00% |
5 / 5 |
|
100.00% |
1 / 1 |
3 | |||
peg_buildException | |
100.00% |
28 / 28 |
|
100.00% |
1 / 1 |
9 | |||
peg_f0 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f1 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f2 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f3 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f4 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f5 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f6 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f7 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_f8 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f9 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f10 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f11 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f12 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_f13 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f14 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_f15 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f16 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f17 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f18 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f19 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f20 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f21 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f22 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f23 | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
2 | |||
peg_f24 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f25 | |
100.00% |
6 / 6 |
|
100.00% |
1 / 1 |
3 | |||
peg_f26 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f27 | |
75.00% |
3 / 4 |
|
0.00% |
0 / 1 |
2.06 | |||
peg_f28 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f29 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f30 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f31 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f32 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f33 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f34 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f35 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f36 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_f37 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f38 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f39 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f40 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f41 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f42 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f43 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f44 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f45 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f46 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f47 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f48 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f49 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f50 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f51 | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
peg_f52 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f53 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f54 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f55 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f56 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f57 | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
2 | |||
peg_f58 | |
66.67% |
2 / 3 |
|
0.00% |
0 / 1 |
2.15 | |||
peg_f59 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f60 | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
2 | |||
peg_f61 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f62 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f63 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f64 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_f65 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f66 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_f67 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f68 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f69 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f70 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f71 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f72 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f73 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f74 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_f75 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_f76 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_f77 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f78 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_f79 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_f80 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_f81 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_f82 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_f83 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f84 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f85 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f86 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f87 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f88 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
2 | |||
peg_f89 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f90 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
2 | |||
peg_f91 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
2 | |||
peg_f92 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
2 | |||
peg_f93 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f94 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f95 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f96 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f97 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f98 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f99 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f100 | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
6 | |||
peg_f101 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f102 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f103 | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
2 | |||
peg_f104 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f105 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f106 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f107 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f108 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f109 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f110 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f111 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
2 | |||
peg_f112 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f113 | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
6 | |||
peg_f114 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f115 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f116 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
2 | |||
peg_f117 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f118 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f119 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f120 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f121 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f122 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f123 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f124 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f125 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f126 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f127 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_f128 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_f129 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f130 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_f131 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f132 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f133 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f134 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f135 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f136 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f137 | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
2 | |||
peg_f138 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f139 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f140 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f141 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f142 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f143 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_f144 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_f145 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_f146 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_f147 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_f148 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_f149 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_f150 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_f151 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_parsestart | |
78.95% |
15 / 19 |
|
0.00% |
0 / 1 |
5.23 | |||
peg_parse_ | |
90.91% |
20 / 22 |
|
0.00% |
0 / 1 |
8.05 | |||
peg_parsetex_expr | |
82.50% |
33 / 40 |
|
0.00% |
0 / 1 |
10.54 | |||
peg_parseexpr | |
86.67% |
13 / 15 |
|
0.00% |
0 / 1 |
5.06 | |||
peg_parsene_expr | |
93.33% |
42 / 45 |
|
0.00% |
0 / 1 |
11.04 | |||
peg_parselitsq_aq | |
85.71% |
12 / 14 |
|
0.00% |
0 / 1 |
6.10 | |||
peg_parselitsq_fq | |
75.00% |
30 / 40 |
|
0.00% |
0 / 1 |
11.56 | |||
peg_parselitsq_uq | |
95.65% |
22 / 23 |
|
0.00% |
0 / 1 |
6 | |||
peg_parselitsq_dq | |
95.65% |
22 / 23 |
|
0.00% |
0 / 1 |
6 | |||
peg_parselitsq_zq | |
100.00% |
13 / 13 |
|
100.00% |
1 / 1 |
4 | |||
peg_parseexpr_nosqc | |
88.46% |
23 / 26 |
|
0.00% |
0 / 1 |
7.08 | |||
peg_parselit_aq | |
88.89% |
16 / 18 |
|
0.00% |
0 / 1 |
8.09 | |||
peg_parselit_fq | |
77.19% |
44 / 57 |
|
0.00% |
0 / 1 |
16.33 | |||
peg_parselit_uq | |
95.65% |
22 / 23 |
|
0.00% |
0 / 1 |
6 | |||
peg_parselit_dq | |
95.65% |
22 / 23 |
|
0.00% |
0 / 1 |
6 | |||
peg_parselit_uqn | |
73.68% |
14 / 19 |
|
0.00% |
0 / 1 |
5.46 | |||
peg_parselit_dqn | |
94.74% |
18 / 19 |
|
0.00% |
0 / 1 |
5.00 | |||
peg_parseleft | |
90.62% |
29 / 32 |
|
0.00% |
0 / 1 |
8.05 | |||
peg_parseright | |
78.12% |
25 / 32 |
|
0.00% |
0 / 1 |
8.67 | |||
peg_parselit | |
86.90% |
557 / 641 |
|
0.00% |
0 / 1 |
222.79 | |||
peg_parsearray | |
84.21% |
16 / 19 |
|
0.00% |
0 / 1 |
5.10 | |||
peg_parsealignat | |
73.68% |
14 / 19 |
|
0.00% |
0 / 1 |
5.46 | |||
peg_parsematrix | |
81.25% |
26 / 32 |
|
0.00% |
0 / 1 |
8.42 | |||
peg_parseline_start | |
85.71% |
18 / 21 |
|
0.00% |
0 / 1 |
6.10 | |||
peg_parseline | |
81.25% |
26 / 32 |
|
0.00% |
0 / 1 |
8.42 | |||
peg_parsecolumn_spec | |
85.29% |
29 / 34 |
|
0.00% |
0 / 1 |
9.26 | |||
peg_parseone_col | |
40.72% |
79 / 194 |
|
0.00% |
0 / 1 |
733.77 | |||
peg_parsealignat_spec | |
72.92% |
35 / 48 |
|
0.00% |
0 / 1 |
17.89 | |||
peg_parseopt_pos | |
29.41% |
15 / 51 |
|
0.00% |
0 / 1 |
106.04 | |||
peg_parsechem_lit | |
78.26% |
18 / 23 |
|
0.00% |
0 / 1 |
6.37 | |||
peg_parsechem_sentence | |
79.59% |
39 / 49 |
|
0.00% |
0 / 1 |
14.44 | |||
peg_parsechem_phrase | |
82.46% |
47 / 57 |
|
0.00% |
0 / 1 |
18.56 | |||
peg_parsechem_word | |
94.44% |
34 / 36 |
|
0.00% |
0 / 1 |
9.01 | |||
peg_parsechem_word_nt | |
90.00% |
18 / 20 |
|
0.00% |
0 / 1 |
6.04 | |||
peg_parsechem_char | |
90.00% |
18 / 20 |
|
0.00% |
0 / 1 |
6.04 | |||
peg_parsechem_char_nl | |
55.41% |
41 / 74 |
|
0.00% |
0 / 1 |
51.02 | |||
peg_parsechem_bond | |
0.00% |
0 / 23 |
|
0.00% |
0 / 1 |
42 | |||
peg_parsechem_script | |
52.83% |
28 / 53 |
|
0.00% |
0 / 1 |
30.74 | |||
peg_parsechem_macro | |
35.44% |
28 / 79 |
|
0.00% |
0 / 1 |
127.62 | |||
peg_parsechem_text | |
0.00% |
0 / 19 |
|
0.00% |
0 / 1 |
42 | |||
peg_parseCHEM_COLOR | |
0.00% |
0 / 51 |
|
0.00% |
0 / 1 |
240 | |||
peg_parsealpha | |
84.62% |
11 / 13 |
|
0.00% |
0 / 1 |
5.09 | |||
peg_parseliteral_id | |
84.62% |
11 / 13 |
|
0.00% |
0 / 1 |
5.09 | |||
peg_parseliteral_mn | |
100.00% |
13 / 13 |
|
100.00% |
1 / 1 |
5 | |||
peg_parseliteral_uf_lt | |
69.23% |
9 / 13 |
|
0.00% |
0 / 1 |
5.73 | |||
peg_parsedelimiter_uf_lt | |
84.62% |
11 / 13 |
|
0.00% |
0 / 1 |
5.09 | |||
peg_parseliteral_uf_op | |
84.62% |
11 / 13 |
|
0.00% |
0 / 1 |
5.09 | |||
peg_parsedelimiter_uf_op | |
84.62% |
11 / 13 |
|
0.00% |
0 / 1 |
5.09 | |||
peg_parseboxchars | |
84.62% |
11 / 13 |
|
0.00% |
0 / 1 |
5.09 | |||
peg_parseBOX | |
76.27% |
45 / 59 |
|
0.00% |
0 / 1 |
20.86 | |||
peg_parseLITERAL | |
84.56% |
241 / 285 |
|
0.00% |
0 / 1 |
101.97 | |||
peg_parseDELIMITER | |
93.81% |
91 / 97 |
|
0.00% |
0 / 1 |
27.17 | |||
peg_parseFUN_AR1nb | |
88.89% |
24 / 27 |
|
0.00% |
0 / 1 |
7.07 | |||
peg_parseFUN_AR1opt | |
90.00% |
36 / 40 |
|
0.00% |
0 / 1 |
11.12 | |||
peg_parseNEXT_CELL | |
86.96% |
20 / 23 |
|
0.00% |
0 / 1 |
7.11 | |||
peg_parseLATEX_LENGTH | |
76.00% |
19 / 25 |
|
0.00% |
0 / 1 |
7.68 | |||
peg_parseLATEX_SIGN | |
84.62% |
11 / 13 |
|
0.00% |
0 / 1 |
5.09 | |||
peg_parseLATEX_NUMBER | |
53.23% |
33 / 62 |
|
0.00% |
0 / 1 |
55.94 | |||
peg_parseLATEX_UNIT | |
67.31% |
70 / 104 |
|
0.00% |
0 / 1 |
111.65 | |||
peg_parseNEXT_ROW | |
83.64% |
46 / 55 |
|
0.00% |
0 / 1 |
17.12 | |||
peg_parseBEGIN | |
95.65% |
22 / 23 |
|
0.00% |
0 / 1 |
7 | |||
peg_parseEND | |
65.22% |
15 / 23 |
|
0.00% |
0 / 1 |
9.06 | |||
peg_parseBEGIN_MATRIX | |
88.89% |
24 / 27 |
|
0.00% |
0 / 1 |
8.09 | |||
peg_parseEND_MATRIX | |
66.67% |
18 / 27 |
|
0.00% |
0 / 1 |
10.37 | |||
peg_parseBEGIN_PMATRIX | |
88.89% |
24 / 27 |
|
0.00% |
0 / 1 |
8.09 | |||
peg_parseEND_PMATRIX | |
66.67% |
18 / 27 |
|
0.00% |
0 / 1 |
10.37 | |||
peg_parseBEGIN_BMATRIX | |
88.89% |
24 / 27 |
|
0.00% |
0 / 1 |
8.09 | |||
peg_parseEND_BMATRIX | |
66.67% |
18 / 27 |
|
0.00% |
0 / 1 |
10.37 | |||
peg_parseBEGIN_BBMATRIX | |
88.89% |
24 / 27 |
|
0.00% |
0 / 1 |
8.09 | |||
peg_parseEND_BBMATRIX | |
66.67% |
18 / 27 |
|
0.00% |
0 / 1 |
10.37 | |||
peg_parseBEGIN_VMATRIX | |
88.89% |
24 / 27 |
|
0.00% |
0 / 1 |
8.09 | |||
peg_parseEND_VMATRIX | |
66.67% |
18 / 27 |
|
0.00% |
0 / 1 |
10.37 | |||
peg_parseBEGIN_VVMATRIX | |
88.89% |
24 / 27 |
|
0.00% |
0 / 1 |
8.09 | |||
peg_parseEND_VVMATRIX | |
66.67% |
18 / 27 |
|
0.00% |
0 / 1 |
10.37 | |||
peg_parseBEGIN_ARRAY | |
88.89% |
24 / 27 |
|
0.00% |
0 / 1 |
8.09 | |||
peg_parseEND_ARRAY | |
66.67% |
18 / 27 |
|
0.00% |
0 / 1 |
10.37 | |||
peg_parseBEGIN_ALIGN | |
88.89% |
24 / 27 |
|
0.00% |
0 / 1 |
8.09 | |||
peg_parseEND_ALIGN | |
66.67% |
18 / 27 |
|
0.00% |
0 / 1 |
10.37 | |||
peg_parseBEGIN_ALIGNED | |
88.89% |
24 / 27 |
|
0.00% |
0 / 1 |
8.09 | |||
peg_parseEND_ALIGNED | |
66.67% |
18 / 27 |
|
0.00% |
0 / 1 |
10.37 | |||
peg_parseBEGIN_ALIGNAT | |
88.89% |
24 / 27 |
|
0.00% |
0 / 1 |
8.09 | |||
peg_parseEND_ALIGNAT | |
66.67% |
18 / 27 |
|
0.00% |
0 / 1 |
10.37 | |||
peg_parseBEGIN_ALIGNEDAT | |
88.89% |
24 / 27 |
|
0.00% |
0 / 1 |
8.09 | |||
peg_parseEND_ALIGNEDAT | |
66.67% |
18 / 27 |
|
0.00% |
0 / 1 |
10.37 | |||
peg_parseBEGIN_SMALLMATRIX | |
88.89% |
24 / 27 |
|
0.00% |
0 / 1 |
8.09 | |||
peg_parseEND_SMALLMATRIX | |
66.67% |
18 / 27 |
|
0.00% |
0 / 1 |
10.37 | |||
peg_parseBEGIN_CASES | |
88.89% |
24 / 27 |
|
0.00% |
0 / 1 |
8.09 | |||
peg_parseEND_CASES | |
66.67% |
18 / 27 |
|
0.00% |
0 / 1 |
10.37 | |||
peg_parseSQ_CLOSE | |
86.96% |
20 / 23 |
|
0.00% |
0 / 1 |
7.11 | |||
peg_parseCURLY_OPEN | |
95.65% |
22 / 23 |
|
0.00% |
0 / 1 |
7 | |||
peg_parseCURLY_CLOSE | |
86.96% |
20 / 23 |
|
0.00% |
0 / 1 |
7.11 | |||
peg_parseSUP | |
95.65% |
22 / 23 |
|
0.00% |
0 / 1 |
7 | |||
peg_parseSUB | |
95.65% |
22 / 23 |
|
0.00% |
0 / 1 |
7 | |||
peg_parsegeneric_func | |
100.00% |
30 / 30 |
|
100.00% |
1 / 1 |
9 | |||
peg_parseBIG | |
96.30% |
26 / 27 |
|
0.00% |
0 / 1 |
7 | |||
peg_parseFUN_AR1 | |
82.61% |
57 / 69 |
|
0.00% |
0 / 1 |
18.52 | |||
peg_parseFUN_MHCHEM | |
88.89% |
24 / 27 |
|
0.00% |
0 / 1 |
7.07 | |||
peg_parseFUN_AR2 | |
88.89% |
24 / 27 |
|
0.00% |
0 / 1 |
7.07 | |||
peg_parseFUN_AR4_MHCHEM_TEXIFIED | |
62.96% |
17 / 27 |
|
0.00% |
0 / 1 |
9.49 | |||
peg_parseFUN_INFIX | |
74.07% |
20 / 27 |
|
0.00% |
0 / 1 |
7.85 | |||
peg_parseDECLh | |
88.89% |
24 / 27 |
|
0.00% |
0 / 1 |
7.07 | |||
peg_parseFUN_AR2nb | |
88.89% |
24 / 27 |
|
0.00% |
0 / 1 |
7.07 | |||
peg_parseLEFTI | |
96.15% |
25 / 26 |
|
0.00% |
0 / 1 |
7 | |||
peg_parseRIGHTI | |
80.77% |
21 / 26 |
|
0.00% |
0 / 1 |
7.35 | |||
peg_parseHLINE | |
88.89% |
24 / 27 |
|
0.00% |
0 / 1 |
7.07 | |||
peg_parseCOLOR | |
90.32% |
28 / 31 |
|
0.00% |
0 / 1 |
8.06 | |||
peg_parseDEFINECOLOR | |
50.58% |
130 / 257 |
|
0.00% |
0 / 1 |
716.07 | |||
peg_parseCOLOR_SPEC | |
73.79% |
183 / 248 |
|
0.00% |
0 / 1 |
168.95 | |||
peg_parseCOLOR_SPEC_NAMED | |
78.43% |
40 / 51 |
|
0.00% |
0 / 1 |
17.26 | |||
peg_parseCOLOR_SPEC_GRAY | |
67.44% |
29 / 43 |
|
0.00% |
0 / 1 |
18.83 | |||
peg_parseCOLOR_SPEC_rgb | |
70.67% |
53 / 75 |
|
0.00% |
0 / 1 |
34.22 | |||
peg_parseCOLOR_SPEC_RGBI | |
66.67% |
50 / 75 |
|
0.00% |
0 / 1 |
39.93 | |||
peg_parseCOLOR_SPEC_CMYK | |
65.22% |
60 / 92 |
|
0.00% |
0 / 1 |
57.68 | |||
peg_parseCNUM255 | |
75.32% |
58 / 77 |
|
0.00% |
0 / 1 |
30.95 | |||
peg_parseCNUM | |
91.35% |
95 / 104 |
|
0.00% |
0 / 1 |
31.62 | |||
peg_parseCHEM_SINGLE_MACRO | |
67.39% |
31 / 46 |
|
0.00% |
0 / 1 |
18.86 | |||
peg_parseCHEM_BONDI | |
37.04% |
10 / 27 |
|
0.00% |
0 / 1 |
19.23 | |||
peg_parseCHEM_MACRO_1P | |
37.04% |
10 / 27 |
|
0.00% |
0 / 1 |
19.23 | |||
peg_parseCHEM_MACRO_2P | |
37.04% |
10 / 27 |
|
0.00% |
0 / 1 |
19.23 | |||
peg_parseCHEM_MACRO_2PU | |
37.04% |
10 / 27 |
|
0.00% |
0 / 1 |
19.23 | |||
peg_parseCHEM_MACRO_2PC | |
37.04% |
10 / 27 |
|
0.00% |
0 / 1 |
19.23 | |||
peg_parseCHEM_SCRIPT_FOLLOW | |
41.18% |
7 / 17 |
|
0.00% |
0 / 1 |
16.97 | |||
peg_parseCHEM_SUPERSUB | |
90.00% |
18 / 20 |
|
0.00% |
0 / 1 |
8.06 | |||
peg_parseCHEM_BOND_TYPE | |
0.00% |
0 / 111 |
|
0.00% |
0 / 1 |
2256 | |||
peg_parseBEGIN_MATH | |
37.04% |
10 / 27 |
|
0.00% |
0 / 1 |
23.97 | |||
peg_parseEND_MATH | |
0.00% |
0 / 27 |
|
0.00% |
0 / 1 |
72 | |||
peg_parseCHEM_LETTER | |
84.62% |
11 / 13 |
|
0.00% |
0 / 1 |
5.09 | |||
peg_parseCHEM_NONLETTER | |
68.92% |
51 / 74 |
|
0.00% |
0 / 1 |
38.88 | |||
peg_parseimpossible | |
0.00% |
0 / 12 |
|
0.00% |
0 / 1 |
20 | |||
peg_parseEOF | |
83.33% |
10 / 12 |
|
0.00% |
0 / 1 |
4.07 | |||
parse | |
97.67% |
210 / 215 |
|
0.00% |
0 / 1 |
9 |
1 | <?php |
2 | /* |
3 | * Generated by peggy 1.0.0 with phpeggy plugin |
4 | * |
5 | * https://peggyjs.org/ |
6 | */ |
7 | |
8 | namespace MediaWiki\Extension\Math\WikiTexVC; |
9 | |
10 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\Box; |
11 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\Big; |
12 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\ChemFun2u; |
13 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\ChemWord; |
14 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\Declh; |
15 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\Dollar; |
16 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\DQ; |
17 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\FQ; |
18 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\Fun1; |
19 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\Fun1nb; |
20 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\Fun2; |
21 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\Fun2nb; |
22 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\Fun2sq; |
23 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\Fun4; |
24 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\Infix; |
25 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\Literal; |
26 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\Lr; |
27 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\LengthSpec; |
28 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\Matrix; |
29 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\Mhchem; |
30 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\UQ; |
31 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\TexArray; |
32 | use MediaWiki\Extension\Math\WikiTexVC\TexUtil; |
33 | use MediaWiki\Extension\Math\WikiTexVC\ParserUtil; |
34 | /* Useful functions: */ |
35 | |
36 | /* chr_unicode - get unicode character from its char code */ |
37 | if (!function_exists("MediaWiki\\Extension\\Math\\WikiTexVC\\chr_unicode")) { |
38 | function chr_unicode($code) { |
39 | return html_entity_decode("&#$code;", ENT_QUOTES, "UTF-8"); |
40 | } |
41 | } |
42 | /* ord_unicode - get unicode char code from string */ |
43 | if (!function_exists("MediaWiki\\Extension\\Math\\WikiTexVC\\ord_unicode")) { |
44 | function ord_unicode($character) { |
45 | if (strlen($character) === 1) { |
46 | return ord($character); |
47 | } |
48 | $json = json_encode($character); |
49 | $utf16_1 = hexdec(substr($json, 3, 4)); |
50 | if (substr($json, 7, 2) === "\u") { |
51 | $utf16_2 = hexdec(substr($json, 9, 4)); |
52 | return 0x10000 + (($utf16_1 & 0x3ff) << 10) + ($utf16_2 & 0x3ff); |
53 | } else { |
54 | return $utf16_1; |
55 | } |
56 | } |
57 | } |
58 | /* peg_regex_test - multibyte regex test */ |
59 | if (!function_exists("MediaWiki\\Extension\\Math\\WikiTexVC\\peg_regex_test")) { |
60 | function peg_regex_test($pattern, $string) { |
61 | if (substr($pattern, -1) == "i") { |
62 | return mb_eregi(substr($pattern, 1, -2), $string); |
63 | } else { |
64 | return mb_ereg(substr($pattern, 1, -1), $string); |
65 | } |
66 | } |
67 | } |
68 | |
69 | /* Syntax error exception */ |
70 | if (!class_exists("MediaWiki\\Extension\\Math\\WikiTexVC\\SyntaxError", false)) { |
71 | class SyntaxError extends \Exception { |
72 | public $expected; |
73 | public $found; |
74 | public $grammarOffset; |
75 | public $grammarLine; |
76 | public $grammarColumn; |
77 | public $name; |
78 | public function __construct($message, $expected, $found, $offset, $line, $column) { |
79 | parent::__construct($message, 0); |
80 | $this->expected = $expected; |
81 | $this->found = $found; |
82 | $this->grammarOffset = $offset; |
83 | $this->grammarLine = $line; |
84 | $this->grammarColumn = $column; |
85 | $this->name = "SyntaxError"; |
86 | } |
87 | } |
88 | } |
89 | |
90 | class Parser { |
91 | private $tu; |
92 | private $options; |
93 | private $peg_currPos = 0; |
94 | private $peg_reportedPos = 0; |
95 | private $peg_cachedPos = 0; |
96 | private $peg_cachedPosDetails = array('line' => 1, 'column' => 1, 'seenCR' => false ); |
97 | private $peg_maxFailPos = 0; |
98 | private $peg_maxFailExpected = array(); |
99 | private $peg_silentFails = 0; |
100 | private $input = array(); |
101 | private $input_length = 0; |
102 | public $peg_cache = array(); |
103 | |
104 | private function cleanup_state() { |
105 | $this->peg_currPos = 0; |
106 | $this->peg_reportedPos = 0; |
107 | $this->peg_cachedPos = 0; |
108 | $this->peg_cachedPosDetails = array('line' => 1, 'column' => 1, 'seenCR' => false ); |
109 | $this->peg_maxFailPos = 0; |
110 | $this->peg_maxFailExpected = array(); |
111 | $this->peg_silentFails = 0; |
112 | $this->input = array(); |
113 | $this->input_length = 0; |
114 | $this->peg_cache = array(); |
115 | } |
116 | |
117 | private function input_substr($start, $length) { |
118 | if ($length === 1 && $start < $this->input_length) { |
119 | return $this->input[$start]; |
120 | } |
121 | $substr = ''; |
122 | $max = min($start + $length, $this->input_length); |
123 | for ($i = $start; $i < $max; $i++) { |
124 | $substr .= $this->input[$i]; |
125 | } |
126 | return $substr; |
127 | } |
128 | |
129 | |
130 | private function text() { |
131 | return $this->input_substr($this->peg_reportedPos, $this->peg_currPos - $this->peg_reportedPos); |
132 | } |
133 | |
134 | private function offset() { |
135 | return $this->peg_reportedPos; |
136 | } |
137 | |
138 | private function line() { |
139 | $compute_pd = $this->peg_computePosDetails($this->peg_reportedPos); |
140 | return $compute_pd["line"]; |
141 | } |
142 | |
143 | private function column() { |
144 | $compute_pd = $this->peg_computePosDetails($this->peg_reportedPos); |
145 | return $compute_pd["column"]; |
146 | } |
147 | |
148 | private function expected($description) { |
149 | throw $this->peg_buildException( |
150 | null, |
151 | array(array("type" => "other", "description" => $description )), |
152 | $this->peg_reportedPos |
153 | ); |
154 | } |
155 | |
156 | private function error($message) { |
157 | throw $this->peg_buildException($message, null, $this->peg_reportedPos); |
158 | } |
159 | |
160 | private function peg_advancePos(&$details, $startPos, $endPos) { |
161 | for ($p = $startPos; $p < $endPos; $p++) { |
162 | $ch = $this->input_substr($p, 1); |
163 | if ($ch === "\n") { |
164 | if (!$details["seenCR"]) { $details["line"]++; } |
165 | $details["column"] = 1; |
166 | $details["seenCR"] = false; |
167 | } else if ($ch === "\r" || $ch === "\u2028" || $ch === "\u2029") { |
168 | $details["line"]++; |
169 | $details["column"] = 1; |
170 | $details["seenCR"] = true; |
171 | } else { |
172 | $details["column"]++; |
173 | $details["seenCR"] = false; |
174 | } |
175 | } |
176 | } |
177 | |
178 | private function peg_computePosDetails($pos) { |
179 | if ($this->peg_cachedPos !== $pos) { |
180 | if ($this->peg_cachedPos > $pos) { |
181 | $this->peg_cachedPos = 0; |
182 | $this->peg_cachedPosDetails = array( "line" => 1, "column" => 1, "seenCR" => false ); |
183 | } |
184 | $this->peg_advancePos($this->peg_cachedPosDetails, $this->peg_cachedPos, $pos); |
185 | $this->peg_cachedPos = $pos; |
186 | } |
187 | |
188 | return $this->peg_cachedPosDetails; |
189 | } |
190 | |
191 | private function peg_fail($expected) { |
192 | if ($this->peg_currPos < $this->peg_maxFailPos) { return; } |
193 | |
194 | if ($this->peg_currPos > $this->peg_maxFailPos) { |
195 | $this->peg_maxFailPos = $this->peg_currPos; |
196 | $this->peg_maxFailExpected = array(); |
197 | } |
198 | |
199 | $this->peg_maxFailExpected[] = $expected; |
200 | } |
201 | |
202 | private function peg_buildException_expectedComparator($a, $b) { |
203 | if ($a["description"] < $b["description"]) { |
204 | return -1; |
205 | } else if ($a["description"] > $b["description"]) { |
206 | return 1; |
207 | } else { |
208 | return 0; |
209 | } |
210 | } |
211 | |
212 | private function peg_buildException($message, $expected, $pos) { |
213 | $posDetails = $this->peg_computePosDetails($pos); |
214 | $found = $pos < $this->input_length ? $this->input[$pos] : null; |
215 | |
216 | if ($expected !== null) { |
217 | usort($expected, array($this, "peg_buildException_expectedComparator")); |
218 | $i = 1; |
219 | while ($i < count($expected)) { |
220 | if ($expected[$i - 1] === $expected[$i]) { |
221 | array_splice($expected, $i, 1); |
222 | } else { |
223 | $i++; |
224 | } |
225 | } |
226 | } |
227 | |
228 | if ($message === null) { |
229 | $expectedDescs = array_fill(0, count($expected), null); |
230 | |
231 | for ($i = 0; $i < count($expected); $i++) { |
232 | $expectedDescs[$i] = $expected[$i]["description"]; |
233 | } |
234 | |
235 | $expectedDesc = count($expected) > 1 |
236 | ? join(", ", array_slice($expectedDescs, 0, -1)) |
237 | . " or " |
238 | . $expectedDescs[count($expected) - 1] |
239 | : $expectedDescs[0]; |
240 | |
241 | $foundDesc = $found ? json_encode($found) : "end of input"; |
242 | |
243 | $message = "Expected " . $expectedDesc . " but " . $foundDesc . " found."; |
244 | } |
245 | |
246 | return new SyntaxError( |
247 | $message, |
248 | $expected, |
249 | $found, |
250 | $pos, |
251 | $posDetails["line"], |
252 | $posDetails["column"] |
253 | ); |
254 | } |
255 | |
256 | private $peg_FAILED; |
257 | private $peg_c0; |
258 | private $peg_c1; |
259 | private $peg_c2; |
260 | private $peg_c3; |
261 | private $peg_c4; |
262 | private $peg_c5; |
263 | private $peg_c6; |
264 | private $peg_c7; |
265 | private $peg_c8; |
266 | private $peg_c9; |
267 | private $peg_c10; |
268 | private $peg_c11; |
269 | private $peg_c12; |
270 | private $peg_c13; |
271 | private $peg_c14; |
272 | private $peg_c15; |
273 | private $peg_c16; |
274 | private $peg_c17; |
275 | private $peg_c18; |
276 | private $peg_c19; |
277 | private $peg_c20; |
278 | private $peg_c21; |
279 | private $peg_c22; |
280 | private $peg_c23; |
281 | private $peg_c24; |
282 | private $peg_c25; |
283 | private $peg_c26; |
284 | private $peg_c27; |
285 | private $peg_c28; |
286 | private $peg_c29; |
287 | private $peg_c30; |
288 | private $peg_c31; |
289 | private $peg_c32; |
290 | private $peg_c33; |
291 | private $peg_c34; |
292 | private $peg_c35; |
293 | private $peg_c36; |
294 | private $peg_c37; |
295 | private $peg_c38; |
296 | private $peg_c39; |
297 | private $peg_c40; |
298 | private $peg_c41; |
299 | private $peg_c42; |
300 | private $peg_c43; |
301 | private $peg_c44; |
302 | private $peg_c45; |
303 | private $peg_c46; |
304 | private $peg_c47; |
305 | private $peg_c48; |
306 | private $peg_c49; |
307 | private $peg_c50; |
308 | private $peg_c51; |
309 | private $peg_c52; |
310 | private $peg_c53; |
311 | private $peg_c54; |
312 | private $peg_c55; |
313 | private $peg_c56; |
314 | private $peg_c57; |
315 | private $peg_c58; |
316 | private $peg_c59; |
317 | private $peg_c60; |
318 | private $peg_c61; |
319 | private $peg_c62; |
320 | private $peg_c63; |
321 | private $peg_c64; |
322 | private $peg_c65; |
323 | private $peg_c66; |
324 | private $peg_c67; |
325 | private $peg_c68; |
326 | private $peg_c69; |
327 | private $peg_c70; |
328 | private $peg_c71; |
329 | private $peg_c72; |
330 | private $peg_c73; |
331 | private $peg_c74; |
332 | private $peg_c75; |
333 | private $peg_c76; |
334 | private $peg_c77; |
335 | private $peg_c78; |
336 | private $peg_c79; |
337 | private $peg_c80; |
338 | private $peg_c81; |
339 | private $peg_c82; |
340 | private $peg_c83; |
341 | private $peg_c84; |
342 | private $peg_c85; |
343 | private $peg_c86; |
344 | private $peg_c87; |
345 | private $peg_c88; |
346 | private $peg_c89; |
347 | private $peg_c90; |
348 | private $peg_c91; |
349 | private $peg_c92; |
350 | private $peg_c93; |
351 | private $peg_c94; |
352 | private $peg_c95; |
353 | private $peg_c96; |
354 | private $peg_c97; |
355 | private $peg_c98; |
356 | private $peg_c99; |
357 | private $peg_c100; |
358 | private $peg_c101; |
359 | private $peg_c102; |
360 | private $peg_c103; |
361 | private $peg_c104; |
362 | private $peg_c105; |
363 | private $peg_c106; |
364 | private $peg_c107; |
365 | private $peg_c108; |
366 | private $peg_c109; |
367 | private $peg_c110; |
368 | private $peg_c111; |
369 | private $peg_c112; |
370 | private $peg_c113; |
371 | private $peg_c114; |
372 | private $peg_c115; |
373 | private $peg_c116; |
374 | private $peg_c117; |
375 | private $peg_c118; |
376 | private $peg_c119; |
377 | private $peg_c120; |
378 | private $peg_c121; |
379 | private $peg_c122; |
380 | private $peg_c123; |
381 | private $peg_c124; |
382 | private $peg_c125; |
383 | private $peg_c126; |
384 | private $peg_c127; |
385 | private $peg_c128; |
386 | private $peg_c129; |
387 | private $peg_c130; |
388 | private $peg_c131; |
389 | private $peg_c132; |
390 | private $peg_c133; |
391 | private $peg_c134; |
392 | private $peg_c135; |
393 | private $peg_c136; |
394 | private $peg_c137; |
395 | private $peg_c138; |
396 | private $peg_c139; |
397 | private $peg_c140; |
398 | private $peg_c141; |
399 | private $peg_c142; |
400 | private $peg_c143; |
401 | private $peg_c144; |
402 | private $peg_c145; |
403 | private $peg_c146; |
404 | private $peg_c147; |
405 | private $peg_c148; |
406 | private $peg_c149; |
407 | private $peg_c150; |
408 | private $peg_c151; |
409 | private $peg_c152; |
410 | private $peg_c153; |
411 | private $peg_c154; |
412 | private $peg_c155; |
413 | private $peg_c156; |
414 | private $peg_c157; |
415 | private $peg_c158; |
416 | private $peg_c159; |
417 | private $peg_c160; |
418 | private $peg_c161; |
419 | private $peg_c162; |
420 | private $peg_c163; |
421 | private $peg_c164; |
422 | private $peg_c165; |
423 | private $peg_c166; |
424 | private $peg_c167; |
425 | private $peg_c168; |
426 | private $peg_c169; |
427 | private $peg_c170; |
428 | private $peg_c171; |
429 | private $peg_c172; |
430 | private $peg_c173; |
431 | private $peg_c174; |
432 | private $peg_c175; |
433 | private $peg_c176; |
434 | private $peg_c177; |
435 | private $peg_c178; |
436 | private $peg_c179; |
437 | private $peg_c180; |
438 | private $peg_c181; |
439 | private $peg_c182; |
440 | private $peg_c183; |
441 | private $peg_c184; |
442 | |
443 | private function peg_f0($t) { |
444 | assert($t instanceof TexArray); |
445 | return $t; |
446 | } |
447 | private function peg_f1($e) { return $e; } |
448 | private function peg_f2($e1, $name, $e2) { return new TexArray( new Infix($name, $e1, $e2)); } |
449 | private function peg_f3() { return new TexArray(); } |
450 | private function peg_f4($h, $t) { return $t->unshift($h); } |
451 | private function peg_f5($d, $e) { return new TexArray(new Declh($d->getFname(), $e)); } |
452 | private function peg_f6($l1, $l2) { return new FQ($l1->getBase(), $l1->getDown(), $l2); } |
453 | private function peg_f7($l1, $l2) { return new FQ($l1->getBase(), $l2, $l1->getUp()); } |
454 | private function peg_f8($base, $upi) { return new UQ($base, $upi); } |
455 | private function peg_f9($base, $downi) { return new DQ($base, $downi); } |
456 | private function peg_f10() { return new Literal( "]"); } |
457 | private function peg_f11($l, $e) { return $e ->unshift( $l ); } |
458 | private function peg_f12($l1, $l2) { return new FQ ($l1->getBase(), $l2, $l1->getUp()); } |
459 | private function peg_f13($l1, $l2) { return new FQ(new TexArray(), $l1->getDown(), $l2); } |
460 | private function peg_f14($l) { return new UQ(new TexArray(),$l); } |
461 | private function peg_f15($l) { return new DQ(new TexArray(),$l); } |
462 | private function peg_f16($d) { return $d; } |
463 | private function peg_f17() { return "]"; } |
464 | private function peg_f18($r) { return new Literal($r); } |
465 | private function peg_f19($f) { return $this->tu->latex_function_names($f); } |
466 | private function peg_f20($f) { return " ";} |
467 | private function peg_f21($f, $c) { return new TexArray( new Literal( $f ) , new Literal( $c ) ) ; } |
468 | private function peg_f22($f) { return $this->tu->nullary_macro_aliase($f); } |
469 | private function peg_f23($f) { |
470 | $parser = new Parser(); |
471 | $ast = $parser->parse($this->tu->nullary_macro_aliase($f), $this->options); |
472 | assert($ast instanceof TexArray && $ast->getLength() === 1); |
473 | return $ast->first(); |
474 | } |
475 | private function peg_f24($f) { return $this->tu->deprecated_nullary_macro_aliase($f); } |
476 | private function peg_f25($f) { |
477 | $parser = new Parser(); |
478 | $ast = $parser->parse($this->tu->deprecated_nullary_macro_aliase($f), $this->options); |
479 | assert($ast instanceof TexArray && $ast->getLength() === 1); |
480 | if ($this->options['oldtexvc']){ |
481 | return $ast->first(); |
482 | } else { |
483 | throw new SyntaxError("Deprecation: Alias no longer supported.", [], $this->text(), $this->offset(), |
484 | $this->line(), $this->column()); |
485 | } |
486 | } |
487 | private function peg_f26($f) { return $this->tu->mediawiki_function_names($f); } |
488 | private function peg_f27($f) { |
489 | if(is_array($f)) { |
490 | // This is an unexpected case, but covers the ambiguity of slice in javascript. |
491 | $fProcessed = implode(array_slice($f, 1)); |
492 | } else { |
493 | $fProcessed = substr($f,1); |
494 | } |
495 | return new Fun1nb( '\\operatorname', new Literal( $fProcessed ) ); |
496 | } |
497 | private function peg_f28($b, $r) { return new Big($b, $r); } |
498 | private function peg_f29($b) { return new Big($b, "]"); } |
499 | private function peg_f30($l, $e, $r) {return new Lr($l, $r, $e); } |
500 | private function peg_f31($name, $e, $l) { return new Fun2sq($name, $e->setCurly(), $l); } |
501 | private function peg_f32($name, $l) { return new Fun1($name, $l); } |
502 | private function peg_f33($name, $l) { return new Fun1nb($name, $l); } |
503 | private function peg_f34($name, $l) { return new Mhchem($name, $l); } |
504 | private function peg_f35($name, $l1, $l2) { return new Fun2($name, $l1, $l2); } |
505 | private function peg_f36($name, $l1, $l2, $l3, $l4) { return new Fun4($name, $l1, $l2, $l3, $l4); } |
506 | private function peg_f37($name, $l1, $l2) { return new Fun2nb($name, $l1, $l2); } |
507 | private function peg_f38($e) { return $e->setCurly(); } |
508 | private function peg_f39($e1, $name, $e2) { return new Infix($name, $e1, $e2); } |
509 | private function peg_f40($m) { return $m->setTop( 'matrix' ); } |
510 | private function peg_f41($m) { return $m->setTop( 'pmatrix' ); } |
511 | private function peg_f42($m) { return $m->setTop( 'bmatrix' ); } |
512 | private function peg_f43($m) { return $m->setTop( 'Bmatrix' ); } |
513 | private function peg_f44($m) { return $m->setTop( 'vmatrix' ); } |
514 | private function peg_f45($m) { return $m->setTop( 'Vmatrix' ); } |
515 | private function peg_f46($m) { return $m->setTop( 'array' ); } |
516 | private function peg_f47($m) { return $m->setTop( 'aligned' ); } |
517 | private function peg_f48($m) { return $m->setTop( 'alignedat' ); } |
518 | private function peg_f49($m) { return $m->setTop( 'smallmatrix' ); } |
519 | private function peg_f50($m) { return $m->setTop( 'cases' ); } |
520 | private function peg_f51() { throw new SyntaxError("Illegal TeX function", [], $this->text(), $this->offset(), |
521 | $this->line(), $this->column()); } |
522 | private function peg_f52($f) { return !$this->tu->getAllFunctionsAt($f); } |
523 | private function peg_f53($f) { throw new SyntaxError("Illegal TeX function", [], $f, $this->offset(), $this->line(), $this->column()); } |
524 | private function peg_f54($cs, $m) { return $m->setColumnSpecs( $cs ); } |
525 | private function peg_f55($as, $m) { return $m->setColumnSpecs( $as ); } |
526 | private function peg_f56($l, $r, $m) { return [$m,$r]; } |
527 | private function peg_f57($l, $tail) { if ($tail === null) { return new Matrix( 'matrix', new TexArray( $l ) ); } |
528 | return new Matrix( 'matrix', $tail[0]->unshift($l), $tail[1] ); } |
529 | private function peg_f58($f, $l) { |
530 | if ($l->first() === null ) { |
531 | $l->push(new TexArray()); |
532 | } |
533 | $l->first()->unshift(new Literal($f . " ")); return $l;} |
534 | private function peg_f59($e, $l) { return $l; } |
535 | private function peg_f60($e, $tail) { |
536 | if ($tail === null) { return new TexArray( $e ) ; } |
537 | return $tail->unshift($e); |
538 | } |
539 | private function peg_f61() { return $this->text(); } |
540 | private function peg_f62($cs) { return TexArray::newCurly(new Literal($cs)); } |
541 | private function peg_f63($num) { return TexArray::newCurly(new Literal($num)); } |
542 | private function peg_f64($p, $s) { return new TexArray($p,new TexArray(new Literal(" "),$s)); } |
543 | private function peg_f65($p) { return new TexArray($p,new TexArray()); } |
544 | private function peg_f66($m) { return new Literal($m); } |
545 | private function peg_f67($m, $n) { return new ChemWord($m, new Literal($n)); } |
546 | private function peg_f68($m) { return $m; } |
547 | private function peg_f69($m, $n) { return new ChemWord($m, $n); } |
548 | private function peg_f70($m, $n, $o) { return new ChemWord(new ChemWord(new Literal($m), $n), $o); } |
549 | private function peg_f71() { return new Literal(""); } |
550 | private function peg_f72($m) { return $m;} |
551 | private function peg_f73($c) { return new Literal($c); } |
552 | private function peg_f74($c) { return TexArray::newCurly($c); } |
553 | private function peg_f75($c) { return new Dollar($c); } |
554 | private function peg_f76($e) { return TexArray::newCurly(new Literal($e)); } |
555 | private function peg_f77($a, $b) { return new ChemWord(new Literal($a), new Literal($b)); } |
556 | private function peg_f78($a, $b) { return new ChemWord(new Literal($a), $b); } |
557 | private function peg_f79($a, $b) { return new ChemWord(new Literal($a), new Dollar($b)); } |
558 | private function peg_f80($name, $l1, $l2) { return new ChemFun2u($name, $l1, $l2); } |
559 | private function peg_f81($cs) { return new Literal(join('',$cs)); } |
560 | private function peg_f82($name) { return new Literal(join('',$name)); } |
561 | private function peg_f83($b) { return $this->tu->box_functions($b); } |
562 | private function peg_f84($b, $cs) { return new Box($b, join('', $cs)); } |
563 | private function peg_f85($c) { return $c; } |
564 | private function peg_f86($f) { return $this->tu->nullary_macro($f); } |
565 | private function peg_f87($f) { return $f . " "; } |
566 | private function peg_f88($f) { return $this->options['usemathrm'] && $this->tu->nullary_macro_in_mbox($f); } |
567 | private function peg_f89($f) { return "\\mathrm {" . $f . "} "; } |
568 | private function peg_f90($mathrm) { return $this->options['usemathrm'] && $mathrm === "\\mathrm"; } |
569 | private function peg_f91($mathrm, $f) { return $this->options['usemathrm'] && $this->tu->nullary_macro_in_mbox($f); } |
570 | private function peg_f92($mathrm, $f) { return $this->options['usemathrm'] ? "\\mathrm {" . $f . "} " : false;} |
571 | private function peg_f93($f) { return $this->tu->nullary_macro_in_mbox($f); } |
572 | private function peg_f94($f) { return "\\mbox{" . $f . "} "; } |
573 | private function peg_f95($mbox) { return $mbox === "\\mbox"; } |
574 | private function peg_f96($mbox, $f) { return $this->tu->nullary_macro_in_mbox($f); } |
575 | private function peg_f97($mbox, $f) { return "\\mbox{" . $f . "} "; } |
576 | private function peg_f98($f) { return $f; } |
577 | private function peg_f99($c) { return "\\" . $c; } |
578 | private function peg_f100($c) { if($this->options['oldtexvc']) { |
579 | return "\\" . $c; /* escape dangerous chars */ |
580 | } else { |
581 | throw new SyntaxError("Deprecation: % and $ need to be escaped.", [], $this->text(), $this->offset(), |
582 | $this->line(), $this->column()); |
583 | }} |
584 | private function peg_f101($f) { return $this->tu->other_delimiters1($f); } |
585 | private function peg_f102($f) { return $this->tu->other_delimiters2($f); } |
586 | private function peg_f103($f) { |
587 | $parser = new Parser(); |
588 | $p = $parser->parse($this->tu->other_delimiters2($f), $this->options); |
589 | # assert.ok(p instanceof TexArray && p.length === 1); |
590 | assert($p instanceof TexArray && count($p->getArgs()) === 1); |
591 | |
592 | # assert.ok(p.first() instanceof Literal); |
593 | assert($p->first() instanceof Literal); |
594 | |
595 | return $p->first()->getArg(); |
596 | } |
597 | private function peg_f104($f) { return $this->tu->fun_ar1nb($f); } |
598 | private function peg_f105($f) { return $this->tu->fun_ar1opt($f); } |
599 | private function peg_f106($s, $n, $u) { return new LengthSpec($s, $n, $u); } |
600 | private function peg_f107($l) { return $l; } |
601 | private function peg_f108($s) {return $s; } |
602 | private function peg_f109($f) { return $this->tu->big_literals($f); } |
603 | private function peg_f110($f) { return $this->tu->fun_ar1($f); } |
604 | private function peg_f111($f) { return $this->options['oldmhchem'] && $this->tu->fun_mhchem($f);} |
605 | private function peg_f112($f) { return $this->tu->other_fun_ar1($f); } |
606 | private function peg_f113($f) { if ($this->options['oldtexvc']) { |
607 | return $this->tu->other_fun_ar1($f); |
608 | } else { |
609 | throw new SyntaxError("Deprecation: \\Bbb and \\bold are not allowed in math mode.", [], |
610 | $this->text(), $this->offset(), $this->line(),$this->column()); |
611 | } |
612 | } |
613 | private function peg_f114($f) { return $this->tu->fun_mhchem($f); } |
614 | private function peg_f115($f) { return $this->tu->fun_ar2($f); } |
615 | private function peg_f116($f) { return $this->tu->fun_ar4($f) && $this->tu->mhchemtexified_required($f); } |
616 | private function peg_f117($f) { return $this->tu->fun_infix($f); } |
617 | private function peg_f118($f) { return $this->tu->declh_function($f); } |
618 | private function peg_f119($f) { return new Declh($f, new TexArray()); } |
619 | private function peg_f120($f) { return $this->tu->fun_ar2nb($f); } |
620 | private function peg_f121($f) { return $this->tu->left_function($f); } |
621 | private function peg_f122($f) { return $this->tu->right_function($f); } |
622 | private function peg_f123($f) { return $this->tu->hline_function($f); } |
623 | private function peg_f124($f) { return $this->tu->color_function($f); } |
624 | private function peg_f125($f, $cs) { return $f . " " . $cs; } |
625 | private function peg_f126($f) { return $this->tu->definecolor_function($f); } |
626 | private function peg_f127($f, $name, $cs) { return "{named}" . $cs; } |
627 | private function peg_f128($f, $name, $cs) { return "{gray}" . $cs; } |
628 | private function peg_f129($f, $name, $cs) { return "{rgb}" . $cs; } |
629 | private function peg_f130($f, $name, $cs) { return "{cmyk}" . $cs; } |
630 | private function peg_f131($f, $name, $a) { return $f . " {" . join('',$name) . "}" . $a; } |
631 | private function peg_f132($cs) { return "[named]" . $cs; } |
632 | private function peg_f133($cs) { return "[gray]" . $cs; } |
633 | private function peg_f134($cs) { return "[rgb]" . $cs; } |
634 | private function peg_f135($cs) { return "[cmyk]" . $cs; } |
635 | private function peg_f136($name) { return "{" . join('', $name) . "}"; } |
636 | private function peg_f137($k) { $s = is_array($k) ? $k[0] : $k; |
637 | return "{" . $s . "}";} |
638 | private function peg_f138($r, $g, $b) { return "{" . $r . "," . $g . "," . $b . "}"; } |
639 | private function peg_f139($c, $m, $y, $k) { return "{" . $c . "," . $m . "," . $y . "," . $k . "}"; } |
640 | private function peg_f140($n) { return intval($n, 10) <= 255; } |
641 | private function peg_f141($n) { return $n / 255; } |
642 | private function peg_f142($n) { return $n; } |
643 | private function peg_f143($f) { return $this->tu->mhchem_single_macro($f); } |
644 | private function peg_f144($f) { return $this->tu->mhchem_bond($f); } |
645 | private function peg_f145($f) { return $this->tu->mhchem_macro_1p($f); } |
646 | private function peg_f146($f) { return $this->tu->mhchem_macro_2p($f); } |
647 | private function peg_f147($f) { return $this->tu->mhchem_macro_2pu($f); } |
648 | private function peg_f148($f) { return $this->tu->mhchem_macro_2pc($f); } |
649 | private function peg_f149() { return "{}"; } |
650 | private function peg_f150() { return false; } |
651 | private function peg_f151() { return $this->peg_currPos === $this->input_length; } |
652 | |
653 | private function peg_parsestart() { |
654 | |
655 | $key = $this->peg_currPos * 130 + 0; |
656 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
657 | |
658 | if ($cached) { |
659 | $this->peg_currPos = $cached["nextPos"]; |
660 | return $cached["result"]; |
661 | } |
662 | |
663 | $s0 = $this->peg_currPos; |
664 | $s1 = $this->peg_parse_(); |
665 | if ($s1 !== $this->peg_FAILED) { |
666 | $s2 = $this->peg_parsetex_expr(); |
667 | if ($s2 !== $this->peg_FAILED) { |
668 | $this->peg_reportedPos = $s0; |
669 | $s1 = $this->peg_f0($s2); |
670 | $s0 = $s1; |
671 | } else { |
672 | $this->peg_currPos = $s0; |
673 | $s0 = $this->peg_FAILED; |
674 | } |
675 | } else { |
676 | $this->peg_currPos = $s0; |
677 | $s0 = $this->peg_FAILED; |
678 | } |
679 | |
680 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
681 | |
682 | return $s0; |
683 | } |
684 | |
685 | private function peg_parse_() { |
686 | |
687 | $key = $this->peg_currPos * 130 + 1; |
688 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
689 | |
690 | if ($cached) { |
691 | $this->peg_currPos = $cached["nextPos"]; |
692 | return $cached["result"]; |
693 | } |
694 | |
695 | $s0 = array(); |
696 | if (peg_regex_test($this->peg_c0, $this->input_substr($this->peg_currPos, 1))) { |
697 | $s1 = $this->input_substr($this->peg_currPos, 1); |
698 | $this->peg_currPos++; |
699 | } else { |
700 | $s1 = $this->peg_FAILED; |
701 | if ($this->peg_silentFails === 0) { |
702 | $this->peg_fail($this->peg_c1); |
703 | } |
704 | } |
705 | while ($s1 !== $this->peg_FAILED) { |
706 | $s0[] = $s1; |
707 | if (peg_regex_test($this->peg_c0, $this->input_substr($this->peg_currPos, 1))) { |
708 | $s1 = $this->input_substr($this->peg_currPos, 1); |
709 | $this->peg_currPos++; |
710 | } else { |
711 | $s1 = $this->peg_FAILED; |
712 | if ($this->peg_silentFails === 0) { |
713 | $this->peg_fail($this->peg_c1); |
714 | } |
715 | } |
716 | } |
717 | |
718 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
719 | |
720 | return $s0; |
721 | } |
722 | |
723 | private function peg_parsetex_expr() { |
724 | |
725 | $key = $this->peg_currPos * 130 + 2; |
726 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
727 | |
728 | if ($cached) { |
729 | $this->peg_currPos = $cached["nextPos"]; |
730 | return $cached["result"]; |
731 | } |
732 | |
733 | $s0 = $this->peg_currPos; |
734 | $s1 = $this->peg_parseexpr(); |
735 | if ($s1 !== $this->peg_FAILED) { |
736 | $s2 = $this->peg_parseEOF(); |
737 | if ($s2 !== $this->peg_FAILED) { |
738 | $this->peg_reportedPos = $s0; |
739 | $s1 = $this->peg_f1($s1); |
740 | $s0 = $s1; |
741 | } else { |
742 | $this->peg_currPos = $s0; |
743 | $s0 = $this->peg_FAILED; |
744 | } |
745 | } else { |
746 | $this->peg_currPos = $s0; |
747 | $s0 = $this->peg_FAILED; |
748 | } |
749 | if ($s0 === $this->peg_FAILED) { |
750 | $s0 = $this->peg_currPos; |
751 | $s1 = $this->peg_parsene_expr(); |
752 | if ($s1 !== $this->peg_FAILED) { |
753 | $s2 = $this->peg_parseFUN_INFIX(); |
754 | if ($s2 !== $this->peg_FAILED) { |
755 | $s3 = $this->peg_parsene_expr(); |
756 | if ($s3 !== $this->peg_FAILED) { |
757 | $s4 = $this->peg_parseEOF(); |
758 | if ($s4 !== $this->peg_FAILED) { |
759 | $this->peg_reportedPos = $s0; |
760 | $s1 = $this->peg_f2($s1, $s2, $s3); |
761 | $s0 = $s1; |
762 | } else { |
763 | $this->peg_currPos = $s0; |
764 | $s0 = $this->peg_FAILED; |
765 | } |
766 | } else { |
767 | $this->peg_currPos = $s0; |
768 | $s0 = $this->peg_FAILED; |
769 | } |
770 | } else { |
771 | $this->peg_currPos = $s0; |
772 | $s0 = $this->peg_FAILED; |
773 | } |
774 | } else { |
775 | $this->peg_currPos = $s0; |
776 | $s0 = $this->peg_FAILED; |
777 | } |
778 | } |
779 | |
780 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
781 | |
782 | return $s0; |
783 | } |
784 | |
785 | private function peg_parseexpr() { |
786 | |
787 | $key = $this->peg_currPos * 130 + 3; |
788 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
789 | |
790 | if ($cached) { |
791 | $this->peg_currPos = $cached["nextPos"]; |
792 | return $cached["result"]; |
793 | } |
794 | |
795 | $s0 = $this->peg_parsene_expr(); |
796 | if ($s0 === $this->peg_FAILED) { |
797 | $s0 = $this->peg_currPos; |
798 | $s1 = $this->peg_c2; |
799 | if ($s1 !== $this->peg_FAILED) { |
800 | $this->peg_reportedPos = $s0; |
801 | $s1 = $this->peg_f3(); |
802 | } |
803 | $s0 = $s1; |
804 | } |
805 | |
806 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
807 | |
808 | return $s0; |
809 | } |
810 | |
811 | private function peg_parsene_expr() { |
812 | |
813 | $key = $this->peg_currPos * 130 + 4; |
814 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
815 | |
816 | if ($cached) { |
817 | $this->peg_currPos = $cached["nextPos"]; |
818 | return $cached["result"]; |
819 | } |
820 | |
821 | $s0 = $this->peg_currPos; |
822 | $s1 = $this->peg_parselit_aq(); |
823 | if ($s1 !== $this->peg_FAILED) { |
824 | $s2 = $this->peg_parseexpr(); |
825 | if ($s2 !== $this->peg_FAILED) { |
826 | $this->peg_reportedPos = $s0; |
827 | $s1 = $this->peg_f4($s1, $s2); |
828 | $s0 = $s1; |
829 | } else { |
830 | $this->peg_currPos = $s0; |
831 | $s0 = $this->peg_FAILED; |
832 | } |
833 | } else { |
834 | $this->peg_currPos = $s0; |
835 | $s0 = $this->peg_FAILED; |
836 | } |
837 | if ($s0 === $this->peg_FAILED) { |
838 | $s0 = $this->peg_currPos; |
839 | $s1 = $this->peg_parselitsq_aq(); |
840 | if ($s1 !== $this->peg_FAILED) { |
841 | $s2 = $this->peg_parseexpr(); |
842 | if ($s2 !== $this->peg_FAILED) { |
843 | $this->peg_reportedPos = $s0; |
844 | $s1 = $this->peg_f4($s1, $s2); |
845 | $s0 = $s1; |
846 | } else { |
847 | $this->peg_currPos = $s0; |
848 | $s0 = $this->peg_FAILED; |
849 | } |
850 | } else { |
851 | $this->peg_currPos = $s0; |
852 | $s0 = $this->peg_FAILED; |
853 | } |
854 | if ($s0 === $this->peg_FAILED) { |
855 | $s0 = $this->peg_currPos; |
856 | $s1 = $this->peg_parseDECLh(); |
857 | if ($s1 !== $this->peg_FAILED) { |
858 | $s2 = $this->peg_parseexpr(); |
859 | if ($s2 !== $this->peg_FAILED) { |
860 | $this->peg_reportedPos = $s0; |
861 | $s1 = $this->peg_f5($s1, $s2); |
862 | $s0 = $s1; |
863 | } else { |
864 | $this->peg_currPos = $s0; |
865 | $s0 = $this->peg_FAILED; |
866 | } |
867 | } else { |
868 | $this->peg_currPos = $s0; |
869 | $s0 = $this->peg_FAILED; |
870 | } |
871 | } |
872 | } |
873 | |
874 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
875 | |
876 | return $s0; |
877 | } |
878 | |
879 | private function peg_parselitsq_aq() { |
880 | |
881 | $key = $this->peg_currPos * 130 + 5; |
882 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
883 | |
884 | if ($cached) { |
885 | $this->peg_currPos = $cached["nextPos"]; |
886 | return $cached["result"]; |
887 | } |
888 | |
889 | $s0 = $this->peg_parselitsq_fq(); |
890 | if ($s0 === $this->peg_FAILED) { |
891 | $s0 = $this->peg_parselitsq_dq(); |
892 | if ($s0 === $this->peg_FAILED) { |
893 | $s0 = $this->peg_parselitsq_uq(); |
894 | if ($s0 === $this->peg_FAILED) { |
895 | $s0 = $this->peg_parselitsq_zq(); |
896 | } |
897 | } |
898 | } |
899 | |
900 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
901 | |
902 | return $s0; |
903 | } |
904 | |
905 | private function peg_parselitsq_fq() { |
906 | |
907 | $key = $this->peg_currPos * 130 + 6; |
908 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
909 | |
910 | if ($cached) { |
911 | $this->peg_currPos = $cached["nextPos"]; |
912 | return $cached["result"]; |
913 | } |
914 | |
915 | $s0 = $this->peg_currPos; |
916 | $s1 = $this->peg_parselitsq_dq(); |
917 | if ($s1 !== $this->peg_FAILED) { |
918 | $s2 = $this->peg_parseSUP(); |
919 | if ($s2 !== $this->peg_FAILED) { |
920 | $s3 = $this->peg_parselit(); |
921 | if ($s3 !== $this->peg_FAILED) { |
922 | $this->peg_reportedPos = $s0; |
923 | $s1 = $this->peg_f6($s1, $s3); |
924 | $s0 = $s1; |
925 | } else { |
926 | $this->peg_currPos = $s0; |
927 | $s0 = $this->peg_FAILED; |
928 | } |
929 | } else { |
930 | $this->peg_currPos = $s0; |
931 | $s0 = $this->peg_FAILED; |
932 | } |
933 | } else { |
934 | $this->peg_currPos = $s0; |
935 | $s0 = $this->peg_FAILED; |
936 | } |
937 | if ($s0 === $this->peg_FAILED) { |
938 | $s0 = $this->peg_currPos; |
939 | $s1 = $this->peg_parselitsq_uq(); |
940 | if ($s1 !== $this->peg_FAILED) { |
941 | $s2 = $this->peg_parseSUB(); |
942 | if ($s2 !== $this->peg_FAILED) { |
943 | $s3 = $this->peg_parselit(); |
944 | if ($s3 !== $this->peg_FAILED) { |
945 | $this->peg_reportedPos = $s0; |
946 | $s1 = $this->peg_f7($s1, $s3); |
947 | $s0 = $s1; |
948 | } else { |
949 | $this->peg_currPos = $s0; |
950 | $s0 = $this->peg_FAILED; |
951 | } |
952 | } else { |
953 | $this->peg_currPos = $s0; |
954 | $s0 = $this->peg_FAILED; |
955 | } |
956 | } else { |
957 | $this->peg_currPos = $s0; |
958 | $s0 = $this->peg_FAILED; |
959 | } |
960 | } |
961 | |
962 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
963 | |
964 | return $s0; |
965 | } |
966 | |
967 | private function peg_parselitsq_uq() { |
968 | |
969 | $key = $this->peg_currPos * 130 + 7; |
970 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
971 | |
972 | if ($cached) { |
973 | $this->peg_currPos = $cached["nextPos"]; |
974 | return $cached["result"]; |
975 | } |
976 | |
977 | $s0 = $this->peg_currPos; |
978 | $s1 = $this->peg_parselitsq_zq(); |
979 | if ($s1 !== $this->peg_FAILED) { |
980 | $s2 = $this->peg_parseSUP(); |
981 | if ($s2 !== $this->peg_FAILED) { |
982 | $s3 = $this->peg_parselit(); |
983 | if ($s3 !== $this->peg_FAILED) { |
984 | $this->peg_reportedPos = $s0; |
985 | $s1 = $this->peg_f8($s1, $s3); |
986 | $s0 = $s1; |
987 | } else { |
988 | $this->peg_currPos = $s0; |
989 | $s0 = $this->peg_FAILED; |
990 | } |
991 | } else { |
992 | $this->peg_currPos = $s0; |
993 | $s0 = $this->peg_FAILED; |
994 | } |
995 | } else { |
996 | $this->peg_currPos = $s0; |
997 | $s0 = $this->peg_FAILED; |
998 | } |
999 | |
1000 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
1001 | |
1002 | return $s0; |
1003 | } |
1004 | |
1005 | private function peg_parselitsq_dq() { |
1006 | |
1007 | $key = $this->peg_currPos * 130 + 8; |
1008 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
1009 | |
1010 | if ($cached) { |
1011 | $this->peg_currPos = $cached["nextPos"]; |
1012 | return $cached["result"]; |
1013 | } |
1014 | |
1015 | $s0 = $this->peg_currPos; |
1016 | $s1 = $this->peg_parselitsq_zq(); |
1017 | if ($s1 !== $this->peg_FAILED) { |
1018 | $s2 = $this->peg_parseSUB(); |
1019 | if ($s2 !== $this->peg_FAILED) { |
1020 | $s3 = $this->peg_parselit(); |
1021 | if ($s3 !== $this->peg_FAILED) { |
1022 | $this->peg_reportedPos = $s0; |
1023 | $s1 = $this->peg_f9($s1, $s3); |
1024 | $s0 = $s1; |
1025 | } else { |
1026 | $this->peg_currPos = $s0; |
1027 | $s0 = $this->peg_FAILED; |
1028 | } |
1029 | } else { |
1030 | $this->peg_currPos = $s0; |
1031 | $s0 = $this->peg_FAILED; |
1032 | } |
1033 | } else { |
1034 | $this->peg_currPos = $s0; |
1035 | $s0 = $this->peg_FAILED; |
1036 | } |
1037 | |
1038 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
1039 | |
1040 | return $s0; |
1041 | } |
1042 | |
1043 | private function peg_parselitsq_zq() { |
1044 | |
1045 | $key = $this->peg_currPos * 130 + 9; |
1046 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
1047 | |
1048 | if ($cached) { |
1049 | $this->peg_currPos = $cached["nextPos"]; |
1050 | return $cached["result"]; |
1051 | } |
1052 | |
1053 | $s0 = $this->peg_currPos; |
1054 | $s1 = $this->peg_parseSQ_CLOSE(); |
1055 | if ($s1 !== $this->peg_FAILED) { |
1056 | $this->peg_reportedPos = $s0; |
1057 | $s1 = $this->peg_f10(); |
1058 | } |
1059 | $s0 = $s1; |
1060 | |
1061 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
1062 | |
1063 | return $s0; |
1064 | } |
1065 | |
1066 | private function peg_parseexpr_nosqc() { |
1067 | |
1068 | $key = $this->peg_currPos * 130 + 10; |
1069 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
1070 | |
1071 | if ($cached) { |
1072 | $this->peg_currPos = $cached["nextPos"]; |
1073 | return $cached["result"]; |
1074 | } |
1075 | |
1076 | $s0 = $this->peg_currPos; |
1077 | $s1 = $this->peg_parselit_aq(); |
1078 | if ($s1 !== $this->peg_FAILED) { |
1079 | $s2 = $this->peg_parseexpr_nosqc(); |
1080 | if ($s2 !== $this->peg_FAILED) { |
1081 | $this->peg_reportedPos = $s0; |
1082 | $s1 = $this->peg_f11($s1, $s2); |
1083 | $s0 = $s1; |
1084 | } else { |
1085 | $this->peg_currPos = $s0; |
1086 | $s0 = $this->peg_FAILED; |
1087 | } |
1088 | } else { |
1089 | $this->peg_currPos = $s0; |
1090 | $s0 = $this->peg_FAILED; |
1091 | } |
1092 | if ($s0 === $this->peg_FAILED) { |
1093 | $s0 = $this->peg_currPos; |
1094 | $s1 = $this->peg_c2; |
1095 | if ($s1 !== $this->peg_FAILED) { |
1096 | $this->peg_reportedPos = $s0; |
1097 | $s1 = $this->peg_f3(); |
1098 | } |
1099 | $s0 = $s1; |
1100 | } |
1101 | |
1102 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
1103 | |
1104 | return $s0; |
1105 | } |
1106 | |
1107 | private function peg_parselit_aq() { |
1108 | |
1109 | $key = $this->peg_currPos * 130 + 11; |
1110 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
1111 | |
1112 | if ($cached) { |
1113 | $this->peg_currPos = $cached["nextPos"]; |
1114 | return $cached["result"]; |
1115 | } |
1116 | |
1117 | $s0 = $this->peg_parselit_fq(); |
1118 | if ($s0 === $this->peg_FAILED) { |
1119 | $s0 = $this->peg_parselit_dq(); |
1120 | if ($s0 === $this->peg_FAILED) { |
1121 | $s0 = $this->peg_parselit_uq(); |
1122 | if ($s0 === $this->peg_FAILED) { |
1123 | $s0 = $this->peg_parselit_dqn(); |
1124 | if ($s0 === $this->peg_FAILED) { |
1125 | $s0 = $this->peg_parselit_uqn(); |
1126 | if ($s0 === $this->peg_FAILED) { |
1127 | $s0 = $this->peg_parselit(); |
1128 | } |
1129 | } |
1130 | } |
1131 | } |
1132 | } |
1133 | |
1134 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
1135 | |
1136 | return $s0; |
1137 | } |
1138 | |
1139 | private function peg_parselit_fq() { |
1140 | |
1141 | $key = $this->peg_currPos * 130 + 12; |
1142 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
1143 | |
1144 | if ($cached) { |
1145 | $this->peg_currPos = $cached["nextPos"]; |
1146 | return $cached["result"]; |
1147 | } |
1148 | |
1149 | $s0 = $this->peg_currPos; |
1150 | $s1 = $this->peg_parselit_dq(); |
1151 | if ($s1 !== $this->peg_FAILED) { |
1152 | $s2 = $this->peg_parseSUP(); |
1153 | if ($s2 !== $this->peg_FAILED) { |
1154 | $s3 = $this->peg_parselit(); |
1155 | if ($s3 !== $this->peg_FAILED) { |
1156 | $this->peg_reportedPos = $s0; |
1157 | $s1 = $this->peg_f6($s1, $s3); |
1158 | $s0 = $s1; |
1159 | } else { |
1160 | $this->peg_currPos = $s0; |
1161 | $s0 = $this->peg_FAILED; |
1162 | } |
1163 | } else { |
1164 | $this->peg_currPos = $s0; |
1165 | $s0 = $this->peg_FAILED; |
1166 | } |
1167 | } else { |
1168 | $this->peg_currPos = $s0; |
1169 | $s0 = $this->peg_FAILED; |
1170 | } |
1171 | if ($s0 === $this->peg_FAILED) { |
1172 | $s0 = $this->peg_currPos; |
1173 | $s1 = $this->peg_parselit_uq(); |
1174 | if ($s1 !== $this->peg_FAILED) { |
1175 | $s2 = $this->peg_parseSUB(); |
1176 | if ($s2 !== $this->peg_FAILED) { |
1177 | $s3 = $this->peg_parselit(); |
1178 | if ($s3 !== $this->peg_FAILED) { |
1179 | $this->peg_reportedPos = $s0; |
1180 | $s1 = $this->peg_f12($s1, $s3); |
1181 | $s0 = $s1; |
1182 | } else { |
1183 | $this->peg_currPos = $s0; |
1184 | $s0 = $this->peg_FAILED; |
1185 | } |
1186 | } else { |
1187 | $this->peg_currPos = $s0; |
1188 | $s0 = $this->peg_FAILED; |
1189 | } |
1190 | } else { |
1191 | $this->peg_currPos = $s0; |
1192 | $s0 = $this->peg_FAILED; |
1193 | } |
1194 | if ($s0 === $this->peg_FAILED) { |
1195 | $s0 = $this->peg_currPos; |
1196 | $s1 = $this->peg_parselit_dqn(); |
1197 | if ($s1 !== $this->peg_FAILED) { |
1198 | $s2 = $this->peg_parseSUP(); |
1199 | if ($s2 !== $this->peg_FAILED) { |
1200 | $s3 = $this->peg_parselit(); |
1201 | if ($s3 !== $this->peg_FAILED) { |
1202 | $this->peg_reportedPos = $s0; |
1203 | $s1 = $this->peg_f13($s1, $s3); |
1204 | $s0 = $s1; |
1205 | } else { |
1206 | $this->peg_currPos = $s0; |
1207 | $s0 = $this->peg_FAILED; |
1208 | } |
1209 | } else { |
1210 | $this->peg_currPos = $s0; |
1211 | $s0 = $this->peg_FAILED; |
1212 | } |
1213 | } else { |
1214 | $this->peg_currPos = $s0; |
1215 | $s0 = $this->peg_FAILED; |
1216 | } |
1217 | } |
1218 | } |
1219 | |
1220 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
1221 | |
1222 | return $s0; |
1223 | } |
1224 | |
1225 | private function peg_parselit_uq() { |
1226 | |
1227 | $key = $this->peg_currPos * 130 + 13; |
1228 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
1229 | |
1230 | if ($cached) { |
1231 | $this->peg_currPos = $cached["nextPos"]; |
1232 | return $cached["result"]; |
1233 | } |
1234 | |
1235 | $s0 = $this->peg_currPos; |
1236 | $s1 = $this->peg_parselit(); |
1237 | if ($s1 !== $this->peg_FAILED) { |
1238 | $s2 = $this->peg_parseSUP(); |
1239 | if ($s2 !== $this->peg_FAILED) { |
1240 | $s3 = $this->peg_parselit(); |
1241 | if ($s3 !== $this->peg_FAILED) { |
1242 | $this->peg_reportedPos = $s0; |
1243 | $s1 = $this->peg_f8($s1, $s3); |
1244 | $s0 = $s1; |
1245 | } else { |
1246 | $this->peg_currPos = $s0; |
1247 | $s0 = $this->peg_FAILED; |
1248 | } |
1249 | } else { |
1250 | $this->peg_currPos = $s0; |
1251 | $s0 = $this->peg_FAILED; |
1252 | } |
1253 | } else { |
1254 | $this->peg_currPos = $s0; |
1255 | $s0 = $this->peg_FAILED; |
1256 | } |
1257 | |
1258 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
1259 | |
1260 | return $s0; |
1261 | } |
1262 | |
1263 | private function peg_parselit_dq() { |
1264 | |
1265 | $key = $this->peg_currPos * 130 + 14; |
1266 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
1267 | |
1268 | if ($cached) { |
1269 | $this->peg_currPos = $cached["nextPos"]; |
1270 | return $cached["result"]; |
1271 | } |
1272 | |
1273 | $s0 = $this->peg_currPos; |
1274 | $s1 = $this->peg_parselit(); |
1275 | if ($s1 !== $this->peg_FAILED) { |
1276 | $s2 = $this->peg_parseSUB(); |
1277 | if ($s2 !== $this->peg_FAILED) { |
1278 | $s3 = $this->peg_parselit(); |
1279 | if ($s3 !== $this->peg_FAILED) { |
1280 | $this->peg_reportedPos = $s0; |
1281 | $s1 = $this->peg_f9($s1, $s3); |
1282 | $s0 = $s1; |
1283 | } else { |
1284 | $this->peg_currPos = $s0; |
1285 | $s0 = $this->peg_FAILED; |
1286 | } |
1287 | } else { |
1288 | $this->peg_currPos = $s0; |
1289 | $s0 = $this->peg_FAILED; |
1290 | } |
1291 | } else { |
1292 | $this->peg_currPos = $s0; |
1293 | $s0 = $this->peg_FAILED; |
1294 | } |
1295 | |
1296 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
1297 | |
1298 | return $s0; |
1299 | } |
1300 | |
1301 | private function peg_parselit_uqn() { |
1302 | |
1303 | $key = $this->peg_currPos * 130 + 15; |
1304 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
1305 | |
1306 | if ($cached) { |
1307 | $this->peg_currPos = $cached["nextPos"]; |
1308 | return $cached["result"]; |
1309 | } |
1310 | |
1311 | $s0 = $this->peg_currPos; |
1312 | $s1 = $this->peg_parseSUP(); |
1313 | if ($s1 !== $this->peg_FAILED) { |
1314 | $s2 = $this->peg_parselit(); |
1315 | if ($s2 !== $this->peg_FAILED) { |
1316 | $this->peg_reportedPos = $s0; |
1317 | $s1 = $this->peg_f14($s2); |
1318 | $s0 = $s1; |
1319 | } else { |
1320 | $this->peg_currPos = $s0; |
1321 | $s0 = $this->peg_FAILED; |
1322 | } |
1323 | } else { |
1324 | $this->peg_currPos = $s0; |
1325 | $s0 = $this->peg_FAILED; |
1326 | } |
1327 | |
1328 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
1329 | |
1330 | return $s0; |
1331 | } |
1332 | |
1333 | private function peg_parselit_dqn() { |
1334 | |
1335 | $key = $this->peg_currPos * 130 + 16; |
1336 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
1337 | |
1338 | if ($cached) { |
1339 | $this->peg_currPos = $cached["nextPos"]; |
1340 | return $cached["result"]; |
1341 | } |
1342 | |
1343 | $s0 = $this->peg_currPos; |
1344 | $s1 = $this->peg_parseSUB(); |
1345 | if ($s1 !== $this->peg_FAILED) { |
1346 | $s2 = $this->peg_parselit(); |
1347 | if ($s2 !== $this->peg_FAILED) { |
1348 | $this->peg_reportedPos = $s0; |
1349 | $s1 = $this->peg_f15($s2); |
1350 | $s0 = $s1; |
1351 | } else { |
1352 | $this->peg_currPos = $s0; |
1353 | $s0 = $this->peg_FAILED; |
1354 | } |
1355 | } else { |
1356 | $this->peg_currPos = $s0; |
1357 | $s0 = $this->peg_FAILED; |
1358 | } |
1359 | |
1360 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
1361 | |
1362 | return $s0; |
1363 | } |
1364 | |
1365 | private function peg_parseleft() { |
1366 | |
1367 | $key = $this->peg_currPos * 130 + 17; |
1368 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
1369 | |
1370 | if ($cached) { |
1371 | $this->peg_currPos = $cached["nextPos"]; |
1372 | return $cached["result"]; |
1373 | } |
1374 | |
1375 | $s0 = $this->peg_currPos; |
1376 | $s1 = $this->peg_parseLEFTI(); |
1377 | if ($s1 !== $this->peg_FAILED) { |
1378 | $s2 = $this->peg_parseDELIMITER(); |
1379 | if ($s2 !== $this->peg_FAILED) { |
1380 | $this->peg_reportedPos = $s0; |
1381 | $s1 = $this->peg_f16($s2); |
1382 | $s0 = $s1; |
1383 | } else { |
1384 | $this->peg_currPos = $s0; |
1385 | $s0 = $this->peg_FAILED; |
1386 | } |
1387 | } else { |
1388 | $this->peg_currPos = $s0; |
1389 | $s0 = $this->peg_FAILED; |
1390 | } |
1391 | if ($s0 === $this->peg_FAILED) { |
1392 | $s0 = $this->peg_currPos; |
1393 | $s1 = $this->peg_parseLEFTI(); |
1394 | if ($s1 !== $this->peg_FAILED) { |
1395 | $s2 = $this->peg_parseSQ_CLOSE(); |
1396 | if ($s2 !== $this->peg_FAILED) { |
1397 | $this->peg_reportedPos = $s0; |
1398 | $s1 = $this->peg_f17(); |
1399 | $s0 = $s1; |
1400 | } else { |
1401 | $this->peg_currPos = $s0; |
1402 | $s0 = $this->peg_FAILED; |
1403 | } |
1404 | } else { |
1405 | $this->peg_currPos = $s0; |
1406 | $s0 = $this->peg_FAILED; |
1407 | } |
1408 | } |
1409 | |
1410 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
1411 | |
1412 | return $s0; |
1413 | } |
1414 | |
1415 | private function peg_parseright() { |
1416 | |
1417 | $key = $this->peg_currPos * 130 + 18; |
1418 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
1419 | |
1420 | if ($cached) { |
1421 | $this->peg_currPos = $cached["nextPos"]; |
1422 | return $cached["result"]; |
1423 | } |
1424 | |
1425 | $s0 = $this->peg_currPos; |
1426 | $s1 = $this->peg_parseRIGHTI(); |
1427 | if ($s1 !== $this->peg_FAILED) { |
1428 | $s2 = $this->peg_parseDELIMITER(); |
1429 | if ($s2 !== $this->peg_FAILED) { |
1430 | $this->peg_reportedPos = $s0; |
1431 | $s1 = $this->peg_f16($s2); |
1432 | $s0 = $s1; |
1433 | } else { |
1434 | $this->peg_currPos = $s0; |
1435 | $s0 = $this->peg_FAILED; |
1436 | } |
1437 | } else { |
1438 | $this->peg_currPos = $s0; |
1439 | $s0 = $this->peg_FAILED; |
1440 | } |
1441 | if ($s0 === $this->peg_FAILED) { |
1442 | $s0 = $this->peg_currPos; |
1443 | $s1 = $this->peg_parseRIGHTI(); |
1444 | if ($s1 !== $this->peg_FAILED) { |
1445 | $s2 = $this->peg_parseSQ_CLOSE(); |
1446 | if ($s2 !== $this->peg_FAILED) { |
1447 | $this->peg_reportedPos = $s0; |
1448 | $s1 = $this->peg_f17(); |
1449 | $s0 = $s1; |
1450 | } else { |
1451 | $this->peg_currPos = $s0; |
1452 | $s0 = $this->peg_FAILED; |
1453 | } |
1454 | } else { |
1455 | $this->peg_currPos = $s0; |
1456 | $s0 = $this->peg_FAILED; |
1457 | } |
1458 | } |
1459 | |
1460 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
1461 | |
1462 | return $s0; |
1463 | } |
1464 | |
1465 | private function peg_parselit() { |
1466 | |
1467 | $key = $this->peg_currPos * 130 + 19; |
1468 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
1469 | |
1470 | if ($cached) { |
1471 | $this->peg_currPos = $cached["nextPos"]; |
1472 | return $cached["result"]; |
1473 | } |
1474 | |
1475 | $s0 = $this->peg_currPos; |
1476 | $s1 = $this->peg_parseLITERAL(); |
1477 | if ($s1 !== $this->peg_FAILED) { |
1478 | $this->peg_reportedPos = $s0; |
1479 | $s1 = $this->peg_f18($s1); |
1480 | } |
1481 | $s0 = $s1; |
1482 | if ($s0 === $this->peg_FAILED) { |
1483 | $s0 = $this->peg_currPos; |
1484 | $s1 = $this->peg_parsegeneric_func(); |
1485 | if ($s1 !== $this->peg_FAILED) { |
1486 | $this->peg_reportedPos = $this->peg_currPos; |
1487 | $s2 = $this->peg_f19($s1); |
1488 | if ($s2) { |
1489 | $s2 = null; |
1490 | } else { |
1491 | $s2 = $this->peg_FAILED; |
1492 | } |
1493 | if ($s2 !== $this->peg_FAILED) { |
1494 | $s3 = $this->peg_parse_(); |
1495 | if ($s3 !== $this->peg_FAILED) { |
1496 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c3) { |
1497 | $s4 = $this->peg_c3; |
1498 | $this->peg_currPos++; |
1499 | } else { |
1500 | $s4 = $this->peg_FAILED; |
1501 | if ($this->peg_silentFails === 0) { |
1502 | $this->peg_fail($this->peg_c4); |
1503 | } |
1504 | } |
1505 | if ($s4 === $this->peg_FAILED) { |
1506 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c5) { |
1507 | $s4 = $this->peg_c5; |
1508 | $this->peg_currPos++; |
1509 | } else { |
1510 | $s4 = $this->peg_FAILED; |
1511 | if ($this->peg_silentFails === 0) { |
1512 | $this->peg_fail($this->peg_c6); |
1513 | } |
1514 | } |
1515 | if ($s4 === $this->peg_FAILED) { |
1516 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c7) { |
1517 | $s4 = $this->peg_c7; |
1518 | $this->peg_currPos += 2; |
1519 | } else { |
1520 | $s4 = $this->peg_FAILED; |
1521 | if ($this->peg_silentFails === 0) { |
1522 | $this->peg_fail($this->peg_c8); |
1523 | } |
1524 | } |
1525 | if ($s4 === $this->peg_FAILED) { |
1526 | $s4 = $this->peg_currPos; |
1527 | $s5 = $this->peg_c2; |
1528 | if ($s5 !== $this->peg_FAILED) { |
1529 | $this->peg_reportedPos = $s4; |
1530 | $s5 = $this->peg_f20($s1); |
1531 | } |
1532 | $s4 = $s5; |
1533 | } |
1534 | } |
1535 | } |
1536 | if ($s4 !== $this->peg_FAILED) { |
1537 | $s5 = $this->peg_parse_(); |
1538 | if ($s5 !== $this->peg_FAILED) { |
1539 | $this->peg_reportedPos = $s0; |
1540 | $s1 = $this->peg_f21($s1, $s4); |
1541 | $s0 = $s1; |
1542 | } else { |
1543 | $this->peg_currPos = $s0; |
1544 | $s0 = $this->peg_FAILED; |
1545 | } |
1546 | } else { |
1547 | $this->peg_currPos = $s0; |
1548 | $s0 = $this->peg_FAILED; |
1549 | } |
1550 | } else { |
1551 | $this->peg_currPos = $s0; |
1552 | $s0 = $this->peg_FAILED; |
1553 | } |
1554 | } else { |
1555 | $this->peg_currPos = $s0; |
1556 | $s0 = $this->peg_FAILED; |
1557 | } |
1558 | } else { |
1559 | $this->peg_currPos = $s0; |
1560 | $s0 = $this->peg_FAILED; |
1561 | } |
1562 | if ($s0 === $this->peg_FAILED) { |
1563 | $s0 = $this->peg_currPos; |
1564 | $s1 = $this->peg_parsegeneric_func(); |
1565 | if ($s1 !== $this->peg_FAILED) { |
1566 | $this->peg_reportedPos = $this->peg_currPos; |
1567 | $s2 = $this->peg_f22($s1); |
1568 | if ($s2) { |
1569 | $s2 = null; |
1570 | } else { |
1571 | $s2 = $this->peg_FAILED; |
1572 | } |
1573 | if ($s2 !== $this->peg_FAILED) { |
1574 | $s3 = $this->peg_parse_(); |
1575 | if ($s3 !== $this->peg_FAILED) { |
1576 | $this->peg_reportedPos = $s0; |
1577 | $s1 = $this->peg_f23($s1); |
1578 | $s0 = $s1; |
1579 | } else { |
1580 | $this->peg_currPos = $s0; |
1581 | $s0 = $this->peg_FAILED; |
1582 | } |
1583 | } else { |
1584 | $this->peg_currPos = $s0; |
1585 | $s0 = $this->peg_FAILED; |
1586 | } |
1587 | } else { |
1588 | $this->peg_currPos = $s0; |
1589 | $s0 = $this->peg_FAILED; |
1590 | } |
1591 | if ($s0 === $this->peg_FAILED) { |
1592 | $s0 = $this->peg_currPos; |
1593 | $s1 = $this->peg_parsegeneric_func(); |
1594 | if ($s1 !== $this->peg_FAILED) { |
1595 | $this->peg_reportedPos = $this->peg_currPos; |
1596 | $s2 = $this->peg_f24($s1); |
1597 | if ($s2) { |
1598 | $s2 = null; |
1599 | } else { |
1600 | $s2 = $this->peg_FAILED; |
1601 | } |
1602 | if ($s2 !== $this->peg_FAILED) { |
1603 | $s3 = $this->peg_parse_(); |
1604 | if ($s3 !== $this->peg_FAILED) { |
1605 | $this->peg_reportedPos = $s0; |
1606 | $s1 = $this->peg_f25($s1); |
1607 | $s0 = $s1; |
1608 | } else { |
1609 | $this->peg_currPos = $s0; |
1610 | $s0 = $this->peg_FAILED; |
1611 | } |
1612 | } else { |
1613 | $this->peg_currPos = $s0; |
1614 | $s0 = $this->peg_FAILED; |
1615 | } |
1616 | } else { |
1617 | $this->peg_currPos = $s0; |
1618 | $s0 = $this->peg_FAILED; |
1619 | } |
1620 | if ($s0 === $this->peg_FAILED) { |
1621 | $s0 = $this->peg_currPos; |
1622 | $s1 = $this->peg_parsegeneric_func(); |
1623 | if ($s1 !== $this->peg_FAILED) { |
1624 | $this->peg_reportedPos = $this->peg_currPos; |
1625 | $s2 = $this->peg_f26($s1); |
1626 | if ($s2) { |
1627 | $s2 = null; |
1628 | } else { |
1629 | $s2 = $this->peg_FAILED; |
1630 | } |
1631 | if ($s2 !== $this->peg_FAILED) { |
1632 | $s3 = $this->peg_parse_(); |
1633 | if ($s3 !== $this->peg_FAILED) { |
1634 | $this->peg_reportedPos = $s0; |
1635 | $s1 = $this->peg_f27($s1); |
1636 | $s0 = $s1; |
1637 | } else { |
1638 | $this->peg_currPos = $s0; |
1639 | $s0 = $this->peg_FAILED; |
1640 | } |
1641 | } else { |
1642 | $this->peg_currPos = $s0; |
1643 | $s0 = $this->peg_FAILED; |
1644 | } |
1645 | } else { |
1646 | $this->peg_currPos = $s0; |
1647 | $s0 = $this->peg_FAILED; |
1648 | } |
1649 | if ($s0 === $this->peg_FAILED) { |
1650 | $s0 = $this->peg_currPos; |
1651 | $s1 = $this->peg_parseDELIMITER(); |
1652 | if ($s1 !== $this->peg_FAILED) { |
1653 | $this->peg_reportedPos = $s0; |
1654 | $s1 = $this->peg_f18($s1); |
1655 | } |
1656 | $s0 = $s1; |
1657 | if ($s0 === $this->peg_FAILED) { |
1658 | $s0 = $this->peg_currPos; |
1659 | $s1 = $this->peg_parseBIG(); |
1660 | if ($s1 !== $this->peg_FAILED) { |
1661 | $s2 = $this->peg_parseDELIMITER(); |
1662 | if ($s2 !== $this->peg_FAILED) { |
1663 | $this->peg_reportedPos = $s0; |
1664 | $s1 = $this->peg_f28($s1, $s2); |
1665 | $s0 = $s1; |
1666 | } else { |
1667 | $this->peg_currPos = $s0; |
1668 | $s0 = $this->peg_FAILED; |
1669 | } |
1670 | } else { |
1671 | $this->peg_currPos = $s0; |
1672 | $s0 = $this->peg_FAILED; |
1673 | } |
1674 | if ($s0 === $this->peg_FAILED) { |
1675 | $s0 = $this->peg_currPos; |
1676 | $s1 = $this->peg_parseBIG(); |
1677 | if ($s1 !== $this->peg_FAILED) { |
1678 | $s2 = $this->peg_parseSQ_CLOSE(); |
1679 | if ($s2 !== $this->peg_FAILED) { |
1680 | $this->peg_reportedPos = $s0; |
1681 | $s1 = $this->peg_f29($s1); |
1682 | $s0 = $s1; |
1683 | } else { |
1684 | $this->peg_currPos = $s0; |
1685 | $s0 = $this->peg_FAILED; |
1686 | } |
1687 | } else { |
1688 | $this->peg_currPos = $s0; |
1689 | $s0 = $this->peg_FAILED; |
1690 | } |
1691 | if ($s0 === $this->peg_FAILED) { |
1692 | $s0 = $this->peg_currPos; |
1693 | $s1 = $this->peg_parseleft(); |
1694 | if ($s1 !== $this->peg_FAILED) { |
1695 | $s2 = $this->peg_parseexpr(); |
1696 | if ($s2 !== $this->peg_FAILED) { |
1697 | $s3 = $this->peg_parseright(); |
1698 | if ($s3 !== $this->peg_FAILED) { |
1699 | $this->peg_reportedPos = $s0; |
1700 | $s1 = $this->peg_f30($s1, $s2, $s3); |
1701 | $s0 = $s1; |
1702 | } else { |
1703 | $this->peg_currPos = $s0; |
1704 | $s0 = $this->peg_FAILED; |
1705 | } |
1706 | } else { |
1707 | $this->peg_currPos = $s0; |
1708 | $s0 = $this->peg_FAILED; |
1709 | } |
1710 | } else { |
1711 | $this->peg_currPos = $s0; |
1712 | $s0 = $this->peg_FAILED; |
1713 | } |
1714 | if ($s0 === $this->peg_FAILED) { |
1715 | $s0 = $this->peg_currPos; |
1716 | $s1 = $this->peg_parseFUN_AR1opt(); |
1717 | if ($s1 !== $this->peg_FAILED) { |
1718 | $s2 = $this->peg_parseexpr_nosqc(); |
1719 | if ($s2 !== $this->peg_FAILED) { |
1720 | $s3 = $this->peg_parseSQ_CLOSE(); |
1721 | if ($s3 !== $this->peg_FAILED) { |
1722 | $s4 = $this->peg_parselit(); |
1723 | if ($s4 !== $this->peg_FAILED) { |
1724 | $this->peg_reportedPos = $s0; |
1725 | $s1 = $this->peg_f31($s1, $s2, $s4); |
1726 | $s0 = $s1; |
1727 | } else { |
1728 | $this->peg_currPos = $s0; |
1729 | $s0 = $this->peg_FAILED; |
1730 | } |
1731 | } else { |
1732 | $this->peg_currPos = $s0; |
1733 | $s0 = $this->peg_FAILED; |
1734 | } |
1735 | } else { |
1736 | $this->peg_currPos = $s0; |
1737 | $s0 = $this->peg_FAILED; |
1738 | } |
1739 | } else { |
1740 | $this->peg_currPos = $s0; |
1741 | $s0 = $this->peg_FAILED; |
1742 | } |
1743 | if ($s0 === $this->peg_FAILED) { |
1744 | $s0 = $this->peg_currPos; |
1745 | $s1 = $this->peg_parseFUN_AR1(); |
1746 | if ($s1 !== $this->peg_FAILED) { |
1747 | $s2 = $this->peg_parselit(); |
1748 | if ($s2 !== $this->peg_FAILED) { |
1749 | $this->peg_reportedPos = $s0; |
1750 | $s1 = $this->peg_f32($s1, $s2); |
1751 | $s0 = $s1; |
1752 | } else { |
1753 | $this->peg_currPos = $s0; |
1754 | $s0 = $this->peg_FAILED; |
1755 | } |
1756 | } else { |
1757 | $this->peg_currPos = $s0; |
1758 | $s0 = $this->peg_FAILED; |
1759 | } |
1760 | if ($s0 === $this->peg_FAILED) { |
1761 | $s0 = $this->peg_currPos; |
1762 | $s1 = $this->peg_parseFUN_AR1nb(); |
1763 | if ($s1 !== $this->peg_FAILED) { |
1764 | $s2 = $this->peg_parselit(); |
1765 | if ($s2 !== $this->peg_FAILED) { |
1766 | $this->peg_reportedPos = $s0; |
1767 | $s1 = $this->peg_f33($s1, $s2); |
1768 | $s0 = $s1; |
1769 | } else { |
1770 | $this->peg_currPos = $s0; |
1771 | $s0 = $this->peg_FAILED; |
1772 | } |
1773 | } else { |
1774 | $this->peg_currPos = $s0; |
1775 | $s0 = $this->peg_FAILED; |
1776 | } |
1777 | if ($s0 === $this->peg_FAILED) { |
1778 | $s0 = $this->peg_currPos; |
1779 | $s1 = $this->peg_parseFUN_MHCHEM(); |
1780 | if ($s1 !== $this->peg_FAILED) { |
1781 | $s2 = $this->peg_parsechem_lit(); |
1782 | if ($s2 !== $this->peg_FAILED) { |
1783 | $this->peg_reportedPos = $s0; |
1784 | $s1 = $this->peg_f34($s1, $s2); |
1785 | $s0 = $s1; |
1786 | } else { |
1787 | $this->peg_currPos = $s0; |
1788 | $s0 = $this->peg_FAILED; |
1789 | } |
1790 | } else { |
1791 | $this->peg_currPos = $s0; |
1792 | $s0 = $this->peg_FAILED; |
1793 | } |
1794 | if ($s0 === $this->peg_FAILED) { |
1795 | $s0 = $this->peg_currPos; |
1796 | $s1 = $this->peg_parseFUN_AR2(); |
1797 | if ($s1 !== $this->peg_FAILED) { |
1798 | $s2 = $this->peg_parselit(); |
1799 | if ($s2 !== $this->peg_FAILED) { |
1800 | $s3 = $this->peg_parselit(); |
1801 | if ($s3 !== $this->peg_FAILED) { |
1802 | $this->peg_reportedPos = $s0; |
1803 | $s1 = $this->peg_f35($s1, $s2, $s3); |
1804 | $s0 = $s1; |
1805 | } else { |
1806 | $this->peg_currPos = $s0; |
1807 | $s0 = $this->peg_FAILED; |
1808 | } |
1809 | } else { |
1810 | $this->peg_currPos = $s0; |
1811 | $s0 = $this->peg_FAILED; |
1812 | } |
1813 | } else { |
1814 | $this->peg_currPos = $s0; |
1815 | $s0 = $this->peg_FAILED; |
1816 | } |
1817 | if ($s0 === $this->peg_FAILED) { |
1818 | $s0 = $this->peg_currPos; |
1819 | $s1 = $this->peg_parseFUN_AR4_MHCHEM_TEXIFIED(); |
1820 | if ($s1 !== $this->peg_FAILED) { |
1821 | $s2 = $this->peg_parselit(); |
1822 | if ($s2 !== $this->peg_FAILED) { |
1823 | $s3 = $this->peg_parselit(); |
1824 | if ($s3 !== $this->peg_FAILED) { |
1825 | $s4 = $this->peg_parselit(); |
1826 | if ($s4 !== $this->peg_FAILED) { |
1827 | $s5 = $this->peg_parselit(); |
1828 | if ($s5 !== $this->peg_FAILED) { |
1829 | $this->peg_reportedPos = $s0; |
1830 | $s1 = $this->peg_f36($s1, $s2, $s3, $s4, $s5); |
1831 | $s0 = $s1; |
1832 | } else { |
1833 | $this->peg_currPos = $s0; |
1834 | $s0 = $this->peg_FAILED; |
1835 | } |
1836 | } else { |
1837 | $this->peg_currPos = $s0; |
1838 | $s0 = $this->peg_FAILED; |
1839 | } |
1840 | } else { |
1841 | $this->peg_currPos = $s0; |
1842 | $s0 = $this->peg_FAILED; |
1843 | } |
1844 | } else { |
1845 | $this->peg_currPos = $s0; |
1846 | $s0 = $this->peg_FAILED; |
1847 | } |
1848 | } else { |
1849 | $this->peg_currPos = $s0; |
1850 | $s0 = $this->peg_FAILED; |
1851 | } |
1852 | if ($s0 === $this->peg_FAILED) { |
1853 | $s0 = $this->peg_currPos; |
1854 | $s1 = $this->peg_parseFUN_AR2nb(); |
1855 | if ($s1 !== $this->peg_FAILED) { |
1856 | $s2 = $this->peg_parselit(); |
1857 | if ($s2 !== $this->peg_FAILED) { |
1858 | $s3 = $this->peg_parselit(); |
1859 | if ($s3 !== $this->peg_FAILED) { |
1860 | $this->peg_reportedPos = $s0; |
1861 | $s1 = $this->peg_f37($s1, $s2, $s3); |
1862 | $s0 = $s1; |
1863 | } else { |
1864 | $this->peg_currPos = $s0; |
1865 | $s0 = $this->peg_FAILED; |
1866 | } |
1867 | } else { |
1868 | $this->peg_currPos = $s0; |
1869 | $s0 = $this->peg_FAILED; |
1870 | } |
1871 | } else { |
1872 | $this->peg_currPos = $s0; |
1873 | $s0 = $this->peg_FAILED; |
1874 | } |
1875 | if ($s0 === $this->peg_FAILED) { |
1876 | $s0 = $this->peg_parseBOX(); |
1877 | if ($s0 === $this->peg_FAILED) { |
1878 | $s0 = $this->peg_currPos; |
1879 | $s1 = $this->peg_parseCURLY_OPEN(); |
1880 | if ($s1 !== $this->peg_FAILED) { |
1881 | $s2 = $this->peg_parseexpr(); |
1882 | if ($s2 !== $this->peg_FAILED) { |
1883 | $s3 = $this->peg_parseCURLY_CLOSE(); |
1884 | if ($s3 !== $this->peg_FAILED) { |
1885 | $this->peg_reportedPos = $s0; |
1886 | $s1 = $this->peg_f38($s2); |
1887 | $s0 = $s1; |
1888 | } else { |
1889 | $this->peg_currPos = $s0; |
1890 | $s0 = $this->peg_FAILED; |
1891 | } |
1892 | } else { |
1893 | $this->peg_currPos = $s0; |
1894 | $s0 = $this->peg_FAILED; |
1895 | } |
1896 | } else { |
1897 | $this->peg_currPos = $s0; |
1898 | $s0 = $this->peg_FAILED; |
1899 | } |
1900 | if ($s0 === $this->peg_FAILED) { |
1901 | $s0 = $this->peg_currPos; |
1902 | $s1 = $this->peg_parseCURLY_OPEN(); |
1903 | if ($s1 !== $this->peg_FAILED) { |
1904 | $s2 = $this->peg_parsene_expr(); |
1905 | if ($s2 !== $this->peg_FAILED) { |
1906 | $s3 = $this->peg_parseFUN_INFIX(); |
1907 | if ($s3 !== $this->peg_FAILED) { |
1908 | $s4 = $this->peg_parsene_expr(); |
1909 | if ($s4 !== $this->peg_FAILED) { |
1910 | $s5 = $this->peg_parseCURLY_CLOSE(); |
1911 | if ($s5 !== $this->peg_FAILED) { |
1912 | $this->peg_reportedPos = $s0; |
1913 | $s1 = $this->peg_f39($s2, $s3, $s4); |
1914 | $s0 = $s1; |
1915 | } else { |
1916 | $this->peg_currPos = $s0; |
1917 | $s0 = $this->peg_FAILED; |
1918 | } |
1919 | } else { |
1920 | $this->peg_currPos = $s0; |
1921 | $s0 = $this->peg_FAILED; |
1922 | } |
1923 | } else { |
1924 | $this->peg_currPos = $s0; |
1925 | $s0 = $this->peg_FAILED; |
1926 | } |
1927 | } else { |
1928 | $this->peg_currPos = $s0; |
1929 | $s0 = $this->peg_FAILED; |
1930 | } |
1931 | } else { |
1932 | $this->peg_currPos = $s0; |
1933 | $s0 = $this->peg_FAILED; |
1934 | } |
1935 | if ($s0 === $this->peg_FAILED) { |
1936 | $s0 = $this->peg_currPos; |
1937 | $s1 = $this->peg_parseBEGIN_MATRIX(); |
1938 | if ($s1 !== $this->peg_FAILED) { |
1939 | $s2 = $this->peg_parsearray(); |
1940 | if ($s2 === $this->peg_FAILED) { |
1941 | $s2 = $this->peg_parsematrix(); |
1942 | } |
1943 | if ($s2 !== $this->peg_FAILED) { |
1944 | $s3 = $this->peg_parseEND_MATRIX(); |
1945 | if ($s3 !== $this->peg_FAILED) { |
1946 | $this->peg_reportedPos = $s0; |
1947 | $s1 = $this->peg_f40($s2); |
1948 | $s0 = $s1; |
1949 | } else { |
1950 | $this->peg_currPos = $s0; |
1951 | $s0 = $this->peg_FAILED; |
1952 | } |
1953 | } else { |
1954 | $this->peg_currPos = $s0; |
1955 | $s0 = $this->peg_FAILED; |
1956 | } |
1957 | } else { |
1958 | $this->peg_currPos = $s0; |
1959 | $s0 = $this->peg_FAILED; |
1960 | } |
1961 | if ($s0 === $this->peg_FAILED) { |
1962 | $s0 = $this->peg_currPos; |
1963 | $s1 = $this->peg_parseBEGIN_PMATRIX(); |
1964 | if ($s1 !== $this->peg_FAILED) { |
1965 | $s2 = $this->peg_parsearray(); |
1966 | if ($s2 === $this->peg_FAILED) { |
1967 | $s2 = $this->peg_parsematrix(); |
1968 | } |
1969 | if ($s2 !== $this->peg_FAILED) { |
1970 | $s3 = $this->peg_parseEND_PMATRIX(); |
1971 | if ($s3 !== $this->peg_FAILED) { |
1972 | $this->peg_reportedPos = $s0; |
1973 | $s1 = $this->peg_f41($s2); |
1974 | $s0 = $s1; |
1975 | } else { |
1976 | $this->peg_currPos = $s0; |
1977 | $s0 = $this->peg_FAILED; |
1978 | } |
1979 | } else { |
1980 | $this->peg_currPos = $s0; |
1981 | $s0 = $this->peg_FAILED; |
1982 | } |
1983 | } else { |
1984 | $this->peg_currPos = $s0; |
1985 | $s0 = $this->peg_FAILED; |
1986 | } |
1987 | if ($s0 === $this->peg_FAILED) { |
1988 | $s0 = $this->peg_currPos; |
1989 | $s1 = $this->peg_parseBEGIN_BMATRIX(); |
1990 | if ($s1 !== $this->peg_FAILED) { |
1991 | $s2 = $this->peg_parsearray(); |
1992 | if ($s2 === $this->peg_FAILED) { |
1993 | $s2 = $this->peg_parsematrix(); |
1994 | } |
1995 | if ($s2 !== $this->peg_FAILED) { |
1996 | $s3 = $this->peg_parseEND_BMATRIX(); |
1997 | if ($s3 !== $this->peg_FAILED) { |
1998 | $this->peg_reportedPos = $s0; |
1999 | $s1 = $this->peg_f42($s2); |
2000 | $s0 = $s1; |
2001 | } else { |
2002 | $this->peg_currPos = $s0; |
2003 | $s0 = $this->peg_FAILED; |
2004 | } |
2005 | } else { |
2006 | $this->peg_currPos = $s0; |
2007 | $s0 = $this->peg_FAILED; |
2008 | } |
2009 | } else { |
2010 | $this->peg_currPos = $s0; |
2011 | $s0 = $this->peg_FAILED; |
2012 | } |
2013 | if ($s0 === $this->peg_FAILED) { |
2014 | $s0 = $this->peg_currPos; |
2015 | $s1 = $this->peg_parseBEGIN_BBMATRIX(); |
2016 | if ($s1 !== $this->peg_FAILED) { |
2017 | $s2 = $this->peg_parsearray(); |
2018 | if ($s2 === $this->peg_FAILED) { |
2019 | $s2 = $this->peg_parsematrix(); |
2020 | } |
2021 | if ($s2 !== $this->peg_FAILED) { |
2022 | $s3 = $this->peg_parseEND_BBMATRIX(); |
2023 | if ($s3 !== $this->peg_FAILED) { |
2024 | $this->peg_reportedPos = $s0; |
2025 | $s1 = $this->peg_f43($s2); |
2026 | $s0 = $s1; |
2027 | } else { |
2028 | $this->peg_currPos = $s0; |
2029 | $s0 = $this->peg_FAILED; |
2030 | } |
2031 | } else { |
2032 | $this->peg_currPos = $s0; |
2033 | $s0 = $this->peg_FAILED; |
2034 | } |
2035 | } else { |
2036 | $this->peg_currPos = $s0; |
2037 | $s0 = $this->peg_FAILED; |
2038 | } |
2039 | if ($s0 === $this->peg_FAILED) { |
2040 | $s0 = $this->peg_currPos; |
2041 | $s1 = $this->peg_parseBEGIN_VMATRIX(); |
2042 | if ($s1 !== $this->peg_FAILED) { |
2043 | $s2 = $this->peg_parsearray(); |
2044 | if ($s2 === $this->peg_FAILED) { |
2045 | $s2 = $this->peg_parsematrix(); |
2046 | } |
2047 | if ($s2 !== $this->peg_FAILED) { |
2048 | $s3 = $this->peg_parseEND_VMATRIX(); |
2049 | if ($s3 !== $this->peg_FAILED) { |
2050 | $this->peg_reportedPos = $s0; |
2051 | $s1 = $this->peg_f44($s2); |
2052 | $s0 = $s1; |
2053 | } else { |
2054 | $this->peg_currPos = $s0; |
2055 | $s0 = $this->peg_FAILED; |
2056 | } |
2057 | } else { |
2058 | $this->peg_currPos = $s0; |
2059 | $s0 = $this->peg_FAILED; |
2060 | } |
2061 | } else { |
2062 | $this->peg_currPos = $s0; |
2063 | $s0 = $this->peg_FAILED; |
2064 | } |
2065 | if ($s0 === $this->peg_FAILED) { |
2066 | $s0 = $this->peg_currPos; |
2067 | $s1 = $this->peg_parseBEGIN_VVMATRIX(); |
2068 | if ($s1 !== $this->peg_FAILED) { |
2069 | $s2 = $this->peg_parsearray(); |
2070 | if ($s2 === $this->peg_FAILED) { |
2071 | $s2 = $this->peg_parsematrix(); |
2072 | } |
2073 | if ($s2 !== $this->peg_FAILED) { |
2074 | $s3 = $this->peg_parseEND_VVMATRIX(); |
2075 | if ($s3 !== $this->peg_FAILED) { |
2076 | $this->peg_reportedPos = $s0; |
2077 | $s1 = $this->peg_f45($s2); |
2078 | $s0 = $s1; |
2079 | } else { |
2080 | $this->peg_currPos = $s0; |
2081 | $s0 = $this->peg_FAILED; |
2082 | } |
2083 | } else { |
2084 | $this->peg_currPos = $s0; |
2085 | $s0 = $this->peg_FAILED; |
2086 | } |
2087 | } else { |
2088 | $this->peg_currPos = $s0; |
2089 | $s0 = $this->peg_FAILED; |
2090 | } |
2091 | if ($s0 === $this->peg_FAILED) { |
2092 | $s0 = $this->peg_currPos; |
2093 | $s1 = $this->peg_parseBEGIN_ARRAY(); |
2094 | if ($s1 !== $this->peg_FAILED) { |
2095 | $s2 = $this->peg_parseopt_pos(); |
2096 | if ($s2 !== $this->peg_FAILED) { |
2097 | $s3 = $this->peg_parsearray(); |
2098 | if ($s3 !== $this->peg_FAILED) { |
2099 | $s4 = $this->peg_parseEND_ARRAY(); |
2100 | if ($s4 !== $this->peg_FAILED) { |
2101 | $this->peg_reportedPos = $s0; |
2102 | $s1 = $this->peg_f46($s3); |
2103 | $s0 = $s1; |
2104 | } else { |
2105 | $this->peg_currPos = $s0; |
2106 | $s0 = $this->peg_FAILED; |
2107 | } |
2108 | } else { |
2109 | $this->peg_currPos = $s0; |
2110 | $s0 = $this->peg_FAILED; |
2111 | } |
2112 | } else { |
2113 | $this->peg_currPos = $s0; |
2114 | $s0 = $this->peg_FAILED; |
2115 | } |
2116 | } else { |
2117 | $this->peg_currPos = $s0; |
2118 | $s0 = $this->peg_FAILED; |
2119 | } |
2120 | if ($s0 === $this->peg_FAILED) { |
2121 | $s0 = $this->peg_currPos; |
2122 | $s1 = $this->peg_parseBEGIN_ALIGN(); |
2123 | if ($s1 !== $this->peg_FAILED) { |
2124 | $s2 = $this->peg_parseopt_pos(); |
2125 | if ($s2 !== $this->peg_FAILED) { |
2126 | $s3 = $this->peg_parsematrix(); |
2127 | if ($s3 !== $this->peg_FAILED) { |
2128 | $s4 = $this->peg_parseEND_ALIGN(); |
2129 | if ($s4 !== $this->peg_FAILED) { |
2130 | $this->peg_reportedPos = $s0; |
2131 | $s1 = $this->peg_f47($s3); |
2132 | $s0 = $s1; |
2133 | } else { |
2134 | $this->peg_currPos = $s0; |
2135 | $s0 = $this->peg_FAILED; |
2136 | } |
2137 | } else { |
2138 | $this->peg_currPos = $s0; |
2139 | $s0 = $this->peg_FAILED; |
2140 | } |
2141 | } else { |
2142 | $this->peg_currPos = $s0; |
2143 | $s0 = $this->peg_FAILED; |
2144 | } |
2145 | } else { |
2146 | $this->peg_currPos = $s0; |
2147 | $s0 = $this->peg_FAILED; |
2148 | } |
2149 | if ($s0 === $this->peg_FAILED) { |
2150 | $s0 = $this->peg_currPos; |
2151 | $s1 = $this->peg_parseBEGIN_ALIGNED(); |
2152 | if ($s1 !== $this->peg_FAILED) { |
2153 | $s2 = $this->peg_parseopt_pos(); |
2154 | if ($s2 !== $this->peg_FAILED) { |
2155 | $s3 = $this->peg_parsematrix(); |
2156 | if ($s3 !== $this->peg_FAILED) { |
2157 | $s4 = $this->peg_parseEND_ALIGNED(); |
2158 | if ($s4 !== $this->peg_FAILED) { |
2159 | $this->peg_reportedPos = $s0; |
2160 | $s1 = $this->peg_f47($s3); |
2161 | $s0 = $s1; |
2162 | } else { |
2163 | $this->peg_currPos = $s0; |
2164 | $s0 = $this->peg_FAILED; |
2165 | } |
2166 | } else { |
2167 | $this->peg_currPos = $s0; |
2168 | $s0 = $this->peg_FAILED; |
2169 | } |
2170 | } else { |
2171 | $this->peg_currPos = $s0; |
2172 | $s0 = $this->peg_FAILED; |
2173 | } |
2174 | } else { |
2175 | $this->peg_currPos = $s0; |
2176 | $s0 = $this->peg_FAILED; |
2177 | } |
2178 | if ($s0 === $this->peg_FAILED) { |
2179 | $s0 = $this->peg_currPos; |
2180 | $s1 = $this->peg_parseBEGIN_ALIGNAT(); |
2181 | if ($s1 !== $this->peg_FAILED) { |
2182 | $s2 = $this->peg_parsealignat(); |
2183 | if ($s2 !== $this->peg_FAILED) { |
2184 | $s3 = $this->peg_parseEND_ALIGNAT(); |
2185 | if ($s3 !== $this->peg_FAILED) { |
2186 | $this->peg_reportedPos = $s0; |
2187 | $s1 = $this->peg_f48($s2); |
2188 | $s0 = $s1; |
2189 | } else { |
2190 | $this->peg_currPos = $s0; |
2191 | $s0 = $this->peg_FAILED; |
2192 | } |
2193 | } else { |
2194 | $this->peg_currPos = $s0; |
2195 | $s0 = $this->peg_FAILED; |
2196 | } |
2197 | } else { |
2198 | $this->peg_currPos = $s0; |
2199 | $s0 = $this->peg_FAILED; |
2200 | } |
2201 | if ($s0 === $this->peg_FAILED) { |
2202 | $s0 = $this->peg_currPos; |
2203 | $s1 = $this->peg_parseBEGIN_ALIGNEDAT(); |
2204 | if ($s1 !== $this->peg_FAILED) { |
2205 | $s2 = $this->peg_parsealignat(); |
2206 | if ($s2 !== $this->peg_FAILED) { |
2207 | $s3 = $this->peg_parseEND_ALIGNEDAT(); |
2208 | if ($s3 !== $this->peg_FAILED) { |
2209 | $this->peg_reportedPos = $s0; |
2210 | $s1 = $this->peg_f48($s2); |
2211 | $s0 = $s1; |
2212 | } else { |
2213 | $this->peg_currPos = $s0; |
2214 | $s0 = $this->peg_FAILED; |
2215 | } |
2216 | } else { |
2217 | $this->peg_currPos = $s0; |
2218 | $s0 = $this->peg_FAILED; |
2219 | } |
2220 | } else { |
2221 | $this->peg_currPos = $s0; |
2222 | $s0 = $this->peg_FAILED; |
2223 | } |
2224 | if ($s0 === $this->peg_FAILED) { |
2225 | $s0 = $this->peg_currPos; |
2226 | $s1 = $this->peg_parseBEGIN_SMALLMATRIX(); |
2227 | if ($s1 !== $this->peg_FAILED) { |
2228 | $s2 = $this->peg_parsearray(); |
2229 | if ($s2 === $this->peg_FAILED) { |
2230 | $s2 = $this->peg_parsematrix(); |
2231 | } |
2232 | if ($s2 !== $this->peg_FAILED) { |
2233 | $s3 = $this->peg_parseEND_SMALLMATRIX(); |
2234 | if ($s3 !== $this->peg_FAILED) { |
2235 | $this->peg_reportedPos = $s0; |
2236 | $s1 = $this->peg_f49($s2); |
2237 | $s0 = $s1; |
2238 | } else { |
2239 | $this->peg_currPos = $s0; |
2240 | $s0 = $this->peg_FAILED; |
2241 | } |
2242 | } else { |
2243 | $this->peg_currPos = $s0; |
2244 | $s0 = $this->peg_FAILED; |
2245 | } |
2246 | } else { |
2247 | $this->peg_currPos = $s0; |
2248 | $s0 = $this->peg_FAILED; |
2249 | } |
2250 | if ($s0 === $this->peg_FAILED) { |
2251 | $s0 = $this->peg_currPos; |
2252 | $s1 = $this->peg_parseBEGIN_CASES(); |
2253 | if ($s1 !== $this->peg_FAILED) { |
2254 | $s2 = $this->peg_parsematrix(); |
2255 | if ($s2 !== $this->peg_FAILED) { |
2256 | $s3 = $this->peg_parseEND_CASES(); |
2257 | if ($s3 !== $this->peg_FAILED) { |
2258 | $this->peg_reportedPos = $s0; |
2259 | $s1 = $this->peg_f50($s2); |
2260 | $s0 = $s1; |
2261 | } else { |
2262 | $this->peg_currPos = $s0; |
2263 | $s0 = $this->peg_FAILED; |
2264 | } |
2265 | } else { |
2266 | $this->peg_currPos = $s0; |
2267 | $s0 = $this->peg_FAILED; |
2268 | } |
2269 | } else { |
2270 | $this->peg_currPos = $s0; |
2271 | $s0 = $this->peg_FAILED; |
2272 | } |
2273 | if ($s0 === $this->peg_FAILED) { |
2274 | $s0 = $this->peg_currPos; |
2275 | if ($this->input_substr($this->peg_currPos, 7) === $this->peg_c9) { |
2276 | $s1 = $this->peg_c9; |
2277 | $this->peg_currPos += 7; |
2278 | } else { |
2279 | $s1 = $this->peg_FAILED; |
2280 | if ($this->peg_silentFails === 0) { |
2281 | $this->peg_fail($this->peg_c10); |
2282 | } |
2283 | } |
2284 | if ($s1 !== $this->peg_FAILED) { |
2285 | $s2 = array(); |
2286 | $s3 = $this->peg_parsealpha(); |
2287 | if ($s3 !== $this->peg_FAILED) { |
2288 | while ($s3 !== $this->peg_FAILED) { |
2289 | $s2[] = $s3; |
2290 | $s3 = $this->peg_parsealpha(); |
2291 | } |
2292 | } else { |
2293 | $s2 = $this->peg_FAILED; |
2294 | } |
2295 | if ($s2 !== $this->peg_FAILED) { |
2296 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c11) { |
2297 | $s3 = $this->peg_c11; |
2298 | $this->peg_currPos++; |
2299 | } else { |
2300 | $s3 = $this->peg_FAILED; |
2301 | if ($this->peg_silentFails === 0) { |
2302 | $this->peg_fail($this->peg_c12); |
2303 | } |
2304 | } |
2305 | if ($s3 !== $this->peg_FAILED) { |
2306 | $this->peg_reportedPos = $s0; |
2307 | $s1 = $this->peg_f51(); |
2308 | $s0 = $s1; |
2309 | } else { |
2310 | $this->peg_currPos = $s0; |
2311 | $s0 = $this->peg_FAILED; |
2312 | } |
2313 | } else { |
2314 | $this->peg_currPos = $s0; |
2315 | $s0 = $this->peg_FAILED; |
2316 | } |
2317 | } else { |
2318 | $this->peg_currPos = $s0; |
2319 | $s0 = $this->peg_FAILED; |
2320 | } |
2321 | if ($s0 === $this->peg_FAILED) { |
2322 | $s0 = $this->peg_currPos; |
2323 | $s1 = $this->peg_parsegeneric_func(); |
2324 | if ($s1 !== $this->peg_FAILED) { |
2325 | $this->peg_reportedPos = $this->peg_currPos; |
2326 | $s2 = $this->peg_f52($s1); |
2327 | if ($s2) { |
2328 | $s2 = null; |
2329 | } else { |
2330 | $s2 = $this->peg_FAILED; |
2331 | } |
2332 | if ($s2 !== $this->peg_FAILED) { |
2333 | $this->peg_reportedPos = $s0; |
2334 | $s1 = $this->peg_f53($s1); |
2335 | $s0 = $s1; |
2336 | } else { |
2337 | $this->peg_currPos = $s0; |
2338 | $s0 = $this->peg_FAILED; |
2339 | } |
2340 | } else { |
2341 | $this->peg_currPos = $s0; |
2342 | $s0 = $this->peg_FAILED; |
2343 | } |
2344 | } |
2345 | } |
2346 | } |
2347 | } |
2348 | } |
2349 | } |
2350 | } |
2351 | } |
2352 | } |
2353 | } |
2354 | } |
2355 | } |
2356 | } |
2357 | } |
2358 | } |
2359 | } |
2360 | } |
2361 | } |
2362 | } |
2363 | } |
2364 | } |
2365 | } |
2366 | } |
2367 | } |
2368 | } |
2369 | } |
2370 | } |
2371 | } |
2372 | } |
2373 | } |
2374 | } |
2375 | } |
2376 | } |
2377 | |
2378 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
2379 | |
2380 | return $s0; |
2381 | } |
2382 | |
2383 | private function peg_parsearray() { |
2384 | |
2385 | $key = $this->peg_currPos * 130 + 20; |
2386 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
2387 | |
2388 | if ($cached) { |
2389 | $this->peg_currPos = $cached["nextPos"]; |
2390 | return $cached["result"]; |
2391 | } |
2392 | |
2393 | $s0 = $this->peg_currPos; |
2394 | $s1 = $this->peg_parsecolumn_spec(); |
2395 | if ($s1 !== $this->peg_FAILED) { |
2396 | $s2 = $this->peg_parsematrix(); |
2397 | if ($s2 !== $this->peg_FAILED) { |
2398 | $this->peg_reportedPos = $s0; |
2399 | $s1 = $this->peg_f54($s1, $s2); |
2400 | $s0 = $s1; |
2401 | } else { |
2402 | $this->peg_currPos = $s0; |
2403 | $s0 = $this->peg_FAILED; |
2404 | } |
2405 | } else { |
2406 | $this->peg_currPos = $s0; |
2407 | $s0 = $this->peg_FAILED; |
2408 | } |
2409 | |
2410 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
2411 | |
2412 | return $s0; |
2413 | } |
2414 | |
2415 | private function peg_parsealignat() { |
2416 | |
2417 | $key = $this->peg_currPos * 130 + 21; |
2418 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
2419 | |
2420 | if ($cached) { |
2421 | $this->peg_currPos = $cached["nextPos"]; |
2422 | return $cached["result"]; |
2423 | } |
2424 | |
2425 | $s0 = $this->peg_currPos; |
2426 | $s1 = $this->peg_parsealignat_spec(); |
2427 | if ($s1 !== $this->peg_FAILED) { |
2428 | $s2 = $this->peg_parsematrix(); |
2429 | if ($s2 !== $this->peg_FAILED) { |
2430 | $this->peg_reportedPos = $s0; |
2431 | $s1 = $this->peg_f55($s1, $s2); |
2432 | $s0 = $s1; |
2433 | } else { |
2434 | $this->peg_currPos = $s0; |
2435 | $s0 = $this->peg_FAILED; |
2436 | } |
2437 | } else { |
2438 | $this->peg_currPos = $s0; |
2439 | $s0 = $this->peg_FAILED; |
2440 | } |
2441 | |
2442 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
2443 | |
2444 | return $s0; |
2445 | } |
2446 | |
2447 | private function peg_parsematrix() { |
2448 | |
2449 | $key = $this->peg_currPos * 130 + 22; |
2450 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
2451 | |
2452 | if ($cached) { |
2453 | $this->peg_currPos = $cached["nextPos"]; |
2454 | return $cached["result"]; |
2455 | } |
2456 | |
2457 | $s0 = $this->peg_currPos; |
2458 | $s1 = $this->peg_parseline_start(); |
2459 | if ($s1 !== $this->peg_FAILED) { |
2460 | $s2 = $this->peg_currPos; |
2461 | $s3 = $this->peg_parseNEXT_ROW(); |
2462 | if ($s3 !== $this->peg_FAILED) { |
2463 | $s4 = $this->peg_parsematrix(); |
2464 | if ($s4 !== $this->peg_FAILED) { |
2465 | $this->peg_reportedPos = $s2; |
2466 | $s3 = $this->peg_f56($s1, $s3, $s4); |
2467 | $s2 = $s3; |
2468 | } else { |
2469 | $this->peg_currPos = $s2; |
2470 | $s2 = $this->peg_FAILED; |
2471 | } |
2472 | } else { |
2473 | $this->peg_currPos = $s2; |
2474 | $s2 = $this->peg_FAILED; |
2475 | } |
2476 | if ($s2 === $this->peg_FAILED) { |
2477 | $s2 = null; |
2478 | } |
2479 | if ($s2 !== $this->peg_FAILED) { |
2480 | $this->peg_reportedPos = $s0; |
2481 | $s1 = $this->peg_f57($s1, $s2); |
2482 | $s0 = $s1; |
2483 | } else { |
2484 | $this->peg_currPos = $s0; |
2485 | $s0 = $this->peg_FAILED; |
2486 | } |
2487 | } else { |
2488 | $this->peg_currPos = $s0; |
2489 | $s0 = $this->peg_FAILED; |
2490 | } |
2491 | |
2492 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
2493 | |
2494 | return $s0; |
2495 | } |
2496 | |
2497 | private function peg_parseline_start() { |
2498 | |
2499 | $key = $this->peg_currPos * 130 + 23; |
2500 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
2501 | |
2502 | if ($cached) { |
2503 | $this->peg_currPos = $cached["nextPos"]; |
2504 | return $cached["result"]; |
2505 | } |
2506 | |
2507 | $s0 = $this->peg_currPos; |
2508 | $s1 = $this->peg_parseHLINE(); |
2509 | if ($s1 !== $this->peg_FAILED) { |
2510 | $s2 = $this->peg_parseline_start(); |
2511 | if ($s2 !== $this->peg_FAILED) { |
2512 | $this->peg_reportedPos = $s0; |
2513 | $s1 = $this->peg_f58($s1, $s2); |
2514 | $s0 = $s1; |
2515 | } else { |
2516 | $this->peg_currPos = $s0; |
2517 | $s0 = $this->peg_FAILED; |
2518 | } |
2519 | } else { |
2520 | $this->peg_currPos = $s0; |
2521 | $s0 = $this->peg_FAILED; |
2522 | } |
2523 | if ($s0 === $this->peg_FAILED) { |
2524 | $s0 = $this->peg_parseline(); |
2525 | } |
2526 | |
2527 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
2528 | |
2529 | return $s0; |
2530 | } |
2531 | |
2532 | private function peg_parseline() { |
2533 | |
2534 | $key = $this->peg_currPos * 130 + 24; |
2535 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
2536 | |
2537 | if ($cached) { |
2538 | $this->peg_currPos = $cached["nextPos"]; |
2539 | return $cached["result"]; |
2540 | } |
2541 | |
2542 | $s0 = $this->peg_currPos; |
2543 | $s1 = $this->peg_parseexpr(); |
2544 | if ($s1 !== $this->peg_FAILED) { |
2545 | $s2 = $this->peg_currPos; |
2546 | $s3 = $this->peg_parseNEXT_CELL(); |
2547 | if ($s3 !== $this->peg_FAILED) { |
2548 | $s4 = $this->peg_parseline(); |
2549 | if ($s4 !== $this->peg_FAILED) { |
2550 | $this->peg_reportedPos = $s2; |
2551 | $s3 = $this->peg_f59($s1, $s4); |
2552 | $s2 = $s3; |
2553 | } else { |
2554 | $this->peg_currPos = $s2; |
2555 | $s2 = $this->peg_FAILED; |
2556 | } |
2557 | } else { |
2558 | $this->peg_currPos = $s2; |
2559 | $s2 = $this->peg_FAILED; |
2560 | } |
2561 | if ($s2 === $this->peg_FAILED) { |
2562 | $s2 = null; |
2563 | } |
2564 | if ($s2 !== $this->peg_FAILED) { |
2565 | $this->peg_reportedPos = $s0; |
2566 | $s1 = $this->peg_f60($s1, $s2); |
2567 | $s0 = $s1; |
2568 | } else { |
2569 | $this->peg_currPos = $s0; |
2570 | $s0 = $this->peg_FAILED; |
2571 | } |
2572 | } else { |
2573 | $this->peg_currPos = $s0; |
2574 | $s0 = $this->peg_FAILED; |
2575 | } |
2576 | |
2577 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
2578 | |
2579 | return $s0; |
2580 | } |
2581 | |
2582 | private function peg_parsecolumn_spec() { |
2583 | |
2584 | $key = $this->peg_currPos * 130 + 25; |
2585 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
2586 | |
2587 | if ($cached) { |
2588 | $this->peg_currPos = $cached["nextPos"]; |
2589 | return $cached["result"]; |
2590 | } |
2591 | |
2592 | $s0 = $this->peg_currPos; |
2593 | $s1 = $this->peg_parseCURLY_OPEN(); |
2594 | if ($s1 !== $this->peg_FAILED) { |
2595 | $s2 = $this->peg_currPos; |
2596 | $s3 = array(); |
2597 | $s4 = $this->peg_parseone_col(); |
2598 | if ($s4 !== $this->peg_FAILED) { |
2599 | while ($s4 !== $this->peg_FAILED) { |
2600 | $s3[] = $s4; |
2601 | $s4 = $this->peg_parseone_col(); |
2602 | } |
2603 | } else { |
2604 | $s3 = $this->peg_FAILED; |
2605 | } |
2606 | if ($s3 !== $this->peg_FAILED) { |
2607 | $this->peg_reportedPos = $s2; |
2608 | $s3 = $this->peg_f61(); |
2609 | } |
2610 | $s2 = $s3; |
2611 | if ($s2 !== $this->peg_FAILED) { |
2612 | $s3 = $this->peg_parseCURLY_CLOSE(); |
2613 | if ($s3 !== $this->peg_FAILED) { |
2614 | $this->peg_reportedPos = $s0; |
2615 | $s1 = $this->peg_f62($s2); |
2616 | $s0 = $s1; |
2617 | } else { |
2618 | $this->peg_currPos = $s0; |
2619 | $s0 = $this->peg_FAILED; |
2620 | } |
2621 | } else { |
2622 | $this->peg_currPos = $s0; |
2623 | $s0 = $this->peg_FAILED; |
2624 | } |
2625 | } else { |
2626 | $this->peg_currPos = $s0; |
2627 | $s0 = $this->peg_FAILED; |
2628 | } |
2629 | |
2630 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
2631 | |
2632 | return $s0; |
2633 | } |
2634 | |
2635 | private function peg_parseone_col() { |
2636 | |
2637 | $key = $this->peg_currPos * 130 + 26; |
2638 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
2639 | |
2640 | if ($cached) { |
2641 | $this->peg_currPos = $cached["nextPos"]; |
2642 | return $cached["result"]; |
2643 | } |
2644 | |
2645 | $s0 = $this->peg_currPos; |
2646 | if (peg_regex_test($this->peg_c13, $this->input_substr($this->peg_currPos, 1))) { |
2647 | $s1 = $this->input_substr($this->peg_currPos, 1); |
2648 | $this->peg_currPos++; |
2649 | } else { |
2650 | $s1 = $this->peg_FAILED; |
2651 | if ($this->peg_silentFails === 0) { |
2652 | $this->peg_fail($this->peg_c14); |
2653 | } |
2654 | } |
2655 | if ($s1 !== $this->peg_FAILED) { |
2656 | $s2 = $this->peg_parse_(); |
2657 | if ($s2 !== $this->peg_FAILED) { |
2658 | $s1 = array($s1, $s2); |
2659 | $s0 = $s1; |
2660 | } else { |
2661 | $this->peg_currPos = $s0; |
2662 | $s0 = $this->peg_FAILED; |
2663 | } |
2664 | } else { |
2665 | $this->peg_currPos = $s0; |
2666 | $s0 = $this->peg_FAILED; |
2667 | } |
2668 | if ($s0 === $this->peg_FAILED) { |
2669 | $s0 = $this->peg_currPos; |
2670 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c15) { |
2671 | $s1 = $this->peg_c15; |
2672 | $this->peg_currPos++; |
2673 | } else { |
2674 | $s1 = $this->peg_FAILED; |
2675 | if ($this->peg_silentFails === 0) { |
2676 | $this->peg_fail($this->peg_c16); |
2677 | } |
2678 | } |
2679 | if ($s1 !== $this->peg_FAILED) { |
2680 | $s2 = $this->peg_parseCURLY_OPEN(); |
2681 | if ($s2 !== $this->peg_FAILED) { |
2682 | $s3 = array(); |
2683 | $s4 = $this->peg_parseboxchars(); |
2684 | if ($s4 !== $this->peg_FAILED) { |
2685 | while ($s4 !== $this->peg_FAILED) { |
2686 | $s3[] = $s4; |
2687 | $s4 = $this->peg_parseboxchars(); |
2688 | } |
2689 | } else { |
2690 | $s3 = $this->peg_FAILED; |
2691 | } |
2692 | if ($s3 !== $this->peg_FAILED) { |
2693 | $s4 = $this->peg_parseCURLY_CLOSE(); |
2694 | if ($s4 !== $this->peg_FAILED) { |
2695 | $s1 = array($s1, $s2, $s3, $s4); |
2696 | $s0 = $s1; |
2697 | } else { |
2698 | $this->peg_currPos = $s0; |
2699 | $s0 = $this->peg_FAILED; |
2700 | } |
2701 | } else { |
2702 | $this->peg_currPos = $s0; |
2703 | $s0 = $this->peg_FAILED; |
2704 | } |
2705 | } else { |
2706 | $this->peg_currPos = $s0; |
2707 | $s0 = $this->peg_FAILED; |
2708 | } |
2709 | } else { |
2710 | $this->peg_currPos = $s0; |
2711 | $s0 = $this->peg_FAILED; |
2712 | } |
2713 | if ($s0 === $this->peg_FAILED) { |
2714 | $s0 = $this->peg_currPos; |
2715 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c17) { |
2716 | $s1 = $this->peg_c17; |
2717 | $this->peg_currPos++; |
2718 | } else { |
2719 | $s1 = $this->peg_FAILED; |
2720 | if ($this->peg_silentFails === 0) { |
2721 | $this->peg_fail($this->peg_c18); |
2722 | } |
2723 | } |
2724 | if ($s1 !== $this->peg_FAILED) { |
2725 | $s2 = $this->peg_parseCURLY_OPEN(); |
2726 | if ($s2 !== $this->peg_FAILED) { |
2727 | $s3 = array(); |
2728 | if (peg_regex_test($this->peg_c19, $this->input_substr($this->peg_currPos, 1))) { |
2729 | $s4 = $this->input_substr($this->peg_currPos, 1); |
2730 | $this->peg_currPos++; |
2731 | } else { |
2732 | $s4 = $this->peg_FAILED; |
2733 | if ($this->peg_silentFails === 0) { |
2734 | $this->peg_fail($this->peg_c20); |
2735 | } |
2736 | } |
2737 | if ($s4 !== $this->peg_FAILED) { |
2738 | while ($s4 !== $this->peg_FAILED) { |
2739 | $s3[] = $s4; |
2740 | if (peg_regex_test($this->peg_c19, $this->input_substr($this->peg_currPos, 1))) { |
2741 | $s4 = $this->input_substr($this->peg_currPos, 1); |
2742 | $this->peg_currPos++; |
2743 | } else { |
2744 | $s4 = $this->peg_FAILED; |
2745 | if ($this->peg_silentFails === 0) { |
2746 | $this->peg_fail($this->peg_c20); |
2747 | } |
2748 | } |
2749 | } |
2750 | } else { |
2751 | $s3 = $this->peg_FAILED; |
2752 | } |
2753 | if ($s3 !== $this->peg_FAILED) { |
2754 | $s4 = $this->peg_parse_(); |
2755 | if ($s4 !== $this->peg_FAILED) { |
2756 | $s5 = $this->peg_parseCURLY_CLOSE(); |
2757 | if ($s5 !== $this->peg_FAILED) { |
2758 | $s6 = $this->peg_parseone_col(); |
2759 | if ($s6 === $this->peg_FAILED) { |
2760 | $s6 = $this->peg_currPos; |
2761 | $s7 = $this->peg_parseCURLY_OPEN(); |
2762 | if ($s7 !== $this->peg_FAILED) { |
2763 | $s8 = array(); |
2764 | $s9 = $this->peg_parseone_col(); |
2765 | if ($s9 !== $this->peg_FAILED) { |
2766 | while ($s9 !== $this->peg_FAILED) { |
2767 | $s8[] = $s9; |
2768 | $s9 = $this->peg_parseone_col(); |
2769 | } |
2770 | } else { |
2771 | $s8 = $this->peg_FAILED; |
2772 | } |
2773 | if ($s8 !== $this->peg_FAILED) { |
2774 | $s9 = $this->peg_parseCURLY_CLOSE(); |
2775 | if ($s9 !== $this->peg_FAILED) { |
2776 | $s7 = array($s7, $s8, $s9); |
2777 | $s6 = $s7; |
2778 | } else { |
2779 | $this->peg_currPos = $s6; |
2780 | $s6 = $this->peg_FAILED; |
2781 | } |
2782 | } else { |
2783 | $this->peg_currPos = $s6; |
2784 | $s6 = $this->peg_FAILED; |
2785 | } |
2786 | } else { |
2787 | $this->peg_currPos = $s6; |
2788 | $s6 = $this->peg_FAILED; |
2789 | } |
2790 | } |
2791 | if ($s6 !== $this->peg_FAILED) { |
2792 | $s1 = array($s1, $s2, $s3, $s4, $s5, $s6); |
2793 | $s0 = $s1; |
2794 | } else { |
2795 | $this->peg_currPos = $s0; |
2796 | $s0 = $this->peg_FAILED; |
2797 | } |
2798 | } else { |
2799 | $this->peg_currPos = $s0; |
2800 | $s0 = $this->peg_FAILED; |
2801 | } |
2802 | } else { |
2803 | $this->peg_currPos = $s0; |
2804 | $s0 = $this->peg_FAILED; |
2805 | } |
2806 | } else { |
2807 | $this->peg_currPos = $s0; |
2808 | $s0 = $this->peg_FAILED; |
2809 | } |
2810 | } else { |
2811 | $this->peg_currPos = $s0; |
2812 | $s0 = $this->peg_FAILED; |
2813 | } |
2814 | } else { |
2815 | $this->peg_currPos = $s0; |
2816 | $s0 = $this->peg_FAILED; |
2817 | } |
2818 | if ($s0 === $this->peg_FAILED) { |
2819 | $s0 = $this->peg_currPos; |
2820 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c21) { |
2821 | $s1 = $this->peg_c21; |
2822 | $this->peg_currPos += 2; |
2823 | } else { |
2824 | $s1 = $this->peg_FAILED; |
2825 | if ($this->peg_silentFails === 0) { |
2826 | $this->peg_fail($this->peg_c22); |
2827 | } |
2828 | } |
2829 | if ($s1 !== $this->peg_FAILED) { |
2830 | $s2 = $this->peg_parse_(); |
2831 | if ($s2 !== $this->peg_FAILED) { |
2832 | $s1 = array($s1, $s2); |
2833 | $s0 = $s1; |
2834 | } else { |
2835 | $this->peg_currPos = $s0; |
2836 | $s0 = $this->peg_FAILED; |
2837 | } |
2838 | } else { |
2839 | $this->peg_currPos = $s0; |
2840 | $s0 = $this->peg_FAILED; |
2841 | } |
2842 | if ($s0 === $this->peg_FAILED) { |
2843 | $s0 = $this->peg_currPos; |
2844 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c23) { |
2845 | $s1 = $this->peg_c23; |
2846 | $this->peg_currPos++; |
2847 | } else { |
2848 | $s1 = $this->peg_FAILED; |
2849 | if ($this->peg_silentFails === 0) { |
2850 | $this->peg_fail($this->peg_c24); |
2851 | } |
2852 | } |
2853 | if ($s1 !== $this->peg_FAILED) { |
2854 | $s2 = $this->peg_parse_(); |
2855 | if ($s2 !== $this->peg_FAILED) { |
2856 | $s1 = array($s1, $s2); |
2857 | $s0 = $s1; |
2858 | } else { |
2859 | $this->peg_currPos = $s0; |
2860 | $s0 = $this->peg_FAILED; |
2861 | } |
2862 | } else { |
2863 | $this->peg_currPos = $s0; |
2864 | $s0 = $this->peg_FAILED; |
2865 | } |
2866 | if ($s0 === $this->peg_FAILED) { |
2867 | $s0 = $this->peg_currPos; |
2868 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c25) { |
2869 | $s1 = $this->peg_c25; |
2870 | $this->peg_currPos++; |
2871 | } else { |
2872 | $s1 = $this->peg_FAILED; |
2873 | if ($this->peg_silentFails === 0) { |
2874 | $this->peg_fail($this->peg_c26); |
2875 | } |
2876 | } |
2877 | if ($s1 !== $this->peg_FAILED) { |
2878 | $s2 = $this->peg_parse_(); |
2879 | if ($s2 !== $this->peg_FAILED) { |
2880 | $s3 = $this->peg_parseCURLY_OPEN(); |
2881 | if ($s3 !== $this->peg_FAILED) { |
2882 | $s4 = array(); |
2883 | $s5 = $this->peg_parseboxchars(); |
2884 | if ($s5 !== $this->peg_FAILED) { |
2885 | while ($s5 !== $this->peg_FAILED) { |
2886 | $s4[] = $s5; |
2887 | $s5 = $this->peg_parseboxchars(); |
2888 | } |
2889 | } else { |
2890 | $s4 = $this->peg_FAILED; |
2891 | } |
2892 | if ($s4 !== $this->peg_FAILED) { |
2893 | $s5 = $this->peg_parseCURLY_CLOSE(); |
2894 | if ($s5 !== $this->peg_FAILED) { |
2895 | $s1 = array($s1, $s2, $s3, $s4, $s5); |
2896 | $s0 = $s1; |
2897 | } else { |
2898 | $this->peg_currPos = $s0; |
2899 | $s0 = $this->peg_FAILED; |
2900 | } |
2901 | } else { |
2902 | $this->peg_currPos = $s0; |
2903 | $s0 = $this->peg_FAILED; |
2904 | } |
2905 | } else { |
2906 | $this->peg_currPos = $s0; |
2907 | $s0 = $this->peg_FAILED; |
2908 | } |
2909 | } else { |
2910 | $this->peg_currPos = $s0; |
2911 | $s0 = $this->peg_FAILED; |
2912 | } |
2913 | } else { |
2914 | $this->peg_currPos = $s0; |
2915 | $s0 = $this->peg_FAILED; |
2916 | } |
2917 | } |
2918 | } |
2919 | } |
2920 | } |
2921 | } |
2922 | |
2923 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
2924 | |
2925 | return $s0; |
2926 | } |
2927 | |
2928 | private function peg_parsealignat_spec() { |
2929 | |
2930 | $key = $this->peg_currPos * 130 + 27; |
2931 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
2932 | |
2933 | if ($cached) { |
2934 | $this->peg_currPos = $cached["nextPos"]; |
2935 | return $cached["result"]; |
2936 | } |
2937 | |
2938 | $s0 = $this->peg_currPos; |
2939 | $s1 = $this->peg_parseCURLY_OPEN(); |
2940 | if ($s1 !== $this->peg_FAILED) { |
2941 | $s2 = $this->peg_currPos; |
2942 | $s3 = array(); |
2943 | if (peg_regex_test($this->peg_c19, $this->input_substr($this->peg_currPos, 1))) { |
2944 | $s4 = $this->input_substr($this->peg_currPos, 1); |
2945 | $this->peg_currPos++; |
2946 | } else { |
2947 | $s4 = $this->peg_FAILED; |
2948 | if ($this->peg_silentFails === 0) { |
2949 | $this->peg_fail($this->peg_c20); |
2950 | } |
2951 | } |
2952 | if ($s4 !== $this->peg_FAILED) { |
2953 | while ($s4 !== $this->peg_FAILED) { |
2954 | $s3[] = $s4; |
2955 | if (peg_regex_test($this->peg_c19, $this->input_substr($this->peg_currPos, 1))) { |
2956 | $s4 = $this->input_substr($this->peg_currPos, 1); |
2957 | $this->peg_currPos++; |
2958 | } else { |
2959 | $s4 = $this->peg_FAILED; |
2960 | if ($this->peg_silentFails === 0) { |
2961 | $this->peg_fail($this->peg_c20); |
2962 | } |
2963 | } |
2964 | } |
2965 | } else { |
2966 | $s3 = $this->peg_FAILED; |
2967 | } |
2968 | if ($s3 !== $this->peg_FAILED) { |
2969 | $this->peg_reportedPos = $s2; |
2970 | $s3 = $this->peg_f61(); |
2971 | } |
2972 | $s2 = $s3; |
2973 | if ($s2 !== $this->peg_FAILED) { |
2974 | $s3 = $this->peg_parse_(); |
2975 | if ($s3 !== $this->peg_FAILED) { |
2976 | $s4 = $this->peg_parseCURLY_CLOSE(); |
2977 | if ($s4 !== $this->peg_FAILED) { |
2978 | $this->peg_reportedPos = $s0; |
2979 | $s1 = $this->peg_f63($s2); |
2980 | $s0 = $s1; |
2981 | } else { |
2982 | $this->peg_currPos = $s0; |
2983 | $s0 = $this->peg_FAILED; |
2984 | } |
2985 | } else { |
2986 | $this->peg_currPos = $s0; |
2987 | $s0 = $this->peg_FAILED; |
2988 | } |
2989 | } else { |
2990 | $this->peg_currPos = $s0; |
2991 | $s0 = $this->peg_FAILED; |
2992 | } |
2993 | } else { |
2994 | $this->peg_currPos = $s0; |
2995 | $s0 = $this->peg_FAILED; |
2996 | } |
2997 | |
2998 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
2999 | |
3000 | return $s0; |
3001 | } |
3002 | |
3003 | private function peg_parseopt_pos() { |
3004 | |
3005 | $key = $this->peg_currPos * 130 + 28; |
3006 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3007 | |
3008 | if ($cached) { |
3009 | $this->peg_currPos = $cached["nextPos"]; |
3010 | return $cached["result"]; |
3011 | } |
3012 | |
3013 | $s0 = $this->peg_currPos; |
3014 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c5) { |
3015 | $s1 = $this->peg_c5; |
3016 | $this->peg_currPos++; |
3017 | } else { |
3018 | $s1 = $this->peg_FAILED; |
3019 | if ($this->peg_silentFails === 0) { |
3020 | $this->peg_fail($this->peg_c6); |
3021 | } |
3022 | } |
3023 | if ($s1 !== $this->peg_FAILED) { |
3024 | $s2 = $this->peg_parse_(); |
3025 | if ($s2 !== $this->peg_FAILED) { |
3026 | if (peg_regex_test($this->peg_c27, $this->input_substr($this->peg_currPos, 1))) { |
3027 | $s3 = $this->input_substr($this->peg_currPos, 1); |
3028 | $this->peg_currPos++; |
3029 | } else { |
3030 | $s3 = $this->peg_FAILED; |
3031 | if ($this->peg_silentFails === 0) { |
3032 | $this->peg_fail($this->peg_c28); |
3033 | } |
3034 | } |
3035 | if ($s3 !== $this->peg_FAILED) { |
3036 | $s4 = $this->peg_parse_(); |
3037 | if ($s4 !== $this->peg_FAILED) { |
3038 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c29) { |
3039 | $s5 = $this->peg_c29; |
3040 | $this->peg_currPos++; |
3041 | } else { |
3042 | $s5 = $this->peg_FAILED; |
3043 | if ($this->peg_silentFails === 0) { |
3044 | $this->peg_fail($this->peg_c30); |
3045 | } |
3046 | } |
3047 | if ($s5 !== $this->peg_FAILED) { |
3048 | $s6 = $this->peg_parse_(); |
3049 | if ($s6 !== $this->peg_FAILED) { |
3050 | $s1 = array($s1, $s2, $s3, $s4, $s5, $s6); |
3051 | $s0 = $s1; |
3052 | } else { |
3053 | $this->peg_currPos = $s0; |
3054 | $s0 = $this->peg_FAILED; |
3055 | } |
3056 | } else { |
3057 | $this->peg_currPos = $s0; |
3058 | $s0 = $this->peg_FAILED; |
3059 | } |
3060 | } else { |
3061 | $this->peg_currPos = $s0; |
3062 | $s0 = $this->peg_FAILED; |
3063 | } |
3064 | } else { |
3065 | $this->peg_currPos = $s0; |
3066 | $s0 = $this->peg_FAILED; |
3067 | } |
3068 | } else { |
3069 | $this->peg_currPos = $s0; |
3070 | $s0 = $this->peg_FAILED; |
3071 | } |
3072 | } else { |
3073 | $this->peg_currPos = $s0; |
3074 | $s0 = $this->peg_FAILED; |
3075 | } |
3076 | if ($s0 === $this->peg_FAILED) { |
3077 | $s0 = $this->peg_c2; |
3078 | } |
3079 | |
3080 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3081 | |
3082 | return $s0; |
3083 | } |
3084 | |
3085 | private function peg_parsechem_lit() { |
3086 | |
3087 | $key = $this->peg_currPos * 130 + 29; |
3088 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3089 | |
3090 | if ($cached) { |
3091 | $this->peg_currPos = $cached["nextPos"]; |
3092 | return $cached["result"]; |
3093 | } |
3094 | |
3095 | $s0 = $this->peg_currPos; |
3096 | $s1 = $this->peg_parseCURLY_OPEN(); |
3097 | if ($s1 !== $this->peg_FAILED) { |
3098 | $s2 = $this->peg_parsechem_sentence(); |
3099 | if ($s2 !== $this->peg_FAILED) { |
3100 | $s3 = $this->peg_parseCURLY_CLOSE(); |
3101 | if ($s3 !== $this->peg_FAILED) { |
3102 | $this->peg_reportedPos = $s0; |
3103 | $s1 = $this->peg_f38($s2); |
3104 | $s0 = $s1; |
3105 | } else { |
3106 | $this->peg_currPos = $s0; |
3107 | $s0 = $this->peg_FAILED; |
3108 | } |
3109 | } else { |
3110 | $this->peg_currPos = $s0; |
3111 | $s0 = $this->peg_FAILED; |
3112 | } |
3113 | } else { |
3114 | $this->peg_currPos = $s0; |
3115 | $s0 = $this->peg_FAILED; |
3116 | } |
3117 | |
3118 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3119 | |
3120 | return $s0; |
3121 | } |
3122 | |
3123 | private function peg_parsechem_sentence() { |
3124 | |
3125 | $key = $this->peg_currPos * 130 + 30; |
3126 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3127 | |
3128 | if ($cached) { |
3129 | $this->peg_currPos = $cached["nextPos"]; |
3130 | return $cached["result"]; |
3131 | } |
3132 | |
3133 | $s0 = $this->peg_currPos; |
3134 | $s1 = $this->peg_parse_(); |
3135 | if ($s1 !== $this->peg_FAILED) { |
3136 | $s2 = $this->peg_parsechem_phrase(); |
3137 | if ($s2 !== $this->peg_FAILED) { |
3138 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c31) { |
3139 | $s3 = $this->peg_c31; |
3140 | $this->peg_currPos++; |
3141 | } else { |
3142 | $s3 = $this->peg_FAILED; |
3143 | if ($this->peg_silentFails === 0) { |
3144 | $this->peg_fail($this->peg_c32); |
3145 | } |
3146 | } |
3147 | if ($s3 !== $this->peg_FAILED) { |
3148 | $s4 = $this->peg_parsechem_sentence(); |
3149 | if ($s4 !== $this->peg_FAILED) { |
3150 | $this->peg_reportedPos = $s0; |
3151 | $s1 = $this->peg_f64($s2, $s4); |
3152 | $s0 = $s1; |
3153 | } else { |
3154 | $this->peg_currPos = $s0; |
3155 | $s0 = $this->peg_FAILED; |
3156 | } |
3157 | } else { |
3158 | $this->peg_currPos = $s0; |
3159 | $s0 = $this->peg_FAILED; |
3160 | } |
3161 | } else { |
3162 | $this->peg_currPos = $s0; |
3163 | $s0 = $this->peg_FAILED; |
3164 | } |
3165 | } else { |
3166 | $this->peg_currPos = $s0; |
3167 | $s0 = $this->peg_FAILED; |
3168 | } |
3169 | if ($s0 === $this->peg_FAILED) { |
3170 | $s0 = $this->peg_currPos; |
3171 | $s1 = $this->peg_parse_(); |
3172 | if ($s1 !== $this->peg_FAILED) { |
3173 | $s2 = $this->peg_parsechem_phrase(); |
3174 | if ($s2 !== $this->peg_FAILED) { |
3175 | $s3 = $this->peg_parse_(); |
3176 | if ($s3 !== $this->peg_FAILED) { |
3177 | $this->peg_reportedPos = $s0; |
3178 | $s1 = $this->peg_f65($s2); |
3179 | $s0 = $s1; |
3180 | } else { |
3181 | $this->peg_currPos = $s0; |
3182 | $s0 = $this->peg_FAILED; |
3183 | } |
3184 | } else { |
3185 | $this->peg_currPos = $s0; |
3186 | $s0 = $this->peg_FAILED; |
3187 | } |
3188 | } else { |
3189 | $this->peg_currPos = $s0; |
3190 | $s0 = $this->peg_FAILED; |
3191 | } |
3192 | } |
3193 | |
3194 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3195 | |
3196 | return $s0; |
3197 | } |
3198 | |
3199 | private function peg_parsechem_phrase() { |
3200 | |
3201 | $key = $this->peg_currPos * 130 + 31; |
3202 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3203 | |
3204 | if ($cached) { |
3205 | $this->peg_currPos = $cached["nextPos"]; |
3206 | return $cached["result"]; |
3207 | } |
3208 | |
3209 | $s0 = $this->peg_currPos; |
3210 | if ($this->input_substr($this->peg_currPos, 3) === $this->peg_c33) { |
3211 | $s1 = $this->peg_c33; |
3212 | $this->peg_currPos += 3; |
3213 | } else { |
3214 | $s1 = $this->peg_FAILED; |
3215 | if ($this->peg_silentFails === 0) { |
3216 | $this->peg_fail($this->peg_c34); |
3217 | } |
3218 | } |
3219 | if ($s1 !== $this->peg_FAILED) { |
3220 | $this->peg_reportedPos = $s0; |
3221 | $s1 = $this->peg_f66($s1); |
3222 | } |
3223 | $s0 = $s1; |
3224 | if ($s0 === $this->peg_FAILED) { |
3225 | $s0 = $this->peg_currPos; |
3226 | $s1 = $this->peg_parsechem_word(); |
3227 | if ($s1 !== $this->peg_FAILED) { |
3228 | $s2 = $this->peg_parseCHEM_SINGLE_MACRO(); |
3229 | if ($s2 !== $this->peg_FAILED) { |
3230 | $this->peg_reportedPos = $s0; |
3231 | $s1 = $this->peg_f67($s1, $s2); |
3232 | $s0 = $s1; |
3233 | } else { |
3234 | $this->peg_currPos = $s0; |
3235 | $s0 = $this->peg_FAILED; |
3236 | } |
3237 | } else { |
3238 | $this->peg_currPos = $s0; |
3239 | $s0 = $this->peg_FAILED; |
3240 | } |
3241 | if ($s0 === $this->peg_FAILED) { |
3242 | $s0 = $this->peg_currPos; |
3243 | $s1 = $this->peg_parsechem_word(); |
3244 | if ($s1 !== $this->peg_FAILED) { |
3245 | $this->peg_reportedPos = $s0; |
3246 | $s1 = $this->peg_f68($s1); |
3247 | } |
3248 | $s0 = $s1; |
3249 | if ($s0 === $this->peg_FAILED) { |
3250 | $s0 = $this->peg_currPos; |
3251 | $s1 = $this->peg_parseCHEM_SINGLE_MACRO(); |
3252 | if ($s1 !== $this->peg_FAILED) { |
3253 | $this->peg_reportedPos = $s0; |
3254 | $s1 = $this->peg_f66($s1); |
3255 | } |
3256 | $s0 = $s1; |
3257 | if ($s0 === $this->peg_FAILED) { |
3258 | $s0 = $this->peg_currPos; |
3259 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c35) { |
3260 | $s1 = $this->peg_c35; |
3261 | $this->peg_currPos++; |
3262 | } else { |
3263 | $s1 = $this->peg_FAILED; |
3264 | if ($this->peg_silentFails === 0) { |
3265 | $this->peg_fail($this->peg_c36); |
3266 | } |
3267 | } |
3268 | if ($s1 !== $this->peg_FAILED) { |
3269 | $this->peg_reportedPos = $s0; |
3270 | $s1 = $this->peg_f66($s1); |
3271 | } |
3272 | $s0 = $s1; |
3273 | } |
3274 | } |
3275 | } |
3276 | } |
3277 | |
3278 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3279 | |
3280 | return $s0; |
3281 | } |
3282 | |
3283 | private function peg_parsechem_word() { |
3284 | |
3285 | $key = $this->peg_currPos * 130 + 32; |
3286 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3287 | |
3288 | if ($cached) { |
3289 | $this->peg_currPos = $cached["nextPos"]; |
3290 | return $cached["result"]; |
3291 | } |
3292 | |
3293 | $s0 = $this->peg_currPos; |
3294 | $s1 = $this->peg_parsechem_char(); |
3295 | if ($s1 !== $this->peg_FAILED) { |
3296 | $s2 = $this->peg_parsechem_word_nt(); |
3297 | if ($s2 !== $this->peg_FAILED) { |
3298 | $this->peg_reportedPos = $s0; |
3299 | $s1 = $this->peg_f69($s1, $s2); |
3300 | $s0 = $s1; |
3301 | } else { |
3302 | $this->peg_currPos = $s0; |
3303 | $s0 = $this->peg_FAILED; |
3304 | } |
3305 | } else { |
3306 | $this->peg_currPos = $s0; |
3307 | $s0 = $this->peg_FAILED; |
3308 | } |
3309 | if ($s0 === $this->peg_FAILED) { |
3310 | $s0 = $this->peg_currPos; |
3311 | $s1 = $this->peg_parseCHEM_SINGLE_MACRO(); |
3312 | if ($s1 !== $this->peg_FAILED) { |
3313 | $s2 = $this->peg_parsechem_char_nl(); |
3314 | if ($s2 !== $this->peg_FAILED) { |
3315 | $s3 = $this->peg_parsechem_word_nt(); |
3316 | if ($s3 !== $this->peg_FAILED) { |
3317 | $this->peg_reportedPos = $s0; |
3318 | $s1 = $this->peg_f70($s1, $s2, $s3); |
3319 | $s0 = $s1; |
3320 | } else { |
3321 | $this->peg_currPos = $s0; |
3322 | $s0 = $this->peg_FAILED; |
3323 | } |
3324 | } else { |
3325 | $this->peg_currPos = $s0; |
3326 | $s0 = $this->peg_FAILED; |
3327 | } |
3328 | } else { |
3329 | $this->peg_currPos = $s0; |
3330 | $s0 = $this->peg_FAILED; |
3331 | } |
3332 | } |
3333 | |
3334 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3335 | |
3336 | return $s0; |
3337 | } |
3338 | |
3339 | private function peg_parsechem_word_nt() { |
3340 | |
3341 | $key = $this->peg_currPos * 130 + 33; |
3342 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3343 | |
3344 | if ($cached) { |
3345 | $this->peg_currPos = $cached["nextPos"]; |
3346 | return $cached["result"]; |
3347 | } |
3348 | |
3349 | $s0 = $this->peg_currPos; |
3350 | $s1 = $this->peg_parsechem_word(); |
3351 | if ($s1 !== $this->peg_FAILED) { |
3352 | $this->peg_reportedPos = $s0; |
3353 | $s1 = $this->peg_f68($s1); |
3354 | } |
3355 | $s0 = $s1; |
3356 | if ($s0 === $this->peg_FAILED) { |
3357 | $s0 = $this->peg_currPos; |
3358 | $s1 = $this->peg_c2; |
3359 | if ($s1 !== $this->peg_FAILED) { |
3360 | $this->peg_reportedPos = $s0; |
3361 | $s1 = $this->peg_f71(); |
3362 | } |
3363 | $s0 = $s1; |
3364 | } |
3365 | |
3366 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3367 | |
3368 | return $s0; |
3369 | } |
3370 | |
3371 | private function peg_parsechem_char() { |
3372 | |
3373 | $key = $this->peg_currPos * 130 + 34; |
3374 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3375 | |
3376 | if ($cached) { |
3377 | $this->peg_currPos = $cached["nextPos"]; |
3378 | return $cached["result"]; |
3379 | } |
3380 | |
3381 | $s0 = $this->peg_currPos; |
3382 | $s1 = $this->peg_parsechem_char_nl(); |
3383 | if ($s1 !== $this->peg_FAILED) { |
3384 | $this->peg_reportedPos = $s0; |
3385 | $s1 = $this->peg_f72($s1); |
3386 | } |
3387 | $s0 = $s1; |
3388 | if ($s0 === $this->peg_FAILED) { |
3389 | $s0 = $this->peg_currPos; |
3390 | $s1 = $this->peg_parseCHEM_LETTER(); |
3391 | if ($s1 !== $this->peg_FAILED) { |
3392 | $this->peg_reportedPos = $s0; |
3393 | $s1 = $this->peg_f73($s1); |
3394 | } |
3395 | $s0 = $s1; |
3396 | } |
3397 | |
3398 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3399 | |
3400 | return $s0; |
3401 | } |
3402 | |
3403 | private function peg_parsechem_char_nl() { |
3404 | |
3405 | $key = $this->peg_currPos * 130 + 35; |
3406 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3407 | |
3408 | if ($cached) { |
3409 | $this->peg_currPos = $cached["nextPos"]; |
3410 | return $cached["result"]; |
3411 | } |
3412 | |
3413 | $s0 = $this->peg_currPos; |
3414 | $s1 = $this->peg_parsechem_script(); |
3415 | if ($s1 !== $this->peg_FAILED) { |
3416 | $this->peg_reportedPos = $s0; |
3417 | $s1 = $this->peg_f72($s1); |
3418 | } |
3419 | $s0 = $s1; |
3420 | if ($s0 === $this->peg_FAILED) { |
3421 | $s0 = $this->peg_currPos; |
3422 | $s1 = $this->peg_parseCURLY_OPEN(); |
3423 | if ($s1 !== $this->peg_FAILED) { |
3424 | $s2 = $this->peg_parsechem_text(); |
3425 | if ($s2 !== $this->peg_FAILED) { |
3426 | $s3 = $this->peg_parseCURLY_CLOSE(); |
3427 | if ($s3 !== $this->peg_FAILED) { |
3428 | $this->peg_reportedPos = $s0; |
3429 | $s1 = $this->peg_f74($s2); |
3430 | $s0 = $s1; |
3431 | } else { |
3432 | $this->peg_currPos = $s0; |
3433 | $s0 = $this->peg_FAILED; |
3434 | } |
3435 | } else { |
3436 | $this->peg_currPos = $s0; |
3437 | $s0 = $this->peg_FAILED; |
3438 | } |
3439 | } else { |
3440 | $this->peg_currPos = $s0; |
3441 | $s0 = $this->peg_FAILED; |
3442 | } |
3443 | if ($s0 === $this->peg_FAILED) { |
3444 | $s0 = $this->peg_currPos; |
3445 | $s1 = $this->peg_parseBEGIN_MATH(); |
3446 | if ($s1 !== $this->peg_FAILED) { |
3447 | $s2 = $this->peg_parseexpr(); |
3448 | if ($s2 !== $this->peg_FAILED) { |
3449 | $s3 = $this->peg_parseEND_MATH(); |
3450 | if ($s3 !== $this->peg_FAILED) { |
3451 | $this->peg_reportedPos = $s0; |
3452 | $s1 = $this->peg_f75($s2); |
3453 | $s0 = $s1; |
3454 | } else { |
3455 | $this->peg_currPos = $s0; |
3456 | $s0 = $this->peg_FAILED; |
3457 | } |
3458 | } else { |
3459 | $this->peg_currPos = $s0; |
3460 | $s0 = $this->peg_FAILED; |
3461 | } |
3462 | } else { |
3463 | $this->peg_currPos = $s0; |
3464 | $s0 = $this->peg_FAILED; |
3465 | } |
3466 | if ($s0 === $this->peg_FAILED) { |
3467 | $s0 = $this->peg_currPos; |
3468 | $s1 = $this->peg_parseCHEM_BONDI(); |
3469 | if ($s1 !== $this->peg_FAILED) { |
3470 | $s2 = $this->peg_parsechem_bond(); |
3471 | if ($s2 !== $this->peg_FAILED) { |
3472 | $this->peg_reportedPos = $s0; |
3473 | $s1 = $this->peg_f32($s1, $s2); |
3474 | $s0 = $s1; |
3475 | } else { |
3476 | $this->peg_currPos = $s0; |
3477 | $s0 = $this->peg_FAILED; |
3478 | } |
3479 | } else { |
3480 | $this->peg_currPos = $s0; |
3481 | $s0 = $this->peg_FAILED; |
3482 | } |
3483 | if ($s0 === $this->peg_FAILED) { |
3484 | $s0 = $this->peg_currPos; |
3485 | $s1 = $this->peg_parsechem_macro(); |
3486 | if ($s1 !== $this->peg_FAILED) { |
3487 | $this->peg_reportedPos = $s0; |
3488 | $s1 = $this->peg_f68($s1); |
3489 | } |
3490 | $s0 = $s1; |
3491 | if ($s0 === $this->peg_FAILED) { |
3492 | $s0 = $this->peg_currPos; |
3493 | $s1 = $this->peg_parseCHEM_NONLETTER(); |
3494 | if ($s1 !== $this->peg_FAILED) { |
3495 | $this->peg_reportedPos = $s0; |
3496 | $s1 = $this->peg_f73($s1); |
3497 | } |
3498 | $s0 = $s1; |
3499 | } |
3500 | } |
3501 | } |
3502 | } |
3503 | } |
3504 | |
3505 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3506 | |
3507 | return $s0; |
3508 | } |
3509 | |
3510 | private function peg_parsechem_bond() { |
3511 | |
3512 | $key = $this->peg_currPos * 130 + 36; |
3513 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3514 | |
3515 | if ($cached) { |
3516 | $this->peg_currPos = $cached["nextPos"]; |
3517 | return $cached["result"]; |
3518 | } |
3519 | |
3520 | $s0 = $this->peg_currPos; |
3521 | $s1 = $this->peg_parseCURLY_OPEN(); |
3522 | if ($s1 !== $this->peg_FAILED) { |
3523 | $s2 = $this->peg_parseCHEM_BOND_TYPE(); |
3524 | if ($s2 !== $this->peg_FAILED) { |
3525 | $s3 = $this->peg_parseCURLY_CLOSE(); |
3526 | if ($s3 !== $this->peg_FAILED) { |
3527 | $this->peg_reportedPos = $s0; |
3528 | $s1 = $this->peg_f76($s2); |
3529 | $s0 = $s1; |
3530 | } else { |
3531 | $this->peg_currPos = $s0; |
3532 | $s0 = $this->peg_FAILED; |
3533 | } |
3534 | } else { |
3535 | $this->peg_currPos = $s0; |
3536 | $s0 = $this->peg_FAILED; |
3537 | } |
3538 | } else { |
3539 | $this->peg_currPos = $s0; |
3540 | $s0 = $this->peg_FAILED; |
3541 | } |
3542 | |
3543 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3544 | |
3545 | return $s0; |
3546 | } |
3547 | |
3548 | private function peg_parsechem_script() { |
3549 | |
3550 | $key = $this->peg_currPos * 130 + 37; |
3551 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3552 | |
3553 | if ($cached) { |
3554 | $this->peg_currPos = $cached["nextPos"]; |
3555 | return $cached["result"]; |
3556 | } |
3557 | |
3558 | $s0 = $this->peg_currPos; |
3559 | $s1 = $this->peg_parseCHEM_SUPERSUB(); |
3560 | if ($s1 !== $this->peg_FAILED) { |
3561 | $s2 = $this->peg_parseCHEM_SCRIPT_FOLLOW(); |
3562 | if ($s2 !== $this->peg_FAILED) { |
3563 | $this->peg_reportedPos = $s0; |
3564 | $s1 = $this->peg_f77($s1, $s2); |
3565 | $s0 = $s1; |
3566 | } else { |
3567 | $this->peg_currPos = $s0; |
3568 | $s0 = $this->peg_FAILED; |
3569 | } |
3570 | } else { |
3571 | $this->peg_currPos = $s0; |
3572 | $s0 = $this->peg_FAILED; |
3573 | } |
3574 | if ($s0 === $this->peg_FAILED) { |
3575 | $s0 = $this->peg_currPos; |
3576 | $s1 = $this->peg_parseCHEM_SUPERSUB(); |
3577 | if ($s1 !== $this->peg_FAILED) { |
3578 | $s2 = $this->peg_parsechem_lit(); |
3579 | if ($s2 !== $this->peg_FAILED) { |
3580 | $this->peg_reportedPos = $s0; |
3581 | $s1 = $this->peg_f78($s1, $s2); |
3582 | $s0 = $s1; |
3583 | } else { |
3584 | $this->peg_currPos = $s0; |
3585 | $s0 = $this->peg_FAILED; |
3586 | } |
3587 | } else { |
3588 | $this->peg_currPos = $s0; |
3589 | $s0 = $this->peg_FAILED; |
3590 | } |
3591 | if ($s0 === $this->peg_FAILED) { |
3592 | $s0 = $this->peg_currPos; |
3593 | $s1 = $this->peg_parseCHEM_SUPERSUB(); |
3594 | if ($s1 !== $this->peg_FAILED) { |
3595 | $s2 = $this->peg_parseBEGIN_MATH(); |
3596 | if ($s2 !== $this->peg_FAILED) { |
3597 | $s3 = $this->peg_parseexpr(); |
3598 | if ($s3 !== $this->peg_FAILED) { |
3599 | $s4 = $this->peg_parseEND_MATH(); |
3600 | if ($s4 !== $this->peg_FAILED) { |
3601 | $this->peg_reportedPos = $s0; |
3602 | $s1 = $this->peg_f79($s1, $s3); |
3603 | $s0 = $s1; |
3604 | } else { |
3605 | $this->peg_currPos = $s0; |
3606 | $s0 = $this->peg_FAILED; |
3607 | } |
3608 | } else { |
3609 | $this->peg_currPos = $s0; |
3610 | $s0 = $this->peg_FAILED; |
3611 | } |
3612 | } else { |
3613 | $this->peg_currPos = $s0; |
3614 | $s0 = $this->peg_FAILED; |
3615 | } |
3616 | } else { |
3617 | $this->peg_currPos = $s0; |
3618 | $s0 = $this->peg_FAILED; |
3619 | } |
3620 | } |
3621 | } |
3622 | |
3623 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3624 | |
3625 | return $s0; |
3626 | } |
3627 | |
3628 | private function peg_parsechem_macro() { |
3629 | |
3630 | $key = $this->peg_currPos * 130 + 38; |
3631 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3632 | |
3633 | if ($cached) { |
3634 | $this->peg_currPos = $cached["nextPos"]; |
3635 | return $cached["result"]; |
3636 | } |
3637 | |
3638 | $s0 = $this->peg_currPos; |
3639 | $s1 = $this->peg_parseCHEM_MACRO_2PU(); |
3640 | if ($s1 !== $this->peg_FAILED) { |
3641 | $s2 = $this->peg_parsechem_lit(); |
3642 | if ($s2 !== $this->peg_FAILED) { |
3643 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c37) { |
3644 | $s3 = $this->peg_c37; |
3645 | $this->peg_currPos++; |
3646 | } else { |
3647 | $s3 = $this->peg_FAILED; |
3648 | if ($this->peg_silentFails === 0) { |
3649 | $this->peg_fail($this->peg_c38); |
3650 | } |
3651 | } |
3652 | if ($s3 !== $this->peg_FAILED) { |
3653 | $s4 = $this->peg_parsechem_lit(); |
3654 | if ($s4 !== $this->peg_FAILED) { |
3655 | $this->peg_reportedPos = $s0; |
3656 | $s1 = $this->peg_f80($s1, $s2, $s4); |
3657 | $s0 = $s1; |
3658 | } else { |
3659 | $this->peg_currPos = $s0; |
3660 | $s0 = $this->peg_FAILED; |
3661 | } |
3662 | } else { |
3663 | $this->peg_currPos = $s0; |
3664 | $s0 = $this->peg_FAILED; |
3665 | } |
3666 | } else { |
3667 | $this->peg_currPos = $s0; |
3668 | $s0 = $this->peg_FAILED; |
3669 | } |
3670 | } else { |
3671 | $this->peg_currPos = $s0; |
3672 | $s0 = $this->peg_FAILED; |
3673 | } |
3674 | if ($s0 === $this->peg_FAILED) { |
3675 | $s0 = $this->peg_currPos; |
3676 | $s1 = $this->peg_parseCHEM_MACRO_2PC(); |
3677 | if ($s1 !== $this->peg_FAILED) { |
3678 | $s2 = $this->peg_parseCHEM_COLOR(); |
3679 | if ($s2 !== $this->peg_FAILED) { |
3680 | $s3 = $this->peg_parsechem_lit(); |
3681 | if ($s3 !== $this->peg_FAILED) { |
3682 | $this->peg_reportedPos = $s0; |
3683 | $s1 = $this->peg_f35($s1, $s2, $s3); |
3684 | $s0 = $s1; |
3685 | } else { |
3686 | $this->peg_currPos = $s0; |
3687 | $s0 = $this->peg_FAILED; |
3688 | } |
3689 | } else { |
3690 | $this->peg_currPos = $s0; |
3691 | $s0 = $this->peg_FAILED; |
3692 | } |
3693 | } else { |
3694 | $this->peg_currPos = $s0; |
3695 | $s0 = $this->peg_FAILED; |
3696 | } |
3697 | if ($s0 === $this->peg_FAILED) { |
3698 | $s0 = $this->peg_currPos; |
3699 | $s1 = $this->peg_parseCHEM_MACRO_2P(); |
3700 | if ($s1 !== $this->peg_FAILED) { |
3701 | $s2 = $this->peg_parsechem_lit(); |
3702 | if ($s2 !== $this->peg_FAILED) { |
3703 | $s3 = $this->peg_parsechem_lit(); |
3704 | if ($s3 !== $this->peg_FAILED) { |
3705 | $this->peg_reportedPos = $s0; |
3706 | $s1 = $this->peg_f35($s1, $s2, $s3); |
3707 | $s0 = $s1; |
3708 | } else { |
3709 | $this->peg_currPos = $s0; |
3710 | $s0 = $this->peg_FAILED; |
3711 | } |
3712 | } else { |
3713 | $this->peg_currPos = $s0; |
3714 | $s0 = $this->peg_FAILED; |
3715 | } |
3716 | } else { |
3717 | $this->peg_currPos = $s0; |
3718 | $s0 = $this->peg_FAILED; |
3719 | } |
3720 | if ($s0 === $this->peg_FAILED) { |
3721 | $s0 = $this->peg_currPos; |
3722 | $s1 = $this->peg_parseCHEM_MACRO_1P(); |
3723 | if ($s1 !== $this->peg_FAILED) { |
3724 | $s2 = $this->peg_parsechem_lit(); |
3725 | if ($s2 !== $this->peg_FAILED) { |
3726 | $this->peg_reportedPos = $s0; |
3727 | $s1 = $this->peg_f32($s1, $s2); |
3728 | $s0 = $s1; |
3729 | } else { |
3730 | $this->peg_currPos = $s0; |
3731 | $s0 = $this->peg_FAILED; |
3732 | } |
3733 | } else { |
3734 | $this->peg_currPos = $s0; |
3735 | $s0 = $this->peg_FAILED; |
3736 | } |
3737 | } |
3738 | } |
3739 | } |
3740 | |
3741 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3742 | |
3743 | return $s0; |
3744 | } |
3745 | |
3746 | private function peg_parsechem_text() { |
3747 | |
3748 | $key = $this->peg_currPos * 130 + 39; |
3749 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3750 | |
3751 | if ($cached) { |
3752 | $this->peg_currPos = $cached["nextPos"]; |
3753 | return $cached["result"]; |
3754 | } |
3755 | |
3756 | $s0 = $this->peg_currPos; |
3757 | $s1 = array(); |
3758 | $s2 = $this->peg_parseboxchars(); |
3759 | if ($s2 !== $this->peg_FAILED) { |
3760 | while ($s2 !== $this->peg_FAILED) { |
3761 | $s1[] = $s2; |
3762 | $s2 = $this->peg_parseboxchars(); |
3763 | } |
3764 | } else { |
3765 | $s1 = $this->peg_FAILED; |
3766 | } |
3767 | if ($s1 !== $this->peg_FAILED) { |
3768 | $this->peg_reportedPos = $s0; |
3769 | $s1 = $this->peg_f81($s1); |
3770 | } |
3771 | $s0 = $s1; |
3772 | |
3773 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3774 | |
3775 | return $s0; |
3776 | } |
3777 | |
3778 | private function peg_parseCHEM_COLOR() { |
3779 | |
3780 | $key = $this->peg_currPos * 130 + 40; |
3781 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3782 | |
3783 | if ($cached) { |
3784 | $this->peg_currPos = $cached["nextPos"]; |
3785 | return $cached["result"]; |
3786 | } |
3787 | |
3788 | $s0 = $this->peg_currPos; |
3789 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c39) { |
3790 | $s1 = $this->peg_c39; |
3791 | $this->peg_currPos++; |
3792 | } else { |
3793 | $s1 = $this->peg_FAILED; |
3794 | if ($this->peg_silentFails === 0) { |
3795 | $this->peg_fail($this->peg_c40); |
3796 | } |
3797 | } |
3798 | if ($s1 !== $this->peg_FAILED) { |
3799 | $s2 = $this->peg_parse_(); |
3800 | if ($s2 !== $this->peg_FAILED) { |
3801 | $s3 = array(); |
3802 | $s4 = $this->peg_parsealpha(); |
3803 | if ($s4 !== $this->peg_FAILED) { |
3804 | while ($s4 !== $this->peg_FAILED) { |
3805 | $s3[] = $s4; |
3806 | $s4 = $this->peg_parsealpha(); |
3807 | } |
3808 | } else { |
3809 | $s3 = $this->peg_FAILED; |
3810 | } |
3811 | if ($s3 !== $this->peg_FAILED) { |
3812 | $s4 = $this->peg_parse_(); |
3813 | if ($s4 !== $this->peg_FAILED) { |
3814 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c11) { |
3815 | $s5 = $this->peg_c11; |
3816 | $this->peg_currPos++; |
3817 | } else { |
3818 | $s5 = $this->peg_FAILED; |
3819 | if ($this->peg_silentFails === 0) { |
3820 | $this->peg_fail($this->peg_c12); |
3821 | } |
3822 | } |
3823 | if ($s5 !== $this->peg_FAILED) { |
3824 | $s6 = $this->peg_parse_(); |
3825 | if ($s6 !== $this->peg_FAILED) { |
3826 | $this->peg_reportedPos = $s0; |
3827 | $s1 = $this->peg_f82($s3); |
3828 | $s0 = $s1; |
3829 | } else { |
3830 | $this->peg_currPos = $s0; |
3831 | $s0 = $this->peg_FAILED; |
3832 | } |
3833 | } else { |
3834 | $this->peg_currPos = $s0; |
3835 | $s0 = $this->peg_FAILED; |
3836 | } |
3837 | } else { |
3838 | $this->peg_currPos = $s0; |
3839 | $s0 = $this->peg_FAILED; |
3840 | } |
3841 | } else { |
3842 | $this->peg_currPos = $s0; |
3843 | $s0 = $this->peg_FAILED; |
3844 | } |
3845 | } else { |
3846 | $this->peg_currPos = $s0; |
3847 | $s0 = $this->peg_FAILED; |
3848 | } |
3849 | } else { |
3850 | $this->peg_currPos = $s0; |
3851 | $s0 = $this->peg_FAILED; |
3852 | } |
3853 | |
3854 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3855 | |
3856 | return $s0; |
3857 | } |
3858 | |
3859 | private function peg_parsealpha() { |
3860 | |
3861 | $key = $this->peg_currPos * 130 + 41; |
3862 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3863 | |
3864 | if ($cached) { |
3865 | $this->peg_currPos = $cached["nextPos"]; |
3866 | return $cached["result"]; |
3867 | } |
3868 | |
3869 | if (peg_regex_test($this->peg_c41, $this->input_substr($this->peg_currPos, 1))) { |
3870 | $s0 = $this->input_substr($this->peg_currPos, 1); |
3871 | $this->peg_currPos++; |
3872 | } else { |
3873 | $s0 = $this->peg_FAILED; |
3874 | if ($this->peg_silentFails === 0) { |
3875 | $this->peg_fail($this->peg_c42); |
3876 | } |
3877 | } |
3878 | |
3879 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3880 | |
3881 | return $s0; |
3882 | } |
3883 | |
3884 | private function peg_parseliteral_id() { |
3885 | |
3886 | $key = $this->peg_currPos * 130 + 42; |
3887 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3888 | |
3889 | if ($cached) { |
3890 | $this->peg_currPos = $cached["nextPos"]; |
3891 | return $cached["result"]; |
3892 | } |
3893 | |
3894 | if (peg_regex_test($this->peg_c41, $this->input_substr($this->peg_currPos, 1))) { |
3895 | $s0 = $this->input_substr($this->peg_currPos, 1); |
3896 | $this->peg_currPos++; |
3897 | } else { |
3898 | $s0 = $this->peg_FAILED; |
3899 | if ($this->peg_silentFails === 0) { |
3900 | $this->peg_fail($this->peg_c42); |
3901 | } |
3902 | } |
3903 | |
3904 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3905 | |
3906 | return $s0; |
3907 | } |
3908 | |
3909 | private function peg_parseliteral_mn() { |
3910 | |
3911 | $key = $this->peg_currPos * 130 + 43; |
3912 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3913 | |
3914 | if ($cached) { |
3915 | $this->peg_currPos = $cached["nextPos"]; |
3916 | return $cached["result"]; |
3917 | } |
3918 | |
3919 | if (peg_regex_test($this->peg_c19, $this->input_substr($this->peg_currPos, 1))) { |
3920 | $s0 = $this->input_substr($this->peg_currPos, 1); |
3921 | $this->peg_currPos++; |
3922 | } else { |
3923 | $s0 = $this->peg_FAILED; |
3924 | if ($this->peg_silentFails === 0) { |
3925 | $this->peg_fail($this->peg_c20); |
3926 | } |
3927 | } |
3928 | |
3929 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3930 | |
3931 | return $s0; |
3932 | } |
3933 | |
3934 | private function peg_parseliteral_uf_lt() { |
3935 | |
3936 | $key = $this->peg_currPos * 130 + 44; |
3937 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3938 | |
3939 | if ($cached) { |
3940 | $this->peg_currPos = $cached["nextPos"]; |
3941 | return $cached["result"]; |
3942 | } |
3943 | |
3944 | if (peg_regex_test($this->peg_c43, $this->input_substr($this->peg_currPos, 1))) { |
3945 | $s0 = $this->input_substr($this->peg_currPos, 1); |
3946 | $this->peg_currPos++; |
3947 | } else { |
3948 | $s0 = $this->peg_FAILED; |
3949 | if ($this->peg_silentFails === 0) { |
3950 | $this->peg_fail($this->peg_c44); |
3951 | } |
3952 | } |
3953 | |
3954 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3955 | |
3956 | return $s0; |
3957 | } |
3958 | |
3959 | private function peg_parsedelimiter_uf_lt() { |
3960 | |
3961 | $key = $this->peg_currPos * 130 + 45; |
3962 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3963 | |
3964 | if ($cached) { |
3965 | $this->peg_currPos = $cached["nextPos"]; |
3966 | return $cached["result"]; |
3967 | } |
3968 | |
3969 | if (peg_regex_test($this->peg_c45, $this->input_substr($this->peg_currPos, 1))) { |
3970 | $s0 = $this->input_substr($this->peg_currPos, 1); |
3971 | $this->peg_currPos++; |
3972 | } else { |
3973 | $s0 = $this->peg_FAILED; |
3974 | if ($this->peg_silentFails === 0) { |
3975 | $this->peg_fail($this->peg_c46); |
3976 | } |
3977 | } |
3978 | |
3979 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3980 | |
3981 | return $s0; |
3982 | } |
3983 | |
3984 | private function peg_parseliteral_uf_op() { |
3985 | |
3986 | $key = $this->peg_currPos * 130 + 46; |
3987 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3988 | |
3989 | if ($cached) { |
3990 | $this->peg_currPos = $cached["nextPos"]; |
3991 | return $cached["result"]; |
3992 | } |
3993 | |
3994 | if (peg_regex_test($this->peg_c47, $this->input_substr($this->peg_currPos, 1))) { |
3995 | $s0 = $this->input_substr($this->peg_currPos, 1); |
3996 | $this->peg_currPos++; |
3997 | } else { |
3998 | $s0 = $this->peg_FAILED; |
3999 | if ($this->peg_silentFails === 0) { |
4000 | $this->peg_fail($this->peg_c48); |
4001 | } |
4002 | } |
4003 | |
4004 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
4005 | |
4006 | return $s0; |
4007 | } |
4008 | |
4009 | private function peg_parsedelimiter_uf_op() { |
4010 | |
4011 | $key = $this->peg_currPos * 130 + 47; |
4012 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
4013 | |
4014 | if ($cached) { |
4015 | $this->peg_currPos = $cached["nextPos"]; |
4016 | return $cached["result"]; |
4017 | } |
4018 | |
4019 | if (peg_regex_test($this->peg_c49, $this->input_substr($this->peg_currPos, 1))) { |
4020 | $s0 = $this->input_substr($this->peg_currPos, 1); |
4021 | $this->peg_currPos++; |
4022 | } else { |
4023 | $s0 = $this->peg_FAILED; |
4024 | if ($this->peg_silentFails === 0) { |
4025 | $this->peg_fail($this->peg_c50); |
4026 | } |
4027 | } |
4028 | |
4029 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
4030 | |
4031 | return $s0; |
4032 | } |
4033 | |
4034 | private function peg_parseboxchars() { |
4035 | |
4036 | $key = $this->peg_currPos * 130 + 48; |
4037 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
4038 | |
4039 | if ($cached) { |
4040 | $this->peg_currPos = $cached["nextPos"]; |
4041 | return $cached["result"]; |
4042 | } |
4043 | |
4044 | if (peg_regex_test($this->peg_c51, $this->input_substr($this->peg_currPos, 1))) { |
4045 | $s0 = $this->input_substr($this->peg_currPos, 1); |
4046 | $this->peg_currPos++; |
4047 | } else { |
4048 | $s0 = $this->peg_FAILED; |
4049 | if ($this->peg_silentFails === 0) { |
4050 | $this->peg_fail($this->peg_c52); |
4051 | } |
4052 | } |
4053 | |
4054 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
4055 | |
4056 | return $s0; |
4057 | } |
4058 | |
4059 | private function peg_parseBOX() { |
4060 | |
4061 | $key = $this->peg_currPos * 130 + 49; |
4062 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
4063 | |
4064 | if ($cached) { |
4065 | $this->peg_currPos = $cached["nextPos"]; |
4066 | return $cached["result"]; |
4067 | } |
4068 | |
4069 | $s0 = $this->peg_currPos; |
4070 | $s1 = $this->peg_parsegeneric_func(); |
4071 | if ($s1 !== $this->peg_FAILED) { |
4072 | $this->peg_reportedPos = $this->peg_currPos; |
4073 | $s2 = $this->peg_f83($s1); |
4074 | if ($s2) { |
4075 | $s2 = null; |
4076 | } else { |
4077 | $s2 = $this->peg_FAILED; |
4078 | } |
4079 | if ($s2 !== $this->peg_FAILED) { |
4080 | $s3 = $this->peg_parse_(); |
4081 | if ($s3 !== $this->peg_FAILED) { |
4082 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c39) { |
4083 | $s4 = $this->peg_c39; |
4084 | $this->peg_currPos++; |
4085 | } else { |
4086 | $s4 = $this->peg_FAILED; |
4087 | if ($this->peg_silentFails === 0) { |
4088 | $this->peg_fail($this->peg_c40); |
4089 | } |
4090 | } |
4091 | if ($s4 !== $this->peg_FAILED) { |
4092 | $s5 = array(); |
4093 | $s6 = $this->peg_parseboxchars(); |
4094 | if ($s6 !== $this->peg_FAILED) { |
4095 | while ($s6 !== $this->peg_FAILED) { |
4096 | $s5[] = $s6; |
4097 | $s6 = $this->peg_parseboxchars(); |
4098 | } |
4099 | } else { |
4100 | $s5 = $this->peg_FAILED; |
4101 | } |
4102 | if ($s5 !== $this->peg_FAILED) { |
4103 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c11) { |
4104 | $s6 = $this->peg_c11; |
4105 | $this->peg_currPos++; |
4106 | } else { |
4107 | $s6 = $this->peg_FAILED; |
4108 | if ($this->peg_silentFails === 0) { |
4109 | $this->peg_fail($this->peg_c12); |
4110 | } |
4111 | } |
4112 | if ($s6 !== $this->peg_FAILED) { |
4113 | $s7 = $this->peg_parse_(); |
4114 | if ($s7 !== $this->peg_FAILED) { |
4115 | $this->peg_reportedPos = $s0; |
4116 | $s1 = $this->peg_f84($s1, $s5); |
4117 | $s0 = $s1; |
4118 | } else { |
4119 | $this->peg_currPos = $s0; |
4120 | $s0 = $this->peg_FAILED; |
4121 | } |
4122 | } else { |
4123 | $this->peg_currPos = $s0; |
4124 | $s0 = $this->peg_FAILED; |
4125 | } |
4126 | } else { |
4127 | $this->peg_currPos = $s0; |
4128 | $s0 = $this->peg_FAILED; |
4129 | } |
4130 | } else { |
4131 | $this->peg_currPos = $s0; |
4132 | $s0 = $this->peg_FAILED; |
4133 | } |
4134 | } else { |
4135 | $this->peg_currPos = $s0; |
4136 | $s0 = $this->peg_FAILED; |
4137 | } |
4138 | } else { |
4139 | $this->peg_currPos = $s0; |
4140 | $s0 = $this->peg_FAILED; |
4141 | } |
4142 | } else { |
4143 | $this->peg_currPos = $s0; |
4144 | $s0 = $this->peg_FAILED; |
4145 | } |
4146 | |
4147 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
4148 | |
4149 | return $s0; |
4150 | } |
4151 | |
4152 | private function peg_parseLITERAL() { |
4153 | |
4154 | $key = $this->peg_currPos * 130 + 50; |
4155 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
4156 | |
4157 | if ($cached) { |
4158 | $this->peg_currPos = $cached["nextPos"]; |
4159 | return $cached["result"]; |
4160 | } |
4161 | |
4162 | $s0 = $this->peg_currPos; |
4163 | $s1 = $this->peg_parseliteral_id(); |
4164 | if ($s1 === $this->peg_FAILED) { |
4165 | $s1 = $this->peg_parseliteral_mn(); |
4166 | if ($s1 === $this->peg_FAILED) { |
4167 | $s1 = $this->peg_parseliteral_uf_lt(); |
4168 | if ($s1 === $this->peg_FAILED) { |
4169 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c53) { |
4170 | $s1 = $this->peg_c53; |
4171 | $this->peg_currPos++; |
4172 | } else { |
4173 | $s1 = $this->peg_FAILED; |
4174 | if ($this->peg_silentFails === 0) { |
4175 | $this->peg_fail($this->peg_c54); |
4176 | } |
4177 | } |
4178 | if ($s1 === $this->peg_FAILED) { |
4179 | $s1 = $this->peg_parseliteral_uf_op(); |
4180 | } |
4181 | } |
4182 | } |
4183 | } |
4184 | if ($s1 !== $this->peg_FAILED) { |
4185 | $s2 = $this->peg_parse_(); |
4186 | if ($s2 !== $this->peg_FAILED) { |
4187 | $this->peg_reportedPos = $s0; |
4188 | $s1 = $this->peg_f85($s1); |
4189 | $s0 = $s1; |
4190 | } else { |
4191 | $this->peg_currPos = $s0; |
4192 | $s0 = $this->peg_FAILED; |
4193 | } |
4194 | } else { |
4195 | $this->peg_currPos = $s0; |
4196 | $s0 = $this->peg_FAILED; |
4197 | } |
4198 | if ($s0 === $this->peg_FAILED) { |
4199 | $s0 = $this->peg_currPos; |
4200 | $s1 = $this->peg_parsegeneric_func(); |
4201 | if ($s1 !== $this->peg_FAILED) { |
4202 | $this->peg_reportedPos = $this->peg_currPos; |
4203 | $s2 = $this->peg_f86($s1); |
4204 | if ($s2) { |
4205 | $s2 = null; |
4206 | } else { |
4207 | $s2 = $this->peg_FAILED; |
4208 | } |
4209 | if ($s2 !== $this->peg_FAILED) { |
4210 | $s3 = $this->peg_parse_(); |
4211 | if ($s3 !== $this->peg_FAILED) { |
4212 | $this->peg_reportedPos = $s0; |
4213 | $s1 = $this->peg_f87($s1); |
4214 | $s0 = $s1; |
4215 | } else { |
4216 | $this->peg_currPos = $s0; |
4217 | $s0 = $this->peg_FAILED; |
4218 | } |
4219 | } else { |
4220 | $this->peg_currPos = $s0; |
4221 | $s0 = $this->peg_FAILED; |
4222 | } |
4223 | } else { |
4224 | $this->peg_currPos = $s0; |
4225 | $s0 = $this->peg_FAILED; |
4226 | } |
4227 | if ($s0 === $this->peg_FAILED) { |
4228 | $s0 = $this->peg_currPos; |
4229 | $s1 = $this->peg_parsegeneric_func(); |
4230 | if ($s1 !== $this->peg_FAILED) { |
4231 | $this->peg_reportedPos = $this->peg_currPos; |
4232 | $s2 = $this->peg_f88($s1); |
4233 | if ($s2) { |
4234 | $s2 = null; |
4235 | } else { |
4236 | $s2 = $this->peg_FAILED; |
4237 | } |
4238 | if ($s2 !== $this->peg_FAILED) { |
4239 | $s3 = $this->peg_parse_(); |
4240 | if ($s3 !== $this->peg_FAILED) { |
4241 | $this->peg_reportedPos = $s0; |
4242 | $s1 = $this->peg_f89($s1); |
4243 | $s0 = $s1; |
4244 | } else { |
4245 | $this->peg_currPos = $s0; |
4246 | $s0 = $this->peg_FAILED; |
4247 | } |
4248 | } else { |
4249 | $this->peg_currPos = $s0; |
4250 | $s0 = $this->peg_FAILED; |
4251 | } |
4252 | } else { |
4253 | $this->peg_currPos = $s0; |
4254 | $s0 = $this->peg_FAILED; |
4255 | } |
4256 | if ($s0 === $this->peg_FAILED) { |
4257 | $s0 = $this->peg_currPos; |
4258 | $s1 = $this->peg_parsegeneric_func(); |
4259 | if ($s1 !== $this->peg_FAILED) { |
4260 | $this->peg_reportedPos = $this->peg_currPos; |
4261 | $s2 = $this->peg_f90($s1); |
4262 | if ($s2) { |
4263 | $s2 = null; |
4264 | } else { |
4265 | $s2 = $this->peg_FAILED; |
4266 | } |
4267 | if ($s2 !== $this->peg_FAILED) { |
4268 | $s3 = $this->peg_parse_(); |
4269 | if ($s3 !== $this->peg_FAILED) { |
4270 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c39) { |
4271 | $s4 = $this->peg_c39; |
4272 | $this->peg_currPos++; |
4273 | } else { |
4274 | $s4 = $this->peg_FAILED; |
4275 | if ($this->peg_silentFails === 0) { |
4276 | $this->peg_fail($this->peg_c40); |
4277 | } |
4278 | } |
4279 | if ($s4 !== $this->peg_FAILED) { |
4280 | $s5 = $this->peg_parsegeneric_func(); |
4281 | if ($s5 !== $this->peg_FAILED) { |
4282 | $this->peg_reportedPos = $this->peg_currPos; |
4283 | $s6 = $this->peg_f91($s1, $s5); |
4284 | if ($s6) { |
4285 | $s6 = null; |
4286 | } else { |
4287 | $s6 = $this->peg_FAILED; |
4288 | } |
4289 | if ($s6 !== $this->peg_FAILED) { |
4290 | $s7 = $this->peg_parse_(); |
4291 | if ($s7 !== $this->peg_FAILED) { |
4292 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c11) { |
4293 | $s8 = $this->peg_c11; |
4294 | $this->peg_currPos++; |
4295 | } else { |
4296 | $s8 = $this->peg_FAILED; |
4297 | if ($this->peg_silentFails === 0) { |
4298 | $this->peg_fail($this->peg_c12); |
4299 | } |
4300 | } |
4301 | if ($s8 !== $this->peg_FAILED) { |
4302 | $s9 = $this->peg_parse_(); |
4303 | if ($s9 !== $this->peg_FAILED) { |
4304 | $this->peg_reportedPos = $s0; |
4305 | $s1 = $this->peg_f92($s1, $s5); |
4306 | $s0 = $s1; |
4307 | } else { |
4308 | $this->peg_currPos = $s0; |
4309 | $s0 = $this->peg_FAILED; |
4310 | } |
4311 | } else { |
4312 | $this->peg_currPos = $s0; |
4313 | $s0 = $this->peg_FAILED; |
4314 | } |
4315 | } else { |
4316 | $this->peg_currPos = $s0; |
4317 | $s0 = $this->peg_FAILED; |
4318 | } |
4319 | } else { |
4320 | $this->peg_currPos = $s0; |
4321 | $s0 = $this->peg_FAILED; |
4322 | } |
4323 | } else { |
4324 | $this->peg_currPos = $s0; |
4325 | $s0 = $this->peg_FAILED; |
4326 | } |
4327 | } else { |
4328 | $this->peg_currPos = $s0; |
4329 | $s0 = $this->peg_FAILED; |
4330 | } |
4331 | } else { |
4332 | $this->peg_currPos = $s0; |
4333 | $s0 = $this->peg_FAILED; |
4334 | } |
4335 | } else { |
4336 | $this->peg_currPos = $s0; |
4337 | $s0 = $this->peg_FAILED; |
4338 | } |
4339 | } else { |
4340 | $this->peg_currPos = $s0; |
4341 | $s0 = $this->peg_FAILED; |
4342 | } |
4343 | if ($s0 === $this->peg_FAILED) { |
4344 | $s0 = $this->peg_currPos; |
4345 | $s1 = $this->peg_parsegeneric_func(); |
4346 | if ($s1 !== $this->peg_FAILED) { |
4347 | $this->peg_reportedPos = $this->peg_currPos; |
4348 | $s2 = $this->peg_f93($s1); |
4349 | if ($s2) { |
4350 | $s2 = null; |
4351 | } else { |
4352 | $s2 = $this->peg_FAILED; |
4353 | } |
4354 | if ($s2 !== $this->peg_FAILED) { |
4355 | $s3 = $this->peg_parse_(); |
4356 | if ($s3 !== $this->peg_FAILED) { |
4357 | $this->peg_reportedPos = $s0; |
4358 | $s1 = $this->peg_f94($s1); |
4359 | $s0 = $s1; |
4360 | } else { |
4361 | $this->peg_currPos = $s0; |
4362 | $s0 = $this->peg_FAILED; |
4363 | } |
4364 | } else { |
4365 | $this->peg_currPos = $s0; |
4366 | $s0 = $this->peg_FAILED; |
4367 | } |
4368 | } else { |
4369 | $this->peg_currPos = $s0; |
4370 | $s0 = $this->peg_FAILED; |
4371 | } |
4372 | if ($s0 === $this->peg_FAILED) { |
4373 | $s0 = $this->peg_currPos; |
4374 | $s1 = $this->peg_parsegeneric_func(); |
4375 | if ($s1 !== $this->peg_FAILED) { |
4376 | $this->peg_reportedPos = $this->peg_currPos; |
4377 | $s2 = $this->peg_f95($s1); |
4378 | if ($s2) { |
4379 | $s2 = null; |
4380 | } else { |
4381 | $s2 = $this->peg_FAILED; |
4382 | } |
4383 | if ($s2 !== $this->peg_FAILED) { |
4384 | $s3 = $this->peg_parse_(); |
4385 | if ($s3 !== $this->peg_FAILED) { |
4386 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c39) { |
4387 | $s4 = $this->peg_c39; |
4388 | $this->peg_currPos++; |
4389 | } else { |
4390 | $s4 = $this->peg_FAILED; |
4391 | if ($this->peg_silentFails === 0) { |
4392 | $this->peg_fail($this->peg_c40); |
4393 | } |
4394 | } |
4395 | if ($s4 !== $this->peg_FAILED) { |
4396 | $s5 = $this->peg_parsegeneric_func(); |
4397 | if ($s5 !== $this->peg_FAILED) { |
4398 | $this->peg_reportedPos = $this->peg_currPos; |
4399 | $s6 = $this->peg_f96($s1, $s5); |
4400 | if ($s6) { |
4401 | $s6 = null; |
4402 | } else { |
4403 | $s6 = $this->peg_FAILED; |
4404 | } |
4405 | if ($s6 !== $this->peg_FAILED) { |
4406 | $s7 = $this->peg_parse_(); |
4407 | if ($s7 !== $this->peg_FAILED) { |
4408 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c11) { |
4409 | $s8 = $this->peg_c11; |
4410 | $this->peg_currPos++; |
4411 | } else { |
4412 | $s8 = $this->peg_FAILED; |
4413 | if ($this->peg_silentFails === 0) { |
4414 | $this->peg_fail($this->peg_c12); |
4415 | } |
4416 | } |
4417 | if ($s8 !== $this->peg_FAILED) { |
4418 | $s9 = $this->peg_parse_(); |
4419 | if ($s9 !== $this->peg_FAILED) { |
4420 | $this->peg_reportedPos = $s0; |
4421 | $s1 = $this->peg_f97($s1, $s5); |
4422 | $s0 = $s1; |
4423 | } else { |
4424 | $this->peg_currPos = $s0; |
4425 | $s0 = $this->peg_FAILED; |
4426 | } |
4427 | } else { |
4428 | $this->peg_currPos = $s0; |
4429 | $s0 = $this->peg_FAILED; |
4430 | } |
4431 | } else { |
4432 | $this->peg_currPos = $s0; |
4433 | $s0 = $this->peg_FAILED; |
4434 | } |
4435 | } else { |
4436 | $this->peg_currPos = $s0; |
4437 | $s0 = $this->peg_FAILED; |
4438 | } |
4439 | } else { |
4440 | $this->peg_currPos = $s0; |
4441 | $s0 = $this->peg_FAILED; |
4442 | } |
4443 | } else { |
4444 | $this->peg_currPos = $s0; |
4445 | $s0 = $this->peg_FAILED; |
4446 | } |
4447 | } else { |
4448 | $this->peg_currPos = $s0; |
4449 | $s0 = $this->peg_FAILED; |
4450 | } |
4451 | } else { |
4452 | $this->peg_currPos = $s0; |
4453 | $s0 = $this->peg_FAILED; |
4454 | } |
4455 | } else { |
4456 | $this->peg_currPos = $s0; |
4457 | $s0 = $this->peg_FAILED; |
4458 | } |
4459 | if ($s0 === $this->peg_FAILED) { |
4460 | $s0 = $this->peg_currPos; |
4461 | $s1 = $this->peg_parseCOLOR(); |
4462 | if ($s1 === $this->peg_FAILED) { |
4463 | $s1 = $this->peg_parseDEFINECOLOR(); |
4464 | } |
4465 | if ($s1 !== $this->peg_FAILED) { |
4466 | $this->peg_reportedPos = $s0; |
4467 | $s1 = $this->peg_f98($s1); |
4468 | } |
4469 | $s0 = $s1; |
4470 | if ($s0 === $this->peg_FAILED) { |
4471 | $s0 = $this->peg_currPos; |
4472 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c55) { |
4473 | $s1 = $this->peg_c55; |
4474 | $this->peg_currPos++; |
4475 | } else { |
4476 | $s1 = $this->peg_FAILED; |
4477 | if ($this->peg_silentFails === 0) { |
4478 | $this->peg_fail($this->peg_c56); |
4479 | } |
4480 | } |
4481 | if ($s1 !== $this->peg_FAILED) { |
4482 | if (peg_regex_test($this->peg_c57, $this->input_substr($this->peg_currPos, 1))) { |
4483 | $s2 = $this->input_substr($this->peg_currPos, 1); |
4484 | $this->peg_currPos++; |
4485 | } else { |
4486 | $s2 = $this->peg_FAILED; |
4487 | if ($this->peg_silentFails === 0) { |
4488 | $this->peg_fail($this->peg_c58); |
4489 | } |
4490 | } |
4491 | if ($s2 !== $this->peg_FAILED) { |
4492 | $s3 = $this->peg_parse_(); |
4493 | if ($s3 !== $this->peg_FAILED) { |
4494 | $this->peg_reportedPos = $s0; |
4495 | $s1 = $this->peg_f99($s2); |
4496 | $s0 = $s1; |
4497 | } else { |
4498 | $this->peg_currPos = $s0; |
4499 | $s0 = $this->peg_FAILED; |
4500 | } |
4501 | } else { |
4502 | $this->peg_currPos = $s0; |
4503 | $s0 = $this->peg_FAILED; |
4504 | } |
4505 | } else { |
4506 | $this->peg_currPos = $s0; |
4507 | $s0 = $this->peg_FAILED; |
4508 | } |
4509 | if ($s0 === $this->peg_FAILED) { |
4510 | $s0 = $this->peg_currPos; |
4511 | if (peg_regex_test($this->peg_c59, $this->input_substr($this->peg_currPos, 1))) { |
4512 | $s1 = $this->input_substr($this->peg_currPos, 1); |
4513 | $this->peg_currPos++; |
4514 | } else { |
4515 | $s1 = $this->peg_FAILED; |
4516 | if ($this->peg_silentFails === 0) { |
4517 | $this->peg_fail($this->peg_c60); |
4518 | } |
4519 | } |
4520 | if ($s1 !== $this->peg_FAILED) { |
4521 | $s2 = $this->peg_parse_(); |
4522 | if ($s2 !== $this->peg_FAILED) { |
4523 | $this->peg_reportedPos = $s0; |
4524 | $s1 = $this->peg_f85($s1); |
4525 | $s0 = $s1; |
4526 | } else { |
4527 | $this->peg_currPos = $s0; |
4528 | $s0 = $this->peg_FAILED; |
4529 | } |
4530 | } else { |
4531 | $this->peg_currPos = $s0; |
4532 | $s0 = $this->peg_FAILED; |
4533 | } |
4534 | if ($s0 === $this->peg_FAILED) { |
4535 | $s0 = $this->peg_currPos; |
4536 | if (peg_regex_test($this->peg_c61, $this->input_substr($this->peg_currPos, 1))) { |
4537 | $s1 = $this->input_substr($this->peg_currPos, 1); |
4538 | $this->peg_currPos++; |
4539 | } else { |
4540 | $s1 = $this->peg_FAILED; |
4541 | if ($this->peg_silentFails === 0) { |
4542 | $this->peg_fail($this->peg_c62); |
4543 | } |
4544 | } |
4545 | if ($s1 !== $this->peg_FAILED) { |
4546 | $s2 = $this->peg_parse_(); |
4547 | if ($s2 !== $this->peg_FAILED) { |
4548 | $this->peg_reportedPos = $s0; |
4549 | $s1 = $this->peg_f100($s1); |
4550 | $s0 = $s1; |
4551 | } else { |
4552 | $this->peg_currPos = $s0; |
4553 | $s0 = $this->peg_FAILED; |
4554 | } |
4555 | } else { |
4556 | $this->peg_currPos = $s0; |
4557 | $s0 = $this->peg_FAILED; |
4558 | } |
4559 | } |
4560 | } |
4561 | } |
4562 | } |
4563 | } |
4564 | } |
4565 | } |
4566 | } |
4567 | } |
4568 | |
4569 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
4570 | |
4571 | return $s0; |
4572 | } |
4573 | |
4574 | private function peg_parseDELIMITER() { |
4575 | |
4576 | $key = $this->peg_currPos * 130 + 51; |
4577 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
4578 | |
4579 | if ($cached) { |
4580 | $this->peg_currPos = $cached["nextPos"]; |
4581 | return $cached["result"]; |
4582 | } |
4583 | |
4584 | $s0 = $this->peg_currPos; |
4585 | $s1 = $this->peg_parsedelimiter_uf_lt(); |
4586 | if ($s1 === $this->peg_FAILED) { |
4587 | $s1 = $this->peg_parsedelimiter_uf_op(); |
4588 | if ($s1 === $this->peg_FAILED) { |
4589 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c5) { |
4590 | $s1 = $this->peg_c5; |
4591 | $this->peg_currPos++; |
4592 | } else { |
4593 | $s1 = $this->peg_FAILED; |
4594 | if ($this->peg_silentFails === 0) { |
4595 | $this->peg_fail($this->peg_c6); |
4596 | } |
4597 | } |
4598 | } |
4599 | } |
4600 | if ($s1 !== $this->peg_FAILED) { |
4601 | $s2 = $this->peg_parse_(); |
4602 | if ($s2 !== $this->peg_FAILED) { |
4603 | $this->peg_reportedPos = $s0; |
4604 | $s1 = $this->peg_f85($s1); |
4605 | $s0 = $s1; |
4606 | } else { |
4607 | $this->peg_currPos = $s0; |
4608 | $s0 = $this->peg_FAILED; |
4609 | } |
4610 | } else { |
4611 | $this->peg_currPos = $s0; |
4612 | $s0 = $this->peg_FAILED; |
4613 | } |
4614 | if ($s0 === $this->peg_FAILED) { |
4615 | $s0 = $this->peg_currPos; |
4616 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c55) { |
4617 | $s1 = $this->peg_c55; |
4618 | $this->peg_currPos++; |
4619 | } else { |
4620 | $s1 = $this->peg_FAILED; |
4621 | if ($this->peg_silentFails === 0) { |
4622 | $this->peg_fail($this->peg_c56); |
4623 | } |
4624 | } |
4625 | if ($s1 !== $this->peg_FAILED) { |
4626 | if (peg_regex_test($this->peg_c63, $this->input_substr($this->peg_currPos, 1))) { |
4627 | $s2 = $this->input_substr($this->peg_currPos, 1); |
4628 | $this->peg_currPos++; |
4629 | } else { |
4630 | $s2 = $this->peg_FAILED; |
4631 | if ($this->peg_silentFails === 0) { |
4632 | $this->peg_fail($this->peg_c64); |
4633 | } |
4634 | } |
4635 | if ($s2 !== $this->peg_FAILED) { |
4636 | $s3 = $this->peg_parse_(); |
4637 | if ($s3 !== $this->peg_FAILED) { |
4638 | $this->peg_reportedPos = $s0; |
4639 | $s1 = $this->peg_f99($s2); |
4640 | $s0 = $s1; |
4641 | } else { |
4642 | $this->peg_currPos = $s0; |
4643 | $s0 = $this->peg_FAILED; |
4644 | } |
4645 | } else { |
4646 | $this->peg_currPos = $s0; |
4647 | $s0 = $this->peg_FAILED; |
4648 | } |
4649 | } else { |
4650 | $this->peg_currPos = $s0; |
4651 | $s0 = $this->peg_FAILED; |
4652 | } |
4653 | if ($s0 === $this->peg_FAILED) { |
4654 | $s0 = $this->peg_currPos; |
4655 | $s1 = $this->peg_parsegeneric_func(); |
4656 | if ($s1 !== $this->peg_FAILED) { |
4657 | $this->peg_reportedPos = $this->peg_currPos; |
4658 | $s2 = $this->peg_f101($s1); |
4659 | if ($s2) { |
4660 | $s2 = null; |
4661 | } else { |
4662 | $s2 = $this->peg_FAILED; |
4663 | } |
4664 | if ($s2 !== $this->peg_FAILED) { |
4665 | $s3 = $this->peg_parse_(); |
4666 | if ($s3 !== $this->peg_FAILED) { |
4667 | $this->peg_reportedPos = $s0; |
4668 | $s1 = $this->peg_f87($s1); |
4669 | $s0 = $s1; |
4670 | } else { |
4671 | $this->peg_currPos = $s0; |
4672 | $s0 = $this->peg_FAILED; |
4673 | } |
4674 | } else { |
4675 | $this->peg_currPos = $s0; |
4676 | $s0 = $this->peg_FAILED; |
4677 | } |
4678 | } else { |
4679 | $this->peg_currPos = $s0; |
4680 | $s0 = $this->peg_FAILED; |
4681 | } |
4682 | if ($s0 === $this->peg_FAILED) { |
4683 | $s0 = $this->peg_currPos; |
4684 | $s1 = $this->peg_parsegeneric_func(); |
4685 | if ($s1 !== $this->peg_FAILED) { |
4686 | $this->peg_reportedPos = $this->peg_currPos; |
4687 | $s2 = $this->peg_f102($s1); |
4688 | if ($s2) { |
4689 | $s2 = null; |
4690 | } else { |
4691 | $s2 = $this->peg_FAILED; |
4692 | } |
4693 | if ($s2 !== $this->peg_FAILED) { |
4694 | $s3 = $this->peg_parse_(); |
4695 | if ($s3 !== $this->peg_FAILED) { |
4696 | $this->peg_reportedPos = $s0; |
4697 | $s1 = $this->peg_f103($s1); |
4698 | $s0 = $s1; |
4699 | } else { |
4700 | $this->peg_currPos = $s0; |
4701 | $s0 = $this->peg_FAILED; |
4702 | } |
4703 | } else { |
4704 | $this->peg_currPos = $s0; |
4705 | $s0 = $this->peg_FAILED; |
4706 | } |
4707 | } else { |
4708 | $this->peg_currPos = $s0; |
4709 | $s0 = $this->peg_FAILED; |
4710 | } |
4711 | } |
4712 | } |
4713 | } |
4714 | |
4715 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
4716 | |
4717 | return $s0; |
4718 | } |
4719 | |
4720 | private function peg_parseFUN_AR1nb() { |
4721 | |
4722 | $key = $this->peg_currPos * 130 + 52; |
4723 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
4724 | |
4725 | if ($cached) { |
4726 | $this->peg_currPos = $cached["nextPos"]; |
4727 | return $cached["result"]; |
4728 | } |
4729 | |
4730 | $s0 = $this->peg_currPos; |
4731 | $s1 = $this->peg_parsegeneric_func(); |
4732 | if ($s1 !== $this->peg_FAILED) { |
4733 | $this->peg_reportedPos = $this->peg_currPos; |
4734 | $s2 = $this->peg_f104($s1); |
4735 | if ($s2) { |
4736 | $s2 = null; |
4737 | } else { |
4738 | $s2 = $this->peg_FAILED; |
4739 | } |
4740 | if ($s2 !== $this->peg_FAILED) { |
4741 | $s3 = $this->peg_parse_(); |
4742 | if ($s3 !== $this->peg_FAILED) { |
4743 | $this->peg_reportedPos = $s0; |
4744 | $s1 = $this->peg_f98($s1); |
4745 | $s0 = $s1; |
4746 | } else { |
4747 | $this->peg_currPos = $s0; |
4748 | $s0 = $this->peg_FAILED; |
4749 | } |
4750 | } else { |
4751 | $this->peg_currPos = $s0; |
4752 | $s0 = $this->peg_FAILED; |
4753 | } |
4754 | } else { |
4755 | $this->peg_currPos = $s0; |
4756 | $s0 = $this->peg_FAILED; |
4757 | } |
4758 | |
4759 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
4760 | |
4761 | return $s0; |
4762 | } |
4763 | |
4764 | private function peg_parseFUN_AR1opt() { |
4765 | |
4766 | $key = $this->peg_currPos * 130 + 53; |
4767 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
4768 | |
4769 | if ($cached) { |
4770 | $this->peg_currPos = $cached["nextPos"]; |
4771 | return $cached["result"]; |
4772 | } |
4773 | |
4774 | $s0 = $this->peg_currPos; |
4775 | $s1 = $this->peg_parsegeneric_func(); |
4776 | if ($s1 !== $this->peg_FAILED) { |
4777 | $this->peg_reportedPos = $this->peg_currPos; |
4778 | $s2 = $this->peg_f105($s1); |
4779 | if ($s2) { |
4780 | $s2 = null; |
4781 | } else { |
4782 | $s2 = $this->peg_FAILED; |
4783 | } |
4784 | if ($s2 !== $this->peg_FAILED) { |
4785 | $s3 = $this->peg_parse_(); |
4786 | if ($s3 !== $this->peg_FAILED) { |
4787 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c5) { |
4788 | $s4 = $this->peg_c5; |
4789 | $this->peg_currPos++; |
4790 | } else { |
4791 | $s4 = $this->peg_FAILED; |
4792 | if ($this->peg_silentFails === 0) { |
4793 | $this->peg_fail($this->peg_c6); |
4794 | } |
4795 | } |
4796 | if ($s4 !== $this->peg_FAILED) { |
4797 | $s5 = $this->peg_parse_(); |
4798 | if ($s5 !== $this->peg_FAILED) { |
4799 | $this->peg_reportedPos = $s0; |
4800 | $s1 = $this->peg_f98($s1); |
4801 | $s0 = $s1; |
4802 | } else { |
4803 | $this->peg_currPos = $s0; |
4804 | $s0 = $this->peg_FAILED; |
4805 | } |
4806 | } else { |
4807 | $this->peg_currPos = $s0; |
4808 | $s0 = $this->peg_FAILED; |
4809 | } |
4810 | } else { |
4811 | $this->peg_currPos = $s0; |
4812 | $s0 = $this->peg_FAILED; |
4813 | } |
4814 | } else { |
4815 | $this->peg_currPos = $s0; |
4816 | $s0 = $this->peg_FAILED; |
4817 | } |
4818 | } else { |
4819 | $this->peg_currPos = $s0; |
4820 | $s0 = $this->peg_FAILED; |
4821 | } |
4822 | |
4823 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
4824 | |
4825 | return $s0; |
4826 | } |
4827 | |
4828 | private function peg_parseNEXT_CELL() { |
4829 | |
4830 | $key = $this->peg_currPos * 130 + 54; |
4831 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
4832 | |
4833 | if ($cached) { |
4834 | $this->peg_currPos = $cached["nextPos"]; |
4835 | return $cached["result"]; |
4836 | } |
4837 | |
4838 | $s0 = $this->peg_currPos; |
4839 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c65) { |
4840 | $s1 = $this->peg_c65; |
4841 | $this->peg_currPos++; |
4842 | } else { |
4843 | $s1 = $this->peg_FAILED; |
4844 | if ($this->peg_silentFails === 0) { |
4845 | $this->peg_fail($this->peg_c66); |
4846 | } |
4847 | } |
4848 | if ($s1 !== $this->peg_FAILED) { |
4849 | $s2 = $this->peg_parse_(); |
4850 | if ($s2 !== $this->peg_FAILED) { |
4851 | $s1 = array($s1, $s2); |
4852 | $s0 = $s1; |
4853 | } else { |
4854 | $this->peg_currPos = $s0; |
4855 | $s0 = $this->peg_FAILED; |
4856 | } |
4857 | } else { |
4858 | $this->peg_currPos = $s0; |
4859 | $s0 = $this->peg_FAILED; |
4860 | } |
4861 | |
4862 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
4863 | |
4864 | return $s0; |
4865 | } |
4866 | |
4867 | private function peg_parseLATEX_LENGTH() { |
4868 | |
4869 | $key = $this->peg_currPos * 130 + 55; |
4870 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
4871 | |
4872 | if ($cached) { |
4873 | $this->peg_currPos = $cached["nextPos"]; |
4874 | return $cached["result"]; |
4875 | } |
4876 | |
4877 | $s0 = $this->peg_currPos; |
4878 | $s1 = $this->peg_parseLATEX_SIGN(); |
4879 | if ($s1 === $this->peg_FAILED) { |
4880 | $s1 = null; |
4881 | } |
4882 | if ($s1 !== $this->peg_FAILED) { |
4883 | $s2 = $this->peg_parseLATEX_NUMBER(); |
4884 | if ($s2 !== $this->peg_FAILED) { |
4885 | $s3 = $this->peg_parseLATEX_UNIT(); |
4886 | if ($s3 !== $this->peg_FAILED) { |
4887 | $this->peg_reportedPos = $s0; |
4888 | $s1 = $this->peg_f106($s1, $s2, $s3); |
4889 | $s0 = $s1; |
4890 | } else { |
4891 | $this->peg_currPos = $s0; |
4892 | $s0 = $this->peg_FAILED; |
4893 | } |
4894 | } else { |
4895 | $this->peg_currPos = $s0; |
4896 | $s0 = $this->peg_FAILED; |
4897 | } |
4898 | } else { |
4899 | $this->peg_currPos = $s0; |
4900 | $s0 = $this->peg_FAILED; |
4901 | } |
4902 | |
4903 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
4904 | |
4905 | return $s0; |
4906 | } |
4907 | |
4908 | private function peg_parseLATEX_SIGN() { |
4909 | |
4910 | $key = $this->peg_currPos * 130 + 56; |
4911 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
4912 | |
4913 | if ($cached) { |
4914 | $this->peg_currPos = $cached["nextPos"]; |
4915 | return $cached["result"]; |
4916 | } |
4917 | |
4918 | if (peg_regex_test($this->peg_c67, $this->input_substr($this->peg_currPos, 1))) { |
4919 | $s0 = $this->input_substr($this->peg_currPos, 1); |
4920 | $this->peg_currPos++; |
4921 | } else { |
4922 | $s0 = $this->peg_FAILED; |
4923 | if ($this->peg_silentFails === 0) { |
4924 | $this->peg_fail($this->peg_c68); |
4925 | } |
4926 | } |
4927 | |
4928 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
4929 | |
4930 | return $s0; |
4931 | } |
4932 | |
4933 | private function peg_parseLATEX_NUMBER() { |
4934 | |
4935 | $key = $this->peg_currPos * 130 + 57; |
4936 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
4937 | |
4938 | if ($cached) { |
4939 | $this->peg_currPos = $cached["nextPos"]; |
4940 | return $cached["result"]; |
4941 | } |
4942 | |
4943 | $s0 = $this->peg_currPos; |
4944 | $s1 = array(); |
4945 | $s2 = $this->peg_parseliteral_mn(); |
4946 | if ($s2 !== $this->peg_FAILED) { |
4947 | while ($s2 !== $this->peg_FAILED) { |
4948 | $s1[] = $s2; |
4949 | $s2 = $this->peg_parseliteral_mn(); |
4950 | } |
4951 | } else { |
4952 | $s1 = $this->peg_FAILED; |
4953 | } |
4954 | if ($s1 !== $this->peg_FAILED) { |
4955 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c69) { |
4956 | $s2 = $this->peg_c69; |
4957 | $this->peg_currPos++; |
4958 | } else { |
4959 | $s2 = $this->peg_FAILED; |
4960 | if ($this->peg_silentFails === 0) { |
4961 | $this->peg_fail($this->peg_c70); |
4962 | } |
4963 | } |
4964 | if ($s2 === $this->peg_FAILED) { |
4965 | $s2 = null; |
4966 | } |
4967 | if ($s2 !== $this->peg_FAILED) { |
4968 | $s3 = array(); |
4969 | $s4 = $this->peg_parseliteral_mn(); |
4970 | while ($s4 !== $this->peg_FAILED) { |
4971 | $s3[] = $s4; |
4972 | $s4 = $this->peg_parseliteral_mn(); |
4973 | } |
4974 | if ($s3 !== $this->peg_FAILED) { |
4975 | $s1 = array($s1, $s2, $s3); |
4976 | $s0 = $s1; |
4977 | } else { |
4978 | $this->peg_currPos = $s0; |
4979 | $s0 = $this->peg_FAILED; |
4980 | } |
4981 | } else { |
4982 | $this->peg_currPos = $s0; |
4983 | $s0 = $this->peg_FAILED; |
4984 | } |
4985 | } else { |
4986 | $this->peg_currPos = $s0; |
4987 | $s0 = $this->peg_FAILED; |
4988 | } |
4989 | if ($s0 === $this->peg_FAILED) { |
4990 | $s0 = $this->peg_currPos; |
4991 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c69) { |
4992 | $s1 = $this->peg_c69; |
4993 | $this->peg_currPos++; |
4994 | } else { |
4995 | $s1 = $this->peg_FAILED; |
4996 | if ($this->peg_silentFails === 0) { |
4997 | $this->peg_fail($this->peg_c70); |
4998 | } |
4999 | } |
5000 | if ($s1 !== $this->peg_FAILED) { |
5001 | $s2 = array(); |
5002 | $s3 = $this->peg_parseliteral_mn(); |
5003 | if ($s3 !== $this->peg_FAILED) { |
5004 | while ($s3 !== $this->peg_FAILED) { |
5005 | $s2[] = $s3; |
5006 | $s3 = $this->peg_parseliteral_mn(); |
5007 | } |
5008 | } else { |
5009 | $s2 = $this->peg_FAILED; |
5010 | } |
5011 | if ($s2 !== $this->peg_FAILED) { |
5012 | $s1 = array($s1, $s2); |
5013 | $s0 = $s1; |
5014 | } else { |
5015 | $this->peg_currPos = $s0; |
5016 | $s0 = $this->peg_FAILED; |
5017 | } |
5018 | } else { |
5019 | $this->peg_currPos = $s0; |
5020 | $s0 = $this->peg_FAILED; |
5021 | } |
5022 | } |
5023 | |
5024 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5025 | |
5026 | return $s0; |
5027 | } |
5028 | |
5029 | private function peg_parseLATEX_UNIT() { |
5030 | |
5031 | $key = $this->peg_currPos * 130 + 58; |
5032 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5033 | |
5034 | if ($cached) { |
5035 | $this->peg_currPos = $cached["nextPos"]; |
5036 | return $cached["result"]; |
5037 | } |
5038 | |
5039 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c71) { |
5040 | $s0 = $this->peg_c71; |
5041 | $this->peg_currPos += 2; |
5042 | } else { |
5043 | $s0 = $this->peg_FAILED; |
5044 | if ($this->peg_silentFails === 0) { |
5045 | $this->peg_fail($this->peg_c72); |
5046 | } |
5047 | } |
5048 | if ($s0 === $this->peg_FAILED) { |
5049 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c73) { |
5050 | $s0 = $this->peg_c73; |
5051 | $this->peg_currPos += 2; |
5052 | } else { |
5053 | $s0 = $this->peg_FAILED; |
5054 | if ($this->peg_silentFails === 0) { |
5055 | $this->peg_fail($this->peg_c74); |
5056 | } |
5057 | } |
5058 | if ($s0 === $this->peg_FAILED) { |
5059 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c75) { |
5060 | $s0 = $this->peg_c75; |
5061 | $this->peg_currPos += 2; |
5062 | } else { |
5063 | $s0 = $this->peg_FAILED; |
5064 | if ($this->peg_silentFails === 0) { |
5065 | $this->peg_fail($this->peg_c76); |
5066 | } |
5067 | } |
5068 | if ($s0 === $this->peg_FAILED) { |
5069 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c77) { |
5070 | $s0 = $this->peg_c77; |
5071 | $this->peg_currPos += 2; |
5072 | } else { |
5073 | $s0 = $this->peg_FAILED; |
5074 | if ($this->peg_silentFails === 0) { |
5075 | $this->peg_fail($this->peg_c78); |
5076 | } |
5077 | } |
5078 | if ($s0 === $this->peg_FAILED) { |
5079 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c79) { |
5080 | $s0 = $this->peg_c79; |
5081 | $this->peg_currPos += 2; |
5082 | } else { |
5083 | $s0 = $this->peg_FAILED; |
5084 | if ($this->peg_silentFails === 0) { |
5085 | $this->peg_fail($this->peg_c80); |
5086 | } |
5087 | } |
5088 | if ($s0 === $this->peg_FAILED) { |
5089 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c81) { |
5090 | $s0 = $this->peg_c81; |
5091 | $this->peg_currPos += 2; |
5092 | } else { |
5093 | $s0 = $this->peg_FAILED; |
5094 | if ($this->peg_silentFails === 0) { |
5095 | $this->peg_fail($this->peg_c82); |
5096 | } |
5097 | } |
5098 | if ($s0 === $this->peg_FAILED) { |
5099 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c83) { |
5100 | $s0 = $this->peg_c83; |
5101 | $this->peg_currPos += 2; |
5102 | } else { |
5103 | $s0 = $this->peg_FAILED; |
5104 | if ($this->peg_silentFails === 0) { |
5105 | $this->peg_fail($this->peg_c84); |
5106 | } |
5107 | } |
5108 | if ($s0 === $this->peg_FAILED) { |
5109 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c85) { |
5110 | $s0 = $this->peg_c85; |
5111 | $this->peg_currPos += 2; |
5112 | } else { |
5113 | $s0 = $this->peg_FAILED; |
5114 | if ($this->peg_silentFails === 0) { |
5115 | $this->peg_fail($this->peg_c86); |
5116 | } |
5117 | } |
5118 | if ($s0 === $this->peg_FAILED) { |
5119 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c87) { |
5120 | $s0 = $this->peg_c87; |
5121 | $this->peg_currPos += 2; |
5122 | } else { |
5123 | $s0 = $this->peg_FAILED; |
5124 | if ($this->peg_silentFails === 0) { |
5125 | $this->peg_fail($this->peg_c88); |
5126 | } |
5127 | } |
5128 | if ($s0 === $this->peg_FAILED) { |
5129 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c89) { |
5130 | $s0 = $this->peg_c89; |
5131 | $this->peg_currPos += 2; |
5132 | } else { |
5133 | $s0 = $this->peg_FAILED; |
5134 | if ($this->peg_silentFails === 0) { |
5135 | $this->peg_fail($this->peg_c90); |
5136 | } |
5137 | } |
5138 | if ($s0 === $this->peg_FAILED) { |
5139 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c91) { |
5140 | $s0 = $this->peg_c91; |
5141 | $this->peg_currPos += 2; |
5142 | } else { |
5143 | $s0 = $this->peg_FAILED; |
5144 | if ($this->peg_silentFails === 0) { |
5145 | $this->peg_fail($this->peg_c92); |
5146 | } |
5147 | } |
5148 | if ($s0 === $this->peg_FAILED) { |
5149 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c93) { |
5150 | $s0 = $this->peg_c93; |
5151 | $this->peg_currPos += 2; |
5152 | } else { |
5153 | $s0 = $this->peg_FAILED; |
5154 | if ($this->peg_silentFails === 0) { |
5155 | $this->peg_fail($this->peg_c94); |
5156 | } |
5157 | } |
5158 | if ($s0 === $this->peg_FAILED) { |
5159 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c95) { |
5160 | $s0 = $this->peg_c95; |
5161 | $this->peg_currPos += 2; |
5162 | } else { |
5163 | $s0 = $this->peg_FAILED; |
5164 | if ($this->peg_silentFails === 0) { |
5165 | $this->peg_fail($this->peg_c96); |
5166 | } |
5167 | } |
5168 | if ($s0 === $this->peg_FAILED) { |
5169 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c97) { |
5170 | $s0 = $this->peg_c97; |
5171 | $this->peg_currPos += 2; |
5172 | } else { |
5173 | $s0 = $this->peg_FAILED; |
5174 | if ($this->peg_silentFails === 0) { |
5175 | $this->peg_fail($this->peg_c98); |
5176 | } |
5177 | } |
5178 | } |
5179 | } |
5180 | } |
5181 | } |
5182 | } |
5183 | } |
5184 | } |
5185 | } |
5186 | } |
5187 | } |
5188 | } |
5189 | } |
5190 | } |
5191 | |
5192 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5193 | |
5194 | return $s0; |
5195 | } |
5196 | |
5197 | private function peg_parseNEXT_ROW() { |
5198 | |
5199 | $key = $this->peg_currPos * 130 + 59; |
5200 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5201 | |
5202 | if ($cached) { |
5203 | $this->peg_currPos = $cached["nextPos"]; |
5204 | return $cached["result"]; |
5205 | } |
5206 | |
5207 | $s0 = $this->peg_currPos; |
5208 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c99) { |
5209 | $s1 = $this->peg_c99; |
5210 | $this->peg_currPos += 2; |
5211 | } else { |
5212 | $s1 = $this->peg_FAILED; |
5213 | if ($this->peg_silentFails === 0) { |
5214 | $this->peg_fail($this->peg_c100); |
5215 | } |
5216 | } |
5217 | if ($s1 !== $this->peg_FAILED) { |
5218 | $s2 = $this->peg_currPos; |
5219 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c5) { |
5220 | $s3 = $this->peg_c5; |
5221 | $this->peg_currPos++; |
5222 | } else { |
5223 | $s3 = $this->peg_FAILED; |
5224 | if ($this->peg_silentFails === 0) { |
5225 | $this->peg_fail($this->peg_c6); |
5226 | } |
5227 | } |
5228 | if ($s3 !== $this->peg_FAILED) { |
5229 | $s4 = $this->peg_parseLATEX_LENGTH(); |
5230 | if ($s4 !== $this->peg_FAILED) { |
5231 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c29) { |
5232 | $s5 = $this->peg_c29; |
5233 | $this->peg_currPos++; |
5234 | } else { |
5235 | $s5 = $this->peg_FAILED; |
5236 | if ($this->peg_silentFails === 0) { |
5237 | $this->peg_fail($this->peg_c30); |
5238 | } |
5239 | } |
5240 | if ($s5 !== $this->peg_FAILED) { |
5241 | $this->peg_reportedPos = $s2; |
5242 | $s3 = $this->peg_f107($s4); |
5243 | $s2 = $s3; |
5244 | } else { |
5245 | $this->peg_currPos = $s2; |
5246 | $s2 = $this->peg_FAILED; |
5247 | } |
5248 | } else { |
5249 | $this->peg_currPos = $s2; |
5250 | $s2 = $this->peg_FAILED; |
5251 | } |
5252 | } else { |
5253 | $this->peg_currPos = $s2; |
5254 | $s2 = $this->peg_FAILED; |
5255 | } |
5256 | if ($s2 === $this->peg_FAILED) { |
5257 | $s2 = null; |
5258 | } |
5259 | if ($s2 !== $this->peg_FAILED) { |
5260 | $s3 = $this->peg_parse_(); |
5261 | if ($s3 !== $this->peg_FAILED) { |
5262 | $this->peg_reportedPos = $s0; |
5263 | $s1 = $this->peg_f108($s2); |
5264 | $s0 = $s1; |
5265 | } else { |
5266 | $this->peg_currPos = $s0; |
5267 | $s0 = $this->peg_FAILED; |
5268 | } |
5269 | } else { |
5270 | $this->peg_currPos = $s0; |
5271 | $s0 = $this->peg_FAILED; |
5272 | } |
5273 | } else { |
5274 | $this->peg_currPos = $s0; |
5275 | $s0 = $this->peg_FAILED; |
5276 | } |
5277 | |
5278 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5279 | |
5280 | return $s0; |
5281 | } |
5282 | |
5283 | private function peg_parseBEGIN() { |
5284 | |
5285 | $key = $this->peg_currPos * 130 + 60; |
5286 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5287 | |
5288 | if ($cached) { |
5289 | $this->peg_currPos = $cached["nextPos"]; |
5290 | return $cached["result"]; |
5291 | } |
5292 | |
5293 | $s0 = $this->peg_currPos; |
5294 | if ($this->input_substr($this->peg_currPos, 6) === $this->peg_c101) { |
5295 | $s1 = $this->peg_c101; |
5296 | $this->peg_currPos += 6; |
5297 | } else { |
5298 | $s1 = $this->peg_FAILED; |
5299 | if ($this->peg_silentFails === 0) { |
5300 | $this->peg_fail($this->peg_c102); |
5301 | } |
5302 | } |
5303 | if ($s1 !== $this->peg_FAILED) { |
5304 | $s2 = $this->peg_parse_(); |
5305 | if ($s2 !== $this->peg_FAILED) { |
5306 | $s1 = array($s1, $s2); |
5307 | $s0 = $s1; |
5308 | } else { |
5309 | $this->peg_currPos = $s0; |
5310 | $s0 = $this->peg_FAILED; |
5311 | } |
5312 | } else { |
5313 | $this->peg_currPos = $s0; |
5314 | $s0 = $this->peg_FAILED; |
5315 | } |
5316 | |
5317 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5318 | |
5319 | return $s0; |
5320 | } |
5321 | |
5322 | private function peg_parseEND() { |
5323 | |
5324 | $key = $this->peg_currPos * 130 + 61; |
5325 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5326 | |
5327 | if ($cached) { |
5328 | $this->peg_currPos = $cached["nextPos"]; |
5329 | return $cached["result"]; |
5330 | } |
5331 | |
5332 | $s0 = $this->peg_currPos; |
5333 | if ($this->input_substr($this->peg_currPos, 4) === $this->peg_c103) { |
5334 | $s1 = $this->peg_c103; |
5335 | $this->peg_currPos += 4; |
5336 | } else { |
5337 | $s1 = $this->peg_FAILED; |
5338 | if ($this->peg_silentFails === 0) { |
5339 | $this->peg_fail($this->peg_c104); |
5340 | } |
5341 | } |
5342 | if ($s1 !== $this->peg_FAILED) { |
5343 | $s2 = $this->peg_parse_(); |
5344 | if ($s2 !== $this->peg_FAILED) { |
5345 | $s1 = array($s1, $s2); |
5346 | $s0 = $s1; |
5347 | } else { |
5348 | $this->peg_currPos = $s0; |
5349 | $s0 = $this->peg_FAILED; |
5350 | } |
5351 | } else { |
5352 | $this->peg_currPos = $s0; |
5353 | $s0 = $this->peg_FAILED; |
5354 | } |
5355 | |
5356 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5357 | |
5358 | return $s0; |
5359 | } |
5360 | |
5361 | private function peg_parseBEGIN_MATRIX() { |
5362 | |
5363 | $key = $this->peg_currPos * 130 + 62; |
5364 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5365 | |
5366 | if ($cached) { |
5367 | $this->peg_currPos = $cached["nextPos"]; |
5368 | return $cached["result"]; |
5369 | } |
5370 | |
5371 | $s0 = $this->peg_currPos; |
5372 | $s1 = $this->peg_parseBEGIN(); |
5373 | if ($s1 !== $this->peg_FAILED) { |
5374 | if ($this->input_substr($this->peg_currPos, 8) === $this->peg_c105) { |
5375 | $s2 = $this->peg_c105; |
5376 | $this->peg_currPos += 8; |
5377 | } else { |
5378 | $s2 = $this->peg_FAILED; |
5379 | if ($this->peg_silentFails === 0) { |
5380 | $this->peg_fail($this->peg_c106); |
5381 | } |
5382 | } |
5383 | if ($s2 !== $this->peg_FAILED) { |
5384 | $s3 = $this->peg_parse_(); |
5385 | if ($s3 !== $this->peg_FAILED) { |
5386 | $s1 = array($s1, $s2, $s3); |
5387 | $s0 = $s1; |
5388 | } else { |
5389 | $this->peg_currPos = $s0; |
5390 | $s0 = $this->peg_FAILED; |
5391 | } |
5392 | } else { |
5393 | $this->peg_currPos = $s0; |
5394 | $s0 = $this->peg_FAILED; |
5395 | } |
5396 | } else { |
5397 | $this->peg_currPos = $s0; |
5398 | $s0 = $this->peg_FAILED; |
5399 | } |
5400 | |
5401 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5402 | |
5403 | return $s0; |
5404 | } |
5405 | |
5406 | private function peg_parseEND_MATRIX() { |
5407 | |
5408 | $key = $this->peg_currPos * 130 + 63; |
5409 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5410 | |
5411 | if ($cached) { |
5412 | $this->peg_currPos = $cached["nextPos"]; |
5413 | return $cached["result"]; |
5414 | } |
5415 | |
5416 | $s0 = $this->peg_currPos; |
5417 | $s1 = $this->peg_parseEND(); |
5418 | if ($s1 !== $this->peg_FAILED) { |
5419 | if ($this->input_substr($this->peg_currPos, 8) === $this->peg_c105) { |
5420 | $s2 = $this->peg_c105; |
5421 | $this->peg_currPos += 8; |
5422 | } else { |
5423 | $s2 = $this->peg_FAILED; |
5424 | if ($this->peg_silentFails === 0) { |
5425 | $this->peg_fail($this->peg_c106); |
5426 | } |
5427 | } |
5428 | if ($s2 !== $this->peg_FAILED) { |
5429 | $s3 = $this->peg_parse_(); |
5430 | if ($s3 !== $this->peg_FAILED) { |
5431 | $s1 = array($s1, $s2, $s3); |
5432 | $s0 = $s1; |
5433 | } else { |
5434 | $this->peg_currPos = $s0; |
5435 | $s0 = $this->peg_FAILED; |
5436 | } |
5437 | } else { |
5438 | $this->peg_currPos = $s0; |
5439 | $s0 = $this->peg_FAILED; |
5440 | } |
5441 | } else { |
5442 | $this->peg_currPos = $s0; |
5443 | $s0 = $this->peg_FAILED; |
5444 | } |
5445 | |
5446 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5447 | |
5448 | return $s0; |
5449 | } |
5450 | |
5451 | private function peg_parseBEGIN_PMATRIX() { |
5452 | |
5453 | $key = $this->peg_currPos * 130 + 64; |
5454 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5455 | |
5456 | if ($cached) { |
5457 | $this->peg_currPos = $cached["nextPos"]; |
5458 | return $cached["result"]; |
5459 | } |
5460 | |
5461 | $s0 = $this->peg_currPos; |
5462 | $s1 = $this->peg_parseBEGIN(); |
5463 | if ($s1 !== $this->peg_FAILED) { |
5464 | if ($this->input_substr($this->peg_currPos, 9) === $this->peg_c107) { |
5465 | $s2 = $this->peg_c107; |
5466 | $this->peg_currPos += 9; |
5467 | } else { |
5468 | $s2 = $this->peg_FAILED; |
5469 | if ($this->peg_silentFails === 0) { |
5470 | $this->peg_fail($this->peg_c108); |
5471 | } |
5472 | } |
5473 | if ($s2 !== $this->peg_FAILED) { |
5474 | $s3 = $this->peg_parse_(); |
5475 | if ($s3 !== $this->peg_FAILED) { |
5476 | $s1 = array($s1, $s2, $s3); |
5477 | $s0 = $s1; |
5478 | } else { |
5479 | $this->peg_currPos = $s0; |
5480 | $s0 = $this->peg_FAILED; |
5481 | } |
5482 | } else { |
5483 | $this->peg_currPos = $s0; |
5484 | $s0 = $this->peg_FAILED; |
5485 | } |
5486 | } else { |
5487 | $this->peg_currPos = $s0; |
5488 | $s0 = $this->peg_FAILED; |
5489 | } |
5490 | |
5491 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5492 | |
5493 | return $s0; |
5494 | } |
5495 | |
5496 | private function peg_parseEND_PMATRIX() { |
5497 | |
5498 | $key = $this->peg_currPos * 130 + 65; |
5499 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5500 | |
5501 | if ($cached) { |
5502 | $this->peg_currPos = $cached["nextPos"]; |
5503 | return $cached["result"]; |
5504 | } |
5505 | |
5506 | $s0 = $this->peg_currPos; |
5507 | $s1 = $this->peg_parseEND(); |
5508 | if ($s1 !== $this->peg_FAILED) { |
5509 | if ($this->input_substr($this->peg_currPos, 9) === $this->peg_c107) { |
5510 | $s2 = $this->peg_c107; |
5511 | $this->peg_currPos += 9; |
5512 | } else { |
5513 | $s2 = $this->peg_FAILED; |
5514 | if ($this->peg_silentFails === 0) { |
5515 | $this->peg_fail($this->peg_c108); |
5516 | } |
5517 | } |
5518 | if ($s2 !== $this->peg_FAILED) { |
5519 | $s3 = $this->peg_parse_(); |
5520 | if ($s3 !== $this->peg_FAILED) { |
5521 | $s1 = array($s1, $s2, $s3); |
5522 | $s0 = $s1; |
5523 | } else { |
5524 | $this->peg_currPos = $s0; |
5525 | $s0 = $this->peg_FAILED; |
5526 | } |
5527 | } else { |
5528 | $this->peg_currPos = $s0; |
5529 | $s0 = $this->peg_FAILED; |
5530 | } |
5531 | } else { |
5532 | $this->peg_currPos = $s0; |
5533 | $s0 = $this->peg_FAILED; |
5534 | } |
5535 | |
5536 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5537 | |
5538 | return $s0; |
5539 | } |
5540 | |
5541 | private function peg_parseBEGIN_BMATRIX() { |
5542 | |
5543 | $key = $this->peg_currPos * 130 + 66; |
5544 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5545 | |
5546 | if ($cached) { |
5547 | $this->peg_currPos = $cached["nextPos"]; |
5548 | return $cached["result"]; |
5549 | } |
5550 | |
5551 | $s0 = $this->peg_currPos; |
5552 | $s1 = $this->peg_parseBEGIN(); |
5553 | if ($s1 !== $this->peg_FAILED) { |
5554 | if ($this->input_substr($this->peg_currPos, 9) === $this->peg_c109) { |
5555 | $s2 = $this->peg_c109; |
5556 | $this->peg_currPos += 9; |
5557 | } else { |
5558 | $s2 = $this->peg_FAILED; |
5559 | if ($this->peg_silentFails === 0) { |
5560 | $this->peg_fail($this->peg_c110); |
5561 | } |
5562 | } |
5563 | if ($s2 !== $this->peg_FAILED) { |
5564 | $s3 = $this->peg_parse_(); |
5565 | if ($s3 !== $this->peg_FAILED) { |
5566 | $s1 = array($s1, $s2, $s3); |
5567 | $s0 = $s1; |
5568 | } else { |
5569 | $this->peg_currPos = $s0; |
5570 | $s0 = $this->peg_FAILED; |
5571 | } |
5572 | } else { |
5573 | $this->peg_currPos = $s0; |
5574 | $s0 = $this->peg_FAILED; |
5575 | } |
5576 | } else { |
5577 | $this->peg_currPos = $s0; |
5578 | $s0 = $this->peg_FAILED; |
5579 | } |
5580 | |
5581 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5582 | |
5583 | return $s0; |
5584 | } |
5585 | |
5586 | private function peg_parseEND_BMATRIX() { |
5587 | |
5588 | $key = $this->peg_currPos * 130 + 67; |
5589 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5590 | |
5591 | if ($cached) { |
5592 | $this->peg_currPos = $cached["nextPos"]; |
5593 | return $cached["result"]; |
5594 | } |
5595 | |
5596 | $s0 = $this->peg_currPos; |
5597 | $s1 = $this->peg_parseEND(); |
5598 | if ($s1 !== $this->peg_FAILED) { |
5599 | if ($this->input_substr($this->peg_currPos, 9) === $this->peg_c109) { |
5600 | $s2 = $this->peg_c109; |
5601 | $this->peg_currPos += 9; |
5602 | } else { |
5603 | $s2 = $this->peg_FAILED; |
5604 | if ($this->peg_silentFails === 0) { |
5605 | $this->peg_fail($this->peg_c110); |
5606 | } |
5607 | } |
5608 | if ($s2 !== $this->peg_FAILED) { |
5609 | $s3 = $this->peg_parse_(); |
5610 | if ($s3 !== $this->peg_FAILED) { |
5611 | $s1 = array($s1, $s2, $s3); |
5612 | $s0 = $s1; |
5613 | } else { |
5614 | $this->peg_currPos = $s0; |
5615 | $s0 = $this->peg_FAILED; |
5616 | } |
5617 | } else { |
5618 | $this->peg_currPos = $s0; |
5619 | $s0 = $this->peg_FAILED; |
5620 | } |
5621 | } else { |
5622 | $this->peg_currPos = $s0; |
5623 | $s0 = $this->peg_FAILED; |
5624 | } |
5625 | |
5626 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5627 | |
5628 | return $s0; |
5629 | } |
5630 | |
5631 | private function peg_parseBEGIN_BBMATRIX() { |
5632 | |
5633 | $key = $this->peg_currPos * 130 + 68; |
5634 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5635 | |
5636 | if ($cached) { |
5637 | $this->peg_currPos = $cached["nextPos"]; |
5638 | return $cached["result"]; |
5639 | } |
5640 | |
5641 | $s0 = $this->peg_currPos; |
5642 | $s1 = $this->peg_parseBEGIN(); |
5643 | if ($s1 !== $this->peg_FAILED) { |
5644 | if ($this->input_substr($this->peg_currPos, 9) === $this->peg_c111) { |
5645 | $s2 = $this->peg_c111; |
5646 | $this->peg_currPos += 9; |
5647 | } else { |
5648 | $s2 = $this->peg_FAILED; |
5649 | if ($this->peg_silentFails === 0) { |
5650 | $this->peg_fail($this->peg_c112); |
5651 | } |
5652 | } |
5653 | if ($s2 !== $this->peg_FAILED) { |
5654 | $s3 = $this->peg_parse_(); |
5655 | if ($s3 !== $this->peg_FAILED) { |
5656 | $s1 = array($s1, $s2, $s3); |
5657 | $s0 = $s1; |
5658 | } else { |
5659 | $this->peg_currPos = $s0; |
5660 | $s0 = $this->peg_FAILED; |
5661 | } |
5662 | } else { |
5663 | $this->peg_currPos = $s0; |
5664 | $s0 = $this->peg_FAILED; |
5665 | } |
5666 | } else { |
5667 | $this->peg_currPos = $s0; |
5668 | $s0 = $this->peg_FAILED; |
5669 | } |
5670 | |
5671 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5672 | |
5673 | return $s0; |
5674 | } |
5675 | |
5676 | private function peg_parseEND_BBMATRIX() { |
5677 | |
5678 | $key = $this->peg_currPos * 130 + 69; |
5679 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5680 | |
5681 | if ($cached) { |
5682 | $this->peg_currPos = $cached["nextPos"]; |
5683 | return $cached["result"]; |
5684 | } |
5685 | |
5686 | $s0 = $this->peg_currPos; |
5687 | $s1 = $this->peg_parseEND(); |
5688 | if ($s1 !== $this->peg_FAILED) { |
5689 | if ($this->input_substr($this->peg_currPos, 9) === $this->peg_c111) { |
5690 | $s2 = $this->peg_c111; |
5691 | $this->peg_currPos += 9; |
5692 | } else { |
5693 | $s2 = $this->peg_FAILED; |
5694 | if ($this->peg_silentFails === 0) { |
5695 | $this->peg_fail($this->peg_c112); |
5696 | } |
5697 | } |
5698 | if ($s2 !== $this->peg_FAILED) { |
5699 | $s3 = $this->peg_parse_(); |
5700 | if ($s3 !== $this->peg_FAILED) { |
5701 | $s1 = array($s1, $s2, $s3); |
5702 | $s0 = $s1; |
5703 | } else { |
5704 | $this->peg_currPos = $s0; |
5705 | $s0 = $this->peg_FAILED; |
5706 | } |
5707 | } else { |
5708 | $this->peg_currPos = $s0; |
5709 | $s0 = $this->peg_FAILED; |
5710 | } |
5711 | } else { |
5712 | $this->peg_currPos = $s0; |
5713 | $s0 = $this->peg_FAILED; |
5714 | } |
5715 | |
5716 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5717 | |
5718 | return $s0; |
5719 | } |
5720 | |
5721 | private function peg_parseBEGIN_VMATRIX() { |
5722 | |
5723 | $key = $this->peg_currPos * 130 + 70; |
5724 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5725 | |
5726 | if ($cached) { |
5727 | $this->peg_currPos = $cached["nextPos"]; |
5728 | return $cached["result"]; |
5729 | } |
5730 | |
5731 | $s0 = $this->peg_currPos; |
5732 | $s1 = $this->peg_parseBEGIN(); |
5733 | if ($s1 !== $this->peg_FAILED) { |
5734 | if ($this->input_substr($this->peg_currPos, 9) === $this->peg_c113) { |
5735 | $s2 = $this->peg_c113; |
5736 | $this->peg_currPos += 9; |
5737 | } else { |
5738 | $s2 = $this->peg_FAILED; |
5739 | if ($this->peg_silentFails === 0) { |
5740 | $this->peg_fail($this->peg_c114); |
5741 | } |
5742 | } |
5743 | if ($s2 !== $this->peg_FAILED) { |
5744 | $s3 = $this->peg_parse_(); |
5745 | if ($s3 !== $this->peg_FAILED) { |
5746 | $s1 = array($s1, $s2, $s3); |
5747 | $s0 = $s1; |
5748 | } else { |
5749 | $this->peg_currPos = $s0; |
5750 | $s0 = $this->peg_FAILED; |
5751 | } |
5752 | } else { |
5753 | $this->peg_currPos = $s0; |
5754 | $s0 = $this->peg_FAILED; |
5755 | } |
5756 | } else { |
5757 | $this->peg_currPos = $s0; |
5758 | $s0 = $this->peg_FAILED; |
5759 | } |
5760 | |
5761 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5762 | |
5763 | return $s0; |
5764 | } |
5765 | |
5766 | private function peg_parseEND_VMATRIX() { |
5767 | |
5768 | $key = $this->peg_currPos * 130 + 71; |
5769 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5770 | |
5771 | if ($cached) { |
5772 | $this->peg_currPos = $cached["nextPos"]; |
5773 | return $cached["result"]; |
5774 | } |
5775 | |
5776 | $s0 = $this->peg_currPos; |
5777 | $s1 = $this->peg_parseEND(); |
5778 | if ($s1 !== $this->peg_FAILED) { |
5779 | if ($this->input_substr($this->peg_currPos, 9) === $this->peg_c113) { |
5780 | $s2 = $this->peg_c113; |
5781 | $this->peg_currPos += 9; |
5782 | } else { |
5783 | $s2 = $this->peg_FAILED; |
5784 | if ($this->peg_silentFails === 0) { |
5785 | $this->peg_fail($this->peg_c114); |
5786 | } |
5787 | } |
5788 | if ($s2 !== $this->peg_FAILED) { |
5789 | $s3 = $this->peg_parse_(); |
5790 | if ($s3 !== $this->peg_FAILED) { |
5791 | $s1 = array($s1, $s2, $s3); |
5792 | $s0 = $s1; |
5793 | } else { |
5794 | $this->peg_currPos = $s0; |
5795 | $s0 = $this->peg_FAILED; |
5796 | } |
5797 | } else { |
5798 | $this->peg_currPos = $s0; |
5799 | $s0 = $this->peg_FAILED; |
5800 | } |
5801 | } else { |
5802 | $this->peg_currPos = $s0; |
5803 | $s0 = $this->peg_FAILED; |
5804 | } |
5805 | |
5806 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5807 | |
5808 | return $s0; |
5809 | } |
5810 | |
5811 | private function peg_parseBEGIN_VVMATRIX() { |
5812 | |
5813 | $key = $this->peg_currPos * 130 + 72; |
5814 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5815 | |
5816 | if ($cached) { |
5817 | $this->peg_currPos = $cached["nextPos"]; |
5818 | return $cached["result"]; |
5819 | } |
5820 | |
5821 | $s0 = $this->peg_currPos; |
5822 | $s1 = $this->peg_parseBEGIN(); |
5823 | if ($s1 !== $this->peg_FAILED) { |
5824 | if ($this->input_substr($this->peg_currPos, 9) === $this->peg_c115) { |
5825 | $s2 = $this->peg_c115; |
5826 | $this->peg_currPos += 9; |
5827 | } else { |
5828 | $s2 = $this->peg_FAILED; |
5829 | if ($this->peg_silentFails === 0) { |
5830 | $this->peg_fail($this->peg_c116); |
5831 | } |
5832 | } |
5833 | if ($s2 !== $this->peg_FAILED) { |
5834 | $s3 = $this->peg_parse_(); |
5835 | if ($s3 !== $this->peg_FAILED) { |
5836 | $s1 = array($s1, $s2, $s3); |
5837 | $s0 = $s1; |
5838 | } else { |
5839 | $this->peg_currPos = $s0; |
5840 | $s0 = $this->peg_FAILED; |
5841 | } |
5842 | } else { |
5843 | $this->peg_currPos = $s0; |
5844 | $s0 = $this->peg_FAILED; |
5845 | } |
5846 | } else { |
5847 | $this->peg_currPos = $s0; |
5848 | $s0 = $this->peg_FAILED; |
5849 | } |
5850 | |
5851 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5852 | |
5853 | return $s0; |
5854 | } |
5855 | |
5856 | private function peg_parseEND_VVMATRIX() { |
5857 | |
5858 | $key = $this->peg_currPos * 130 + 73; |
5859 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5860 | |
5861 | if ($cached) { |
5862 | $this->peg_currPos = $cached["nextPos"]; |
5863 | return $cached["result"]; |
5864 | } |
5865 | |
5866 | $s0 = $this->peg_currPos; |
5867 | $s1 = $this->peg_parseEND(); |
5868 | if ($s1 !== $this->peg_FAILED) { |
5869 | if ($this->input_substr($this->peg_currPos, 9) === $this->peg_c115) { |
5870 | $s2 = $this->peg_c115; |
5871 | $this->peg_currPos += 9; |
5872 | } else { |
5873 | $s2 = $this->peg_FAILED; |
5874 | if ($this->peg_silentFails === 0) { |
5875 | $this->peg_fail($this->peg_c116); |
5876 | } |
5877 | } |
5878 | if ($s2 !== $this->peg_FAILED) { |
5879 | $s3 = $this->peg_parse_(); |
5880 | if ($s3 !== $this->peg_FAILED) { |
5881 | $s1 = array($s1, $s2, $s3); |
5882 | $s0 = $s1; |
5883 | } else { |
5884 | $this->peg_currPos = $s0; |
5885 | $s0 = $this->peg_FAILED; |
5886 | } |
5887 | } else { |
5888 | $this->peg_currPos = $s0; |
5889 | $s0 = $this->peg_FAILED; |
5890 | } |
5891 | } else { |
5892 | $this->peg_currPos = $s0; |
5893 | $s0 = $this->peg_FAILED; |
5894 | } |
5895 | |
5896 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5897 | |
5898 | return $s0; |
5899 | } |
5900 | |
5901 | private function peg_parseBEGIN_ARRAY() { |
5902 | |
5903 | $key = $this->peg_currPos * 130 + 74; |
5904 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5905 | |
5906 | if ($cached) { |
5907 | $this->peg_currPos = $cached["nextPos"]; |
5908 | return $cached["result"]; |
5909 | } |
5910 | |
5911 | $s0 = $this->peg_currPos; |
5912 | $s1 = $this->peg_parseBEGIN(); |
5913 | if ($s1 !== $this->peg_FAILED) { |
5914 | if ($this->input_substr($this->peg_currPos, 7) === $this->peg_c117) { |
5915 | $s2 = $this->peg_c117; |
5916 | $this->peg_currPos += 7; |
5917 | } else { |
5918 | $s2 = $this->peg_FAILED; |
5919 | if ($this->peg_silentFails === 0) { |
5920 | $this->peg_fail($this->peg_c118); |
5921 | } |
5922 | } |
5923 | if ($s2 !== $this->peg_FAILED) { |
5924 | $s3 = $this->peg_parse_(); |
5925 | if ($s3 !== $this->peg_FAILED) { |
5926 | $s1 = array($s1, $s2, $s3); |
5927 | $s0 = $s1; |
5928 | } else { |
5929 | $this->peg_currPos = $s0; |
5930 | $s0 = $this->peg_FAILED; |
5931 | } |
5932 | } else { |
5933 | $this->peg_currPos = $s0; |
5934 | $s0 = $this->peg_FAILED; |
5935 | } |
5936 | } else { |
5937 | $this->peg_currPos = $s0; |
5938 | $s0 = $this->peg_FAILED; |
5939 | } |
5940 | |
5941 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5942 | |
5943 | return $s0; |
5944 | } |
5945 | |
5946 | private function peg_parseEND_ARRAY() { |
5947 | |
5948 | $key = $this->peg_currPos * 130 + 75; |
5949 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5950 | |
5951 | if ($cached) { |
5952 | $this->peg_currPos = $cached["nextPos"]; |
5953 | return $cached["result"]; |
5954 | } |
5955 | |
5956 | $s0 = $this->peg_currPos; |
5957 | $s1 = $this->peg_parseEND(); |
5958 | if ($s1 !== $this->peg_FAILED) { |
5959 | if ($this->input_substr($this->peg_currPos, 7) === $this->peg_c117) { |
5960 | $s2 = $this->peg_c117; |
5961 | $this->peg_currPos += 7; |
5962 | } else { |
5963 | $s2 = $this->peg_FAILED; |
5964 | if ($this->peg_silentFails === 0) { |
5965 | $this->peg_fail($this->peg_c118); |
5966 | } |
5967 | } |
5968 | if ($s2 !== $this->peg_FAILED) { |
5969 | $s3 = $this->peg_parse_(); |
5970 | if ($s3 !== $this->peg_FAILED) { |
5971 | $s1 = array($s1, $s2, $s3); |
5972 | $s0 = $s1; |
5973 | } else { |
5974 | $this->peg_currPos = $s0; |
5975 | $s0 = $this->peg_FAILED; |
5976 | } |
5977 | } else { |
5978 | $this->peg_currPos = $s0; |
5979 | $s0 = $this->peg_FAILED; |
5980 | } |
5981 | } else { |
5982 | $this->peg_currPos = $s0; |
5983 | $s0 = $this->peg_FAILED; |
5984 | } |
5985 | |
5986 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5987 | |
5988 | return $s0; |
5989 | } |
5990 | |
5991 | private function peg_parseBEGIN_ALIGN() { |
5992 | |
5993 | $key = $this->peg_currPos * 130 + 76; |
5994 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5995 | |
5996 | if ($cached) { |
5997 | $this->peg_currPos = $cached["nextPos"]; |
5998 | return $cached["result"]; |
5999 | } |
6000 | |
6001 | $s0 = $this->peg_currPos; |
6002 | $s1 = $this->peg_parseBEGIN(); |
6003 | if ($s1 !== $this->peg_FAILED) { |
6004 | if ($this->input_substr($this->peg_currPos, 7) === $this->peg_c119) { |
6005 | $s2 = $this->peg_c119; |
6006 | $this->peg_currPos += 7; |
6007 | } else { |
6008 | $s2 = $this->peg_FAILED; |
6009 | if ($this->peg_silentFails === 0) { |
6010 | $this->peg_fail($this->peg_c120); |
6011 | } |
6012 | } |
6013 | if ($s2 !== $this->peg_FAILED) { |
6014 | $s3 = $this->peg_parse_(); |
6015 | if ($s3 !== $this->peg_FAILED) { |
6016 | $s1 = array($s1, $s2, $s3); |
6017 | $s0 = $s1; |
6018 | } else { |
6019 | $this->peg_currPos = $s0; |
6020 | $s0 = $this->peg_FAILED; |
6021 | } |
6022 | } else { |
6023 | $this->peg_currPos = $s0; |
6024 | $s0 = $this->peg_FAILED; |
6025 | } |
6026 | } else { |
6027 | $this->peg_currPos = $s0; |
6028 | $s0 = $this->peg_FAILED; |
6029 | } |
6030 | |
6031 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6032 | |
6033 | return $s0; |
6034 | } |
6035 | |
6036 | private function peg_parseEND_ALIGN() { |
6037 | |
6038 | $key = $this->peg_currPos * 130 + 77; |
6039 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6040 | |
6041 | if ($cached) { |
6042 | $this->peg_currPos = $cached["nextPos"]; |
6043 | return $cached["result"]; |
6044 | } |
6045 | |
6046 | $s0 = $this->peg_currPos; |
6047 | $s1 = $this->peg_parseEND(); |
6048 | if ($s1 !== $this->peg_FAILED) { |
6049 | if ($this->input_substr($this->peg_currPos, 7) === $this->peg_c119) { |
6050 | $s2 = $this->peg_c119; |
6051 | $this->peg_currPos += 7; |
6052 | } else { |
6053 | $s2 = $this->peg_FAILED; |
6054 | if ($this->peg_silentFails === 0) { |
6055 | $this->peg_fail($this->peg_c120); |
6056 | } |
6057 | } |
6058 | if ($s2 !== $this->peg_FAILED) { |
6059 | $s3 = $this->peg_parse_(); |
6060 | if ($s3 !== $this->peg_FAILED) { |
6061 | $s1 = array($s1, $s2, $s3); |
6062 | $s0 = $s1; |
6063 | } else { |
6064 | $this->peg_currPos = $s0; |
6065 | $s0 = $this->peg_FAILED; |
6066 | } |
6067 | } else { |
6068 | $this->peg_currPos = $s0; |
6069 | $s0 = $this->peg_FAILED; |
6070 | } |
6071 | } else { |
6072 | $this->peg_currPos = $s0; |
6073 | $s0 = $this->peg_FAILED; |
6074 | } |
6075 | |
6076 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6077 | |
6078 | return $s0; |
6079 | } |
6080 | |
6081 | private function peg_parseBEGIN_ALIGNED() { |
6082 | |
6083 | $key = $this->peg_currPos * 130 + 78; |
6084 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6085 | |
6086 | if ($cached) { |
6087 | $this->peg_currPos = $cached["nextPos"]; |
6088 | return $cached["result"]; |
6089 | } |
6090 | |
6091 | $s0 = $this->peg_currPos; |
6092 | $s1 = $this->peg_parseBEGIN(); |
6093 | if ($s1 !== $this->peg_FAILED) { |
6094 | if ($this->input_substr($this->peg_currPos, 9) === $this->peg_c121) { |
6095 | $s2 = $this->peg_c121; |
6096 | $this->peg_currPos += 9; |
6097 | } else { |
6098 | $s2 = $this->peg_FAILED; |
6099 | if ($this->peg_silentFails === 0) { |
6100 | $this->peg_fail($this->peg_c122); |
6101 | } |
6102 | } |
6103 | if ($s2 !== $this->peg_FAILED) { |
6104 | $s3 = $this->peg_parse_(); |
6105 | if ($s3 !== $this->peg_FAILED) { |
6106 | $s1 = array($s1, $s2, $s3); |
6107 | $s0 = $s1; |
6108 | } else { |
6109 | $this->peg_currPos = $s0; |
6110 | $s0 = $this->peg_FAILED; |
6111 | } |
6112 | } else { |
6113 | $this->peg_currPos = $s0; |
6114 | $s0 = $this->peg_FAILED; |
6115 | } |
6116 | } else { |
6117 | $this->peg_currPos = $s0; |
6118 | $s0 = $this->peg_FAILED; |
6119 | } |
6120 | |
6121 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6122 | |
6123 | return $s0; |
6124 | } |
6125 | |
6126 | private function peg_parseEND_ALIGNED() { |
6127 | |
6128 | $key = $this->peg_currPos * 130 + 79; |
6129 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6130 | |
6131 | if ($cached) { |
6132 | $this->peg_currPos = $cached["nextPos"]; |
6133 | return $cached["result"]; |
6134 | } |
6135 | |
6136 | $s0 = $this->peg_currPos; |
6137 | $s1 = $this->peg_parseEND(); |
6138 | if ($s1 !== $this->peg_FAILED) { |
6139 | if ($this->input_substr($this->peg_currPos, 9) === $this->peg_c121) { |
6140 | $s2 = $this->peg_c121; |
6141 | $this->peg_currPos += 9; |
6142 | } else { |
6143 | $s2 = $this->peg_FAILED; |
6144 | if ($this->peg_silentFails === 0) { |
6145 | $this->peg_fail($this->peg_c122); |
6146 | } |
6147 | } |
6148 | if ($s2 !== $this->peg_FAILED) { |
6149 | $s3 = $this->peg_parse_(); |
6150 | if ($s3 !== $this->peg_FAILED) { |
6151 | $s1 = array($s1, $s2, $s3); |
6152 | $s0 = $s1; |
6153 | } else { |
6154 | $this->peg_currPos = $s0; |
6155 | $s0 = $this->peg_FAILED; |
6156 | } |
6157 | } else { |
6158 | $this->peg_currPos = $s0; |
6159 | $s0 = $this->peg_FAILED; |
6160 | } |
6161 | } else { |
6162 | $this->peg_currPos = $s0; |
6163 | $s0 = $this->peg_FAILED; |
6164 | } |
6165 | |
6166 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6167 | |
6168 | return $s0; |
6169 | } |
6170 | |
6171 | private function peg_parseBEGIN_ALIGNAT() { |
6172 | |
6173 | $key = $this->peg_currPos * 130 + 80; |
6174 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6175 | |
6176 | if ($cached) { |
6177 | $this->peg_currPos = $cached["nextPos"]; |
6178 | return $cached["result"]; |
6179 | } |
6180 | |
6181 | $s0 = $this->peg_currPos; |
6182 | $s1 = $this->peg_parseBEGIN(); |
6183 | if ($s1 !== $this->peg_FAILED) { |
6184 | if ($this->input_substr($this->peg_currPos, 9) === $this->peg_c123) { |
6185 | $s2 = $this->peg_c123; |
6186 | $this->peg_currPos += 9; |
6187 | } else { |
6188 | $s2 = $this->peg_FAILED; |
6189 | if ($this->peg_silentFails === 0) { |
6190 | $this->peg_fail($this->peg_c124); |
6191 | } |
6192 | } |
6193 | if ($s2 !== $this->peg_FAILED) { |
6194 | $s3 = $this->peg_parse_(); |
6195 | if ($s3 !== $this->peg_FAILED) { |
6196 | $s1 = array($s1, $s2, $s3); |
6197 | $s0 = $s1; |
6198 | } else { |
6199 | $this->peg_currPos = $s0; |
6200 | $s0 = $this->peg_FAILED; |
6201 | } |
6202 | } else { |
6203 | $this->peg_currPos = $s0; |
6204 | $s0 = $this->peg_FAILED; |
6205 | } |
6206 | } else { |
6207 | $this->peg_currPos = $s0; |
6208 | $s0 = $this->peg_FAILED; |
6209 | } |
6210 | |
6211 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6212 | |
6213 | return $s0; |
6214 | } |
6215 | |
6216 | private function peg_parseEND_ALIGNAT() { |
6217 | |
6218 | $key = $this->peg_currPos * 130 + 81; |
6219 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6220 | |
6221 | if ($cached) { |
6222 | $this->peg_currPos = $cached["nextPos"]; |
6223 | return $cached["result"]; |
6224 | } |
6225 | |
6226 | $s0 = $this->peg_currPos; |
6227 | $s1 = $this->peg_parseEND(); |
6228 | if ($s1 !== $this->peg_FAILED) { |
6229 | if ($this->input_substr($this->peg_currPos, 9) === $this->peg_c123) { |
6230 | $s2 = $this->peg_c123; |
6231 | $this->peg_currPos += 9; |
6232 | } else { |
6233 | $s2 = $this->peg_FAILED; |
6234 | if ($this->peg_silentFails === 0) { |
6235 | $this->peg_fail($this->peg_c124); |
6236 | } |
6237 | } |
6238 | if ($s2 !== $this->peg_FAILED) { |
6239 | $s3 = $this->peg_parse_(); |
6240 | if ($s3 !== $this->peg_FAILED) { |
6241 | $s1 = array($s1, $s2, $s3); |
6242 | $s0 = $s1; |
6243 | } else { |
6244 | $this->peg_currPos = $s0; |
6245 | $s0 = $this->peg_FAILED; |
6246 | } |
6247 | } else { |
6248 | $this->peg_currPos = $s0; |
6249 | $s0 = $this->peg_FAILED; |
6250 | } |
6251 | } else { |
6252 | $this->peg_currPos = $s0; |
6253 | $s0 = $this->peg_FAILED; |
6254 | } |
6255 | |
6256 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6257 | |
6258 | return $s0; |
6259 | } |
6260 | |
6261 | private function peg_parseBEGIN_ALIGNEDAT() { |
6262 | |
6263 | $key = $this->peg_currPos * 130 + 82; |
6264 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6265 | |
6266 | if ($cached) { |
6267 | $this->peg_currPos = $cached["nextPos"]; |
6268 | return $cached["result"]; |
6269 | } |
6270 | |
6271 | $s0 = $this->peg_currPos; |
6272 | $s1 = $this->peg_parseBEGIN(); |
6273 | if ($s1 !== $this->peg_FAILED) { |
6274 | if ($this->input_substr($this->peg_currPos, 11) === $this->peg_c125) { |
6275 | $s2 = $this->peg_c125; |
6276 | $this->peg_currPos += 11; |
6277 | } else { |
6278 | $s2 = $this->peg_FAILED; |
6279 | if ($this->peg_silentFails === 0) { |
6280 | $this->peg_fail($this->peg_c126); |
6281 | } |
6282 | } |
6283 | if ($s2 !== $this->peg_FAILED) { |
6284 | $s3 = $this->peg_parse_(); |
6285 | if ($s3 !== $this->peg_FAILED) { |
6286 | $s1 = array($s1, $s2, $s3); |
6287 | $s0 = $s1; |
6288 | } else { |
6289 | $this->peg_currPos = $s0; |
6290 | $s0 = $this->peg_FAILED; |
6291 | } |
6292 | } else { |
6293 | $this->peg_currPos = $s0; |
6294 | $s0 = $this->peg_FAILED; |
6295 | } |
6296 | } else { |
6297 | $this->peg_currPos = $s0; |
6298 | $s0 = $this->peg_FAILED; |
6299 | } |
6300 | |
6301 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6302 | |
6303 | return $s0; |
6304 | } |
6305 | |
6306 | private function peg_parseEND_ALIGNEDAT() { |
6307 | |
6308 | $key = $this->peg_currPos * 130 + 83; |
6309 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6310 | |
6311 | if ($cached) { |
6312 | $this->peg_currPos = $cached["nextPos"]; |
6313 | return $cached["result"]; |
6314 | } |
6315 | |
6316 | $s0 = $this->peg_currPos; |
6317 | $s1 = $this->peg_parseEND(); |
6318 | if ($s1 !== $this->peg_FAILED) { |
6319 | if ($this->input_substr($this->peg_currPos, 11) === $this->peg_c125) { |
6320 | $s2 = $this->peg_c125; |
6321 | $this->peg_currPos += 11; |
6322 | } else { |
6323 | $s2 = $this->peg_FAILED; |
6324 | if ($this->peg_silentFails === 0) { |
6325 | $this->peg_fail($this->peg_c126); |
6326 | } |
6327 | } |
6328 | if ($s2 !== $this->peg_FAILED) { |
6329 | $s3 = $this->peg_parse_(); |
6330 | if ($s3 !== $this->peg_FAILED) { |
6331 | $s1 = array($s1, $s2, $s3); |
6332 | $s0 = $s1; |
6333 | } else { |
6334 | $this->peg_currPos = $s0; |
6335 | $s0 = $this->peg_FAILED; |
6336 | } |
6337 | } else { |
6338 | $this->peg_currPos = $s0; |
6339 | $s0 = $this->peg_FAILED; |
6340 | } |
6341 | } else { |
6342 | $this->peg_currPos = $s0; |
6343 | $s0 = $this->peg_FAILED; |
6344 | } |
6345 | |
6346 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6347 | |
6348 | return $s0; |
6349 | } |
6350 | |
6351 | private function peg_parseBEGIN_SMALLMATRIX() { |
6352 | |
6353 | $key = $this->peg_currPos * 130 + 84; |
6354 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6355 | |
6356 | if ($cached) { |
6357 | $this->peg_currPos = $cached["nextPos"]; |
6358 | return $cached["result"]; |
6359 | } |
6360 | |
6361 | $s0 = $this->peg_currPos; |
6362 | $s1 = $this->peg_parseBEGIN(); |
6363 | if ($s1 !== $this->peg_FAILED) { |
6364 | if ($this->input_substr($this->peg_currPos, 13) === $this->peg_c127) { |
6365 | $s2 = $this->peg_c127; |
6366 | $this->peg_currPos += 13; |
6367 | } else { |
6368 | $s2 = $this->peg_FAILED; |
6369 | if ($this->peg_silentFails === 0) { |
6370 | $this->peg_fail($this->peg_c128); |
6371 | } |
6372 | } |
6373 | if ($s2 !== $this->peg_FAILED) { |
6374 | $s3 = $this->peg_parse_(); |
6375 | if ($s3 !== $this->peg_FAILED) { |
6376 | $s1 = array($s1, $s2, $s3); |
6377 | $s0 = $s1; |
6378 | } else { |
6379 | $this->peg_currPos = $s0; |
6380 | $s0 = $this->peg_FAILED; |
6381 | } |
6382 | } else { |
6383 | $this->peg_currPos = $s0; |
6384 | $s0 = $this->peg_FAILED; |
6385 | } |
6386 | } else { |
6387 | $this->peg_currPos = $s0; |
6388 | $s0 = $this->peg_FAILED; |
6389 | } |
6390 | |
6391 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6392 | |
6393 | return $s0; |
6394 | } |
6395 | |
6396 | private function peg_parseEND_SMALLMATRIX() { |
6397 | |
6398 | $key = $this->peg_currPos * 130 + 85; |
6399 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6400 | |
6401 | if ($cached) { |
6402 | $this->peg_currPos = $cached["nextPos"]; |
6403 | return $cached["result"]; |
6404 | } |
6405 | |
6406 | $s0 = $this->peg_currPos; |
6407 | $s1 = $this->peg_parseEND(); |
6408 | if ($s1 !== $this->peg_FAILED) { |
6409 | if ($this->input_substr($this->peg_currPos, 13) === $this->peg_c127) { |
6410 | $s2 = $this->peg_c127; |
6411 | $this->peg_currPos += 13; |
6412 | } else { |
6413 | $s2 = $this->peg_FAILED; |
6414 | if ($this->peg_silentFails === 0) { |
6415 | $this->peg_fail($this->peg_c128); |
6416 | } |
6417 | } |
6418 | if ($s2 !== $this->peg_FAILED) { |
6419 | $s3 = $this->peg_parse_(); |
6420 | if ($s3 !== $this->peg_FAILED) { |
6421 | $s1 = array($s1, $s2, $s3); |
6422 | $s0 = $s1; |
6423 | } else { |
6424 | $this->peg_currPos = $s0; |
6425 | $s0 = $this->peg_FAILED; |
6426 | } |
6427 | } else { |
6428 | $this->peg_currPos = $s0; |
6429 | $s0 = $this->peg_FAILED; |
6430 | } |
6431 | } else { |
6432 | $this->peg_currPos = $s0; |
6433 | $s0 = $this->peg_FAILED; |
6434 | } |
6435 | |
6436 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6437 | |
6438 | return $s0; |
6439 | } |
6440 | |
6441 | private function peg_parseBEGIN_CASES() { |
6442 | |
6443 | $key = $this->peg_currPos * 130 + 86; |
6444 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6445 | |
6446 | if ($cached) { |
6447 | $this->peg_currPos = $cached["nextPos"]; |
6448 | return $cached["result"]; |
6449 | } |
6450 | |
6451 | $s0 = $this->peg_currPos; |
6452 | $s1 = $this->peg_parseBEGIN(); |
6453 | if ($s1 !== $this->peg_FAILED) { |
6454 | if ($this->input_substr($this->peg_currPos, 7) === $this->peg_c129) { |
6455 | $s2 = $this->peg_c129; |
6456 | $this->peg_currPos += 7; |
6457 | } else { |
6458 | $s2 = $this->peg_FAILED; |
6459 | if ($this->peg_silentFails === 0) { |
6460 | $this->peg_fail($this->peg_c130); |
6461 | } |
6462 | } |
6463 | if ($s2 !== $this->peg_FAILED) { |
6464 | $s3 = $this->peg_parse_(); |
6465 | if ($s3 !== $this->peg_FAILED) { |
6466 | $s1 = array($s1, $s2, $s3); |
6467 | $s0 = $s1; |
6468 | } else { |
6469 | $this->peg_currPos = $s0; |
6470 | $s0 = $this->peg_FAILED; |
6471 | } |
6472 | } else { |
6473 | $this->peg_currPos = $s0; |
6474 | $s0 = $this->peg_FAILED; |
6475 | } |
6476 | } else { |
6477 | $this->peg_currPos = $s0; |
6478 | $s0 = $this->peg_FAILED; |
6479 | } |
6480 | |
6481 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6482 | |
6483 | return $s0; |
6484 | } |
6485 | |
6486 | private function peg_parseEND_CASES() { |
6487 | |
6488 | $key = $this->peg_currPos * 130 + 87; |
6489 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6490 | |
6491 | if ($cached) { |
6492 | $this->peg_currPos = $cached["nextPos"]; |
6493 | return $cached["result"]; |
6494 | } |
6495 | |
6496 | $s0 = $this->peg_currPos; |
6497 | $s1 = $this->peg_parseEND(); |
6498 | if ($s1 !== $this->peg_FAILED) { |
6499 | if ($this->input_substr($this->peg_currPos, 7) === $this->peg_c129) { |
6500 | $s2 = $this->peg_c129; |
6501 | $this->peg_currPos += 7; |
6502 | } else { |
6503 | $s2 = $this->peg_FAILED; |
6504 | if ($this->peg_silentFails === 0) { |
6505 | $this->peg_fail($this->peg_c130); |
6506 | } |
6507 | } |
6508 | if ($s2 !== $this->peg_FAILED) { |
6509 | $s3 = $this->peg_parse_(); |
6510 | if ($s3 !== $this->peg_FAILED) { |
6511 | $s1 = array($s1, $s2, $s3); |
6512 | $s0 = $s1; |
6513 | } else { |
6514 | $this->peg_currPos = $s0; |
6515 | $s0 = $this->peg_FAILED; |
6516 | } |
6517 | } else { |
6518 | $this->peg_currPos = $s0; |
6519 | $s0 = $this->peg_FAILED; |
6520 | } |
6521 | } else { |
6522 | $this->peg_currPos = $s0; |
6523 | $s0 = $this->peg_FAILED; |
6524 | } |
6525 | |
6526 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6527 | |
6528 | return $s0; |
6529 | } |
6530 | |
6531 | private function peg_parseSQ_CLOSE() { |
6532 | |
6533 | $key = $this->peg_currPos * 130 + 88; |
6534 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6535 | |
6536 | if ($cached) { |
6537 | $this->peg_currPos = $cached["nextPos"]; |
6538 | return $cached["result"]; |
6539 | } |
6540 | |
6541 | $s0 = $this->peg_currPos; |
6542 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c29) { |
6543 | $s1 = $this->peg_c29; |
6544 | $this->peg_currPos++; |
6545 | } else { |
6546 | $s1 = $this->peg_FAILED; |
6547 | if ($this->peg_silentFails === 0) { |
6548 | $this->peg_fail($this->peg_c30); |
6549 | } |
6550 | } |
6551 | if ($s1 !== $this->peg_FAILED) { |
6552 | $s2 = $this->peg_parse_(); |
6553 | if ($s2 !== $this->peg_FAILED) { |
6554 | $s1 = array($s1, $s2); |
6555 | $s0 = $s1; |
6556 | } else { |
6557 | $this->peg_currPos = $s0; |
6558 | $s0 = $this->peg_FAILED; |
6559 | } |
6560 | } else { |
6561 | $this->peg_currPos = $s0; |
6562 | $s0 = $this->peg_FAILED; |
6563 | } |
6564 | |
6565 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6566 | |
6567 | return $s0; |
6568 | } |
6569 | |
6570 | private function peg_parseCURLY_OPEN() { |
6571 | |
6572 | $key = $this->peg_currPos * 130 + 89; |
6573 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6574 | |
6575 | if ($cached) { |
6576 | $this->peg_currPos = $cached["nextPos"]; |
6577 | return $cached["result"]; |
6578 | } |
6579 | |
6580 | $s0 = $this->peg_currPos; |
6581 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c39) { |
6582 | $s1 = $this->peg_c39; |
6583 | $this->peg_currPos++; |
6584 | } else { |
6585 | $s1 = $this->peg_FAILED; |
6586 | if ($this->peg_silentFails === 0) { |
6587 | $this->peg_fail($this->peg_c40); |
6588 | } |
6589 | } |
6590 | if ($s1 !== $this->peg_FAILED) { |
6591 | $s2 = $this->peg_parse_(); |
6592 | if ($s2 !== $this->peg_FAILED) { |
6593 | $s1 = array($s1, $s2); |
6594 | $s0 = $s1; |
6595 | } else { |
6596 | $this->peg_currPos = $s0; |
6597 | $s0 = $this->peg_FAILED; |
6598 | } |
6599 | } else { |
6600 | $this->peg_currPos = $s0; |
6601 | $s0 = $this->peg_FAILED; |
6602 | } |
6603 | |
6604 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6605 | |
6606 | return $s0; |
6607 | } |
6608 | |
6609 | private function peg_parseCURLY_CLOSE() { |
6610 | |
6611 | $key = $this->peg_currPos * 130 + 90; |
6612 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6613 | |
6614 | if ($cached) { |
6615 | $this->peg_currPos = $cached["nextPos"]; |
6616 | return $cached["result"]; |
6617 | } |
6618 | |
6619 | $s0 = $this->peg_currPos; |
6620 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c11) { |
6621 | $s1 = $this->peg_c11; |
6622 | $this->peg_currPos++; |
6623 | } else { |
6624 | $s1 = $this->peg_FAILED; |
6625 | if ($this->peg_silentFails === 0) { |
6626 | $this->peg_fail($this->peg_c12); |
6627 | } |
6628 | } |
6629 | if ($s1 !== $this->peg_FAILED) { |
6630 | $s2 = $this->peg_parse_(); |
6631 | if ($s2 !== $this->peg_FAILED) { |
6632 | $s1 = array($s1, $s2); |
6633 | $s0 = $s1; |
6634 | } else { |
6635 | $this->peg_currPos = $s0; |
6636 | $s0 = $this->peg_FAILED; |
6637 | } |
6638 | } else { |
6639 | $this->peg_currPos = $s0; |
6640 | $s0 = $this->peg_FAILED; |
6641 | } |
6642 | |
6643 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6644 | |
6645 | return $s0; |
6646 | } |
6647 | |
6648 | private function peg_parseSUP() { |
6649 | |
6650 | $key = $this->peg_currPos * 130 + 91; |
6651 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6652 | |
6653 | if ($cached) { |
6654 | $this->peg_currPos = $cached["nextPos"]; |
6655 | return $cached["result"]; |
6656 | } |
6657 | |
6658 | $s0 = $this->peg_currPos; |
6659 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c35) { |
6660 | $s1 = $this->peg_c35; |
6661 | $this->peg_currPos++; |
6662 | } else { |
6663 | $s1 = $this->peg_FAILED; |
6664 | if ($this->peg_silentFails === 0) { |
6665 | $this->peg_fail($this->peg_c36); |
6666 | } |
6667 | } |
6668 | if ($s1 !== $this->peg_FAILED) { |
6669 | $s2 = $this->peg_parse_(); |
6670 | if ($s2 !== $this->peg_FAILED) { |
6671 | $s1 = array($s1, $s2); |
6672 | $s0 = $s1; |
6673 | } else { |
6674 | $this->peg_currPos = $s0; |
6675 | $s0 = $this->peg_FAILED; |
6676 | } |
6677 | } else { |
6678 | $this->peg_currPos = $s0; |
6679 | $s0 = $this->peg_FAILED; |
6680 | } |
6681 | |
6682 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6683 | |
6684 | return $s0; |
6685 | } |
6686 | |
6687 | private function peg_parseSUB() { |
6688 | |
6689 | $key = $this->peg_currPos * 130 + 92; |
6690 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6691 | |
6692 | if ($cached) { |
6693 | $this->peg_currPos = $cached["nextPos"]; |
6694 | return $cached["result"]; |
6695 | } |
6696 | |
6697 | $s0 = $this->peg_currPos; |
6698 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c37) { |
6699 | $s1 = $this->peg_c37; |
6700 | $this->peg_currPos++; |
6701 | } else { |
6702 | $s1 = $this->peg_FAILED; |
6703 | if ($this->peg_silentFails === 0) { |
6704 | $this->peg_fail($this->peg_c38); |
6705 | } |
6706 | } |
6707 | if ($s1 !== $this->peg_FAILED) { |
6708 | $s2 = $this->peg_parse_(); |
6709 | if ($s2 !== $this->peg_FAILED) { |
6710 | $s1 = array($s1, $s2); |
6711 | $s0 = $s1; |
6712 | } else { |
6713 | $this->peg_currPos = $s0; |
6714 | $s0 = $this->peg_FAILED; |
6715 | } |
6716 | } else { |
6717 | $this->peg_currPos = $s0; |
6718 | $s0 = $this->peg_FAILED; |
6719 | } |
6720 | |
6721 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6722 | |
6723 | return $s0; |
6724 | } |
6725 | |
6726 | private function peg_parsegeneric_func() { |
6727 | |
6728 | $key = $this->peg_currPos * 130 + 93; |
6729 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6730 | |
6731 | if ($cached) { |
6732 | $this->peg_currPos = $cached["nextPos"]; |
6733 | return $cached["result"]; |
6734 | } |
6735 | |
6736 | $s0 = $this->peg_currPos; |
6737 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c55) { |
6738 | $s1 = $this->peg_c55; |
6739 | $this->peg_currPos++; |
6740 | } else { |
6741 | $s1 = $this->peg_FAILED; |
6742 | if ($this->peg_silentFails === 0) { |
6743 | $this->peg_fail($this->peg_c56); |
6744 | } |
6745 | } |
6746 | if ($s1 !== $this->peg_FAILED) { |
6747 | $s2 = array(); |
6748 | $s3 = $this->peg_parsealpha(); |
6749 | if ($s3 !== $this->peg_FAILED) { |
6750 | while ($s3 !== $this->peg_FAILED) { |
6751 | $s2[] = $s3; |
6752 | $s3 = $this->peg_parsealpha(); |
6753 | } |
6754 | } else { |
6755 | $s2 = $this->peg_FAILED; |
6756 | } |
6757 | if ($s2 !== $this->peg_FAILED) { |
6758 | $this->peg_reportedPos = $s0; |
6759 | $s1 = $this->peg_f61(); |
6760 | $s0 = $s1; |
6761 | } else { |
6762 | $this->peg_currPos = $s0; |
6763 | $s0 = $this->peg_FAILED; |
6764 | } |
6765 | } else { |
6766 | $this->peg_currPos = $s0; |
6767 | $s0 = $this->peg_FAILED; |
6768 | } |
6769 | |
6770 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6771 | |
6772 | return $s0; |
6773 | } |
6774 | |
6775 | private function peg_parseBIG() { |
6776 | |
6777 | $key = $this->peg_currPos * 130 + 94; |
6778 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6779 | |
6780 | if ($cached) { |
6781 | $this->peg_currPos = $cached["nextPos"]; |
6782 | return $cached["result"]; |
6783 | } |
6784 | |
6785 | $s0 = $this->peg_currPos; |
6786 | $s1 = $this->peg_parsegeneric_func(); |
6787 | if ($s1 !== $this->peg_FAILED) { |
6788 | $this->peg_reportedPos = $this->peg_currPos; |
6789 | $s2 = $this->peg_f109($s1); |
6790 | if ($s2) { |
6791 | $s2 = null; |
6792 | } else { |
6793 | $s2 = $this->peg_FAILED; |
6794 | } |
6795 | if ($s2 !== $this->peg_FAILED) { |
6796 | $s3 = $this->peg_parse_(); |
6797 | if ($s3 !== $this->peg_FAILED) { |
6798 | $this->peg_reportedPos = $s0; |
6799 | $s1 = $this->peg_f98($s1); |
6800 | $s0 = $s1; |
6801 | } else { |
6802 | $this->peg_currPos = $s0; |
6803 | $s0 = $this->peg_FAILED; |
6804 | } |
6805 | } else { |
6806 | $this->peg_currPos = $s0; |
6807 | $s0 = $this->peg_FAILED; |
6808 | } |
6809 | } else { |
6810 | $this->peg_currPos = $s0; |
6811 | $s0 = $this->peg_FAILED; |
6812 | } |
6813 | |
6814 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6815 | |
6816 | return $s0; |
6817 | } |
6818 | |
6819 | private function peg_parseFUN_AR1() { |
6820 | |
6821 | $key = $this->peg_currPos * 130 + 95; |
6822 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6823 | |
6824 | if ($cached) { |
6825 | $this->peg_currPos = $cached["nextPos"]; |
6826 | return $cached["result"]; |
6827 | } |
6828 | |
6829 | $s0 = $this->peg_currPos; |
6830 | $s1 = $this->peg_parsegeneric_func(); |
6831 | if ($s1 !== $this->peg_FAILED) { |
6832 | $this->peg_reportedPos = $this->peg_currPos; |
6833 | $s2 = $this->peg_f110($s1); |
6834 | if ($s2) { |
6835 | $s2 = null; |
6836 | } else { |
6837 | $s2 = $this->peg_FAILED; |
6838 | } |
6839 | if ($s2 !== $this->peg_FAILED) { |
6840 | $s3 = $this->peg_parse_(); |
6841 | if ($s3 !== $this->peg_FAILED) { |
6842 | $this->peg_reportedPos = $s0; |
6843 | $s1 = $this->peg_f98($s1); |
6844 | $s0 = $s1; |
6845 | } else { |
6846 | $this->peg_currPos = $s0; |
6847 | $s0 = $this->peg_FAILED; |
6848 | } |
6849 | } else { |
6850 | $this->peg_currPos = $s0; |
6851 | $s0 = $this->peg_FAILED; |
6852 | } |
6853 | } else { |
6854 | $this->peg_currPos = $s0; |
6855 | $s0 = $this->peg_FAILED; |
6856 | } |
6857 | if ($s0 === $this->peg_FAILED) { |
6858 | $s0 = $this->peg_currPos; |
6859 | $s1 = $this->peg_parsegeneric_func(); |
6860 | if ($s1 !== $this->peg_FAILED) { |
6861 | $this->peg_reportedPos = $this->peg_currPos; |
6862 | $s2 = $this->peg_f111($s1); |
6863 | if ($s2) { |
6864 | $s2 = null; |
6865 | } else { |
6866 | $s2 = $this->peg_FAILED; |
6867 | } |
6868 | if ($s2 !== $this->peg_FAILED) { |
6869 | $s3 = $this->peg_parse_(); |
6870 | if ($s3 !== $this->peg_FAILED) { |
6871 | $this->peg_reportedPos = $s0; |
6872 | $s1 = $this->peg_f98($s1); |
6873 | $s0 = $s1; |
6874 | } else { |
6875 | $this->peg_currPos = $s0; |
6876 | $s0 = $this->peg_FAILED; |
6877 | } |
6878 | } else { |
6879 | $this->peg_currPos = $s0; |
6880 | $s0 = $this->peg_FAILED; |
6881 | } |
6882 | } else { |
6883 | $this->peg_currPos = $s0; |
6884 | $s0 = $this->peg_FAILED; |
6885 | } |
6886 | if ($s0 === $this->peg_FAILED) { |
6887 | $s0 = $this->peg_currPos; |
6888 | $s1 = $this->peg_parsegeneric_func(); |
6889 | if ($s1 !== $this->peg_FAILED) { |
6890 | $this->peg_reportedPos = $this->peg_currPos; |
6891 | $s2 = $this->peg_f112($s1); |
6892 | if ($s2) { |
6893 | $s2 = null; |
6894 | } else { |
6895 | $s2 = $this->peg_FAILED; |
6896 | } |
6897 | if ($s2 !== $this->peg_FAILED) { |
6898 | $s3 = $this->peg_parse_(); |
6899 | if ($s3 !== $this->peg_FAILED) { |
6900 | $this->peg_reportedPos = $s0; |
6901 | $s1 = $this->peg_f113($s1); |
6902 | $s0 = $s1; |
6903 | } else { |
6904 | $this->peg_currPos = $s0; |
6905 | $s0 = $this->peg_FAILED; |
6906 | } |
6907 | } else { |
6908 | $this->peg_currPos = $s0; |
6909 | $s0 = $this->peg_FAILED; |
6910 | } |
6911 | } else { |
6912 | $this->peg_currPos = $s0; |
6913 | $s0 = $this->peg_FAILED; |
6914 | } |
6915 | } |
6916 | } |
6917 | |
6918 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6919 | |
6920 | return $s0; |
6921 | } |
6922 | |
6923 | private function peg_parseFUN_MHCHEM() { |
6924 | |
6925 | $key = $this->peg_currPos * 130 + 96; |
6926 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6927 | |
6928 | if ($cached) { |
6929 | $this->peg_currPos = $cached["nextPos"]; |
6930 | return $cached["result"]; |
6931 | } |
6932 | |
6933 | $s0 = $this->peg_currPos; |
6934 | $s1 = $this->peg_parsegeneric_func(); |
6935 | if ($s1 !== $this->peg_FAILED) { |
6936 | $this->peg_reportedPos = $this->peg_currPos; |
6937 | $s2 = $this->peg_f114($s1); |
6938 | if ($s2) { |
6939 | $s2 = null; |
6940 | } else { |
6941 | $s2 = $this->peg_FAILED; |
6942 | } |
6943 | if ($s2 !== $this->peg_FAILED) { |
6944 | $s3 = $this->peg_parse_(); |
6945 | if ($s3 !== $this->peg_FAILED) { |
6946 | $this->peg_reportedPos = $s0; |
6947 | $s1 = $this->peg_f98($s1); |
6948 | $s0 = $s1; |
6949 | } else { |
6950 | $this->peg_currPos = $s0; |
6951 | $s0 = $this->peg_FAILED; |
6952 | } |
6953 | } else { |
6954 | $this->peg_currPos = $s0; |
6955 | $s0 = $this->peg_FAILED; |
6956 | } |
6957 | } else { |
6958 | $this->peg_currPos = $s0; |
6959 | $s0 = $this->peg_FAILED; |
6960 | } |
6961 | |
6962 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6963 | |
6964 | return $s0; |
6965 | } |
6966 | |
6967 | private function peg_parseFUN_AR2() { |
6968 | |
6969 | $key = $this->peg_currPos * 130 + 97; |
6970 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6971 | |
6972 | if ($cached) { |
6973 | $this->peg_currPos = $cached["nextPos"]; |
6974 | return $cached["result"]; |
6975 | } |
6976 | |
6977 | $s0 = $this->peg_currPos; |
6978 | $s1 = $this->peg_parsegeneric_func(); |
6979 | if ($s1 !== $this->peg_FAILED) { |
6980 | $this->peg_reportedPos = $this->peg_currPos; |
6981 | $s2 = $this->peg_f115($s1); |
6982 | if ($s2) { |
6983 | $s2 = null; |
6984 | } else { |
6985 | $s2 = $this->peg_FAILED; |
6986 | } |
6987 | if ($s2 !== $this->peg_FAILED) { |
6988 | $s3 = $this->peg_parse_(); |
6989 | if ($s3 !== $this->peg_FAILED) { |
6990 | $this->peg_reportedPos = $s0; |
6991 | $s1 = $this->peg_f98($s1); |
6992 | $s0 = $s1; |
6993 | } else { |
6994 | $this->peg_currPos = $s0; |
6995 | $s0 = $this->peg_FAILED; |
6996 | } |
6997 | } else { |
6998 | $this->peg_currPos = $s0; |
6999 | $s0 = $this->peg_FAILED; |
7000 | } |
7001 | } else { |
7002 | $this->peg_currPos = $s0; |
7003 | $s0 = $this->peg_FAILED; |
7004 | } |
7005 | |
7006 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
7007 | |
7008 | return $s0; |
7009 | } |
7010 | |
7011 | private function peg_parseFUN_AR4_MHCHEM_TEXIFIED() { |
7012 | |
7013 | $key = $this->peg_currPos * 130 + 98; |
7014 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
7015 | |
7016 | if ($cached) { |
7017 | $this->peg_currPos = $cached["nextPos"]; |
7018 | return $cached["result"]; |
7019 | } |
7020 | |
7021 | $s0 = $this->peg_currPos; |
7022 | $s1 = $this->peg_parsegeneric_func(); |
7023 | if ($s1 !== $this->peg_FAILED) { |
7024 | $this->peg_reportedPos = $this->peg_currPos; |
7025 | $s2 = $this->peg_f116($s1); |
7026 | if ($s2) { |
7027 | $s2 = null; |
7028 | } else { |
7029 | $s2 = $this->peg_FAILED; |
7030 | } |
7031 | if ($s2 !== $this->peg_FAILED) { |
7032 | $s3 = $this->peg_parse_(); |
7033 | if ($s3 !== $this->peg_FAILED) { |
7034 | $this->peg_reportedPos = $s0; |
7035 | $s1 = $this->peg_f98($s1); |
7036 | $s0 = $s1; |
7037 | } else { |
7038 | $this->peg_currPos = $s0; |
7039 | $s0 = $this->peg_FAILED; |
7040 | } |
7041 | } else { |
7042 | $this->peg_currPos = $s0; |
7043 | $s0 = $this->peg_FAILED; |
7044 | } |
7045 | } else { |
7046 | $this->peg_currPos = $s0; |
7047 | $s0 = $this->peg_FAILED; |
7048 | } |
7049 | |
7050 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
7051 | |
7052 | return $s0; |
7053 | } |
7054 | |
7055 | private function peg_parseFUN_INFIX() { |
7056 | |
7057 | $key = $this->peg_currPos * 130 + 99; |
7058 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
7059 | |
7060 | if ($cached) { |
7061 | $this->peg_currPos = $cached["nextPos"]; |
7062 | return $cached["result"]; |
7063 | } |
7064 | |
7065 | $s0 = $this->peg_currPos; |
7066 | $s1 = $this->peg_parsegeneric_func(); |
7067 | if ($s1 !== $this->peg_FAILED) { |
7068 | $this->peg_reportedPos = $this->peg_currPos; |
7069 | $s2 = $this->peg_f117($s1); |
7070 | if ($s2) { |
7071 | $s2 = null; |
7072 | } else { |
7073 | $s2 = $this->peg_FAILED; |
7074 | } |
7075 | if ($s2 !== $this->peg_FAILED) { |
7076 | $s3 = $this->peg_parse_(); |
7077 | if ($s3 !== $this->peg_FAILED) { |
7078 | $this->peg_reportedPos = $s0; |
7079 | $s1 = $this->peg_f98($s1); |
7080 | $s0 = $s1; |
7081 | } else { |
7082 | $this->peg_currPos = $s0; |
7083 | $s0 = $this->peg_FAILED; |
7084 | } |
7085 | } else { |
7086 | $this->peg_currPos = $s0; |
7087 | $s0 = $this->peg_FAILED; |
7088 | } |
7089 | } else { |
7090 | $this->peg_currPos = $s0; |
7091 | $s0 = $this->peg_FAILED; |
7092 | } |
7093 | |
7094 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
7095 | |
7096 | return $s0; |
7097 | } |
7098 | |
7099 | private function peg_parseDECLh() { |
7100 | |
7101 | $key = $this->peg_currPos * 130 + 100; |
7102 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
7103 | |
7104 | if ($cached) { |
7105 | $this->peg_currPos = $cached["nextPos"]; |
7106 | return $cached["result"]; |
7107 | } |
7108 | |
7109 | $s0 = $this->peg_currPos; |
7110 | $s1 = $this->peg_parsegeneric_func(); |
7111 | if ($s1 !== $this->peg_FAILED) { |
7112 | $this->peg_reportedPos = $this->peg_currPos; |
7113 | $s2 = $this->peg_f118($s1); |
7114 | if ($s2) { |
7115 | $s2 = null; |
7116 | } else { |
7117 | $s2 = $this->peg_FAILED; |
7118 | } |
7119 | if ($s2 !== $this->peg_FAILED) { |
7120 | $s3 = $this->peg_parse_(); |
7121 | if ($s3 !== $this->peg_FAILED) { |
7122 | $this->peg_reportedPos = $s0; |
7123 | $s1 = $this->peg_f119($s1); |
7124 | $s0 = $s1; |
7125 | } else { |
7126 | $this->peg_currPos = $s0; |
7127 | $s0 = $this->peg_FAILED; |
7128 | } |
7129 | } else { |
7130 | $this->peg_currPos = $s0; |
7131 | $s0 = $this->peg_FAILED; |
7132 | } |
7133 | } else { |
7134 | $this->peg_currPos = $s0; |
7135 | $s0 = $this->peg_FAILED; |
7136 | } |
7137 | |
7138 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
7139 | |
7140 | return $s0; |
7141 | } |
7142 | |
7143 | private function peg_parseFUN_AR2nb() { |
7144 | |
7145 | $key = $this->peg_currPos * 130 + 101; |
7146 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
7147 | |
7148 | if ($cached) { |
7149 | $this->peg_currPos = $cached["nextPos"]; |
7150 | return $cached["result"]; |
7151 | } |
7152 | |
7153 | $s0 = $this->peg_currPos; |
7154 | $s1 = $this->peg_parsegeneric_func(); |
7155 | if ($s1 !== $this->peg_FAILED) { |
7156 | $this->peg_reportedPos = $this->peg_currPos; |
7157 | $s2 = $this->peg_f120($s1); |
7158 | if ($s2) { |
7159 | $s2 = null; |
7160 | } else { |
7161 | $s2 = $this->peg_FAILED; |
7162 | } |
7163 | if ($s2 !== $this->peg_FAILED) { |
7164 | $s3 = $this->peg_parse_(); |
7165 | if ($s3 !== $this->peg_FAILED) { |
7166 | $this->peg_reportedPos = $s0; |
7167 | $s1 = $this->peg_f98($s1); |
7168 | $s0 = $s1; |
7169 | } else { |
7170 | $this->peg_currPos = $s0; |
7171 | $s0 = $this->peg_FAILED; |
7172 | } |
7173 | } else { |
7174 | $this->peg_currPos = $s0; |
7175 | $s0 = $this->peg_FAILED; |
7176 | } |
7177 | } else { |
7178 | $this->peg_currPos = $s0; |
7179 | $s0 = $this->peg_FAILED; |
7180 | } |
7181 | |
7182 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
7183 | |
7184 | return $s0; |
7185 | } |
7186 | |
7187 | private function peg_parseLEFTI() { |
7188 | |
7189 | $key = $this->peg_currPos * 130 + 102; |
7190 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
7191 | |
7192 | if ($cached) { |
7193 | $this->peg_currPos = $cached["nextPos"]; |
7194 | return $cached["result"]; |
7195 | } |
7196 | |
7197 | $s0 = $this->peg_currPos; |
7198 | $s1 = $this->peg_parsegeneric_func(); |
7199 | if ($s1 !== $this->peg_FAILED) { |
7200 | $this->peg_reportedPos = $this->peg_currPos; |
7201 | $s2 = $this->peg_f121($s1); |
7202 | if ($s2) { |
7203 | $s2 = null; |
7204 | } else { |
7205 | $s2 = $this->peg_FAILED; |
7206 | } |
7207 | if ($s2 !== $this->peg_FAILED) { |
7208 | $s3 = $this->peg_parse_(); |
7209 | if ($s3 !== $this->peg_FAILED) { |
7210 | $s1 = array($s1, $s2, $s3); |
7211 | $s0 = $s1; |
7212 | } else { |
7213 | $this->peg_currPos = $s0; |
7214 | $s0 = $this->peg_FAILED; |
7215 | } |
7216 | } else { |
7217 | $this->peg_currPos = $s0; |
7218 | $s0 = $this->peg_FAILED; |
7219 | } |
7220 | } else { |
7221 | $this->peg_currPos = $s0; |
7222 | $s0 = $this->peg_FAILED; |
7223 | } |
7224 | |
7225 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
7226 | |
7227 | return $s0; |
7228 | } |
7229 | |
7230 | private function peg_parseRIGHTI() { |
7231 | |
7232 | $key = $this->peg_currPos * 130 + 103; |
7233 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
7234 | |
7235 | if ($cached) { |
7236 | $this->peg_currPos = $cached["nextPos"]; |
7237 | return $cached["result"]; |
7238 | } |
7239 | |
7240 | $s0 = $this->peg_currPos; |
7241 | $s1 = $this->peg_parsegeneric_func(); |
7242 | if ($s1 !== $this->peg_FAILED) { |
7243 | $this->peg_reportedPos = $this->peg_currPos; |
7244 | $s2 = $this->peg_f122($s1); |
7245 | if ($s2) { |
7246 | $s2 = null; |
7247 | } else { |
7248 | $s2 = $this->peg_FAILED; |
7249 | } |
7250 | if ($s2 !== $this->peg_FAILED) { |
7251 | $s3 = $this->peg_parse_(); |
7252 | if ($s3 !== $this->peg_FAILED) { |
7253 | $s1 = array($s1, $s2, $s3); |
7254 | $s0 = $s1; |
7255 | } else { |
7256 | $this->peg_currPos = $s0; |
7257 | $s0 = $this->peg_FAILED; |
7258 | } |
7259 | } else { |
7260 | $this->peg_currPos = $s0; |
7261 | $s0 = $this->peg_FAILED; |
7262 | } |
7263 | } else { |
7264 | $this->peg_currPos = $s0; |
7265 | $s0 = $this->peg_FAILED; |
7266 | } |
7267 | |
7268 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
7269 | |
7270 | return $s0; |
7271 | } |
7272 | |
7273 | private function peg_parseHLINE() { |
7274 | |
7275 | $key = $this->peg_currPos * 130 + 104; |
7276 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
7277 | |
7278 | if ($cached) { |
7279 | $this->peg_currPos = $cached["nextPos"]; |
7280 | return $cached["result"]; |
7281 | } |
7282 | |
7283 | $s0 = $this->peg_currPos; |
7284 | $s1 = $this->peg_parsegeneric_func(); |
7285 | if ($s1 !== $this->peg_FAILED) { |
7286 | $this->peg_reportedPos = $this->peg_currPos; |
7287 | $s2 = $this->peg_f123($s1); |
7288 | if ($s2) { |
7289 | $s2 = null; |
7290 | } else { |
7291 | $s2 = $this->peg_FAILED; |
7292 | } |
7293 | if ($s2 !== $this->peg_FAILED) { |
7294 | $s3 = $this->peg_parse_(); |
7295 | if ($s3 !== $this->peg_FAILED) { |
7296 | $this->peg_reportedPos = $s0; |
7297 | $s1 = $this->peg_f98($s1); |
7298 | $s0 = $s1; |
7299 | } else { |
7300 | $this->peg_currPos = $s0; |
7301 | $s0 = $this->peg_FAILED; |
7302 | } |
7303 | } else { |
7304 | $this->peg_currPos = $s0; |
7305 | $s0 = $this->peg_FAILED; |
7306 | } |
7307 | } else { |
7308 | $this->peg_currPos = $s0; |
7309 | $s0 = $this->peg_FAILED; |
7310 | } |
7311 | |
7312 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
7313 | |
7314 | return $s0; |
7315 | } |
7316 | |
7317 | private function peg_parseCOLOR() { |
7318 | |
7319 | $key = $this->peg_currPos * 130 + 105; |
7320 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
7321 | |
7322 | if ($cached) { |
7323 | $this->peg_currPos = $cached["nextPos"]; |
7324 | return $cached["result"]; |
7325 | } |
7326 | |
7327 | $s0 = $this->peg_currPos; |
7328 | $s1 = $this->peg_parsegeneric_func(); |
7329 | if ($s1 !== $this->peg_FAILED) { |
7330 | $this->peg_reportedPos = $this->peg_currPos; |
7331 | $s2 = $this->peg_f124($s1); |
7332 | if ($s2) { |
7333 | $s2 = null; |
7334 | } else { |
7335 | $s2 = $this->peg_FAILED; |
7336 | } |
7337 | if ($s2 !== $this->peg_FAILED) { |
7338 | $s3 = $this->peg_parse_(); |
7339 | if ($s3 !== $this->peg_FAILED) { |
7340 | $s4 = $this->peg_parseCOLOR_SPEC(); |
7341 | if ($s4 !== $this->peg_FAILED) { |
7342 | $this->peg_reportedPos = $s0; |
7343 | $s1 = $this->peg_f125($s1, $s4); |
7344 | $s0 = $s1; |
7345 | } else { |
7346 | $this->peg_currPos = $s0; |
7347 | $s0 = $this->peg_FAILED; |
7348 | } |
7349 | } else { |
7350 | $this->peg_currPos = $s0; |
7351 | $s0 = $this->peg_FAILED; |
7352 | } |
7353 | } else { |
7354 | $this->peg_currPos = $s0; |
7355 | $s0 = $this->peg_FAILED; |
7356 | } |
7357 | } else { |
7358 | $this->peg_currPos = $s0; |
7359 | $s0 = $this->peg_FAILED; |
7360 | } |
7361 | |
7362 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
7363 | |
7364 | return $s0; |
7365 | } |
7366 | |
7367 | private function peg_parseDEFINECOLOR() { |
7368 | |
7369 | $key = $this->peg_currPos * 130 + 106; |
7370 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
7371 | |
7372 | if ($cached) { |
7373 | $this->peg_currPos = $cached["nextPos"]; |
7374 | return $cached["result"]; |
7375 | } |
7376 | |
7377 | $s0 = $this->peg_currPos; |
7378 | $s1 = $this->peg_parsegeneric_func(); |
7379 | if ($s1 !== $this->peg_FAILED) { |
7380 | $this->peg_reportedPos = $this->peg_currPos; |
7381 | $s2 = $this->peg_f126($s1); |
7382 | if ($s2) { |
7383 | $s2 = null; |
7384 | } else { |
7385 | $s2 = $this->peg_FAILED; |
7386 | } |
7387 | if ($s2 !== $this->peg_FAILED) { |
7388 | $s3 = $this->peg_parse_(); |
7389 | if ($s3 !== $this->peg_FAILED) { |
7390 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c39) { |
7391 | $s4 = $this->peg_c39; |
7392 | $this->peg_currPos++; |
7393 | } else { |
7394 | $s4 = $this->peg_FAILED; |
7395 | if ($this->peg_silentFails === 0) { |
7396 | $this->peg_fail($this->peg_c40); |
7397 | } |
7398 | } |
7399 | if ($s4 !== $this->peg_FAILED) { |
7400 | $s5 = $this->peg_parse_(); |
7401 | if ($s5 !== $this->peg_FAILED) { |
7402 | $s6 = array(); |
7403 | $s7 = $this->peg_parsealpha(); |
7404 | if ($s7 !== $this->peg_FAILED) { |
7405 | while ($s7 !== $this->peg_FAILED) { |
7406 | $s6[] = $s7; |
7407 | $s7 = $this->peg_parsealpha(); |
7408 | } |
7409 | } else { |
7410 | $s6 = $this->peg_FAILED; |
7411 | } |
7412 | if ($s6 !== $this->peg_FAILED) { |
7413 | $s7 = $this->peg_parse_(); |
7414 | if ($s7 !== $this->peg_FAILED) { |
7415 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c11) { |
7416 | $s8 = $this->peg_c11; |
7417 | $this->peg_currPos++; |
7418 | } else { |
7419 | $s8 = $this->peg_FAILED; |
7420 | if ($this->peg_silentFails === 0) { |
7421 | $this->peg_fail($this->peg_c12); |
7422 | } |
7423 | } |
7424 | if ($s8 !== $this->peg_FAILED) { |
7425 | $s9 = $this->peg_parse_(); |
7426 | if ($s9 !== $this->peg_FAILED) { |
7427 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c39) { |
7428 | $s10 = $this->peg_c39; |
7429 | $this->peg_currPos++; |
7430 | } else { |
7431 | $s10 = $this->peg_FAILED; |
7432 | if ($this->peg_silentFails === 0) { |
7433 | $this->peg_fail($this->peg_c40); |
7434 | } |
7435 | } |
7436 | if ($s10 !== $this->peg_FAILED) { |
7437 | $s11 = $this->peg_parse_(); |
7438 | if ($s11 !== $this->peg_FAILED) { |
7439 | $s12 = $this->peg_currPos; |
7440 | if (mb_strtolower($this->input_substr($this->peg_currPos, 5), "UTF-8") === $this->peg_c131) { |
7441 | $s13 = $this->input_substr($this->peg_currPos, 5); |
7442 | $this->peg_currPos += 5; |
7443 | } else { |
7444 | $s13 = $this->peg_FAILED; |
7445 | if ($this->peg_silentFails === 0) { |
7446 | $this->peg_fail($this->peg_c132); |
7447 | } |
7448 | } |
7449 | if ($s13 !== $this->peg_FAILED) { |
7450 | $s14 = $this->peg_parse_(); |
7451 | if ($s14 !== $this->peg_FAILED) { |
7452 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c11) { |
7453 | $s15 = $this->peg_c11; |
7454 | $this->peg_currPos++; |
7455 | } else { |
7456 | $s15 = $this->peg_FAILED; |
7457 | if ($this->peg_silentFails === 0) { |
7458 | $this->peg_fail($this->peg_c12); |
7459 | } |
7460 | } |
7461 | if ($s15 !== $this->peg_FAILED) { |
7462 | $s16 = $this->peg_parse_(); |
7463 | if ($s16 !== $this->peg_FAILED) { |
7464 | $s17 = $this->peg_parseCOLOR_SPEC_NAMED(); |
7465 | if ($s17 !== $this->peg_FAILED) { |
7466 | $this->peg_reportedPos = $s12; |
7467 | $s13 = $this->peg_f127($s1, $s6, $s17); |
7468 | $s12 = $s13; |
7469 | } else { |
7470 | $this->peg_currPos = $s12; |
7471 | $s12 = $this->peg_FAILED; |
7472 | } |
7473 | } else { |
7474 | $this->peg_currPos = $s12; |
7475 | $s12 = $this->peg_FAILED; |
7476 | } |
7477 | } else { |
7478 | $this->peg_currPos = $s12; |
7479 | $s12 = $this->peg_FAILED; |
7480 | } |
7481 | } else { |
7482 | $this->peg_currPos = $s12; |
7483 | $s12 = $this->peg_FAILED; |
7484 | } |
7485 | } else { |
7486 | $this->peg_currPos = $s12; |
7487 | $s12 = $this->peg_FAILED; |
7488 | } |
7489 | if ($s12 === $this->peg_FAILED) { |
7490 | $s12 = $this->peg_currPos; |
7491 | if (mb_strtolower($this->input_substr($this->peg_currPos, 4), "UTF-8") === $this->peg_c133) { |
7492 | $s13 = $this->input_substr($this->peg_currPos, 4); |
7493 | $this->peg_currPos += 4; |
7494 | } else { |
7495 | $s13 = $this->peg_FAILED; |
7496 | if ($this->peg_silentFails === 0) { |
7497 | $this->peg_fail($this->peg_c134); |
7498 | } |
7499 | } |
7500 | if ($s13 !== $this->peg_FAILED) { |
7501 | $s14 = $this->peg_parse_(); |
7502 | if ($s14 !== $this->peg_FAILED) { |
7503 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c11) { |
7504 | $s15 = $this->peg_c11; |
7505 | $this->peg_currPos++; |
7506 | } else { |
7507 | $s15 = $this->peg_FAILED; |
7508 | if ($this->peg_silentFails === 0) { |
7509 | $this->peg_fail($this->peg_c12); |
7510 | } |
7511 | } |
7512 | if ($s15 !== $this->peg_FAILED) { |
7513 | $s16 = $this->peg_parse_(); |
7514 | if ($s16 !== $this->peg_FAILED) { |
7515 | $s17 = $this->peg_parseCOLOR_SPEC_GRAY(); |
7516 | if ($s17 !== $this->peg_FAILED) { |
7517 | $this->peg_reportedPos = $s12; |
7518 | $s13 = $this->peg_f128($s1, $s6, $s17); |
7519 | $s12 = $s13; |
7520 | } else { |
7521 | $this->peg_currPos = $s12; |
7522 | $s12 = $this->peg_FAILED; |
7523 | } |
7524 | } else { |
7525 | $this->peg_currPos = $s12; |
7526 | $s12 = $this->peg_FAILED; |
7527 | } |
7528 | } else { |
7529 | $this->peg_currPos = $s12; |
7530 | $s12 = $this->peg_FAILED; |
7531 | } |
7532 | } else { |
7533 | $this->peg_currPos = $s12; |
7534 | $s12 = $this->peg_FAILED; |
7535 | } |
7536 | } else { |
7537 | $this->peg_currPos = $s12; |
7538 | $s12 = $this->peg_FAILED; |
7539 | } |
7540 | if ($s12 === $this->peg_FAILED) { |
7541 | $s12 = $this->peg_currPos; |
7542 | if ($this->input_substr($this->peg_currPos, 3) === $this->peg_c135) { |
7543 | $s13 = $this->peg_c135; |
7544 | $this->peg_currPos += 3; |
7545 | } else { |
7546 | $s13 = $this->peg_FAILED; |
7547 | if ($this->peg_silentFails === 0) { |
7548 | $this->peg_fail($this->peg_c136); |
7549 | } |
7550 | } |
7551 | if ($s13 !== $this->peg_FAILED) { |
7552 | $s14 = $this->peg_parse_(); |
7553 | if ($s14 !== $this->peg_FAILED) { |
7554 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c11) { |
7555 | $s15 = $this->peg_c11; |
7556 | $this->peg_currPos++; |
7557 | } else { |
7558 | $s15 = $this->peg_FAILED; |
7559 | if ($this->peg_silentFails === 0) { |
7560 | $this->peg_fail($this->peg_c12); |
7561 | } |
7562 | } |
7563 | if ($s15 !== $this->peg_FAILED) { |
7564 | $s16 = $this->peg_parse_(); |
7565 | if ($s16 !== $this->peg_FAILED) { |
7566 | $s17 = $this->peg_parseCOLOR_SPEC_rgb(); |
7567 | if ($s17 !== $this->peg_FAILED) { |
7568 | $this->peg_reportedPos = $s12; |
7569 | $s13 = $this->peg_f129($s1, $s6, $s17); |
7570 | $s12 = $s13; |
7571 | } else { |
7572 | $this->peg_currPos = $s12; |
7573 | $s12 = $this->peg_FAILED; |
7574 | } |
7575 | } else { |
7576 | $this->peg_currPos = $s12; |
7577 | $s12 = $this->peg_FAILED; |
7578 | } |
7579 | } else { |
7580 | $this->peg_currPos = $s12; |
7581 | $s12 = $this->peg_FAILED; |
7582 | } |
7583 | } else { |
7584 | $this->peg_currPos = $s12; |
7585 | $s12 = $this->peg_FAILED; |
7586 | } |
7587 | } else { |
7588 | $this->peg_currPos = $s12; |
7589 | $s12 = $this->peg_FAILED; |
7590 | } |
7591 | if ($s12 === $this->peg_FAILED) { |
7592 | $s12 = $this->peg_currPos; |
7593 | if ($this->input_substr($this->peg_currPos, 3) === $this->peg_c137) { |
7594 | $s13 = $this->peg_c137; |
7595 | $this->peg_currPos += 3; |
7596 | } else { |
7597 | $s13 = $this->peg_FAILED; |
7598 | if ($this->peg_silentFails === 0) { |
7599 | $this->peg_fail($this->peg_c138); |
7600 | } |
7601 | } |
7602 | if ($s13 !== $this->peg_FAILED) { |
7603 | $s14 = $this->peg_parse_(); |
7604 | if ($s14 !== $this->peg_FAILED) { |
7605 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c11) { |
7606 | $s15 = $this->peg_c11; |
7607 | $this->peg_currPos++; |
7608 | } else { |
7609 | $s15 = $this->peg_FAILED; |
7610 | if ($this->peg_silentFails === 0) { |
7611 | $this->peg_fail($this->peg_c12); |
7612 | } |
7613 | } |
7614 | if ($s15 !== $this->peg_FAILED) { |
7615 | $s16 = $this->peg_parse_(); |
7616 | if ($s16 !== $this->peg_FAILED) { |
7617 | $s17 = $this->peg_parseCOLOR_SPEC_RGBI(); |
7618 | if ($s17 !== $this->peg_FAILED) { |
7619 | $this->peg_reportedPos = $s12; |
7620 | $s13 = $this->peg_f129($s1, $s6, $s17); |
7621 | $s12 = $s13; |
7622 | } else { |
7623 | $this->peg_currPos = $s12; |
7624 | $s12 = $this->peg_FAILED; |
7625 | } |
7626 | } else { |
7627 | $this->peg_currPos = $s12; |
7628 | $s12 = $this->peg_FAILED; |
7629 | } |
7630 | } else { |
7631 | $this->peg_currPos = $s12; |
7632 | $s12 = $this->peg_FAILED; |
7633 | } |
7634 | } else { |
7635 | $this->peg_currPos = $s12; |
7636 | $s12 = $this->peg_FAILED; |
7637 | } |
7638 | } else { |
7639 | $this->peg_currPos = $s12; |
7640 | $s12 = $this->peg_FAILED; |
7641 | } |
7642 | if ($s12 === $this->peg_FAILED) { |
7643 | $s12 = $this->peg_currPos; |
7644 | if (mb_strtolower($this->input_substr($this->peg_currPos, 4), "UTF-8") === $this->peg_c139) { |
7645 | $s13 = $this->input_substr($this->peg_currPos, 4); |
7646 | $this->peg_currPos += 4; |
7647 | } else { |
7648 | $s13 = $this->peg_FAILED; |
7649 | if ($this->peg_silentFails === 0) { |
7650 | $this->peg_fail($this->peg_c140); |
7651 | } |
7652 | } |
7653 | if ($s13 !== $this->peg_FAILED) { |
7654 | $s14 = $this->peg_parse_(); |
7655 | if ($s14 !== $this->peg_FAILED) { |
7656 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c11) { |
7657 | $s15 = $this->peg_c11; |
7658 | $this->peg_currPos++; |
7659 | } else { |
7660 | $s15 = $this->peg_FAILED; |
7661 | if ($this->peg_silentFails === 0) { |
7662 | $this->peg_fail($this->peg_c12); |
7663 | } |
7664 | } |
7665 | if ($s15 !== $this->peg_FAILED) { |
7666 | $s16 = $this->peg_parse_(); |
7667 | if ($s16 !== $this->peg_FAILED) { |
7668 | $s17 = $this->peg_parseCOLOR_SPEC_CMYK(); |
7669 | if ($s17 !== $this->peg_FAILED) { |
7670 | $this->peg_reportedPos = $s12; |
7671 | $s13 = $this->peg_f130($s1, $s6, $s17); |
7672 | $s12 = $s13; |
7673 | } else { |
7674 | $this->peg_currPos = $s12; |
7675 | $s12 = $this->peg_FAILED; |
7676 | } |
7677 | } else { |
7678 | $this->peg_currPos = $s12; |
7679 | $s12 = $this->peg_FAILED; |
7680 | } |
7681 | } else { |
7682 | $this->peg_currPos = $s12; |
7683 | $s12 = $this->peg_FAILED; |
7684 | } |
7685 | } else { |
7686 | $this->peg_currPos = $s12; |
7687 | $s12 = $this->peg_FAILED; |
7688 | } |
7689 | } else { |
7690 | $this->peg_currPos = $s12; |
7691 | $s12 = $this->peg_FAILED; |
7692 | } |
7693 | } |
7694 | } |
7695 | } |
7696 | } |
7697 | if ($s12 !== $this->peg_FAILED) { |
7698 | $this->peg_reportedPos = $s0; |
7699 | $s1 = $this->peg_f131($s1, $s6, $s12); |
7700 | $s0 = $s1; |
7701 | } else { |
7702 | $this->peg_currPos = $s0; |
7703 | $s0 = $this->peg_FAILED; |
7704 | } |
7705 | } else { |
7706 | $this->peg_currPos = $s0; |
7707 | $s0 = $this->peg_FAILED; |
7708 | } |
7709 | } else { |
7710 | $this->peg_currPos = $s0; |
7711 | $s0 = $this->peg_FAILED; |
7712 | } |
7713 | } else { |
7714 | $this->peg_currPos = $s0; |
7715 | $s0 = $this->peg_FAILED; |
7716 | } |
7717 | } else { |
7718 | $this->peg_currPos = $s0; |
7719 | $s0 = $this->peg_FAILED; |
7720 | } |
7721 | } else { |
7722 | $this->peg_currPos = $s0; |
7723 | $s0 = $this->peg_FAILED; |
7724 | } |
7725 | } else { |
7726 | $this->peg_currPos = $s0; |
7727 | $s0 = $this->peg_FAILED; |
7728 | } |
7729 | } else { |
7730 | $this->peg_currPos = $s0; |
7731 | $s0 = $this->peg_FAILED; |
7732 | } |
7733 | } else { |
7734 | $this->peg_currPos = $s0; |
7735 | $s0 = $this->peg_FAILED; |
7736 | } |
7737 | } else { |
7738 | $this->peg_currPos = $s0; |
7739 | $s0 = $this->peg_FAILED; |
7740 | } |
7741 | } else { |
7742 | $this->peg_currPos = $s0; |
7743 | $s0 = $this->peg_FAILED; |
7744 | } |
7745 | } else { |
7746 | $this->peg_currPos = $s0; |
7747 | $s0 = $this->peg_FAILED; |
7748 | } |
7749 | |
7750 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
7751 | |
7752 | return $s0; |
7753 | } |
7754 | |
7755 | private function peg_parseCOLOR_SPEC() { |
7756 | |
7757 | $key = $this->peg_currPos * 130 + 107; |
7758 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
7759 | |
7760 | if ($cached) { |
7761 | $this->peg_currPos = $cached["nextPos"]; |
7762 | return $cached["result"]; |
7763 | } |
7764 | |
7765 | $s0 = $this->peg_parseCOLOR_SPEC_NAMED(); |
7766 | if ($s0 === $this->peg_FAILED) { |
7767 | $s0 = $this->peg_currPos; |
7768 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c5) { |
7769 | $s1 = $this->peg_c5; |
7770 | $this->peg_currPos++; |
7771 | } else { |
7772 | $s1 = $this->peg_FAILED; |
7773 | if ($this->peg_silentFails === 0) { |
7774 | $this->peg_fail($this->peg_c6); |
7775 | } |
7776 | } |
7777 | if ($s1 !== $this->peg_FAILED) { |
7778 | $s2 = $this->peg_parse_(); |
7779 | if ($s2 !== $this->peg_FAILED) { |
7780 | if (mb_strtolower($this->input_substr($this->peg_currPos, 5), "UTF-8") === $this->peg_c131) { |
7781 | $s3 = $this->input_substr($this->peg_currPos, 5); |
7782 | $this->peg_currPos += 5; |
7783 | } else { |
7784 | $s3 = $this->peg_FAILED; |
7785 | if ($this->peg_silentFails === 0) { |
7786 | $this->peg_fail($this->peg_c132); |
7787 | } |
7788 | } |
7789 | if ($s3 !== $this->peg_FAILED) { |
7790 | $s4 = $this->peg_parse_(); |
7791 | if ($s4 !== $this->peg_FAILED) { |
7792 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c29) { |
7793 | $s5 = $this->peg_c29; |
7794 | $this->peg_currPos++; |
7795 | } else { |
7796 | $s5 = $this->peg_FAILED; |
7797 | if ($this->peg_silentFails === 0) { |
7798 | $this->peg_fail($this->peg_c30); |
7799 | } |
7800 | } |
7801 | if ($s5 !== $this->peg_FAILED) { |
7802 | $s6 = $this->peg_parse_(); |
7803 | if ($s6 !== $this->peg_FAILED) { |
7804 | $s7 = $this->peg_parseCOLOR_SPEC_NAMED(); |
7805 | if ($s7 !== $this->peg_FAILED) { |
7806 | $this->peg_reportedPos = $s0; |
7807 | $s1 = $this->peg_f132($s7); |
7808 | $s0 = $s1; |
7809 | } else { |
7810 | $this->peg_currPos = $s0; |
7811 | $s0 = $this->peg_FAILED; |
7812 | } |
7813 | } else { |
7814 | $this->peg_currPos = $s0; |
7815 | $s0 = $this->peg_FAILED; |
7816 | } |
7817 | } else { |
7818 | $this->peg_currPos = $s0; |
7819 | $s0 = $this->peg_FAILED; |
7820 | } |
7821 | } else { |
7822 | $this->peg_currPos = $s0; |
7823 | $s0 = $this->peg_FAILED; |
7824 | } |
7825 | } else { |
7826 | $this->peg_currPos = $s0; |
7827 | $s0 = $this->peg_FAILED; |
7828 | } |
7829 | } else { |
7830 | $this->peg_currPos = $s0; |
7831 | $s0 = $this->peg_FAILED; |
7832 | } |
7833 | } else { |
7834 | $this->peg_currPos = $s0; |
7835 | $s0 = $this->peg_FAILED; |
7836 | } |
7837 | if ($s0 === $this->peg_FAILED) { |
7838 | $s0 = $this->peg_currPos; |
7839 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c5) { |
7840 | $s1 = $this->peg_c5; |
7841 | $this->peg_currPos++; |
7842 | } else { |
7843 | $s1 = $this->peg_FAILED; |
7844 | if ($this->peg_silentFails === 0) { |
7845 | $this->peg_fail($this->peg_c6); |
7846 | } |
7847 | } |
7848 | if ($s1 !== $this->peg_FAILED) { |
7849 | $s2 = $this->peg_parse_(); |
7850 | if ($s2 !== $this->peg_FAILED) { |
7851 | if (mb_strtolower($this->input_substr($this->peg_currPos, 4), "UTF-8") === $this->peg_c133) { |
7852 | $s3 = $this->input_substr($this->peg_currPos, 4); |
7853 | $this->peg_currPos += 4; |
7854 | } else { |
7855 | $s3 = $this->peg_FAILED; |
7856 | if ($this->peg_silentFails === 0) { |
7857 | $this->peg_fail($this->peg_c134); |
7858 | } |
7859 | } |
7860 | if ($s3 !== $this->peg_FAILED) { |
7861 | $s4 = $this->peg_parse_(); |
7862 | if ($s4 !== $this->peg_FAILED) { |
7863 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c29) { |
7864 | $s5 = $this->peg_c29; |
7865 | $this->peg_currPos++; |
7866 | } else { |
7867 | $s5 = $this->peg_FAILED; |
7868 | if ($this->peg_silentFails === 0) { |
7869 | $this->peg_fail($this->peg_c30); |
7870 | } |
7871 | } |
7872 | if ($s5 !== $this->peg_FAILED) { |
7873 | $s6 = $this->peg_parse_(); |
7874 | if ($s6 !== $this->peg_FAILED) { |
7875 | $s7 = $this->peg_parseCOLOR_SPEC_GRAY(); |
7876 | if ($s7 !== $this->peg_FAILED) { |
7877 | $this->peg_reportedPos = $s0; |
7878 | $s1 = $this->peg_f133($s7); |
7879 | $s0 = $s1; |
7880 | } else { |
7881 | $this->peg_currPos = $s0; |
7882 | $s0 = $this->peg_FAILED; |
7883 | } |
7884 | } else { |
7885 | $this->peg_currPos = $s0; |
7886 | $s0 = $this->peg_FAILED; |
7887 | } |
7888 | } else { |
7889 | $this->peg_currPos = $s0; |
7890 | $s0 = $this->peg_FAILED; |
7891 | } |
7892 | } else { |
7893 | $this->peg_currPos = $s0; |
7894 | $s0 = $this->peg_FAILED; |
7895 | } |
7896 | } else { |
7897 | $this->peg_currPos = $s0; |
7898 | $s0 = $this->peg_FAILED; |
7899 | } |
7900 | } else { |
7901 | $this->peg_currPos = $s0; |
7902 | $s0 = $this->peg_FAILED; |
7903 | } |
7904 | } else { |
7905 | $this->peg_currPos = $s0; |
7906 | $s0 = $this->peg_FAILED; |
7907 | } |
7908 | if ($s0 === $this->peg_FAILED) { |
7909 | $s0 = $this->peg_currPos; |
7910 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c5) { |
7911 | $s1 = $this->peg_c5; |
7912 | $this->peg_currPos++; |
7913 | } else { |
7914 | $s1 = $this->peg_FAILED; |
7915 | if ($this->peg_silentFails === 0) { |
7916 | $this->peg_fail($this->peg_c6); |
7917 | } |
7918 | } |
7919 | if ($s1 !== $this->peg_FAILED) { |
7920 | $s2 = $this->peg_parse_(); |
7921 | if ($s2 !== $this->peg_FAILED) { |
7922 | if ($this->input_substr($this->peg_currPos, 3) === $this->peg_c135) { |
7923 | $s3 = $this->peg_c135; |
7924 | $this->peg_currPos += 3; |
7925 | } else { |
7926 | $s3 = $this->peg_FAILED; |
7927 | if ($this->peg_silentFails === 0) { |
7928 | $this->peg_fail($this->peg_c136); |
7929 | } |
7930 | } |
7931 | if ($s3 !== $this->peg_FAILED) { |
7932 | $s4 = $this->peg_parse_(); |
7933 | if ($s4 !== $this->peg_FAILED) { |
7934 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c29) { |
7935 | $s5 = $this->peg_c29; |
7936 | $this->peg_currPos++; |
7937 | } else { |
7938 | $s5 = $this->peg_FAILED; |
7939 | if ($this->peg_silentFails === 0) { |
7940 | $this->peg_fail($this->peg_c30); |
7941 | } |
7942 | } |
7943 | if ($s5 !== $this->peg_FAILED) { |
7944 | $s6 = $this->peg_parse_(); |
7945 | if ($s6 !== $this->peg_FAILED) { |
7946 | $s7 = $this->peg_parseCOLOR_SPEC_rgb(); |
7947 | if ($s7 !== $this->peg_FAILED) { |
7948 | $this->peg_reportedPos = $s0; |
7949 | $s1 = $this->peg_f134($s7); |
7950 | $s0 = $s1; |
7951 | } else { |
7952 | $this->peg_currPos = $s0; |
7953 | $s0 = $this->peg_FAILED; |
7954 | } |
7955 | } else { |
7956 | $this->peg_currPos = $s0; |
7957 | $s0 = $this->peg_FAILED; |
7958 | } |
7959 | } else { |
7960 | $this->peg_currPos = $s0; |
7961 | $s0 = $this->peg_FAILED; |
7962 | } |
7963 | } else { |
7964 | $this->peg_currPos = $s0; |
7965 | $s0 = $this->peg_FAILED; |
7966 | } |
7967 | } else { |
7968 | $this->peg_currPos = $s0; |
7969 | $s0 = $this->peg_FAILED; |
7970 | } |
7971 | } else { |
7972 | $this->peg_currPos = $s0; |
7973 | $s0 = $this->peg_FAILED; |
7974 | } |
7975 | } else { |
7976 | $this->peg_currPos = $s0; |
7977 | $s0 = $this->peg_FAILED; |
7978 | } |
7979 | if ($s0 === $this->peg_FAILED) { |
7980 | $s0 = $this->peg_currPos; |
7981 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c5) { |
7982 | $s1 = $this->peg_c5; |
7983 | $this->peg_currPos++; |
7984 | } else { |
7985 | $s1 = $this->peg_FAILED; |
7986 | if ($this->peg_silentFails === 0) { |
7987 | $this->peg_fail($this->peg_c6); |
7988 | } |
7989 | } |
7990 | if ($s1 !== $this->peg_FAILED) { |
7991 | $s2 = $this->peg_parse_(); |
7992 | if ($s2 !== $this->peg_FAILED) { |
7993 | if ($this->input_substr($this->peg_currPos, 3) === $this->peg_c137) { |
7994 | $s3 = $this->peg_c137; |
7995 | $this->peg_currPos += 3; |
7996 | } else { |
7997 | $s3 = $this->peg_FAILED; |
7998 | if ($this->peg_silentFails === 0) { |
7999 | $this->peg_fail($this->peg_c138); |
8000 | } |
8001 | } |
8002 | if ($s3 !== $this->peg_FAILED) { |
8003 | $s4 = $this->peg_parse_(); |
8004 | if ($s4 !== $this->peg_FAILED) { |
8005 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c29) { |
8006 | $s5 = $this->peg_c29; |
8007 | $this->peg_currPos++; |
8008 | } else { |
8009 | $s5 = $this->peg_FAILED; |
8010 | if ($this->peg_silentFails === 0) { |
8011 | $this->peg_fail($this->peg_c30); |
8012 | } |
8013 | } |
8014 | if ($s5 !== $this->peg_FAILED) { |
8015 | $s6 = $this->peg_parse_(); |
8016 | if ($s6 !== $this->peg_FAILED) { |
8017 | $s7 = $this->peg_parseCOLOR_SPEC_RGBI(); |
8018 | if ($s7 !== $this->peg_FAILED) { |
8019 | $this->peg_reportedPos = $s0; |
8020 | $s1 = $this->peg_f134($s7); |
8021 | $s0 = $s1; |
8022 | } else { |
8023 | $this->peg_currPos = $s0; |
8024 | $s0 = $this->peg_FAILED; |
8025 | } |
8026 | } else { |
8027 | $this->peg_currPos = $s0; |
8028 | $s0 = $this->peg_FAILED; |
8029 | } |
8030 | } else { |
8031 | $this->peg_currPos = $s0; |
8032 | $s0 = $this->peg_FAILED; |
8033 | } |
8034 | } else { |
8035 | $this->peg_currPos = $s0; |
8036 | $s0 = $this->peg_FAILED; |
8037 | } |
8038 | } else { |
8039 | $this->peg_currPos = $s0; |
8040 | $s0 = $this->peg_FAILED; |
8041 | } |
8042 | } else { |
8043 | $this->peg_currPos = $s0; |
8044 | $s0 = $this->peg_FAILED; |
8045 | } |
8046 | } else { |
8047 | $this->peg_currPos = $s0; |
8048 | $s0 = $this->peg_FAILED; |
8049 | } |
8050 | if ($s0 === $this->peg_FAILED) { |
8051 | $s0 = $this->peg_currPos; |
8052 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c5) { |
8053 | $s1 = $this->peg_c5; |
8054 | $this->peg_currPos++; |
8055 | } else { |
8056 | $s1 = $this->peg_FAILED; |
8057 | if ($this->peg_silentFails === 0) { |
8058 | $this->peg_fail($this->peg_c6); |
8059 | } |
8060 | } |
8061 | if ($s1 !== $this->peg_FAILED) { |
8062 | $s2 = $this->peg_parse_(); |
8063 | if ($s2 !== $this->peg_FAILED) { |
8064 | if (mb_strtolower($this->input_substr($this->peg_currPos, 4), "UTF-8") === $this->peg_c139) { |
8065 | $s3 = $this->input_substr($this->peg_currPos, 4); |
8066 | $this->peg_currPos += 4; |
8067 | } else { |
8068 | $s3 = $this->peg_FAILED; |
8069 | if ($this->peg_silentFails === 0) { |
8070 | $this->peg_fail($this->peg_c140); |
8071 | } |
8072 | } |
8073 | if ($s3 !== $this->peg_FAILED) { |
8074 | $s4 = $this->peg_parse_(); |
8075 | if ($s4 !== $this->peg_FAILED) { |
8076 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c29) { |
8077 | $s5 = $this->peg_c29; |
8078 | $this->peg_currPos++; |
8079 | } else { |
8080 | $s5 = $this->peg_FAILED; |
8081 | if ($this->peg_silentFails === 0) { |
8082 | $this->peg_fail($this->peg_c30); |
8083 | } |
8084 | } |
8085 | if ($s5 !== $this->peg_FAILED) { |
8086 | $s6 = $this->peg_parse_(); |
8087 | if ($s6 !== $this->peg_FAILED) { |
8088 | $s7 = $this->peg_parseCOLOR_SPEC_CMYK(); |
8089 | if ($s7 !== $this->peg_FAILED) { |
8090 | $this->peg_reportedPos = $s0; |
8091 | $s1 = $this->peg_f135($s7); |
8092 | $s0 = $s1; |
8093 | } else { |
8094 | $this->peg_currPos = $s0; |
8095 | $s0 = $this->peg_FAILED; |
8096 | } |
8097 | } else { |
8098 | $this->peg_currPos = $s0; |
8099 | $s0 = $this->peg_FAILED; |
8100 | } |
8101 | } else { |
8102 | $this->peg_currPos = $s0; |
8103 | $s0 = $this->peg_FAILED; |
8104 | } |
8105 | } else { |
8106 | $this->peg_currPos = $s0; |
8107 | $s0 = $this->peg_FAILED; |
8108 | } |
8109 | } else { |
8110 | $this->peg_currPos = $s0; |
8111 | $s0 = $this->peg_FAILED; |
8112 | } |
8113 | } else { |
8114 | $this->peg_currPos = $s0; |
8115 | $s0 = $this->peg_FAILED; |
8116 | } |
8117 | } else { |
8118 | $this->peg_currPos = $s0; |
8119 | $s0 = $this->peg_FAILED; |
8120 | } |
8121 | } |
8122 | } |
8123 | } |
8124 | } |
8125 | } |
8126 | |
8127 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
8128 | |
8129 | return $s0; |
8130 | } |
8131 | |
8132 | private function peg_parseCOLOR_SPEC_NAMED() { |
8133 | |
8134 | $key = $this->peg_currPos * 130 + 108; |
8135 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
8136 | |
8137 | if ($cached) { |
8138 | $this->peg_currPos = $cached["nextPos"]; |
8139 | return $cached["result"]; |
8140 | } |
8141 | |
8142 | $s0 = $this->peg_currPos; |
8143 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c39) { |
8144 | $s1 = $this->peg_c39; |
8145 | $this->peg_currPos++; |
8146 | } else { |
8147 | $s1 = $this->peg_FAILED; |
8148 | if ($this->peg_silentFails === 0) { |
8149 | $this->peg_fail($this->peg_c40); |
8150 | } |
8151 | } |
8152 | if ($s1 !== $this->peg_FAILED) { |
8153 | $s2 = $this->peg_parse_(); |
8154 | if ($s2 !== $this->peg_FAILED) { |
8155 | $s3 = array(); |
8156 | $s4 = $this->peg_parsealpha(); |
8157 | if ($s4 !== $this->peg_FAILED) { |
8158 | while ($s4 !== $this->peg_FAILED) { |
8159 | $s3[] = $s4; |
8160 | $s4 = $this->peg_parsealpha(); |
8161 | } |
8162 | } else { |
8163 | $s3 = $this->peg_FAILED; |
8164 | } |
8165 | if ($s3 !== $this->peg_FAILED) { |
8166 | $s4 = $this->peg_parse_(); |
8167 | if ($s4 !== $this->peg_FAILED) { |
8168 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c11) { |
8169 | $s5 = $this->peg_c11; |
8170 | $this->peg_currPos++; |
8171 | } else { |
8172 | $s5 = $this->peg_FAILED; |
8173 | if ($this->peg_silentFails === 0) { |
8174 | $this->peg_fail($this->peg_c12); |
8175 | } |
8176 | } |
8177 | if ($s5 !== $this->peg_FAILED) { |
8178 | $s6 = $this->peg_parse_(); |
8179 | if ($s6 !== $this->peg_FAILED) { |
8180 | $this->peg_reportedPos = $s0; |
8181 | $s1 = $this->peg_f136($s3); |
8182 | $s0 = $s1; |
8183 | } else { |
8184 | $this->peg_currPos = $s0; |
8185 | $s0 = $this->peg_FAILED; |
8186 | } |
8187 | } else { |
8188 | $this->peg_currPos = $s0; |
8189 | $s0 = $this->peg_FAILED; |
8190 | } |
8191 | } else { |
8192 | $this->peg_currPos = $s0; |
8193 | $s0 = $this->peg_FAILED; |
8194 | } |
8195 | } else { |
8196 | $this->peg_currPos = $s0; |
8197 | $s0 = $this->peg_FAILED; |
8198 | } |
8199 | } else { |
8200 | $this->peg_currPos = $s0; |
8201 | $s0 = $this->peg_FAILED; |
8202 | } |
8203 | } else { |
8204 | $this->peg_currPos = $s0; |
8205 | $s0 = $this->peg_FAILED; |
8206 | } |
8207 | |
8208 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
8209 | |
8210 | return $s0; |
8211 | } |
8212 | |
8213 | private function peg_parseCOLOR_SPEC_GRAY() { |
8214 | |
8215 | $key = $this->peg_currPos * 130 + 109; |
8216 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
8217 | |
8218 | if ($cached) { |
8219 | $this->peg_currPos = $cached["nextPos"]; |
8220 | return $cached["result"]; |
8221 | } |
8222 | |
8223 | $s0 = $this->peg_currPos; |
8224 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c39) { |
8225 | $s1 = $this->peg_c39; |
8226 | $this->peg_currPos++; |
8227 | } else { |
8228 | $s1 = $this->peg_FAILED; |
8229 | if ($this->peg_silentFails === 0) { |
8230 | $this->peg_fail($this->peg_c40); |
8231 | } |
8232 | } |
8233 | if ($s1 !== $this->peg_FAILED) { |
8234 | $s2 = $this->peg_parse_(); |
8235 | if ($s2 !== $this->peg_FAILED) { |
8236 | $s3 = array(); |
8237 | $s4 = $this->peg_parseCNUM(); |
8238 | if ($s4 !== $this->peg_FAILED) { |
8239 | while ($s4 !== $this->peg_FAILED) { |
8240 | $s3[] = $s4; |
8241 | $s4 = $this->peg_parseCNUM(); |
8242 | } |
8243 | } else { |
8244 | $s3 = $this->peg_FAILED; |
8245 | } |
8246 | if ($s3 !== $this->peg_FAILED) { |
8247 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c11) { |
8248 | $s4 = $this->peg_c11; |
8249 | $this->peg_currPos++; |
8250 | } else { |
8251 | $s4 = $this->peg_FAILED; |
8252 | if ($this->peg_silentFails === 0) { |
8253 | $this->peg_fail($this->peg_c12); |
8254 | } |
8255 | } |
8256 | if ($s4 !== $this->peg_FAILED) { |
8257 | $this->peg_reportedPos = $s0; |
8258 | $s1 = $this->peg_f137($s3); |
8259 | $s0 = $s1; |
8260 | } else { |
8261 | $this->peg_currPos = $s0; |
8262 | $s0 = $this->peg_FAILED; |
8263 | } |
8264 | } else { |
8265 | $this->peg_currPos = $s0; |
8266 | $s0 = $this->peg_FAILED; |
8267 | } |
8268 | } else { |
8269 | $this->peg_currPos = $s0; |
8270 | $s0 = $this->peg_FAILED; |
8271 | } |
8272 | } else { |
8273 | $this->peg_currPos = $s0; |
8274 | $s0 = $this->peg_FAILED; |
8275 | } |
8276 | |
8277 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
8278 | |
8279 | return $s0; |
8280 | } |
8281 | |
8282 | private function peg_parseCOLOR_SPEC_rgb() { |
8283 | |
8284 | $key = $this->peg_currPos * 130 + 110; |
8285 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
8286 | |
8287 | if ($cached) { |
8288 | $this->peg_currPos = $cached["nextPos"]; |
8289 | return $cached["result"]; |
8290 | } |
8291 | |
8292 | $s0 = $this->peg_currPos; |
8293 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c39) { |
8294 | $s1 = $this->peg_c39; |
8295 | $this->peg_currPos++; |
8296 | } else { |
8297 | $s1 = $this->peg_FAILED; |
8298 | if ($this->peg_silentFails === 0) { |
8299 | $this->peg_fail($this->peg_c40); |
8300 | } |
8301 | } |
8302 | if ($s1 !== $this->peg_FAILED) { |
8303 | $s2 = $this->peg_parse_(); |
8304 | if ($s2 !== $this->peg_FAILED) { |
8305 | $s3 = $this->peg_parseCNUM(); |
8306 | if ($s3 !== $this->peg_FAILED) { |
8307 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c141) { |
8308 | $s4 = $this->peg_c141; |
8309 | $this->peg_currPos++; |
8310 | } else { |
8311 | $s4 = $this->peg_FAILED; |
8312 | if ($this->peg_silentFails === 0) { |
8313 | $this->peg_fail($this->peg_c142); |
8314 | } |
8315 | } |
8316 | if ($s4 !== $this->peg_FAILED) { |
8317 | $s5 = $this->peg_parse_(); |
8318 | if ($s5 !== $this->peg_FAILED) { |
8319 | $s6 = $this->peg_parseCNUM(); |
8320 | if ($s6 !== $this->peg_FAILED) { |
8321 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c141) { |
8322 | $s7 = $this->peg_c141; |
8323 | $this->peg_currPos++; |
8324 | } else { |
8325 | $s7 = $this->peg_FAILED; |
8326 | if ($this->peg_silentFails === 0) { |
8327 | $this->peg_fail($this->peg_c142); |
8328 | } |
8329 | } |
8330 | if ($s7 !== $this->peg_FAILED) { |
8331 | $s8 = $this->peg_parse_(); |
8332 | if ($s8 !== $this->peg_FAILED) { |
8333 | $s9 = $this->peg_parseCNUM(); |
8334 | if ($s9 !== $this->peg_FAILED) { |
8335 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c11) { |
8336 | $s10 = $this->peg_c11; |
8337 | $this->peg_currPos++; |
8338 | } else { |
8339 | $s10 = $this->peg_FAILED; |
8340 | if ($this->peg_silentFails === 0) { |
8341 | $this->peg_fail($this->peg_c12); |
8342 | } |
8343 | } |
8344 | if ($s10 !== $this->peg_FAILED) { |
8345 | $s11 = $this->peg_parse_(); |
8346 | if ($s11 !== $this->peg_FAILED) { |
8347 | $this->peg_reportedPos = $s0; |
8348 | $s1 = $this->peg_f138($s3, $s6, $s9); |
8349 | $s0 = $s1; |
8350 | } else { |
8351 | $this->peg_currPos = $s0; |
8352 | $s0 = $this->peg_FAILED; |
8353 | } |
8354 | } else { |
8355 | $this->peg_currPos = $s0; |
8356 | $s0 = $this->peg_FAILED; |
8357 | } |
8358 | } else { |
8359 | $this->peg_currPos = $s0; |
8360 | $s0 = $this->peg_FAILED; |
8361 | } |
8362 | } else { |
8363 | $this->peg_currPos = $s0; |
8364 | $s0 = $this->peg_FAILED; |
8365 | } |
8366 | } else { |
8367 | $this->peg_currPos = $s0; |
8368 | $s0 = $this->peg_FAILED; |
8369 | } |
8370 | } else { |
8371 | $this->peg_currPos = $s0; |
8372 | $s0 = $this->peg_FAILED; |
8373 | } |
8374 | } else { |
8375 | $this->peg_currPos = $s0; |
8376 | $s0 = $this->peg_FAILED; |
8377 | } |
8378 | } else { |
8379 | $this->peg_currPos = $s0; |
8380 | $s0 = $this->peg_FAILED; |
8381 | } |
8382 | } else { |
8383 | $this->peg_currPos = $s0; |
8384 | $s0 = $this->peg_FAILED; |
8385 | } |
8386 | } else { |
8387 | $this->peg_currPos = $s0; |
8388 | $s0 = $this->peg_FAILED; |
8389 | } |
8390 | } else { |
8391 | $this->peg_currPos = $s0; |
8392 | $s0 = $this->peg_FAILED; |
8393 | } |
8394 | |
8395 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
8396 | |
8397 | return $s0; |
8398 | } |
8399 | |
8400 | private function peg_parseCOLOR_SPEC_RGBI() { |
8401 | |
8402 | $key = $this->peg_currPos * 130 + 111; |
8403 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
8404 | |
8405 | if ($cached) { |
8406 | $this->peg_currPos = $cached["nextPos"]; |
8407 | return $cached["result"]; |
8408 | } |
8409 | |
8410 | $s0 = $this->peg_currPos; |
8411 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c39) { |
8412 | $s1 = $this->peg_c39; |
8413 | $this->peg_currPos++; |
8414 | } else { |
8415 | $s1 = $this->peg_FAILED; |
8416 | if ($this->peg_silentFails === 0) { |
8417 | $this->peg_fail($this->peg_c40); |
8418 | } |
8419 | } |
8420 | if ($s1 !== $this->peg_FAILED) { |
8421 | $s2 = $this->peg_parse_(); |
8422 | if ($s2 !== $this->peg_FAILED) { |
8423 | $s3 = $this->peg_parseCNUM255(); |
8424 | if ($s3 !== $this->peg_FAILED) { |
8425 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c141) { |
8426 | $s4 = $this->peg_c141; |
8427 | $this->peg_currPos++; |
8428 | } else { |
8429 | $s4 = $this->peg_FAILED; |
8430 | if ($this->peg_silentFails === 0) { |
8431 | $this->peg_fail($this->peg_c142); |
8432 | } |
8433 | } |
8434 | if ($s4 !== $this->peg_FAILED) { |
8435 | $s5 = $this->peg_parse_(); |
8436 | if ($s5 !== $this->peg_FAILED) { |
8437 | $s6 = $this->peg_parseCNUM255(); |
8438 | if ($s6 !== $this->peg_FAILED) { |
8439 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c141) { |
8440 | $s7 = $this->peg_c141; |
8441 | $this->peg_currPos++; |
8442 | } else { |
8443 | $s7 = $this->peg_FAILED; |
8444 | if ($this->peg_silentFails === 0) { |
8445 | $this->peg_fail($this->peg_c142); |
8446 | } |
8447 | } |
8448 | if ($s7 !== $this->peg_FAILED) { |
8449 | $s8 = $this->peg_parse_(); |
8450 | if ($s8 !== $this->peg_FAILED) { |
8451 | $s9 = $this->peg_parseCNUM255(); |
8452 | if ($s9 !== $this->peg_FAILED) { |
8453 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c11) { |
8454 | $s10 = $this->peg_c11; |
8455 | $this->peg_currPos++; |
8456 | } else { |
8457 | $s10 = $this->peg_FAILED; |
8458 | if ($this->peg_silentFails === 0) { |
8459 | $this->peg_fail($this->peg_c12); |
8460 | } |
8461 | } |
8462 | if ($s10 !== $this->peg_FAILED) { |
8463 | $s11 = $this->peg_parse_(); |
8464 | if ($s11 !== $this->peg_FAILED) { |
8465 | $this->peg_reportedPos = $s0; |
8466 | $s1 = $this->peg_f138($s3, $s6, $s9); |
8467 | $s0 = $s1; |
8468 | } else { |
8469 | $this->peg_currPos = $s0; |
8470 | $s0 = $this->peg_FAILED; |
8471 | } |
8472 | } else { |
8473 | $this->peg_currPos = $s0; |
8474 | $s0 = $this->peg_FAILED; |
8475 | } |
8476 | } else { |
8477 | $this->peg_currPos = $s0; |
8478 | $s0 = $this->peg_FAILED; |
8479 | } |
8480 | } else { |
8481 | $this->peg_currPos = $s0; |
8482 | $s0 = $this->peg_FAILED; |
8483 | } |
8484 | } else { |
8485 | $this->peg_currPos = $s0; |
8486 | $s0 = $this->peg_FAILED; |
8487 | } |
8488 | } else { |
8489 | $this->peg_currPos = $s0; |
8490 | $s0 = $this->peg_FAILED; |
8491 | } |
8492 | } else { |
8493 | $this->peg_currPos = $s0; |
8494 | $s0 = $this->peg_FAILED; |
8495 | } |
8496 | } else { |
8497 | $this->peg_currPos = $s0; |
8498 | $s0 = $this->peg_FAILED; |
8499 | } |
8500 | } else { |
8501 | $this->peg_currPos = $s0; |
8502 | $s0 = $this->peg_FAILED; |
8503 | } |
8504 | } else { |
8505 | $this->peg_currPos = $s0; |
8506 | $s0 = $this->peg_FAILED; |
8507 | } |
8508 | } else { |
8509 | $this->peg_currPos = $s0; |
8510 | $s0 = $this->peg_FAILED; |
8511 | } |
8512 | |
8513 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
8514 | |
8515 | return $s0; |
8516 | } |
8517 | |
8518 | private function peg_parseCOLOR_SPEC_CMYK() { |
8519 | |
8520 | $key = $this->peg_currPos * 130 + 112; |
8521 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
8522 | |
8523 | if ($cached) { |
8524 | $this->peg_currPos = $cached["nextPos"]; |
8525 | return $cached["result"]; |
8526 | } |
8527 | |
8528 | $s0 = $this->peg_currPos; |
8529 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c39) { |
8530 | $s1 = $this->peg_c39; |
8531 | $this->peg_currPos++; |
8532 | } else { |
8533 | $s1 = $this->peg_FAILED; |
8534 | if ($this->peg_silentFails === 0) { |
8535 | $this->peg_fail($this->peg_c40); |
8536 | } |
8537 | } |
8538 | if ($s1 !== $this->peg_FAILED) { |
8539 | $s2 = $this->peg_parse_(); |
8540 | if ($s2 !== $this->peg_FAILED) { |
8541 | $s3 = $this->peg_parseCNUM(); |
8542 | if ($s3 !== $this->peg_FAILED) { |
8543 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c141) { |
8544 | $s4 = $this->peg_c141; |
8545 | $this->peg_currPos++; |
8546 | } else { |
8547 | $s4 = $this->peg_FAILED; |
8548 | if ($this->peg_silentFails === 0) { |
8549 | $this->peg_fail($this->peg_c142); |
8550 | } |
8551 | } |
8552 | if ($s4 !== $this->peg_FAILED) { |
8553 | $s5 = $this->peg_parse_(); |
8554 | if ($s5 !== $this->peg_FAILED) { |
8555 | $s6 = $this->peg_parseCNUM(); |
8556 | if ($s6 !== $this->peg_FAILED) { |
8557 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c141) { |
8558 | $s7 = $this->peg_c141; |
8559 | $this->peg_currPos++; |
8560 | } else { |
8561 | $s7 = $this->peg_FAILED; |
8562 | if ($this->peg_silentFails === 0) { |
8563 | $this->peg_fail($this->peg_c142); |
8564 | } |
8565 | } |
8566 | if ($s7 !== $this->peg_FAILED) { |
8567 | $s8 = $this->peg_parse_(); |
8568 | if ($s8 !== $this->peg_FAILED) { |
8569 | $s9 = $this->peg_parseCNUM(); |
8570 | if ($s9 !== $this->peg_FAILED) { |
8571 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c141) { |
8572 | $s10 = $this->peg_c141; |
8573 | $this->peg_currPos++; |
8574 | } else { |
8575 | $s10 = $this->peg_FAILED; |
8576 | if ($this->peg_silentFails === 0) { |
8577 | $this->peg_fail($this->peg_c142); |
8578 | } |
8579 | } |
8580 | if ($s10 !== $this->peg_FAILED) { |
8581 | $s11 = $this->peg_parse_(); |
8582 | if ($s11 !== $this->peg_FAILED) { |
8583 | $s12 = $this->peg_parseCNUM(); |
8584 | if ($s12 !== $this->peg_FAILED) { |
8585 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c11) { |
8586 | $s13 = $this->peg_c11; |
8587 | $this->peg_currPos++; |
8588 | } else { |
8589 | $s13 = $this->peg_FAILED; |
8590 | if ($this->peg_silentFails === 0) { |
8591 | $this->peg_fail($this->peg_c12); |
8592 | } |
8593 | } |
8594 | if ($s13 !== $this->peg_FAILED) { |
8595 | $s14 = $this->peg_parse_(); |
8596 | if ($s14 !== $this->peg_FAILED) { |
8597 | $this->peg_reportedPos = $s0; |
8598 | $s1 = $this->peg_f139($s3, $s6, $s9, $s12); |
8599 | $s0 = $s1; |
8600 | } else { |
8601 | $this->peg_currPos = $s0; |
8602 | $s0 = $this->peg_FAILED; |
8603 | } |
8604 | } else { |
8605 | $this->peg_currPos = $s0; |
8606 | $s0 = $this->peg_FAILED; |
8607 | } |
8608 | } else { |
8609 | $this->peg_currPos = $s0; |
8610 | $s0 = $this->peg_FAILED; |
8611 | } |
8612 | } else { |
8613 | $this->peg_currPos = $s0; |
8614 | $s0 = $this->peg_FAILED; |
8615 | } |
8616 | } else { |
8617 | $this->peg_currPos = $s0; |
8618 | $s0 = $this->peg_FAILED; |
8619 | } |
8620 | } else { |
8621 | $this->peg_currPos = $s0; |
8622 | $s0 = $this->peg_FAILED; |
8623 | } |
8624 | } else { |
8625 | $this->peg_currPos = $s0; |
8626 | $s0 = $this->peg_FAILED; |
8627 | } |
8628 | } else { |
8629 | $this->peg_currPos = $s0; |
8630 | $s0 = $this->peg_FAILED; |
8631 | } |
8632 | } else { |
8633 | $this->peg_currPos = $s0; |
8634 | $s0 = $this->peg_FAILED; |
8635 | } |
8636 | } else { |
8637 | $this->peg_currPos = $s0; |
8638 | $s0 = $this->peg_FAILED; |
8639 | } |
8640 | } else { |
8641 | $this->peg_currPos = $s0; |
8642 | $s0 = $this->peg_FAILED; |
8643 | } |
8644 | } else { |
8645 | $this->peg_currPos = $s0; |
8646 | $s0 = $this->peg_FAILED; |
8647 | } |
8648 | } else { |
8649 | $this->peg_currPos = $s0; |
8650 | $s0 = $this->peg_FAILED; |
8651 | } |
8652 | } else { |
8653 | $this->peg_currPos = $s0; |
8654 | $s0 = $this->peg_FAILED; |
8655 | } |
8656 | |
8657 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
8658 | |
8659 | return $s0; |
8660 | } |
8661 | |
8662 | private function peg_parseCNUM255() { |
8663 | |
8664 | $key = $this->peg_currPos * 130 + 113; |
8665 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
8666 | |
8667 | if ($cached) { |
8668 | $this->peg_currPos = $cached["nextPos"]; |
8669 | return $cached["result"]; |
8670 | } |
8671 | |
8672 | $s0 = $this->peg_currPos; |
8673 | $s1 = $this->peg_currPos; |
8674 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c143) { |
8675 | $s2 = $this->peg_c143; |
8676 | $this->peg_currPos++; |
8677 | } else { |
8678 | $s2 = $this->peg_FAILED; |
8679 | if ($this->peg_silentFails === 0) { |
8680 | $this->peg_fail($this->peg_c144); |
8681 | } |
8682 | } |
8683 | if ($s2 === $this->peg_FAILED) { |
8684 | $s2 = $this->peg_currPos; |
8685 | if (peg_regex_test($this->peg_c145, $this->input_substr($this->peg_currPos, 1))) { |
8686 | $s3 = $this->input_substr($this->peg_currPos, 1); |
8687 | $this->peg_currPos++; |
8688 | } else { |
8689 | $s3 = $this->peg_FAILED; |
8690 | if ($this->peg_silentFails === 0) { |
8691 | $this->peg_fail($this->peg_c146); |
8692 | } |
8693 | } |
8694 | if ($s3 !== $this->peg_FAILED) { |
8695 | $s4 = $this->peg_currPos; |
8696 | if (peg_regex_test($this->peg_c19, $this->input_substr($this->peg_currPos, 1))) { |
8697 | $s5 = $this->input_substr($this->peg_currPos, 1); |
8698 | $this->peg_currPos++; |
8699 | } else { |
8700 | $s5 = $this->peg_FAILED; |
8701 | if ($this->peg_silentFails === 0) { |
8702 | $this->peg_fail($this->peg_c20); |
8703 | } |
8704 | } |
8705 | if ($s5 !== $this->peg_FAILED) { |
8706 | if (peg_regex_test($this->peg_c19, $this->input_substr($this->peg_currPos, 1))) { |
8707 | $s6 = $this->input_substr($this->peg_currPos, 1); |
8708 | $this->peg_currPos++; |
8709 | } else { |
8710 | $s6 = $this->peg_FAILED; |
8711 | if ($this->peg_silentFails === 0) { |
8712 | $this->peg_fail($this->peg_c20); |
8713 | } |
8714 | } |
8715 | if ($s6 === $this->peg_FAILED) { |
8716 | $s6 = null; |
8717 | } |
8718 | if ($s6 !== $this->peg_FAILED) { |
8719 | $s5 = array($s5, $s6); |
8720 | $s4 = $s5; |
8721 | } else { |
8722 | $this->peg_currPos = $s4; |
8723 | $s4 = $this->peg_FAILED; |
8724 | } |
8725 | } else { |
8726 | $this->peg_currPos = $s4; |
8727 | $s4 = $this->peg_FAILED; |
8728 | } |
8729 | if ($s4 === $this->peg_FAILED) { |
8730 | $s4 = null; |
8731 | } |
8732 | if ($s4 !== $this->peg_FAILED) { |
8733 | $s3 = array($s3, $s4); |
8734 | $s2 = $s3; |
8735 | } else { |
8736 | $this->peg_currPos = $s2; |
8737 | $s2 = $this->peg_FAILED; |
8738 | } |
8739 | } else { |
8740 | $this->peg_currPos = $s2; |
8741 | $s2 = $this->peg_FAILED; |
8742 | } |
8743 | } |
8744 | if ($s2 !== $this->peg_FAILED) { |
8745 | $s1 = $this->input_substr($s1, $this->peg_currPos - $s1); |
8746 | } else { |
8747 | $s1 = $s2; |
8748 | } |
8749 | if ($s1 !== $this->peg_FAILED) { |
8750 | $this->peg_reportedPos = $this->peg_currPos; |
8751 | $s2 = $this->peg_f140($s1); |
8752 | if ($s2) { |
8753 | $s2 = null; |
8754 | } else { |
8755 | $s2 = $this->peg_FAILED; |
8756 | } |
8757 | if ($s2 !== $this->peg_FAILED) { |
8758 | $s3 = $this->peg_parse_(); |
8759 | if ($s3 !== $this->peg_FAILED) { |
8760 | $this->peg_reportedPos = $s0; |
8761 | $s1 = $this->peg_f141($s1); |
8762 | $s0 = $s1; |
8763 | } else { |
8764 | $this->peg_currPos = $s0; |
8765 | $s0 = $this->peg_FAILED; |
8766 | } |
8767 | } else { |
8768 | $this->peg_currPos = $s0; |
8769 | $s0 = $this->peg_FAILED; |
8770 | } |
8771 | } else { |
8772 | $this->peg_currPos = $s0; |
8773 | $s0 = $this->peg_FAILED; |
8774 | } |
8775 | |
8776 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
8777 | |
8778 | return $s0; |
8779 | } |
8780 | |
8781 | private function peg_parseCNUM() { |
8782 | |
8783 | $key = $this->peg_currPos * 130 + 114; |
8784 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
8785 | |
8786 | if ($cached) { |
8787 | $this->peg_currPos = $cached["nextPos"]; |
8788 | return $cached["result"]; |
8789 | } |
8790 | |
8791 | $s0 = $this->peg_currPos; |
8792 | $s1 = $this->peg_currPos; |
8793 | $s2 = $this->peg_currPos; |
8794 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c143) { |
8795 | $s3 = $this->peg_c143; |
8796 | $this->peg_currPos++; |
8797 | } else { |
8798 | $s3 = $this->peg_FAILED; |
8799 | if ($this->peg_silentFails === 0) { |
8800 | $this->peg_fail($this->peg_c144); |
8801 | } |
8802 | } |
8803 | if ($s3 === $this->peg_FAILED) { |
8804 | $s3 = null; |
8805 | } |
8806 | if ($s3 !== $this->peg_FAILED) { |
8807 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c69) { |
8808 | $s4 = $this->peg_c69; |
8809 | $this->peg_currPos++; |
8810 | } else { |
8811 | $s4 = $this->peg_FAILED; |
8812 | if ($this->peg_silentFails === 0) { |
8813 | $this->peg_fail($this->peg_c70); |
8814 | } |
8815 | } |
8816 | if ($s4 !== $this->peg_FAILED) { |
8817 | $s5 = array(); |
8818 | if (peg_regex_test($this->peg_c19, $this->input_substr($this->peg_currPos, 1))) { |
8819 | $s6 = $this->input_substr($this->peg_currPos, 1); |
8820 | $this->peg_currPos++; |
8821 | } else { |
8822 | $s6 = $this->peg_FAILED; |
8823 | if ($this->peg_silentFails === 0) { |
8824 | $this->peg_fail($this->peg_c20); |
8825 | } |
8826 | } |
8827 | if ($s6 !== $this->peg_FAILED) { |
8828 | while ($s6 !== $this->peg_FAILED) { |
8829 | $s5[] = $s6; |
8830 | if (peg_regex_test($this->peg_c19, $this->input_substr($this->peg_currPos, 1))) { |
8831 | $s6 = $this->input_substr($this->peg_currPos, 1); |
8832 | $this->peg_currPos++; |
8833 | } else { |
8834 | $s6 = $this->peg_FAILED; |
8835 | if ($this->peg_silentFails === 0) { |
8836 | $this->peg_fail($this->peg_c20); |
8837 | } |
8838 | } |
8839 | } |
8840 | } else { |
8841 | $s5 = $this->peg_FAILED; |
8842 | } |
8843 | if ($s5 !== $this->peg_FAILED) { |
8844 | $s3 = array($s3, $s4, $s5); |
8845 | $s2 = $s3; |
8846 | } else { |
8847 | $this->peg_currPos = $s2; |
8848 | $s2 = $this->peg_FAILED; |
8849 | } |
8850 | } else { |
8851 | $this->peg_currPos = $s2; |
8852 | $s2 = $this->peg_FAILED; |
8853 | } |
8854 | } else { |
8855 | $this->peg_currPos = $s2; |
8856 | $s2 = $this->peg_FAILED; |
8857 | } |
8858 | if ($s2 !== $this->peg_FAILED) { |
8859 | $s1 = $this->input_substr($s1, $this->peg_currPos - $s1); |
8860 | } else { |
8861 | $s1 = $s2; |
8862 | } |
8863 | if ($s1 !== $this->peg_FAILED) { |
8864 | $s2 = $this->peg_parse_(); |
8865 | if ($s2 !== $this->peg_FAILED) { |
8866 | $this->peg_reportedPos = $s0; |
8867 | $s1 = $this->peg_f142($s1); |
8868 | $s0 = $s1; |
8869 | } else { |
8870 | $this->peg_currPos = $s0; |
8871 | $s0 = $this->peg_FAILED; |
8872 | } |
8873 | } else { |
8874 | $this->peg_currPos = $s0; |
8875 | $s0 = $this->peg_FAILED; |
8876 | } |
8877 | if ($s0 === $this->peg_FAILED) { |
8878 | $s0 = $this->peg_currPos; |
8879 | $s1 = $this->peg_currPos; |
8880 | $s2 = $this->peg_currPos; |
8881 | if (peg_regex_test($this->peg_c147, $this->input_substr($this->peg_currPos, 1))) { |
8882 | $s3 = $this->input_substr($this->peg_currPos, 1); |
8883 | $this->peg_currPos++; |
8884 | } else { |
8885 | $s3 = $this->peg_FAILED; |
8886 | if ($this->peg_silentFails === 0) { |
8887 | $this->peg_fail($this->peg_c148); |
8888 | } |
8889 | } |
8890 | if ($s3 !== $this->peg_FAILED) { |
8891 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c69) { |
8892 | $s4 = $this->peg_c69; |
8893 | $this->peg_currPos++; |
8894 | } else { |
8895 | $s4 = $this->peg_FAILED; |
8896 | if ($this->peg_silentFails === 0) { |
8897 | $this->peg_fail($this->peg_c70); |
8898 | } |
8899 | } |
8900 | if ($s4 === $this->peg_FAILED) { |
8901 | $s4 = null; |
8902 | } |
8903 | if ($s4 !== $this->peg_FAILED) { |
8904 | $s3 = array($s3, $s4); |
8905 | $s2 = $s3; |
8906 | } else { |
8907 | $this->peg_currPos = $s2; |
8908 | $s2 = $this->peg_FAILED; |
8909 | } |
8910 | } else { |
8911 | $this->peg_currPos = $s2; |
8912 | $s2 = $this->peg_FAILED; |
8913 | } |
8914 | if ($s2 !== $this->peg_FAILED) { |
8915 | $s1 = $this->input_substr($s1, $this->peg_currPos - $s1); |
8916 | } else { |
8917 | $s1 = $s2; |
8918 | } |
8919 | if ($s1 !== $this->peg_FAILED) { |
8920 | $s2 = $this->peg_parse_(); |
8921 | if ($s2 !== $this->peg_FAILED) { |
8922 | $this->peg_reportedPos = $s0; |
8923 | $s1 = $this->peg_f142($s1); |
8924 | $s0 = $s1; |
8925 | } else { |
8926 | $this->peg_currPos = $s0; |
8927 | $s0 = $this->peg_FAILED; |
8928 | } |
8929 | } else { |
8930 | $this->peg_currPos = $s0; |
8931 | $s0 = $this->peg_FAILED; |
8932 | } |
8933 | } |
8934 | |
8935 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
8936 | |
8937 | return $s0; |
8938 | } |
8939 | |
8940 | private function peg_parseCHEM_SINGLE_MACRO() { |
8941 | |
8942 | $key = $this->peg_currPos * 130 + 115; |
8943 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
8944 | |
8945 | if ($cached) { |
8946 | $this->peg_currPos = $cached["nextPos"]; |
8947 | return $cached["result"]; |
8948 | } |
8949 | |
8950 | $s0 = $this->peg_currPos; |
8951 | $s1 = $this->peg_parsegeneric_func(); |
8952 | if ($s1 !== $this->peg_FAILED) { |
8953 | $this->peg_reportedPos = $this->peg_currPos; |
8954 | $s2 = $this->peg_f143($s1); |
8955 | if ($s2) { |
8956 | $s2 = null; |
8957 | } else { |
8958 | $s2 = $this->peg_FAILED; |
8959 | } |
8960 | if ($s2 !== $this->peg_FAILED) { |
8961 | $this->peg_reportedPos = $s0; |
8962 | $s1 = $this->peg_f98($s1); |
8963 | $s0 = $s1; |
8964 | } else { |
8965 | $this->peg_currPos = $s0; |
8966 | $s0 = $this->peg_FAILED; |
8967 | } |
8968 | } else { |
8969 | $this->peg_currPos = $s0; |
8970 | $s0 = $this->peg_FAILED; |
8971 | } |
8972 | if ($s0 === $this->peg_FAILED) { |
8973 | $s0 = $this->peg_currPos; |
8974 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c55) { |
8975 | $s1 = $this->peg_c55; |
8976 | $this->peg_currPos++; |
8977 | } else { |
8978 | $s1 = $this->peg_FAILED; |
8979 | if ($this->peg_silentFails === 0) { |
8980 | $this->peg_fail($this->peg_c56); |
8981 | } |
8982 | } |
8983 | if ($s1 !== $this->peg_FAILED) { |
8984 | if (peg_regex_test($this->peg_c57, $this->input_substr($this->peg_currPos, 1))) { |
8985 | $s2 = $this->input_substr($this->peg_currPos, 1); |
8986 | $this->peg_currPos++; |
8987 | } else { |
8988 | $s2 = $this->peg_FAILED; |
8989 | if ($this->peg_silentFails === 0) { |
8990 | $this->peg_fail($this->peg_c58); |
8991 | } |
8992 | } |
8993 | if ($s2 !== $this->peg_FAILED) { |
8994 | $this->peg_reportedPos = $s0; |
8995 | $s1 = $this->peg_f99($s2); |
8996 | $s0 = $s1; |
8997 | } else { |
8998 | $this->peg_currPos = $s0; |
8999 | $s0 = $this->peg_FAILED; |
9000 | } |
9001 | } else { |
9002 | $this->peg_currPos = $s0; |
9003 | $s0 = $this->peg_FAILED; |
9004 | } |
9005 | } |
9006 | |
9007 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
9008 | |
9009 | return $s0; |
9010 | } |
9011 | |
9012 | private function peg_parseCHEM_BONDI() { |
9013 | |
9014 | $key = $this->peg_currPos * 130 + 116; |
9015 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
9016 | |
9017 | if ($cached) { |
9018 | $this->peg_currPos = $cached["nextPos"]; |
9019 | return $cached["result"]; |
9020 | } |
9021 | |
9022 | $s0 = $this->peg_currPos; |
9023 | $s1 = $this->peg_parsegeneric_func(); |
9024 | if ($s1 !== $this->peg_FAILED) { |
9025 | $this->peg_reportedPos = $this->peg_currPos; |
9026 | $s2 = $this->peg_f144($s1); |
9027 | if ($s2) { |
9028 | $s2 = null; |
9029 | } else { |
9030 | $s2 = $this->peg_FAILED; |
9031 | } |
9032 | if ($s2 !== $this->peg_FAILED) { |
9033 | $s3 = $this->peg_parse_(); |
9034 | if ($s3 !== $this->peg_FAILED) { |
9035 | $this->peg_reportedPos = $s0; |
9036 | $s1 = $this->peg_f98($s1); |
9037 | $s0 = $s1; |
9038 | } else { |
9039 | $this->peg_currPos = $s0; |
9040 | $s0 = $this->peg_FAILED; |
9041 | } |
9042 | } else { |
9043 | $this->peg_currPos = $s0; |
9044 | $s0 = $this->peg_FAILED; |
9045 | } |
9046 | } else { |
9047 | $this->peg_currPos = $s0; |
9048 | $s0 = $this->peg_FAILED; |
9049 | } |
9050 | |
9051 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
9052 | |
9053 | return $s0; |
9054 | } |
9055 | |
9056 | private function peg_parseCHEM_MACRO_1P() { |
9057 | |
9058 | $key = $this->peg_currPos * 130 + 117; |
9059 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
9060 | |
9061 | if ($cached) { |
9062 | $this->peg_currPos = $cached["nextPos"]; |
9063 | return $cached["result"]; |
9064 | } |
9065 | |
9066 | $s0 = $this->peg_currPos; |
9067 | $s1 = $this->peg_parsegeneric_func(); |
9068 | if ($s1 !== $this->peg_FAILED) { |
9069 | $this->peg_reportedPos = $this->peg_currPos; |
9070 | $s2 = $this->peg_f145($s1); |
9071 | if ($s2) { |
9072 | $s2 = null; |
9073 | } else { |
9074 | $s2 = $this->peg_FAILED; |
9075 | } |
9076 | if ($s2 !== $this->peg_FAILED) { |
9077 | $s3 = $this->peg_parse_(); |
9078 | if ($s3 !== $this->peg_FAILED) { |
9079 | $this->peg_reportedPos = $s0; |
9080 | $s1 = $this->peg_f98($s1); |
9081 | $s0 = $s1; |
9082 | } else { |
9083 | $this->peg_currPos = $s0; |
9084 | $s0 = $this->peg_FAILED; |
9085 | } |
9086 | } else { |
9087 | $this->peg_currPos = $s0; |
9088 | $s0 = $this->peg_FAILED; |
9089 | } |
9090 | } else { |
9091 | $this->peg_currPos = $s0; |
9092 | $s0 = $this->peg_FAILED; |
9093 | } |
9094 | |
9095 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
9096 | |
9097 | return $s0; |
9098 | } |
9099 | |
9100 | private function peg_parseCHEM_MACRO_2P() { |
9101 | |
9102 | $key = $this->peg_currPos * 130 + 118; |
9103 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
9104 | |
9105 | if ($cached) { |
9106 | $this->peg_currPos = $cached["nextPos"]; |
9107 | return $cached["result"]; |
9108 | } |
9109 | |
9110 | $s0 = $this->peg_currPos; |
9111 | $s1 = $this->peg_parsegeneric_func(); |
9112 | if ($s1 !== $this->peg_FAILED) { |
9113 | $this->peg_reportedPos = $this->peg_currPos; |
9114 | $s2 = $this->peg_f146($s1); |
9115 | if ($s2) { |
9116 | $s2 = null; |
9117 | } else { |
9118 | $s2 = $this->peg_FAILED; |
9119 | } |
9120 | if ($s2 !== $this->peg_FAILED) { |
9121 | $s3 = $this->peg_parse_(); |
9122 | if ($s3 !== $this->peg_FAILED) { |
9123 | $this->peg_reportedPos = $s0; |
9124 | $s1 = $this->peg_f98($s1); |
9125 | $s0 = $s1; |
9126 | } else { |
9127 | $this->peg_currPos = $s0; |
9128 | $s0 = $this->peg_FAILED; |
9129 | } |
9130 | } else { |
9131 | $this->peg_currPos = $s0; |
9132 | $s0 = $this->peg_FAILED; |
9133 | } |
9134 | } else { |
9135 | $this->peg_currPos = $s0; |
9136 | $s0 = $this->peg_FAILED; |
9137 | } |
9138 | |
9139 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
9140 | |
9141 | return $s0; |
9142 | } |
9143 | |
9144 | private function peg_parseCHEM_MACRO_2PU() { |
9145 | |
9146 | $key = $this->peg_currPos * 130 + 119; |
9147 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
9148 | |
9149 | if ($cached) { |
9150 | $this->peg_currPos = $cached["nextPos"]; |
9151 | return $cached["result"]; |
9152 | } |
9153 | |
9154 | $s0 = $this->peg_currPos; |
9155 | $s1 = $this->peg_parsegeneric_func(); |
9156 | if ($s1 !== $this->peg_FAILED) { |
9157 | $this->peg_reportedPos = $this->peg_currPos; |
9158 | $s2 = $this->peg_f147($s1); |
9159 | if ($s2) { |
9160 | $s2 = null; |
9161 | } else { |
9162 | $s2 = $this->peg_FAILED; |
9163 | } |
9164 | if ($s2 !== $this->peg_FAILED) { |
9165 | $s3 = $this->peg_parse_(); |
9166 | if ($s3 !== $this->peg_FAILED) { |
9167 | $this->peg_reportedPos = $s0; |
9168 | $s1 = $this->peg_f98($s1); |
9169 | $s0 = $s1; |
9170 | } else { |
9171 | $this->peg_currPos = $s0; |
9172 | $s0 = $this->peg_FAILED; |
9173 | } |
9174 | } else { |
9175 | $this->peg_currPos = $s0; |
9176 | $s0 = $this->peg_FAILED; |
9177 | } |
9178 | } else { |
9179 | $this->peg_currPos = $s0; |
9180 | $s0 = $this->peg_FAILED; |
9181 | } |
9182 | |
9183 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
9184 | |
9185 | return $s0; |
9186 | } |
9187 | |
9188 | private function peg_parseCHEM_MACRO_2PC() { |
9189 | |
9190 | $key = $this->peg_currPos * 130 + 120; |
9191 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
9192 | |
9193 | if ($cached) { |
9194 | $this->peg_currPos = $cached["nextPos"]; |
9195 | return $cached["result"]; |
9196 | } |
9197 | |
9198 | $s0 = $this->peg_currPos; |
9199 | $s1 = $this->peg_parsegeneric_func(); |
9200 | if ($s1 !== $this->peg_FAILED) { |
9201 | $this->peg_reportedPos = $this->peg_currPos; |
9202 | $s2 = $this->peg_f148($s1); |
9203 | if ($s2) { |
9204 | $s2 = null; |
9205 | } else { |
9206 | $s2 = $this->peg_FAILED; |
9207 | } |
9208 | if ($s2 !== $this->peg_FAILED) { |
9209 | $s3 = $this->peg_parse_(); |
9210 | if ($s3 !== $this->peg_FAILED) { |
9211 | $this->peg_reportedPos = $s0; |
9212 | $s1 = $this->peg_f98($s1); |
9213 | $s0 = $s1; |
9214 | } else { |
9215 | $this->peg_currPos = $s0; |
9216 | $s0 = $this->peg_FAILED; |
9217 | } |
9218 | } else { |
9219 | $this->peg_currPos = $s0; |
9220 | $s0 = $this->peg_FAILED; |
9221 | } |
9222 | } else { |
9223 | $this->peg_currPos = $s0; |
9224 | $s0 = $this->peg_FAILED; |
9225 | } |
9226 | |
9227 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
9228 | |
9229 | return $s0; |
9230 | } |
9231 | |
9232 | private function peg_parseCHEM_SCRIPT_FOLLOW() { |
9233 | |
9234 | $key = $this->peg_currPos * 130 + 121; |
9235 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
9236 | |
9237 | if ($cached) { |
9238 | $this->peg_currPos = $cached["nextPos"]; |
9239 | return $cached["result"]; |
9240 | } |
9241 | |
9242 | $s0 = $this->peg_parseliteral_mn(); |
9243 | if ($s0 === $this->peg_FAILED) { |
9244 | $s0 = $this->peg_parseliteral_id(); |
9245 | if ($s0 === $this->peg_FAILED) { |
9246 | if (peg_regex_test($this->peg_c149, $this->input_substr($this->peg_currPos, 1))) { |
9247 | $s0 = $this->input_substr($this->peg_currPos, 1); |
9248 | $this->peg_currPos++; |
9249 | } else { |
9250 | $s0 = $this->peg_FAILED; |
9251 | if ($this->peg_silentFails === 0) { |
9252 | $this->peg_fail($this->peg_c150); |
9253 | } |
9254 | } |
9255 | } |
9256 | } |
9257 | |
9258 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
9259 | |
9260 | return $s0; |
9261 | } |
9262 | |
9263 | private function peg_parseCHEM_SUPERSUB() { |
9264 | |
9265 | $key = $this->peg_currPos * 130 + 122; |
9266 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
9267 | |
9268 | if ($cached) { |
9269 | $this->peg_currPos = $cached["nextPos"]; |
9270 | return $cached["result"]; |
9271 | } |
9272 | |
9273 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c37) { |
9274 | $s0 = $this->peg_c37; |
9275 | $this->peg_currPos++; |
9276 | } else { |
9277 | $s0 = $this->peg_FAILED; |
9278 | if ($this->peg_silentFails === 0) { |
9279 | $this->peg_fail($this->peg_c38); |
9280 | } |
9281 | } |
9282 | if ($s0 === $this->peg_FAILED) { |
9283 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c35) { |
9284 | $s0 = $this->peg_c35; |
9285 | $this->peg_currPos++; |
9286 | } else { |
9287 | $s0 = $this->peg_FAILED; |
9288 | if ($this->peg_silentFails === 0) { |
9289 | $this->peg_fail($this->peg_c36); |
9290 | } |
9291 | } |
9292 | } |
9293 | |
9294 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
9295 | |
9296 | return $s0; |
9297 | } |
9298 | |
9299 | private function peg_parseCHEM_BOND_TYPE() { |
9300 | |
9301 | $key = $this->peg_currPos * 130 + 123; |
9302 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
9303 | |
9304 | if ($cached) { |
9305 | $this->peg_currPos = $cached["nextPos"]; |
9306 | return $cached["result"]; |
9307 | } |
9308 | |
9309 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c151) { |
9310 | $s0 = $this->peg_c151; |
9311 | $this->peg_currPos++; |
9312 | } else { |
9313 | $s0 = $this->peg_FAILED; |
9314 | if ($this->peg_silentFails === 0) { |
9315 | $this->peg_fail($this->peg_c152); |
9316 | } |
9317 | } |
9318 | if ($s0 === $this->peg_FAILED) { |
9319 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c153) { |
9320 | $s0 = $this->peg_c153; |
9321 | $this->peg_currPos++; |
9322 | } else { |
9323 | $s0 = $this->peg_FAILED; |
9324 | if ($this->peg_silentFails === 0) { |
9325 | $this->peg_fail($this->peg_c154); |
9326 | } |
9327 | } |
9328 | if ($s0 === $this->peg_FAILED) { |
9329 | if ($this->input_substr($this->peg_currPos, 3) === $this->peg_c155) { |
9330 | $s0 = $this->peg_c155; |
9331 | $this->peg_currPos += 3; |
9332 | } else { |
9333 | $s0 = $this->peg_FAILED; |
9334 | if ($this->peg_silentFails === 0) { |
9335 | $this->peg_fail($this->peg_c156); |
9336 | } |
9337 | } |
9338 | if ($s0 === $this->peg_FAILED) { |
9339 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c157) { |
9340 | $s0 = $this->peg_c157; |
9341 | $this->peg_currPos += 2; |
9342 | } else { |
9343 | $s0 = $this->peg_FAILED; |
9344 | if ($this->peg_silentFails === 0) { |
9345 | $this->peg_fail($this->peg_c158); |
9346 | } |
9347 | } |
9348 | if ($s0 === $this->peg_FAILED) { |
9349 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c159) { |
9350 | $s0 = $this->peg_c159; |
9351 | $this->peg_currPos += 2; |
9352 | } else { |
9353 | $s0 = $this->peg_FAILED; |
9354 | if ($this->peg_silentFails === 0) { |
9355 | $this->peg_fail($this->peg_c160); |
9356 | } |
9357 | } |
9358 | if ($s0 === $this->peg_FAILED) { |
9359 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c161) { |
9360 | $s0 = $this->peg_c161; |
9361 | $this->peg_currPos++; |
9362 | } else { |
9363 | $s0 = $this->peg_FAILED; |
9364 | if ($this->peg_silentFails === 0) { |
9365 | $this->peg_fail($this->peg_c162); |
9366 | } |
9367 | } |
9368 | if ($s0 === $this->peg_FAILED) { |
9369 | if ($this->input_substr($this->peg_currPos, 3) === $this->peg_c163) { |
9370 | $s0 = $this->peg_c163; |
9371 | $this->peg_currPos += 3; |
9372 | } else { |
9373 | $s0 = $this->peg_FAILED; |
9374 | if ($this->peg_silentFails === 0) { |
9375 | $this->peg_fail($this->peg_c164); |
9376 | } |
9377 | } |
9378 | if ($s0 === $this->peg_FAILED) { |
9379 | if ($this->input_substr($this->peg_currPos, 4) === $this->peg_c165) { |
9380 | $s0 = $this->peg_c165; |
9381 | $this->peg_currPos += 4; |
9382 | } else { |
9383 | $s0 = $this->peg_FAILED; |
9384 | if ($this->peg_silentFails === 0) { |
9385 | $this->peg_fail($this->peg_c166); |
9386 | } |
9387 | } |
9388 | if ($s0 === $this->peg_FAILED) { |
9389 | if ($this->input_substr($this->peg_currPos, 3) === $this->peg_c167) { |
9390 | $s0 = $this->peg_c167; |
9391 | $this->peg_currPos += 3; |
9392 | } else { |
9393 | $s0 = $this->peg_FAILED; |
9394 | if ($this->peg_silentFails === 0) { |
9395 | $this->peg_fail($this->peg_c168); |
9396 | } |
9397 | } |
9398 | if ($s0 === $this->peg_FAILED) { |
9399 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c169) { |
9400 | $s0 = $this->peg_c169; |
9401 | $this->peg_currPos += 2; |
9402 | } else { |
9403 | $s0 = $this->peg_FAILED; |
9404 | if ($this->peg_silentFails === 0) { |
9405 | $this->peg_fail($this->peg_c170); |
9406 | } |
9407 | } |
9408 | if ($s0 === $this->peg_FAILED) { |
9409 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c171) { |
9410 | $s0 = $this->peg_c171; |
9411 | $this->peg_currPos += 2; |
9412 | } else { |
9413 | $s0 = $this->peg_FAILED; |
9414 | if ($this->peg_silentFails === 0) { |
9415 | $this->peg_fail($this->peg_c172); |
9416 | } |
9417 | } |
9418 | if ($s0 === $this->peg_FAILED) { |
9419 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c53) { |
9420 | $s0 = $this->peg_c53; |
9421 | $this->peg_currPos++; |
9422 | } else { |
9423 | $s0 = $this->peg_FAILED; |
9424 | if ($this->peg_silentFails === 0) { |
9425 | $this->peg_fail($this->peg_c54); |
9426 | } |
9427 | } |
9428 | if ($s0 === $this->peg_FAILED) { |
9429 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c173) { |
9430 | $s0 = $this->peg_c173; |
9431 | $this->peg_currPos++; |
9432 | } else { |
9433 | $s0 = $this->peg_FAILED; |
9434 | if ($this->peg_silentFails === 0) { |
9435 | $this->peg_fail($this->peg_c174); |
9436 | } |
9437 | } |
9438 | if ($s0 === $this->peg_FAILED) { |
9439 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c175) { |
9440 | $s0 = $this->peg_c175; |
9441 | $this->peg_currPos++; |
9442 | } else { |
9443 | $s0 = $this->peg_FAILED; |
9444 | if ($this->peg_silentFails === 0) { |
9445 | $this->peg_fail($this->peg_c176); |
9446 | } |
9447 | } |
9448 | if ($s0 === $this->peg_FAILED) { |
9449 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c177) { |
9450 | $s0 = $this->peg_c177; |
9451 | $this->peg_currPos++; |
9452 | } else { |
9453 | $s0 = $this->peg_FAILED; |
9454 | if ($this->peg_silentFails === 0) { |
9455 | $this->peg_fail($this->peg_c178); |
9456 | } |
9457 | } |
9458 | } |
9459 | } |
9460 | } |
9461 | } |
9462 | } |
9463 | } |
9464 | } |
9465 | } |
9466 | } |
9467 | } |
9468 | } |
9469 | } |
9470 | } |
9471 | } |
9472 | |
9473 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
9474 | |
9475 | return $s0; |
9476 | } |
9477 | |
9478 | private function peg_parseBEGIN_MATH() { |
9479 | |
9480 | $key = $this->peg_currPos * 130 + 124; |
9481 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
9482 | |
9483 | if ($cached) { |
9484 | $this->peg_currPos = $cached["nextPos"]; |
9485 | return $cached["result"]; |
9486 | } |
9487 | |
9488 | $s0 = $this->peg_currPos; |
9489 | $s1 = $this->peg_parseBEGIN(); |
9490 | if ($s1 !== $this->peg_FAILED) { |
9491 | if ($this->input_substr($this->peg_currPos, 6) === $this->peg_c179) { |
9492 | $s2 = $this->peg_c179; |
9493 | $this->peg_currPos += 6; |
9494 | } else { |
9495 | $s2 = $this->peg_FAILED; |
9496 | if ($this->peg_silentFails === 0) { |
9497 | $this->peg_fail($this->peg_c180); |
9498 | } |
9499 | } |
9500 | if ($s2 !== $this->peg_FAILED) { |
9501 | $s3 = $this->peg_parse_(); |
9502 | if ($s3 !== $this->peg_FAILED) { |
9503 | $s1 = array($s1, $s2, $s3); |
9504 | $s0 = $s1; |
9505 | } else { |
9506 | $this->peg_currPos = $s0; |
9507 | $s0 = $this->peg_FAILED; |
9508 | } |
9509 | } else { |
9510 | $this->peg_currPos = $s0; |
9511 | $s0 = $this->peg_FAILED; |
9512 | } |
9513 | } else { |
9514 | $this->peg_currPos = $s0; |
9515 | $s0 = $this->peg_FAILED; |
9516 | } |
9517 | |
9518 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
9519 | |
9520 | return $s0; |
9521 | } |
9522 | |
9523 | private function peg_parseEND_MATH() { |
9524 | |
9525 | $key = $this->peg_currPos * 130 + 125; |
9526 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
9527 | |
9528 | if ($cached) { |
9529 | $this->peg_currPos = $cached["nextPos"]; |
9530 | return $cached["result"]; |
9531 | } |
9532 | |
9533 | $s0 = $this->peg_currPos; |
9534 | $s1 = $this->peg_parseEND(); |
9535 | if ($s1 !== $this->peg_FAILED) { |
9536 | if ($this->input_substr($this->peg_currPos, 6) === $this->peg_c179) { |
9537 | $s2 = $this->peg_c179; |
9538 | $this->peg_currPos += 6; |
9539 | } else { |
9540 | $s2 = $this->peg_FAILED; |
9541 | if ($this->peg_silentFails === 0) { |
9542 | $this->peg_fail($this->peg_c180); |
9543 | } |
9544 | } |
9545 | if ($s2 !== $this->peg_FAILED) { |
9546 | $s3 = $this->peg_parse_(); |
9547 | if ($s3 !== $this->peg_FAILED) { |
9548 | $s1 = array($s1, $s2, $s3); |
9549 | $s0 = $s1; |
9550 | } else { |
9551 | $this->peg_currPos = $s0; |
9552 | $s0 = $this->peg_FAILED; |
9553 | } |
9554 | } else { |
9555 | $this->peg_currPos = $s0; |
9556 | $s0 = $this->peg_FAILED; |
9557 | } |
9558 | } else { |
9559 | $this->peg_currPos = $s0; |
9560 | $s0 = $this->peg_FAILED; |
9561 | } |
9562 | |
9563 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
9564 | |
9565 | return $s0; |
9566 | } |
9567 | |
9568 | private function peg_parseCHEM_LETTER() { |
9569 | |
9570 | $key = $this->peg_currPos * 130 + 126; |
9571 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
9572 | |
9573 | if ($cached) { |
9574 | $this->peg_currPos = $cached["nextPos"]; |
9575 | return $cached["result"]; |
9576 | } |
9577 | |
9578 | if (peg_regex_test($this->peg_c41, $this->input_substr($this->peg_currPos, 1))) { |
9579 | $s0 = $this->input_substr($this->peg_currPos, 1); |
9580 | $this->peg_currPos++; |
9581 | } else { |
9582 | $s0 = $this->peg_FAILED; |
9583 | if ($this->peg_silentFails === 0) { |
9584 | $this->peg_fail($this->peg_c42); |
9585 | } |
9586 | } |
9587 | |
9588 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
9589 | |
9590 | return $s0; |
9591 | } |
9592 | |
9593 | private function peg_parseCHEM_NONLETTER() { |
9594 | |
9595 | $key = $this->peg_currPos * 130 + 127; |
9596 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
9597 | |
9598 | if ($cached) { |
9599 | $this->peg_currPos = $cached["nextPos"]; |
9600 | return $cached["result"]; |
9601 | } |
9602 | |
9603 | $s0 = $this->peg_currPos; |
9604 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c7) { |
9605 | $s1 = $this->peg_c7; |
9606 | $this->peg_currPos += 2; |
9607 | } else { |
9608 | $s1 = $this->peg_FAILED; |
9609 | if ($this->peg_silentFails === 0) { |
9610 | $this->peg_fail($this->peg_c8); |
9611 | } |
9612 | } |
9613 | if ($s1 !== $this->peg_FAILED) { |
9614 | $this->peg_reportedPos = $s0; |
9615 | $s1 = $this->peg_f85($s1); |
9616 | } |
9617 | $s0 = $s1; |
9618 | if ($s0 === $this->peg_FAILED) { |
9619 | $s0 = $this->peg_currPos; |
9620 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c181) { |
9621 | $s1 = $this->peg_c181; |
9622 | $this->peg_currPos += 2; |
9623 | } else { |
9624 | $s1 = $this->peg_FAILED; |
9625 | if ($this->peg_silentFails === 0) { |
9626 | $this->peg_fail($this->peg_c182); |
9627 | } |
9628 | } |
9629 | if ($s1 !== $this->peg_FAILED) { |
9630 | $this->peg_reportedPos = $s0; |
9631 | $s1 = $this->peg_f85($s1); |
9632 | } |
9633 | $s0 = $s1; |
9634 | if ($s0 === $this->peg_FAILED) { |
9635 | $s0 = $this->peg_currPos; |
9636 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c99) { |
9637 | $s1 = $this->peg_c99; |
9638 | $this->peg_currPos += 2; |
9639 | } else { |
9640 | $s1 = $this->peg_FAILED; |
9641 | if ($this->peg_silentFails === 0) { |
9642 | $this->peg_fail($this->peg_c100); |
9643 | } |
9644 | } |
9645 | if ($s1 !== $this->peg_FAILED) { |
9646 | $this->peg_reportedPos = $s0; |
9647 | $s1 = $this->peg_f85($s1); |
9648 | } |
9649 | $s0 = $s1; |
9650 | if ($s0 === $this->peg_FAILED) { |
9651 | $s0 = $this->peg_currPos; |
9652 | if (peg_regex_test($this->peg_c183, $this->input_substr($this->peg_currPos, 1))) { |
9653 | $s1 = $this->input_substr($this->peg_currPos, 1); |
9654 | $this->peg_currPos++; |
9655 | } else { |
9656 | $s1 = $this->peg_FAILED; |
9657 | if ($this->peg_silentFails === 0) { |
9658 | $this->peg_fail($this->peg_c184); |
9659 | } |
9660 | } |
9661 | if ($s1 !== $this->peg_FAILED) { |
9662 | $this->peg_reportedPos = $s0; |
9663 | $s1 = $this->peg_f85($s1); |
9664 | } |
9665 | $s0 = $s1; |
9666 | if ($s0 === $this->peg_FAILED) { |
9667 | $s0 = $this->peg_currPos; |
9668 | $s1 = $this->peg_parseliteral_mn(); |
9669 | if ($s1 !== $this->peg_FAILED) { |
9670 | $this->peg_reportedPos = $s0; |
9671 | $s1 = $this->peg_f85($s1); |
9672 | } |
9673 | $s0 = $s1; |
9674 | if ($s0 === $this->peg_FAILED) { |
9675 | $s0 = $this->peg_currPos; |
9676 | $s1 = $this->peg_parseCURLY_OPEN(); |
9677 | if ($s1 !== $this->peg_FAILED) { |
9678 | $s2 = $this->peg_parseCURLY_CLOSE(); |
9679 | if ($s2 !== $this->peg_FAILED) { |
9680 | $this->peg_reportedPos = $s0; |
9681 | $s1 = $this->peg_f149(); |
9682 | $s0 = $s1; |
9683 | } else { |
9684 | $this->peg_currPos = $s0; |
9685 | $s0 = $this->peg_FAILED; |
9686 | } |
9687 | } else { |
9688 | $this->peg_currPos = $s0; |
9689 | $s0 = $this->peg_FAILED; |
9690 | } |
9691 | } |
9692 | } |
9693 | } |
9694 | } |
9695 | } |
9696 | |
9697 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
9698 | |
9699 | return $s0; |
9700 | } |
9701 | |
9702 | private function peg_parseimpossible() { |
9703 | |
9704 | $key = $this->peg_currPos * 130 + 128; |
9705 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
9706 | |
9707 | if ($cached) { |
9708 | $this->peg_currPos = $cached["nextPos"]; |
9709 | return $cached["result"]; |
9710 | } |
9711 | |
9712 | $this->peg_reportedPos = $this->peg_currPos; |
9713 | $s0 = $this->peg_f150(); |
9714 | if ($s0) { |
9715 | $s0 = null; |
9716 | } else { |
9717 | $s0 = $this->peg_FAILED; |
9718 | } |
9719 | |
9720 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
9721 | |
9722 | return $s0; |
9723 | } |
9724 | |
9725 | private function peg_parseEOF() { |
9726 | |
9727 | $key = $this->peg_currPos * 130 + 129; |
9728 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
9729 | |
9730 | if ($cached) { |
9731 | $this->peg_currPos = $cached["nextPos"]; |
9732 | return $cached["result"]; |
9733 | } |
9734 | |
9735 | $this->peg_reportedPos = $this->peg_currPos; |
9736 | $s0 = $this->peg_f151(); |
9737 | if ($s0) { |
9738 | $s0 = null; |
9739 | } else { |
9740 | $s0 = $this->peg_FAILED; |
9741 | } |
9742 | |
9743 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
9744 | |
9745 | return $s0; |
9746 | } |
9747 | |
9748 | public function parse($input) { |
9749 | $arguments = func_get_args(); |
9750 | $options = count($arguments) > 1 ? $arguments[1] : array(); |
9751 | $this->cleanup_state(); |
9752 | |
9753 | if (is_array($input)) { |
9754 | $this->input = $input; |
9755 | } else { |
9756 | preg_match_all("/./us", $input, $match); |
9757 | $this->input = $match[0]; |
9758 | } |
9759 | $this->input_length = count($this->input); |
9760 | |
9761 | $old_regex_encoding = mb_regex_encoding(); |
9762 | mb_regex_encoding("UTF-8"); |
9763 | |
9764 | $this->peg_FAILED = new \stdClass; |
9765 | $this->peg_c0 = "/^[ \\t\\n\\r]/"; |
9766 | $this->peg_c1 = array( "type" => "class", "value" => "[ \t\n\r]", "description" => "[ \t\n\r]" ); |
9767 | $this->peg_c2 = ""; |
9768 | $this->peg_c3 = "("; |
9769 | $this->peg_c4 = array( "type" => "literal", "value" => "(", "description" => "\"(\"" ); |
9770 | $this->peg_c5 = "["; |
9771 | $this->peg_c6 = array( "type" => "literal", "value" => "[", "description" => "\"[\"" ); |
9772 | $this->peg_c7 = "\\{"; |
9773 | $this->peg_c8 = array( "type" => "literal", "value" => "\\{", "description" => "\"\\\\{\"" ); |
9774 | $this->peg_c9 = "\\begin{"; |
9775 | $this->peg_c10 = array( "type" => "literal", "value" => "\\begin{", "description" => "\"\\\\begin{\"" ); |
9776 | $this->peg_c11 = "}"; |
9777 | $this->peg_c12 = array( "type" => "literal", "value" => "}", "description" => "\"}\"" ); |
9778 | $this->peg_c13 = "/^[lrc]/"; |
9779 | $this->peg_c14 = array( "type" => "class", "value" => "[lrc]", "description" => "[lrc]" ); |
9780 | $this->peg_c15 = "p"; |
9781 | $this->peg_c16 = array( "type" => "literal", "value" => "p", "description" => "\"p\"" ); |
9782 | $this->peg_c17 = "*"; |
9783 | $this->peg_c18 = array( "type" => "literal", "value" => "*", "description" => "\"*\"" ); |
9784 | $this->peg_c19 = "/^[0-9]/"; |
9785 | $this->peg_c20 = array( "type" => "class", "value" => "[0-9]", "description" => "[0-9]" ); |
9786 | $this->peg_c21 = "||"; |
9787 | $this->peg_c22 = array( "type" => "literal", "value" => "||", "description" => "\"||\"" ); |
9788 | $this->peg_c23 = "|"; |
9789 | $this->peg_c24 = array( "type" => "literal", "value" => "|", "description" => "\"|\"" ); |
9790 | $this->peg_c25 = "@"; |
9791 | $this->peg_c26 = array( "type" => "literal", "value" => "@", "description" => "\"@\"" ); |
9792 | $this->peg_c27 = "/^[tcb]/"; |
9793 | $this->peg_c28 = array( "type" => "class", "value" => "[tcb]", "description" => "[tcb]" ); |
9794 | $this->peg_c29 = "]"; |
9795 | $this->peg_c30 = array( "type" => "literal", "value" => "]", "description" => "\"]\"" ); |
9796 | $this->peg_c31 = " "; |
9797 | $this->peg_c32 = array( "type" => "literal", "value" => " ", "description" => "\" \"" ); |
9798 | $this->peg_c33 = "(^)"; |
9799 | $this->peg_c34 = array( "type" => "literal", "value" => "(^)", "description" => "\"(^)\"" ); |
9800 | $this->peg_c35 = "^"; |
9801 | $this->peg_c36 = array( "type" => "literal", "value" => "^", "description" => "\"^\"" ); |
9802 | $this->peg_c37 = "_"; |
9803 | $this->peg_c38 = array( "type" => "literal", "value" => "_", "description" => "\"_\"" ); |
9804 | $this->peg_c39 = "{"; |
9805 | $this->peg_c40 = array( "type" => "literal", "value" => "{", "description" => "\"{\"" ); |
9806 | $this->peg_c41 = "/^[a-zA-Z]/"; |
9807 | $this->peg_c42 = array( "type" => "class", "value" => "[a-zA-Z]", "description" => "[a-zA-Z]" ); |
9808 | $this->peg_c43 = "/^[,:;?!']/"; |
9809 | $this->peg_c44 = array( "type" => "class", "value" => "[,:;?!']", "description" => "[,:;?!']" ); |
9810 | $this->peg_c45 = "/^[\\(\\).]/"; |
9811 | $this->peg_c46 = array( "type" => "class", "value" => "[().]", "description" => "[().]" ); |
9812 | $this->peg_c47 = "/^[-+*=]/"; |
9813 | $this->peg_c48 = array( "type" => "class", "value" => "[-+*=]", "description" => "[-+*=]" ); |
9814 | $this->peg_c49 = "/^[\\/|]/"; |
9815 | $this->peg_c50 = array( "type" => "class", "value" => "[/|]", "description" => "[/|]" ); |
9816 | $this->peg_c51 = "/^[-0-9a-zA-Z+*,=\\(\\):\\/;?.!'` \\[\\]\\[\\x{0080}-\\x{D7FF}\\]\\[\\x{E000}-\\x{FFFF}\\]]/"; |
9817 | $this->peg_c52 = array( "type" => "class", "value" => "[-0-9a-zA-Z+*,=():/;?.!'` [][\x{0080}-\x{D7FF}][\x{E000}-\x{FFFF}]]", "description" => "[-0-9a-zA-Z+*,=():/;?.!'` [][\x{0080}-\x{D7FF}][\x{E000}-\x{FFFF}]]" ); |
9818 | $this->peg_c53 = "-"; |
9819 | $this->peg_c54 = array( "type" => "literal", "value" => "-", "description" => "\"-\"" ); |
9820 | $this->peg_c55 = "\\"; |
9821 | $this->peg_c56 = array( "type" => "literal", "value" => "\\", "description" => "\"\\\\\"" ); |
9822 | $this->peg_c57 = "/^[, ;!_#%\\\$&]/"; |
9823 | $this->peg_c58 = array( "type" => "class", "value" => "[, ;!_#%\$&]", "description" => "[, ;!_#%\$&]" ); |
9824 | $this->peg_c59 = "/^[><~]/"; |
9825 | $this->peg_c60 = array( "type" => "class", "value" => "[><~]", "description" => "[><~]" ); |
9826 | $this->peg_c61 = "/^[%\\\$]/"; |
9827 | $this->peg_c62 = array( "type" => "class", "value" => "[%\$]", "description" => "[%\$]" ); |
9828 | $this->peg_c63 = "/^[{}|]/"; |
9829 | $this->peg_c64 = array( "type" => "class", "value" => "[{}|]", "description" => "[{}|]" ); |
9830 | $this->peg_c65 = "&"; |
9831 | $this->peg_c66 = array( "type" => "literal", "value" => "&", "description" => "\"&\"" ); |
9832 | $this->peg_c67 = "/^[+-]/"; |
9833 | $this->peg_c68 = array( "type" => "class", "value" => "[+-]", "description" => "[+-]" ); |
9834 | $this->peg_c69 = "."; |
9835 | $this->peg_c70 = array( "type" => "literal", "value" => ".", "description" => "\".\"" ); |
9836 | $this->peg_c71 = "pt"; |
9837 | $this->peg_c72 = array( "type" => "literal", "value" => "pt", "description" => "\"pt\"" ); |
9838 | $this->peg_c73 = "pc"; |
9839 | $this->peg_c74 = array( "type" => "literal", "value" => "pc", "description" => "\"pc\"" ); |
9840 | $this->peg_c75 = "in"; |
9841 | $this->peg_c76 = array( "type" => "literal", "value" => "in", "description" => "\"in\"" ); |
9842 | $this->peg_c77 = "bp"; |
9843 | $this->peg_c78 = array( "type" => "literal", "value" => "bp", "description" => "\"bp\"" ); |
9844 | $this->peg_c79 = "cm"; |
9845 | $this->peg_c80 = array( "type" => "literal", "value" => "cm", "description" => "\"cm\"" ); |
9846 | $this->peg_c81 = "mm"; |
9847 | $this->peg_c82 = array( "type" => "literal", "value" => "mm", "description" => "\"mm\"" ); |
9848 | $this->peg_c83 = "dd"; |
9849 | $this->peg_c84 = array( "type" => "literal", "value" => "dd", "description" => "\"dd\"" ); |
9850 | $this->peg_c85 = "cc"; |
9851 | $this->peg_c86 = array( "type" => "literal", "value" => "cc", "description" => "\"cc\"" ); |
9852 | $this->peg_c87 = "sp"; |
9853 | $this->peg_c88 = array( "type" => "literal", "value" => "sp", "description" => "\"sp\"" ); |
9854 | $this->peg_c89 = "em"; |
9855 | $this->peg_c90 = array( "type" => "literal", "value" => "em", "description" => "\"em\"" ); |
9856 | $this->peg_c91 = "ex"; |
9857 | $this->peg_c92 = array( "type" => "literal", "value" => "ex", "description" => "\"ex\"" ); |
9858 | $this->peg_c93 = "mu"; |
9859 | $this->peg_c94 = array( "type" => "literal", "value" => "mu", "description" => "\"mu\"" ); |
9860 | $this->peg_c95 = "nd"; |
9861 | $this->peg_c96 = array( "type" => "literal", "value" => "nd", "description" => "\"nd\"" ); |
9862 | $this->peg_c97 = "nc"; |
9863 | $this->peg_c98 = array( "type" => "literal", "value" => "nc", "description" => "\"nc\"" ); |
9864 | $this->peg_c99 = "\\\\"; |
9865 | $this->peg_c100 = array( "type" => "literal", "value" => "\\\\", "description" => "\"\\\\\\\\\"" ); |
9866 | $this->peg_c101 = "\\begin"; |
9867 | $this->peg_c102 = array( "type" => "literal", "value" => "\\begin", "description" => "\"\\\\begin\"" ); |
9868 | $this->peg_c103 = "\\end"; |
9869 | $this->peg_c104 = array( "type" => "literal", "value" => "\\end", "description" => "\"\\\\end\"" ); |
9870 | $this->peg_c105 = "{matrix}"; |
9871 | $this->peg_c106 = array( "type" => "literal", "value" => "{matrix}", "description" => "\"{matrix}\"" ); |
9872 | $this->peg_c107 = "{pmatrix}"; |
9873 | $this->peg_c108 = array( "type" => "literal", "value" => "{pmatrix}", "description" => "\"{pmatrix}\"" ); |
9874 | $this->peg_c109 = "{bmatrix}"; |
9875 | $this->peg_c110 = array( "type" => "literal", "value" => "{bmatrix}", "description" => "\"{bmatrix}\"" ); |
9876 | $this->peg_c111 = "{Bmatrix}"; |
9877 | $this->peg_c112 = array( "type" => "literal", "value" => "{Bmatrix}", "description" => "\"{Bmatrix}\"" ); |
9878 | $this->peg_c113 = "{vmatrix}"; |
9879 | $this->peg_c114 = array( "type" => "literal", "value" => "{vmatrix}", "description" => "\"{vmatrix}\"" ); |
9880 | $this->peg_c115 = "{Vmatrix}"; |
9881 | $this->peg_c116 = array( "type" => "literal", "value" => "{Vmatrix}", "description" => "\"{Vmatrix}\"" ); |
9882 | $this->peg_c117 = "{array}"; |
9883 | $this->peg_c118 = array( "type" => "literal", "value" => "{array}", "description" => "\"{array}\"" ); |
9884 | $this->peg_c119 = "{align}"; |
9885 | $this->peg_c120 = array( "type" => "literal", "value" => "{align}", "description" => "\"{align}\"" ); |
9886 | $this->peg_c121 = "{aligned}"; |
9887 | $this->peg_c122 = array( "type" => "literal", "value" => "{aligned}", "description" => "\"{aligned}\"" ); |
9888 | $this->peg_c123 = "{alignat}"; |
9889 | $this->peg_c124 = array( "type" => "literal", "value" => "{alignat}", "description" => "\"{alignat}\"" ); |
9890 | $this->peg_c125 = "{alignedat}"; |
9891 | $this->peg_c126 = array( "type" => "literal", "value" => "{alignedat}", "description" => "\"{alignedat}\"" ); |
9892 | $this->peg_c127 = "{smallmatrix}"; |
9893 | $this->peg_c128 = array( "type" => "literal", "value" => "{smallmatrix}", "description" => "\"{smallmatrix}\"" ); |
9894 | $this->peg_c129 = "{cases}"; |
9895 | $this->peg_c130 = array( "type" => "literal", "value" => "{cases}", "description" => "\"{cases}\"" ); |
9896 | $this->peg_c131 = "named"; |
9897 | $this->peg_c132 = array( "type" => "literal", "value" => "named", "description" => "\"named\"" ); |
9898 | $this->peg_c133 = "gray"; |
9899 | $this->peg_c134 = array( "type" => "literal", "value" => "gray", "description" => "\"gray\"" ); |
9900 | $this->peg_c135 = "rgb"; |
9901 | $this->peg_c136 = array( "type" => "literal", "value" => "rgb", "description" => "\"rgb\"" ); |
9902 | $this->peg_c137 = "RGB"; |
9903 | $this->peg_c138 = array( "type" => "literal", "value" => "RGB", "description" => "\"RGB\"" ); |
9904 | $this->peg_c139 = "cmyk"; |
9905 | $this->peg_c140 = array( "type" => "literal", "value" => "cmyk", "description" => "\"cmyk\"" ); |
9906 | $this->peg_c141 = ","; |
9907 | $this->peg_c142 = array( "type" => "literal", "value" => ",", "description" => "\",\"" ); |
9908 | $this->peg_c143 = "0"; |
9909 | $this->peg_c144 = array( "type" => "literal", "value" => "0", "description" => "\"0\"" ); |
9910 | $this->peg_c145 = "/^[1-9]/"; |
9911 | $this->peg_c146 = array( "type" => "class", "value" => "[1-9]", "description" => "[1-9]" ); |
9912 | $this->peg_c147 = "/^[01]/"; |
9913 | $this->peg_c148 = array( "type" => "class", "value" => "[01]", "description" => "[01]" ); |
9914 | $this->peg_c149 = "/^[+-.*']/"; |
9915 | $this->peg_c150 = array( "type" => "class", "value" => "[+-.*']", "description" => "[+-.*']" ); |
9916 | $this->peg_c151 = "="; |
9917 | $this->peg_c152 = array( "type" => "literal", "value" => "=", "description" => "\"=\"" ); |
9918 | $this->peg_c153 = "#"; |
9919 | $this->peg_c154 = array( "type" => "literal", "value" => "#", "description" => "\"#\"" ); |
9920 | $this->peg_c155 = "~--"; |
9921 | $this->peg_c156 = array( "type" => "literal", "value" => "~--", "description" => "\"~--\"" ); |
9922 | $this->peg_c157 = "~-"; |
9923 | $this->peg_c158 = array( "type" => "literal", "value" => "~-", "description" => "\"~-\"" ); |
9924 | $this->peg_c159 = "~="; |
9925 | $this->peg_c160 = array( "type" => "literal", "value" => "~=", "description" => "\"~=\"" ); |
9926 | $this->peg_c161 = "~"; |
9927 | $this->peg_c162 = array( "type" => "literal", "value" => "~", "description" => "\"~\"" ); |
9928 | $this->peg_c163 = "-~-"; |
9929 | $this->peg_c164 = array( "type" => "literal", "value" => "-~-", "description" => "\"-~-\"" ); |
9930 | $this->peg_c165 = "...."; |
9931 | $this->peg_c166 = array( "type" => "literal", "value" => "....", "description" => "\"....\"" ); |
9932 | $this->peg_c167 = "..."; |
9933 | $this->peg_c168 = array( "type" => "literal", "value" => "...", "description" => "\"...\"" ); |
9934 | $this->peg_c169 = "<-"; |
9935 | $this->peg_c170 = array( "type" => "literal", "value" => "<-", "description" => "\"<-\"" ); |
9936 | $this->peg_c171 = "->"; |
9937 | $this->peg_c172 = array( "type" => "literal", "value" => "->", "description" => "\"->\"" ); |
9938 | $this->peg_c173 = "1"; |
9939 | $this->peg_c174 = array( "type" => "literal", "value" => "1", "description" => "\"1\"" ); |
9940 | $this->peg_c175 = "2"; |
9941 | $this->peg_c176 = array( "type" => "literal", "value" => "2", "description" => "\"2\"" ); |
9942 | $this->peg_c177 = "3"; |
9943 | $this->peg_c178 = array( "type" => "literal", "value" => "3", "description" => "\"3\"" ); |
9944 | $this->peg_c179 = "{math}"; |
9945 | $this->peg_c180 = array( "type" => "literal", "value" => "{math}", "description" => "\"{math}\"" ); |
9946 | $this->peg_c181 = "\\}"; |
9947 | $this->peg_c182 = array( "type" => "literal", "value" => "\\}", "description" => "\"\\\\}\"" ); |
9948 | $this->peg_c183 = "/^[+-=#\\(\\).,;\\/*<>|@&'\\[\\]]/"; |
9949 | $this->peg_c184 = array( "type" => "class", "value" => "[+-=#().,;/*<>|@&'[]]", "description" => "[+-=#().,;/*<>|@&'[]]" ); |
9950 | |
9951 | $peg_startRuleFunctions = array( 'start' => array($this, "peg_parsestart") ); |
9952 | $peg_startRuleFunction = array($this, "peg_parsestart"); |
9953 | if (isset($options["startRule"])) { |
9954 | if (!(isset($peg_startRuleFunctions[$options["startRule"]]))) { |
9955 | throw new \Exception("Can't start parsing from rule \"" . $options["startRule"] . "\"."); |
9956 | } |
9957 | |
9958 | $peg_startRuleFunction = $peg_startRuleFunctions[$options["startRule"]]; |
9959 | } |
9960 | |
9961 | /* BEGIN initializer code */ |
9962 | |
9963 | $this->tu = TexUtil::getInstance(); |
9964 | |
9965 | # get reference of the options for usage in functions. |
9966 | |
9967 | |
9968 | # get reference of the options for usage in functions. |
9969 | $this->options = ParserUtil::createOptions($options); |
9970 | |
9971 | |
9972 | /* END initializer code */ |
9973 | |
9974 | $peg_result = call_user_func($peg_startRuleFunction); |
9975 | |
9976 | $this->peg_cache = array(); |
9977 | |
9978 | mb_regex_encoding($old_regex_encoding); |
9979 | |
9980 | if ($peg_result !== $this->peg_FAILED && $this->peg_currPos === $this->input_length) { |
9981 | $this->cleanup_state(); // Free up memory |
9982 | return $peg_result; |
9983 | } else { |
9984 | if ($peg_result !== $this->peg_FAILED && $this->peg_currPos < $this->input_length) { |
9985 | $this->peg_fail(array("type" => "end", "description" => "end of input" )); |
9986 | } |
9987 | |
9988 | $exception = $this->peg_buildException(null, $this->peg_maxFailExpected, $this->peg_maxFailPos); |
9989 | $this->cleanup_state(); // Free up memory |
9990 | throw $exception; |
9991 | } |
9992 | } |
9993 | |
9994 | }; |