Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
73.10% |
4432 / 6063 |
|
44.22% |
130 / 294 |
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.38% |
4432 / 6040 |
|
44.83% |
130 / 290 |
63765.19 | |
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 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
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 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_f35 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f36 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
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% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
peg_f50 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f51 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f52 | |
75.00% |
3 / 4 |
|
0.00% |
0 / 1 |
2.06 | |||
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 | |
66.67% |
2 / 3 |
|
0.00% |
0 / 1 |
2.15 | |||
peg_f57 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f58 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f59 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f60 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f61 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f62 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
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 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
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 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_f73 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_f74 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_f75 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f76 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_f77 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
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 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
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 | |
75.00% |
3 / 4 |
|
0.00% |
0 / 1 |
2.06 | |||
peg_f87 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f88 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f89 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
2 | |||
peg_f90 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
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 |
2 | |||
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 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f101 | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
6 | |||
peg_f102 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f103 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f104 | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
2 | |||
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 |
2 | |||
peg_f110 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f111 | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
6 | |||
peg_f112 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f113 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f114 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
2 | |||
peg_f115 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f116 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
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 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_f126 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_f127 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f128 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_f129 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f130 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
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% |
2 / 2 |
|
100.00% |
1 / 1 |
2 | |||
peg_f136 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
peg_f137 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
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 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
peg_f142 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
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 | |
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.61% |
537 / 620 |
|
0.00% |
0 / 1 |
217.89 | |||
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 | |
84.62% |
11 / 13 |
|
0.00% |
0 / 1 |
5.09 | |||
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 | |
55.56% |
20 / 36 |
|
0.00% |
0 / 1 |
24.64 | |||
peg_parseBOX | |
76.27% |
45 / 59 |
|
0.00% |
0 / 1 |
20.86 | |||
peg_parseLITERAL | |
84.41% |
287 / 340 |
|
0.00% |
0 / 1 |
130.91 | |||
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_parseNEXT_ROW | |
86.96% |
20 / 23 |
|
0.00% |
0 / 1 |
7.11 | |||
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.35% |
184 / 189 |
|
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\Curly; |
15 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\Declh; |
16 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\Dollar; |
17 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\DQ; |
18 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\FQ; |
19 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\Fun1; |
20 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\Fun1nb; |
21 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\Fun2; |
22 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\Fun2nb; |
23 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\Fun2sq; |
24 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\Fun4; |
25 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\Infix; |
26 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\Literal; |
27 | use MediaWiki\Extension\Math\WikiTexVC\Nodes\Lr; |
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 $peg_currPos = 0; |
92 | private $peg_reportedPos = 0; |
93 | private $peg_cachedPos = 0; |
94 | private $peg_cachedPosDetails = array('line' => 1, 'column' => 1, 'seenCR' => false ); |
95 | private $peg_maxFailPos = 0; |
96 | private $peg_maxFailExpected = array(); |
97 | private $peg_silentFails = 0; |
98 | private $input = array(); |
99 | private $input_length = 0; |
100 | public $peg_cache = array(); |
101 | |
102 | private function cleanup_state() { |
103 | $this->peg_currPos = 0; |
104 | $this->peg_reportedPos = 0; |
105 | $this->peg_cachedPos = 0; |
106 | $this->peg_cachedPosDetails = array('line' => 1, 'column' => 1, 'seenCR' => false ); |
107 | $this->peg_maxFailPos = 0; |
108 | $this->peg_maxFailExpected = array(); |
109 | $this->peg_silentFails = 0; |
110 | $this->input = array(); |
111 | $this->input_length = 0; |
112 | $this->peg_cache = array(); |
113 | } |
114 | |
115 | private function input_substr($start, $length) { |
116 | if ($length === 1 && $start < $this->input_length) { |
117 | return $this->input[$start]; |
118 | } |
119 | $substr = ''; |
120 | $max = min($start + $length, $this->input_length); |
121 | for ($i = $start; $i < $max; $i++) { |
122 | $substr .= $this->input[$i]; |
123 | } |
124 | return $substr; |
125 | } |
126 | |
127 | |
128 | private function text() { |
129 | return $this->input_substr($this->peg_reportedPos, $this->peg_currPos - $this->peg_reportedPos); |
130 | } |
131 | |
132 | private function offset() { |
133 | return $this->peg_reportedPos; |
134 | } |
135 | |
136 | private function line() { |
137 | $compute_pd = $this->peg_computePosDetails($this->peg_reportedPos); |
138 | return $compute_pd["line"]; |
139 | } |
140 | |
141 | private function column() { |
142 | $compute_pd = $this->peg_computePosDetails($this->peg_reportedPos); |
143 | return $compute_pd["column"]; |
144 | } |
145 | |
146 | private function expected($description) { |
147 | throw $this->peg_buildException( |
148 | null, |
149 | array(array("type" => "other", "description" => $description )), |
150 | $this->peg_reportedPos |
151 | ); |
152 | } |
153 | |
154 | private function error($message) { |
155 | throw $this->peg_buildException($message, null, $this->peg_reportedPos); |
156 | } |
157 | |
158 | private function peg_advancePos(&$details, $startPos, $endPos) { |
159 | for ($p = $startPos; $p < $endPos; $p++) { |
160 | $ch = $this->input_substr($p, 1); |
161 | if ($ch === "\n") { |
162 | if (!$details["seenCR"]) { $details["line"]++; } |
163 | $details["column"] = 1; |
164 | $details["seenCR"] = false; |
165 | } else if ($ch === "\r" || $ch === "\u2028" || $ch === "\u2029") { |
166 | $details["line"]++; |
167 | $details["column"] = 1; |
168 | $details["seenCR"] = true; |
169 | } else { |
170 | $details["column"]++; |
171 | $details["seenCR"] = false; |
172 | } |
173 | } |
174 | } |
175 | |
176 | private function peg_computePosDetails($pos) { |
177 | if ($this->peg_cachedPos !== $pos) { |
178 | if ($this->peg_cachedPos > $pos) { |
179 | $this->peg_cachedPos = 0; |
180 | $this->peg_cachedPosDetails = array( "line" => 1, "column" => 1, "seenCR" => false ); |
181 | } |
182 | $this->peg_advancePos($this->peg_cachedPosDetails, $this->peg_cachedPos, $pos); |
183 | $this->peg_cachedPos = $pos; |
184 | } |
185 | |
186 | return $this->peg_cachedPosDetails; |
187 | } |
188 | |
189 | private function peg_fail($expected) { |
190 | if ($this->peg_currPos < $this->peg_maxFailPos) { return; } |
191 | |
192 | if ($this->peg_currPos > $this->peg_maxFailPos) { |
193 | $this->peg_maxFailPos = $this->peg_currPos; |
194 | $this->peg_maxFailExpected = array(); |
195 | } |
196 | |
197 | $this->peg_maxFailExpected[] = $expected; |
198 | } |
199 | |
200 | private function peg_buildException_expectedComparator($a, $b) { |
201 | if ($a["description"] < $b["description"]) { |
202 | return -1; |
203 | } else if ($a["description"] > $b["description"]) { |
204 | return 1; |
205 | } else { |
206 | return 0; |
207 | } |
208 | } |
209 | |
210 | private function peg_buildException($message, $expected, $pos) { |
211 | $posDetails = $this->peg_computePosDetails($pos); |
212 | $found = $pos < $this->input_length ? $this->input[$pos] : null; |
213 | |
214 | if ($expected !== null) { |
215 | usort($expected, array($this, "peg_buildException_expectedComparator")); |
216 | $i = 1; |
217 | while ($i < count($expected)) { |
218 | if ($expected[$i - 1] === $expected[$i]) { |
219 | array_splice($expected, $i, 1); |
220 | } else { |
221 | $i++; |
222 | } |
223 | } |
224 | } |
225 | |
226 | if ($message === null) { |
227 | $expectedDescs = array_fill(0, count($expected), null); |
228 | |
229 | for ($i = 0; $i < count($expected); $i++) { |
230 | $expectedDescs[$i] = $expected[$i]["description"]; |
231 | } |
232 | |
233 | $expectedDesc = count($expected) > 1 |
234 | ? join(", ", array_slice($expectedDescs, 0, -1)) |
235 | . " or " |
236 | . $expectedDescs[count($expected) - 1] |
237 | : $expectedDescs[0]; |
238 | |
239 | $foundDesc = $found ? json_encode($found) : "end of input"; |
240 | |
241 | $message = "Expected " . $expectedDesc . " but " . $foundDesc . " found."; |
242 | } |
243 | |
244 | return new SyntaxError( |
245 | $message, |
246 | $expected, |
247 | $found, |
248 | $pos, |
249 | $posDetails["line"], |
250 | $posDetails["column"] |
251 | ); |
252 | } |
253 | |
254 | private $peg_FAILED; |
255 | private $peg_c0; |
256 | private $peg_c1; |
257 | private $peg_c2; |
258 | private $peg_c3; |
259 | private $peg_c4; |
260 | private $peg_c5; |
261 | private $peg_c6; |
262 | private $peg_c7; |
263 | private $peg_c8; |
264 | private $peg_c9; |
265 | private $peg_c10; |
266 | private $peg_c11; |
267 | private $peg_c12; |
268 | private $peg_c13; |
269 | private $peg_c14; |
270 | private $peg_c15; |
271 | private $peg_c16; |
272 | private $peg_c17; |
273 | private $peg_c18; |
274 | private $peg_c19; |
275 | private $peg_c20; |
276 | private $peg_c21; |
277 | private $peg_c22; |
278 | private $peg_c23; |
279 | private $peg_c24; |
280 | private $peg_c25; |
281 | private $peg_c26; |
282 | private $peg_c27; |
283 | private $peg_c28; |
284 | private $peg_c29; |
285 | private $peg_c30; |
286 | private $peg_c31; |
287 | private $peg_c32; |
288 | private $peg_c33; |
289 | private $peg_c34; |
290 | private $peg_c35; |
291 | private $peg_c36; |
292 | private $peg_c37; |
293 | private $peg_c38; |
294 | private $peg_c39; |
295 | private $peg_c40; |
296 | private $peg_c41; |
297 | private $peg_c42; |
298 | private $peg_c43; |
299 | private $peg_c44; |
300 | private $peg_c45; |
301 | private $peg_c46; |
302 | private $peg_c47; |
303 | private $peg_c48; |
304 | private $peg_c49; |
305 | private $peg_c50; |
306 | private $peg_c51; |
307 | private $peg_c52; |
308 | private $peg_c53; |
309 | private $peg_c54; |
310 | private $peg_c55; |
311 | private $peg_c56; |
312 | private $peg_c57; |
313 | private $peg_c58; |
314 | private $peg_c59; |
315 | private $peg_c60; |
316 | private $peg_c61; |
317 | private $peg_c62; |
318 | private $peg_c63; |
319 | private $peg_c64; |
320 | private $peg_c65; |
321 | private $peg_c66; |
322 | private $peg_c67; |
323 | private $peg_c68; |
324 | private $peg_c69; |
325 | private $peg_c70; |
326 | private $peg_c71; |
327 | private $peg_c72; |
328 | private $peg_c73; |
329 | private $peg_c74; |
330 | private $peg_c75; |
331 | private $peg_c76; |
332 | private $peg_c77; |
333 | private $peg_c78; |
334 | private $peg_c79; |
335 | private $peg_c80; |
336 | private $peg_c81; |
337 | private $peg_c82; |
338 | private $peg_c83; |
339 | private $peg_c84; |
340 | private $peg_c85; |
341 | private $peg_c86; |
342 | private $peg_c87; |
343 | private $peg_c88; |
344 | private $peg_c89; |
345 | private $peg_c90; |
346 | private $peg_c91; |
347 | private $peg_c92; |
348 | private $peg_c93; |
349 | private $peg_c94; |
350 | private $peg_c95; |
351 | private $peg_c96; |
352 | private $peg_c97; |
353 | private $peg_c98; |
354 | private $peg_c99; |
355 | private $peg_c100; |
356 | private $peg_c101; |
357 | private $peg_c102; |
358 | private $peg_c103; |
359 | private $peg_c104; |
360 | private $peg_c105; |
361 | private $peg_c106; |
362 | private $peg_c107; |
363 | private $peg_c108; |
364 | private $peg_c109; |
365 | private $peg_c110; |
366 | private $peg_c111; |
367 | private $peg_c112; |
368 | private $peg_c113; |
369 | private $peg_c114; |
370 | private $peg_c115; |
371 | private $peg_c116; |
372 | private $peg_c117; |
373 | private $peg_c118; |
374 | private $peg_c119; |
375 | private $peg_c120; |
376 | private $peg_c121; |
377 | private $peg_c122; |
378 | private $peg_c123; |
379 | private $peg_c124; |
380 | private $peg_c125; |
381 | private $peg_c126; |
382 | private $peg_c127; |
383 | private $peg_c128; |
384 | private $peg_c129; |
385 | private $peg_c130; |
386 | private $peg_c131; |
387 | private $peg_c132; |
388 | private $peg_c133; |
389 | private $peg_c134; |
390 | private $peg_c135; |
391 | private $peg_c136; |
392 | private $peg_c137; |
393 | private $peg_c138; |
394 | private $peg_c139; |
395 | private $peg_c140; |
396 | private $peg_c141; |
397 | private $peg_c142; |
398 | private $peg_c143; |
399 | private $peg_c144; |
400 | private $peg_c145; |
401 | private $peg_c146; |
402 | private $peg_c147; |
403 | private $peg_c148; |
404 | private $peg_c149; |
405 | private $peg_c150; |
406 | private $peg_c151; |
407 | private $peg_c152; |
408 | private $peg_c153; |
409 | private $peg_c154; |
410 | private $peg_c155; |
411 | private $peg_c156; |
412 | private $peg_c157; |
413 | private $peg_c158; |
414 | |
415 | private function peg_f0($t) { |
416 | # assert.ok($t instanceof TexArray); |
417 | assert($t instanceof TexArray); |
418 | return ParserUtil::lst2arr($t); |
419 | } |
420 | private function peg_f1($e) { return $e; } |
421 | private function peg_f2($e1, $name, $e2) { return new TexArray(new Infix($name, ParserUtil::lst2arr($e1), ParserUtil::lst2arr($e2))); } |
422 | private function peg_f3() { return new TexArray(); } |
423 | private function peg_f4($h, $t) { return new TexArray($h, $t); } |
424 | private function peg_f5($d, $e) { return new TexArray(new Declh($d->getFname(), ParserUtil::lst2arr($e))); } |
425 | private function peg_f6($l1, $l2) { return new FQ($l1->getBase(), $l1->getDown(), $l2); } |
426 | private function peg_f7($l1, $l2) { return new FQ($l1->getBase(), $l2, $l1->getUp()); } |
427 | private function peg_f8($base, $upi) { return new UQ($base, $upi); } |
428 | private function peg_f9($base, $downi) { return new DQ($base, $downi); } |
429 | private function peg_f10() { return new Literal( "]"); } |
430 | private function peg_f11($l, $e) { return new TexArray($l, $e); } |
431 | private function peg_f12($l1, $l2) { return new FQ ($l1->getBase(), $l2, $l1->getUp()); } |
432 | private function peg_f13($l1, $l2) { return new FQ(new TexArray(), $l1->getDown(), $l2); } |
433 | private function peg_f14($l) { return new UQ(new TexArray(),$l); } |
434 | private function peg_f15($l) { return new DQ(new TexArray(),$l); } |
435 | private function peg_f16($d) { return $d; } |
436 | private function peg_f17() { return "]"; } |
437 | private function peg_f18($r) { return new Literal($r); } |
438 | private function peg_f19($f) { return $this->tu->latex_function_names($f); } |
439 | private function peg_f20($f) { return " ";} |
440 | private function peg_f21($f, $c) { return new TexArray( new Literal( $f ) , new Literal( $c ) ) ; } |
441 | private function peg_f22($f) { return $this->tu->nullary_macro_aliase($f); } |
442 | private function peg_f23($f) { |
443 | $parser = new Parser(); |
444 | $ast = $parser->parse($this->tu->nullary_macro_aliase($f), $this->options); |
445 | assert($ast instanceof TexArray && count($ast->getArgs()) === 1); |
446 | return $ast->first(); |
447 | } |
448 | private function peg_f24($f) { return $this->tu->deprecated_nullary_macro_aliase($f); } |
449 | private function peg_f25($f) { |
450 | $parser = new Parser(); |
451 | $ast = $parser->parse($this->tu->deprecated_nullary_macro_aliase($f), $this->options); |
452 | assert($ast instanceof TexArray && count($ast->getArgs()) === 1); |
453 | if ($this->options['oldtexvc']){ |
454 | return $ast->first(); |
455 | } else { |
456 | throw new SyntaxError("Deprecation: Alias no longer supported.", [], $this->text(), $this->offset(), |
457 | $this->line(), $this->column()); |
458 | } |
459 | } |
460 | private function peg_f26($b, $r) { return new Big($b, $r); } |
461 | private function peg_f27($b) { return new Big($b, "]"); } |
462 | private function peg_f28($l, $e, $r) {return new Lr($l, $r, ParserUtil::lst2arr($e)); } |
463 | private function peg_f29($name, $e, $l) { return new Fun2sq($name, new Curly(ParserUtil::lst2arr($e)), $l); } |
464 | private function peg_f30($name, $l) { return new Fun1($name, $l); } |
465 | private function peg_f31($name, $l) {return new Fun1nb($name, $l); } |
466 | private function peg_f32($name, $l) { return new Mhchem($name, $l); } |
467 | private function peg_f33($name, $l1, $l2) { return new Fun2($name, $l1, $l2); } |
468 | private function peg_f34($name, $l1, $l2, $l3, $l4) { return new Fun4($name, $l1, $l2, $l3, $l4); } |
469 | private function peg_f35($name, $l1, $l2) { return new Fun2nb($name, $l1, $l2); } |
470 | private function peg_f36($e) { return new Curly(ParserUtil::lst2arr($e)); } |
471 | private function peg_f37($e1, $name, $e2) { return new Infix($name, ParserUtil::lst2arr($e1), ParserUtil::lst2arr($e2)); } |
472 | private function peg_f38($m) { return new Matrix("matrix", ParserUtil::lst2arr($m)); } |
473 | private function peg_f39($m) { return new Matrix("pmatrix", ParserUtil::lst2arr($m)); } |
474 | private function peg_f40($m) { return new Matrix("bmatrix", ParserUtil::lst2arr($m)); } |
475 | private function peg_f41($m) { return new Matrix("Bmatrix", ParserUtil::lst2arr($m)); } |
476 | private function peg_f42($m) { return new Matrix("vmatrix", ParserUtil::lst2arr($m)); } |
477 | private function peg_f43($m) { return new Matrix("Vmatrix", ParserUtil::lst2arr($m)); } |
478 | private function peg_f44($m) { return new Matrix("array", ParserUtil::lst2arr($m)); } |
479 | private function peg_f45($m) { return new Matrix("aligned", ParserUtil::lst2arr($m)); } |
480 | private function peg_f46($m) { return new Matrix("alignedat", ParserUtil::lst2arr($m)); } |
481 | private function peg_f47($m) { return new Matrix("smallmatrix", ParserUtil::lst2arr($m)); } |
482 | private function peg_f48($m) { return new Matrix("cases", ParserUtil::lst2arr($m)); } |
483 | private function peg_f49() { throw new SyntaxError("Illegal TeX function", [], $this->text(), $this->offset(), |
484 | $this->line(), $this->column()); } |
485 | private function peg_f50($f) { return !$this->tu->getAllFunctionsAt($f); } |
486 | private function peg_f51($f) { throw new SyntaxError("Illegal TeX function", [], $f, $this->offset(), $this->line(), $this->column()); } |
487 | private function peg_f52($cs, $m) { |
488 | if ($m->getLength() ) { |
489 | $m->first()->first()->unshift($cs); |
490 | return $m; |
491 | } |
492 | return new TexArray(new TexArray($cs)); |
493 | } |
494 | private function peg_f53($as, $m) { $m->first()->first()->unshift($as); return $m; } |
495 | private function peg_f54($l, $m) { return $m; } |
496 | private function peg_f55($l, $tail) { return new TexArray( ParserUtil::lst2arr($l), $tail ); } |
497 | private function peg_f56($f, $l) { |
498 | if ($l->first() === null ) { |
499 | $l->push(new TexArray()); |
500 | } |
501 | $l->first()->unshift(new Literal($f . " ")); return $l;} |
502 | private function peg_f57($e, $l) { return $l; } |
503 | private function peg_f58($e, $tail) { return new TexArray($e, $tail); } |
504 | private function peg_f59() { return $this->text(); } |
505 | private function peg_f60($cs) { return new Curly(new TexArray(new Literal($cs))); } |
506 | private function peg_f61($num) { return new Curly(new TexArray(new Literal($num))); } |
507 | private function peg_f62($p, $s) { return new TexArray($p,new TexArray(new Literal(" "),$s)); } |
508 | private function peg_f63($p) { return new TexArray($p,new TexArray()); } |
509 | private function peg_f64($m) { return new Literal($m); } |
510 | private function peg_f65($m, $n) { return new ChemWord($m, new Literal($n)); } |
511 | private function peg_f66($m) { return $m; } |
512 | private function peg_f67($m, $n) { return new ChemWord($m, $n); } |
513 | private function peg_f68($m, $n, $o) { return new ChemWord(new ChemWord(new Literal($m), $n), $o); } |
514 | private function peg_f69() { return new Literal(""); } |
515 | private function peg_f70($m) { return $m;} |
516 | private function peg_f71($c) { return new Literal($c); } |
517 | private function peg_f72($c) { return new Curly(new TexArray($c)); } |
518 | private function peg_f73($c) { return new Dollar(ParserUtil::lst2arr($c)); } |
519 | private function peg_f74($e) { return new Curly(new TexArray(new Literal($e))); } |
520 | private function peg_f75($a, $b) { return new ChemWord(new Literal($a), new Literal($b)); } |
521 | private function peg_f76($a, $b) { return new ChemWord(new Literal($a), $b); } |
522 | private function peg_f77($a, $b) { return new ChemWord(new Literal($a), new Dollar(ParserUtil::lst2arr($b))); } |
523 | private function peg_f78($name, $l1, $l2) { return new ChemFun2u($name, $l1, $l2); } |
524 | private function peg_f79($cs) { return new Literal(join('',$cs)); } |
525 | private function peg_f80($name) { return new Literal(join('',$name)); } |
526 | private function peg_f81($l, $h) { return $this->text(); } |
527 | private function peg_f82($b) { return $this->tu->box_functions($b); } |
528 | private function peg_f83($b, $cs) { return new Box($b, join('', $cs)); } |
529 | private function peg_f84($c) { return $c; } |
530 | private function peg_f85($f) { return $this->tu->mediawiki_function_names($f); } |
531 | private function peg_f86($f, $c) { |
532 | if(is_array($f)) { |
533 | // This is an unexpected case, but covers the ambiguity of slice in javascript. |
534 | $fProcessed = implode(array_slice($f, 1)); |
535 | } else { |
536 | $fProcessed = substr($f,1); |
537 | } |
538 | return "\\operatorname {" . $fProcessed . "}" . $c; |
539 | } |
540 | private function peg_f87($f) { return $this->tu->nullary_macro($f); } |
541 | private function peg_f88($f) { return $f . " "; } |
542 | private function peg_f89($f) { return $this->options['usemathrm'] && $this->tu->nullary_macro_in_mbox($f); } |
543 | private function peg_f90($f) { return "\\mathrm {" . $f . "} "; } |
544 | private function peg_f91($mathrm) { return $this->options['usemathrm'] && $mathrm === "\\mathrm"; } |
545 | private function peg_f92($mathrm, $f) { return $this->options['usemathrm'] && $this->tu->nullary_macro_in_mbox($f); } |
546 | private function peg_f93($mathrm, $f) { return $this->options['usemathrm'] ? "\\mathrm {" . $f . "} " : false;} |
547 | private function peg_f94($f) { return $this->tu->nullary_macro_in_mbox($f); } |
548 | private function peg_f95($f) { return "\\mbox{" . $f . "} "; } |
549 | private function peg_f96($mbox) { return $mbox === "\\mbox"; } |
550 | private function peg_f97($mbox, $f) { return $this->tu->nullary_macro_in_mbox($f); } |
551 | private function peg_f98($mbox, $f) { return "\\mbox{" . $f . "} "; } |
552 | private function peg_f99($f) { return $f; } |
553 | private function peg_f100($c) { return "\\" . $c; } |
554 | private function peg_f101($c) { if($this->options['oldtexvc']) { |
555 | return "\\" . $c; /* escape dangerous chars */ |
556 | } else { |
557 | throw new SyntaxError("Deprecation: % and $ need to be escaped.", [], $this->text(), $this->offset(), |
558 | $this->line(), $this->column()); |
559 | }} |
560 | private function peg_f102($f) { return $this->tu->other_delimiters1($f); } |
561 | private function peg_f103($f) { return $this->tu->other_delimiters2($f); } |
562 | private function peg_f104($f) { |
563 | $parser = new Parser(); |
564 | $p = $parser->parse($this->tu->other_delimiters2($f), $this->options); |
565 | # assert.ok(p instanceof TexArray && p.length === 1); |
566 | assert($p instanceof TexArray && count($p->getArgs()) === 1); |
567 | |
568 | # assert.ok(p.first() instanceof Literal); |
569 | assert($p->first() instanceof Literal); |
570 | |
571 | return $p->first()->getArg(); |
572 | } |
573 | private function peg_f105($f) { return $this->tu->fun_ar1nb($f); } |
574 | private function peg_f106($f) { return $this->tu->fun_ar1opt($f); } |
575 | private function peg_f107($f) { return $this->tu->big_literals($f); } |
576 | private function peg_f108($f) { return $this->tu->fun_ar1($f); } |
577 | private function peg_f109($f) { return $this->options['oldmhchem'] && $this->tu->fun_mhchem($f);} |
578 | private function peg_f110($f) { return $this->tu->other_fun_ar1($f); } |
579 | private function peg_f111($f) { if ($this->options['oldtexvc']) { |
580 | return $this->tu->other_fun_ar1($f); |
581 | } else { |
582 | throw new SyntaxError("Deprecation: \\Bbb and \\bold are not allowed in math mode.", [], |
583 | $this->text(), $this->offset(), $this->line(),$this->column()); |
584 | } |
585 | } |
586 | private function peg_f112($f) { return $this->tu->fun_mhchem($f); } |
587 | private function peg_f113($f) { return $this->tu->fun_ar2($f); } |
588 | private function peg_f114($f) { return $this->tu->fun_ar4($f) && $this->tu->mhchemtexified_required($f); } |
589 | private function peg_f115($f) { return $this->tu->fun_infix($f); } |
590 | private function peg_f116($f) { return $this->tu->declh_function($f); } |
591 | private function peg_f117($f) { return new Declh($f, new TexArray()); } |
592 | private function peg_f118($f) { return $this->tu->fun_ar2nb($f); } |
593 | private function peg_f119($f) { return $this->tu->left_function($f); } |
594 | private function peg_f120($f) { return $this->tu->right_function($f); } |
595 | private function peg_f121($f) { return $this->tu->hline_function($f); } |
596 | private function peg_f122($f) { return $this->tu->color_function($f); } |
597 | private function peg_f123($f, $cs) { return $f . " " . $cs; } |
598 | private function peg_f124($f) { return $this->tu->definecolor_function($f); } |
599 | private function peg_f125($f, $name, $cs) { return "{named}" . $cs; } |
600 | private function peg_f126($f, $name, $cs) { return "{gray}" . $cs; } |
601 | private function peg_f127($f, $name, $cs) { return "{rgb}" . $cs; } |
602 | private function peg_f128($f, $name, $cs) { return "{cmyk}" . $cs; } |
603 | private function peg_f129($f, $name, $a) { return $f . " {" . join('',$name) . "}" . $a; } |
604 | private function peg_f130($cs) { return "[named]" . $cs; } |
605 | private function peg_f131($cs) { return "[gray]" . $cs; } |
606 | private function peg_f132($cs) { return "[rgb]" . $cs; } |
607 | private function peg_f133($cs) { return "[cmyk]" . $cs; } |
608 | private function peg_f134($name) { return "{" . join('', $name) . "}"; } |
609 | private function peg_f135($k) { $s = is_array($k) ? $k[0] : $k; |
610 | return "{" . $s . "}";} |
611 | private function peg_f136($r, $g, $b) { return "{" . $r . "," . $g . "," . $b . "}"; } |
612 | private function peg_f137($c, $m, $y, $k) { return "{" . $c . "," . $m . "," . $y . "," . $k . "}"; } |
613 | private function peg_f138($n) { return intval($n, 10) <= 255; } |
614 | private function peg_f139($n) { return $n / 255; } |
615 | private function peg_f140($n) { return $n; } |
616 | private function peg_f141($f) { return $this->tu->mhchem_single_macro($f); } |
617 | private function peg_f142($f) { return $this->tu->mhchem_bond($f); } |
618 | private function peg_f143($f) { return $this->tu->mhchem_macro_1p($f); } |
619 | private function peg_f144($f) { return $this->tu->mhchem_macro_2p($f); } |
620 | private function peg_f145($f) { return $this->tu->mhchem_macro_2pu($f); } |
621 | private function peg_f146($f) { return $this->tu->mhchem_macro_2pc($f); } |
622 | private function peg_f147() { return "{}"; } |
623 | private function peg_f148() { return false; } |
624 | private function peg_f149() { return $this->peg_currPos === $this->input_length; } |
625 | |
626 | private function peg_parsestart() { |
627 | |
628 | $key = $this->peg_currPos * 126 + 0; |
629 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
630 | |
631 | if ($cached) { |
632 | $this->peg_currPos = $cached["nextPos"]; |
633 | return $cached["result"]; |
634 | } |
635 | |
636 | $s0 = $this->peg_currPos; |
637 | $s1 = $this->peg_parse_(); |
638 | if ($s1 !== $this->peg_FAILED) { |
639 | $s2 = $this->peg_parsetex_expr(); |
640 | if ($s2 !== $this->peg_FAILED) { |
641 | $this->peg_reportedPos = $s0; |
642 | $s1 = $this->peg_f0($s2); |
643 | $s0 = $s1; |
644 | } else { |
645 | $this->peg_currPos = $s0; |
646 | $s0 = $this->peg_FAILED; |
647 | } |
648 | } else { |
649 | $this->peg_currPos = $s0; |
650 | $s0 = $this->peg_FAILED; |
651 | } |
652 | |
653 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
654 | |
655 | return $s0; |
656 | } |
657 | |
658 | private function peg_parse_() { |
659 | |
660 | $key = $this->peg_currPos * 126 + 1; |
661 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
662 | |
663 | if ($cached) { |
664 | $this->peg_currPos = $cached["nextPos"]; |
665 | return $cached["result"]; |
666 | } |
667 | |
668 | $s0 = array(); |
669 | if (peg_regex_test($this->peg_c0, $this->input_substr($this->peg_currPos, 1))) { |
670 | $s1 = $this->input_substr($this->peg_currPos, 1); |
671 | $this->peg_currPos++; |
672 | } else { |
673 | $s1 = $this->peg_FAILED; |
674 | if ($this->peg_silentFails === 0) { |
675 | $this->peg_fail($this->peg_c1); |
676 | } |
677 | } |
678 | while ($s1 !== $this->peg_FAILED) { |
679 | $s0[] = $s1; |
680 | if (peg_regex_test($this->peg_c0, $this->input_substr($this->peg_currPos, 1))) { |
681 | $s1 = $this->input_substr($this->peg_currPos, 1); |
682 | $this->peg_currPos++; |
683 | } else { |
684 | $s1 = $this->peg_FAILED; |
685 | if ($this->peg_silentFails === 0) { |
686 | $this->peg_fail($this->peg_c1); |
687 | } |
688 | } |
689 | } |
690 | |
691 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
692 | |
693 | return $s0; |
694 | } |
695 | |
696 | private function peg_parsetex_expr() { |
697 | |
698 | $key = $this->peg_currPos * 126 + 2; |
699 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
700 | |
701 | if ($cached) { |
702 | $this->peg_currPos = $cached["nextPos"]; |
703 | return $cached["result"]; |
704 | } |
705 | |
706 | $s0 = $this->peg_currPos; |
707 | $s1 = $this->peg_parseexpr(); |
708 | if ($s1 !== $this->peg_FAILED) { |
709 | $s2 = $this->peg_parseEOF(); |
710 | if ($s2 !== $this->peg_FAILED) { |
711 | $this->peg_reportedPos = $s0; |
712 | $s1 = $this->peg_f1($s1); |
713 | $s0 = $s1; |
714 | } else { |
715 | $this->peg_currPos = $s0; |
716 | $s0 = $this->peg_FAILED; |
717 | } |
718 | } else { |
719 | $this->peg_currPos = $s0; |
720 | $s0 = $this->peg_FAILED; |
721 | } |
722 | if ($s0 === $this->peg_FAILED) { |
723 | $s0 = $this->peg_currPos; |
724 | $s1 = $this->peg_parsene_expr(); |
725 | if ($s1 !== $this->peg_FAILED) { |
726 | $s2 = $this->peg_parseFUN_INFIX(); |
727 | if ($s2 !== $this->peg_FAILED) { |
728 | $s3 = $this->peg_parsene_expr(); |
729 | if ($s3 !== $this->peg_FAILED) { |
730 | $s4 = $this->peg_parseEOF(); |
731 | if ($s4 !== $this->peg_FAILED) { |
732 | $this->peg_reportedPos = $s0; |
733 | $s1 = $this->peg_f2($s1, $s2, $s3); |
734 | $s0 = $s1; |
735 | } else { |
736 | $this->peg_currPos = $s0; |
737 | $s0 = $this->peg_FAILED; |
738 | } |
739 | } else { |
740 | $this->peg_currPos = $s0; |
741 | $s0 = $this->peg_FAILED; |
742 | } |
743 | } else { |
744 | $this->peg_currPos = $s0; |
745 | $s0 = $this->peg_FAILED; |
746 | } |
747 | } else { |
748 | $this->peg_currPos = $s0; |
749 | $s0 = $this->peg_FAILED; |
750 | } |
751 | } |
752 | |
753 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
754 | |
755 | return $s0; |
756 | } |
757 | |
758 | private function peg_parseexpr() { |
759 | |
760 | $key = $this->peg_currPos * 126 + 3; |
761 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
762 | |
763 | if ($cached) { |
764 | $this->peg_currPos = $cached["nextPos"]; |
765 | return $cached["result"]; |
766 | } |
767 | |
768 | $s0 = $this->peg_parsene_expr(); |
769 | if ($s0 === $this->peg_FAILED) { |
770 | $s0 = $this->peg_currPos; |
771 | $s1 = $this->peg_c2; |
772 | if ($s1 !== $this->peg_FAILED) { |
773 | $this->peg_reportedPos = $s0; |
774 | $s1 = $this->peg_f3(); |
775 | } |
776 | $s0 = $s1; |
777 | } |
778 | |
779 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
780 | |
781 | return $s0; |
782 | } |
783 | |
784 | private function peg_parsene_expr() { |
785 | |
786 | $key = $this->peg_currPos * 126 + 4; |
787 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
788 | |
789 | if ($cached) { |
790 | $this->peg_currPos = $cached["nextPos"]; |
791 | return $cached["result"]; |
792 | } |
793 | |
794 | $s0 = $this->peg_currPos; |
795 | $s1 = $this->peg_parselit_aq(); |
796 | if ($s1 !== $this->peg_FAILED) { |
797 | $s2 = $this->peg_parseexpr(); |
798 | if ($s2 !== $this->peg_FAILED) { |
799 | $this->peg_reportedPos = $s0; |
800 | $s1 = $this->peg_f4($s1, $s2); |
801 | $s0 = $s1; |
802 | } else { |
803 | $this->peg_currPos = $s0; |
804 | $s0 = $this->peg_FAILED; |
805 | } |
806 | } else { |
807 | $this->peg_currPos = $s0; |
808 | $s0 = $this->peg_FAILED; |
809 | } |
810 | if ($s0 === $this->peg_FAILED) { |
811 | $s0 = $this->peg_currPos; |
812 | $s1 = $this->peg_parselitsq_aq(); |
813 | if ($s1 !== $this->peg_FAILED) { |
814 | $s2 = $this->peg_parseexpr(); |
815 | if ($s2 !== $this->peg_FAILED) { |
816 | $this->peg_reportedPos = $s0; |
817 | $s1 = $this->peg_f4($s1, $s2); |
818 | $s0 = $s1; |
819 | } else { |
820 | $this->peg_currPos = $s0; |
821 | $s0 = $this->peg_FAILED; |
822 | } |
823 | } else { |
824 | $this->peg_currPos = $s0; |
825 | $s0 = $this->peg_FAILED; |
826 | } |
827 | if ($s0 === $this->peg_FAILED) { |
828 | $s0 = $this->peg_currPos; |
829 | $s1 = $this->peg_parseDECLh(); |
830 | if ($s1 !== $this->peg_FAILED) { |
831 | $s2 = $this->peg_parseexpr(); |
832 | if ($s2 !== $this->peg_FAILED) { |
833 | $this->peg_reportedPos = $s0; |
834 | $s1 = $this->peg_f5($s1, $s2); |
835 | $s0 = $s1; |
836 | } else { |
837 | $this->peg_currPos = $s0; |
838 | $s0 = $this->peg_FAILED; |
839 | } |
840 | } else { |
841 | $this->peg_currPos = $s0; |
842 | $s0 = $this->peg_FAILED; |
843 | } |
844 | } |
845 | } |
846 | |
847 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
848 | |
849 | return $s0; |
850 | } |
851 | |
852 | private function peg_parselitsq_aq() { |
853 | |
854 | $key = $this->peg_currPos * 126 + 5; |
855 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
856 | |
857 | if ($cached) { |
858 | $this->peg_currPos = $cached["nextPos"]; |
859 | return $cached["result"]; |
860 | } |
861 | |
862 | $s0 = $this->peg_parselitsq_fq(); |
863 | if ($s0 === $this->peg_FAILED) { |
864 | $s0 = $this->peg_parselitsq_dq(); |
865 | if ($s0 === $this->peg_FAILED) { |
866 | $s0 = $this->peg_parselitsq_uq(); |
867 | if ($s0 === $this->peg_FAILED) { |
868 | $s0 = $this->peg_parselitsq_zq(); |
869 | } |
870 | } |
871 | } |
872 | |
873 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
874 | |
875 | return $s0; |
876 | } |
877 | |
878 | private function peg_parselitsq_fq() { |
879 | |
880 | $key = $this->peg_currPos * 126 + 6; |
881 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
882 | |
883 | if ($cached) { |
884 | $this->peg_currPos = $cached["nextPos"]; |
885 | return $cached["result"]; |
886 | } |
887 | |
888 | $s0 = $this->peg_currPos; |
889 | $s1 = $this->peg_parselitsq_dq(); |
890 | if ($s1 !== $this->peg_FAILED) { |
891 | $s2 = $this->peg_parseSUP(); |
892 | if ($s2 !== $this->peg_FAILED) { |
893 | $s3 = $this->peg_parselit(); |
894 | if ($s3 !== $this->peg_FAILED) { |
895 | $this->peg_reportedPos = $s0; |
896 | $s1 = $this->peg_f6($s1, $s3); |
897 | $s0 = $s1; |
898 | } else { |
899 | $this->peg_currPos = $s0; |
900 | $s0 = $this->peg_FAILED; |
901 | } |
902 | } else { |
903 | $this->peg_currPos = $s0; |
904 | $s0 = $this->peg_FAILED; |
905 | } |
906 | } else { |
907 | $this->peg_currPos = $s0; |
908 | $s0 = $this->peg_FAILED; |
909 | } |
910 | if ($s0 === $this->peg_FAILED) { |
911 | $s0 = $this->peg_currPos; |
912 | $s1 = $this->peg_parselitsq_uq(); |
913 | if ($s1 !== $this->peg_FAILED) { |
914 | $s2 = $this->peg_parseSUB(); |
915 | if ($s2 !== $this->peg_FAILED) { |
916 | $s3 = $this->peg_parselit(); |
917 | if ($s3 !== $this->peg_FAILED) { |
918 | $this->peg_reportedPos = $s0; |
919 | $s1 = $this->peg_f7($s1, $s3); |
920 | $s0 = $s1; |
921 | } else { |
922 | $this->peg_currPos = $s0; |
923 | $s0 = $this->peg_FAILED; |
924 | } |
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 | } |
934 | |
935 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
936 | |
937 | return $s0; |
938 | } |
939 | |
940 | private function peg_parselitsq_uq() { |
941 | |
942 | $key = $this->peg_currPos * 126 + 7; |
943 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
944 | |
945 | if ($cached) { |
946 | $this->peg_currPos = $cached["nextPos"]; |
947 | return $cached["result"]; |
948 | } |
949 | |
950 | $s0 = $this->peg_currPos; |
951 | $s1 = $this->peg_parselitsq_zq(); |
952 | if ($s1 !== $this->peg_FAILED) { |
953 | $s2 = $this->peg_parseSUP(); |
954 | if ($s2 !== $this->peg_FAILED) { |
955 | $s3 = $this->peg_parselit(); |
956 | if ($s3 !== $this->peg_FAILED) { |
957 | $this->peg_reportedPos = $s0; |
958 | $s1 = $this->peg_f8($s1, $s3); |
959 | $s0 = $s1; |
960 | } else { |
961 | $this->peg_currPos = $s0; |
962 | $s0 = $this->peg_FAILED; |
963 | } |
964 | } else { |
965 | $this->peg_currPos = $s0; |
966 | $s0 = $this->peg_FAILED; |
967 | } |
968 | } else { |
969 | $this->peg_currPos = $s0; |
970 | $s0 = $this->peg_FAILED; |
971 | } |
972 | |
973 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
974 | |
975 | return $s0; |
976 | } |
977 | |
978 | private function peg_parselitsq_dq() { |
979 | |
980 | $key = $this->peg_currPos * 126 + 8; |
981 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
982 | |
983 | if ($cached) { |
984 | $this->peg_currPos = $cached["nextPos"]; |
985 | return $cached["result"]; |
986 | } |
987 | |
988 | $s0 = $this->peg_currPos; |
989 | $s1 = $this->peg_parselitsq_zq(); |
990 | if ($s1 !== $this->peg_FAILED) { |
991 | $s2 = $this->peg_parseSUB(); |
992 | if ($s2 !== $this->peg_FAILED) { |
993 | $s3 = $this->peg_parselit(); |
994 | if ($s3 !== $this->peg_FAILED) { |
995 | $this->peg_reportedPos = $s0; |
996 | $s1 = $this->peg_f9($s1, $s3); |
997 | $s0 = $s1; |
998 | } else { |
999 | $this->peg_currPos = $s0; |
1000 | $s0 = $this->peg_FAILED; |
1001 | } |
1002 | } else { |
1003 | $this->peg_currPos = $s0; |
1004 | $s0 = $this->peg_FAILED; |
1005 | } |
1006 | } else { |
1007 | $this->peg_currPos = $s0; |
1008 | $s0 = $this->peg_FAILED; |
1009 | } |
1010 | |
1011 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
1012 | |
1013 | return $s0; |
1014 | } |
1015 | |
1016 | private function peg_parselitsq_zq() { |
1017 | |
1018 | $key = $this->peg_currPos * 126 + 9; |
1019 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
1020 | |
1021 | if ($cached) { |
1022 | $this->peg_currPos = $cached["nextPos"]; |
1023 | return $cached["result"]; |
1024 | } |
1025 | |
1026 | $s0 = $this->peg_currPos; |
1027 | $s1 = $this->peg_parseSQ_CLOSE(); |
1028 | if ($s1 !== $this->peg_FAILED) { |
1029 | $this->peg_reportedPos = $s0; |
1030 | $s1 = $this->peg_f10(); |
1031 | } |
1032 | $s0 = $s1; |
1033 | |
1034 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
1035 | |
1036 | return $s0; |
1037 | } |
1038 | |
1039 | private function peg_parseexpr_nosqc() { |
1040 | |
1041 | $key = $this->peg_currPos * 126 + 10; |
1042 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
1043 | |
1044 | if ($cached) { |
1045 | $this->peg_currPos = $cached["nextPos"]; |
1046 | return $cached["result"]; |
1047 | } |
1048 | |
1049 | $s0 = $this->peg_currPos; |
1050 | $s1 = $this->peg_parselit_aq(); |
1051 | if ($s1 !== $this->peg_FAILED) { |
1052 | $s2 = $this->peg_parseexpr_nosqc(); |
1053 | if ($s2 !== $this->peg_FAILED) { |
1054 | $this->peg_reportedPos = $s0; |
1055 | $s1 = $this->peg_f11($s1, $s2); |
1056 | $s0 = $s1; |
1057 | } else { |
1058 | $this->peg_currPos = $s0; |
1059 | $s0 = $this->peg_FAILED; |
1060 | } |
1061 | } else { |
1062 | $this->peg_currPos = $s0; |
1063 | $s0 = $this->peg_FAILED; |
1064 | } |
1065 | if ($s0 === $this->peg_FAILED) { |
1066 | $s0 = $this->peg_currPos; |
1067 | $s1 = $this->peg_c2; |
1068 | if ($s1 !== $this->peg_FAILED) { |
1069 | $this->peg_reportedPos = $s0; |
1070 | $s1 = $this->peg_f3(); |
1071 | } |
1072 | $s0 = $s1; |
1073 | } |
1074 | |
1075 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
1076 | |
1077 | return $s0; |
1078 | } |
1079 | |
1080 | private function peg_parselit_aq() { |
1081 | |
1082 | $key = $this->peg_currPos * 126 + 11; |
1083 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
1084 | |
1085 | if ($cached) { |
1086 | $this->peg_currPos = $cached["nextPos"]; |
1087 | return $cached["result"]; |
1088 | } |
1089 | |
1090 | $s0 = $this->peg_parselit_fq(); |
1091 | if ($s0 === $this->peg_FAILED) { |
1092 | $s0 = $this->peg_parselit_dq(); |
1093 | if ($s0 === $this->peg_FAILED) { |
1094 | $s0 = $this->peg_parselit_uq(); |
1095 | if ($s0 === $this->peg_FAILED) { |
1096 | $s0 = $this->peg_parselit_dqn(); |
1097 | if ($s0 === $this->peg_FAILED) { |
1098 | $s0 = $this->peg_parselit_uqn(); |
1099 | if ($s0 === $this->peg_FAILED) { |
1100 | $s0 = $this->peg_parselit(); |
1101 | } |
1102 | } |
1103 | } |
1104 | } |
1105 | } |
1106 | |
1107 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
1108 | |
1109 | return $s0; |
1110 | } |
1111 | |
1112 | private function peg_parselit_fq() { |
1113 | |
1114 | $key = $this->peg_currPos * 126 + 12; |
1115 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
1116 | |
1117 | if ($cached) { |
1118 | $this->peg_currPos = $cached["nextPos"]; |
1119 | return $cached["result"]; |
1120 | } |
1121 | |
1122 | $s0 = $this->peg_currPos; |
1123 | $s1 = $this->peg_parselit_dq(); |
1124 | if ($s1 !== $this->peg_FAILED) { |
1125 | $s2 = $this->peg_parseSUP(); |
1126 | if ($s2 !== $this->peg_FAILED) { |
1127 | $s3 = $this->peg_parselit(); |
1128 | if ($s3 !== $this->peg_FAILED) { |
1129 | $this->peg_reportedPos = $s0; |
1130 | $s1 = $this->peg_f6($s1, $s3); |
1131 | $s0 = $s1; |
1132 | } else { |
1133 | $this->peg_currPos = $s0; |
1134 | $s0 = $this->peg_FAILED; |
1135 | } |
1136 | } else { |
1137 | $this->peg_currPos = $s0; |
1138 | $s0 = $this->peg_FAILED; |
1139 | } |
1140 | } else { |
1141 | $this->peg_currPos = $s0; |
1142 | $s0 = $this->peg_FAILED; |
1143 | } |
1144 | if ($s0 === $this->peg_FAILED) { |
1145 | $s0 = $this->peg_currPos; |
1146 | $s1 = $this->peg_parselit_uq(); |
1147 | if ($s1 !== $this->peg_FAILED) { |
1148 | $s2 = $this->peg_parseSUB(); |
1149 | if ($s2 !== $this->peg_FAILED) { |
1150 | $s3 = $this->peg_parselit(); |
1151 | if ($s3 !== $this->peg_FAILED) { |
1152 | $this->peg_reportedPos = $s0; |
1153 | $s1 = $this->peg_f12($s1, $s3); |
1154 | $s0 = $s1; |
1155 | } else { |
1156 | $this->peg_currPos = $s0; |
1157 | $s0 = $this->peg_FAILED; |
1158 | } |
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 | if ($s0 === $this->peg_FAILED) { |
1168 | $s0 = $this->peg_currPos; |
1169 | $s1 = $this->peg_parselit_dqn(); |
1170 | if ($s1 !== $this->peg_FAILED) { |
1171 | $s2 = $this->peg_parseSUP(); |
1172 | if ($s2 !== $this->peg_FAILED) { |
1173 | $s3 = $this->peg_parselit(); |
1174 | if ($s3 !== $this->peg_FAILED) { |
1175 | $this->peg_reportedPos = $s0; |
1176 | $s1 = $this->peg_f13($s1, $s3); |
1177 | $s0 = $s1; |
1178 | } else { |
1179 | $this->peg_currPos = $s0; |
1180 | $s0 = $this->peg_FAILED; |
1181 | } |
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 | } |
1191 | } |
1192 | |
1193 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
1194 | |
1195 | return $s0; |
1196 | } |
1197 | |
1198 | private function peg_parselit_uq() { |
1199 | |
1200 | $key = $this->peg_currPos * 126 + 13; |
1201 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
1202 | |
1203 | if ($cached) { |
1204 | $this->peg_currPos = $cached["nextPos"]; |
1205 | return $cached["result"]; |
1206 | } |
1207 | |
1208 | $s0 = $this->peg_currPos; |
1209 | $s1 = $this->peg_parselit(); |
1210 | if ($s1 !== $this->peg_FAILED) { |
1211 | $s2 = $this->peg_parseSUP(); |
1212 | if ($s2 !== $this->peg_FAILED) { |
1213 | $s3 = $this->peg_parselit(); |
1214 | if ($s3 !== $this->peg_FAILED) { |
1215 | $this->peg_reportedPos = $s0; |
1216 | $s1 = $this->peg_f8($s1, $s3); |
1217 | $s0 = $s1; |
1218 | } else { |
1219 | $this->peg_currPos = $s0; |
1220 | $s0 = $this->peg_FAILED; |
1221 | } |
1222 | } else { |
1223 | $this->peg_currPos = $s0; |
1224 | $s0 = $this->peg_FAILED; |
1225 | } |
1226 | } else { |
1227 | $this->peg_currPos = $s0; |
1228 | $s0 = $this->peg_FAILED; |
1229 | } |
1230 | |
1231 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
1232 | |
1233 | return $s0; |
1234 | } |
1235 | |
1236 | private function peg_parselit_dq() { |
1237 | |
1238 | $key = $this->peg_currPos * 126 + 14; |
1239 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
1240 | |
1241 | if ($cached) { |
1242 | $this->peg_currPos = $cached["nextPos"]; |
1243 | return $cached["result"]; |
1244 | } |
1245 | |
1246 | $s0 = $this->peg_currPos; |
1247 | $s1 = $this->peg_parselit(); |
1248 | if ($s1 !== $this->peg_FAILED) { |
1249 | $s2 = $this->peg_parseSUB(); |
1250 | if ($s2 !== $this->peg_FAILED) { |
1251 | $s3 = $this->peg_parselit(); |
1252 | if ($s3 !== $this->peg_FAILED) { |
1253 | $this->peg_reportedPos = $s0; |
1254 | $s1 = $this->peg_f9($s1, $s3); |
1255 | $s0 = $s1; |
1256 | } else { |
1257 | $this->peg_currPos = $s0; |
1258 | $s0 = $this->peg_FAILED; |
1259 | } |
1260 | } else { |
1261 | $this->peg_currPos = $s0; |
1262 | $s0 = $this->peg_FAILED; |
1263 | } |
1264 | } else { |
1265 | $this->peg_currPos = $s0; |
1266 | $s0 = $this->peg_FAILED; |
1267 | } |
1268 | |
1269 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
1270 | |
1271 | return $s0; |
1272 | } |
1273 | |
1274 | private function peg_parselit_uqn() { |
1275 | |
1276 | $key = $this->peg_currPos * 126 + 15; |
1277 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
1278 | |
1279 | if ($cached) { |
1280 | $this->peg_currPos = $cached["nextPos"]; |
1281 | return $cached["result"]; |
1282 | } |
1283 | |
1284 | $s0 = $this->peg_currPos; |
1285 | $s1 = $this->peg_parseSUP(); |
1286 | if ($s1 !== $this->peg_FAILED) { |
1287 | $s2 = $this->peg_parselit(); |
1288 | if ($s2 !== $this->peg_FAILED) { |
1289 | $this->peg_reportedPos = $s0; |
1290 | $s1 = $this->peg_f14($s2); |
1291 | $s0 = $s1; |
1292 | } else { |
1293 | $this->peg_currPos = $s0; |
1294 | $s0 = $this->peg_FAILED; |
1295 | } |
1296 | } else { |
1297 | $this->peg_currPos = $s0; |
1298 | $s0 = $this->peg_FAILED; |
1299 | } |
1300 | |
1301 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
1302 | |
1303 | return $s0; |
1304 | } |
1305 | |
1306 | private function peg_parselit_dqn() { |
1307 | |
1308 | $key = $this->peg_currPos * 126 + 16; |
1309 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
1310 | |
1311 | if ($cached) { |
1312 | $this->peg_currPos = $cached["nextPos"]; |
1313 | return $cached["result"]; |
1314 | } |
1315 | |
1316 | $s0 = $this->peg_currPos; |
1317 | $s1 = $this->peg_parseSUB(); |
1318 | if ($s1 !== $this->peg_FAILED) { |
1319 | $s2 = $this->peg_parselit(); |
1320 | if ($s2 !== $this->peg_FAILED) { |
1321 | $this->peg_reportedPos = $s0; |
1322 | $s1 = $this->peg_f15($s2); |
1323 | $s0 = $s1; |
1324 | } else { |
1325 | $this->peg_currPos = $s0; |
1326 | $s0 = $this->peg_FAILED; |
1327 | } |
1328 | } else { |
1329 | $this->peg_currPos = $s0; |
1330 | $s0 = $this->peg_FAILED; |
1331 | } |
1332 | |
1333 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
1334 | |
1335 | return $s0; |
1336 | } |
1337 | |
1338 | private function peg_parseleft() { |
1339 | |
1340 | $key = $this->peg_currPos * 126 + 17; |
1341 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
1342 | |
1343 | if ($cached) { |
1344 | $this->peg_currPos = $cached["nextPos"]; |
1345 | return $cached["result"]; |
1346 | } |
1347 | |
1348 | $s0 = $this->peg_currPos; |
1349 | $s1 = $this->peg_parseLEFTI(); |
1350 | if ($s1 !== $this->peg_FAILED) { |
1351 | $s2 = $this->peg_parseDELIMITER(); |
1352 | if ($s2 !== $this->peg_FAILED) { |
1353 | $this->peg_reportedPos = $s0; |
1354 | $s1 = $this->peg_f16($s2); |
1355 | $s0 = $s1; |
1356 | } else { |
1357 | $this->peg_currPos = $s0; |
1358 | $s0 = $this->peg_FAILED; |
1359 | } |
1360 | } else { |
1361 | $this->peg_currPos = $s0; |
1362 | $s0 = $this->peg_FAILED; |
1363 | } |
1364 | if ($s0 === $this->peg_FAILED) { |
1365 | $s0 = $this->peg_currPos; |
1366 | $s1 = $this->peg_parseLEFTI(); |
1367 | if ($s1 !== $this->peg_FAILED) { |
1368 | $s2 = $this->peg_parseSQ_CLOSE(); |
1369 | if ($s2 !== $this->peg_FAILED) { |
1370 | $this->peg_reportedPos = $s0; |
1371 | $s1 = $this->peg_f17(); |
1372 | $s0 = $s1; |
1373 | } else { |
1374 | $this->peg_currPos = $s0; |
1375 | $s0 = $this->peg_FAILED; |
1376 | } |
1377 | } else { |
1378 | $this->peg_currPos = $s0; |
1379 | $s0 = $this->peg_FAILED; |
1380 | } |
1381 | } |
1382 | |
1383 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
1384 | |
1385 | return $s0; |
1386 | } |
1387 | |
1388 | private function peg_parseright() { |
1389 | |
1390 | $key = $this->peg_currPos * 126 + 18; |
1391 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
1392 | |
1393 | if ($cached) { |
1394 | $this->peg_currPos = $cached["nextPos"]; |
1395 | return $cached["result"]; |
1396 | } |
1397 | |
1398 | $s0 = $this->peg_currPos; |
1399 | $s1 = $this->peg_parseRIGHTI(); |
1400 | if ($s1 !== $this->peg_FAILED) { |
1401 | $s2 = $this->peg_parseDELIMITER(); |
1402 | if ($s2 !== $this->peg_FAILED) { |
1403 | $this->peg_reportedPos = $s0; |
1404 | $s1 = $this->peg_f16($s2); |
1405 | $s0 = $s1; |
1406 | } else { |
1407 | $this->peg_currPos = $s0; |
1408 | $s0 = $this->peg_FAILED; |
1409 | } |
1410 | } else { |
1411 | $this->peg_currPos = $s0; |
1412 | $s0 = $this->peg_FAILED; |
1413 | } |
1414 | if ($s0 === $this->peg_FAILED) { |
1415 | $s0 = $this->peg_currPos; |
1416 | $s1 = $this->peg_parseRIGHTI(); |
1417 | if ($s1 !== $this->peg_FAILED) { |
1418 | $s2 = $this->peg_parseSQ_CLOSE(); |
1419 | if ($s2 !== $this->peg_FAILED) { |
1420 | $this->peg_reportedPos = $s0; |
1421 | $s1 = $this->peg_f17(); |
1422 | $s0 = $s1; |
1423 | } else { |
1424 | $this->peg_currPos = $s0; |
1425 | $s0 = $this->peg_FAILED; |
1426 | } |
1427 | } else { |
1428 | $this->peg_currPos = $s0; |
1429 | $s0 = $this->peg_FAILED; |
1430 | } |
1431 | } |
1432 | |
1433 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
1434 | |
1435 | return $s0; |
1436 | } |
1437 | |
1438 | private function peg_parselit() { |
1439 | |
1440 | $key = $this->peg_currPos * 126 + 19; |
1441 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
1442 | |
1443 | if ($cached) { |
1444 | $this->peg_currPos = $cached["nextPos"]; |
1445 | return $cached["result"]; |
1446 | } |
1447 | |
1448 | $s0 = $this->peg_currPos; |
1449 | $s1 = $this->peg_parseLITERAL(); |
1450 | if ($s1 !== $this->peg_FAILED) { |
1451 | $this->peg_reportedPos = $s0; |
1452 | $s1 = $this->peg_f18($s1); |
1453 | } |
1454 | $s0 = $s1; |
1455 | if ($s0 === $this->peg_FAILED) { |
1456 | $s0 = $this->peg_currPos; |
1457 | $s1 = $this->peg_parsegeneric_func(); |
1458 | if ($s1 !== $this->peg_FAILED) { |
1459 | $this->peg_reportedPos = $this->peg_currPos; |
1460 | $s2 = $this->peg_f19($s1); |
1461 | if ($s2) { |
1462 | $s2 = null; |
1463 | } else { |
1464 | $s2 = $this->peg_FAILED; |
1465 | } |
1466 | if ($s2 !== $this->peg_FAILED) { |
1467 | $s3 = $this->peg_parse_(); |
1468 | if ($s3 !== $this->peg_FAILED) { |
1469 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c3) { |
1470 | $s4 = $this->peg_c3; |
1471 | $this->peg_currPos++; |
1472 | } else { |
1473 | $s4 = $this->peg_FAILED; |
1474 | if ($this->peg_silentFails === 0) { |
1475 | $this->peg_fail($this->peg_c4); |
1476 | } |
1477 | } |
1478 | if ($s4 === $this->peg_FAILED) { |
1479 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c5) { |
1480 | $s4 = $this->peg_c5; |
1481 | $this->peg_currPos++; |
1482 | } else { |
1483 | $s4 = $this->peg_FAILED; |
1484 | if ($this->peg_silentFails === 0) { |
1485 | $this->peg_fail($this->peg_c6); |
1486 | } |
1487 | } |
1488 | if ($s4 === $this->peg_FAILED) { |
1489 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c7) { |
1490 | $s4 = $this->peg_c7; |
1491 | $this->peg_currPos += 2; |
1492 | } else { |
1493 | $s4 = $this->peg_FAILED; |
1494 | if ($this->peg_silentFails === 0) { |
1495 | $this->peg_fail($this->peg_c8); |
1496 | } |
1497 | } |
1498 | if ($s4 === $this->peg_FAILED) { |
1499 | $s4 = $this->peg_currPos; |
1500 | $s5 = $this->peg_c2; |
1501 | if ($s5 !== $this->peg_FAILED) { |
1502 | $this->peg_reportedPos = $s4; |
1503 | $s5 = $this->peg_f20($s1); |
1504 | } |
1505 | $s4 = $s5; |
1506 | } |
1507 | } |
1508 | } |
1509 | if ($s4 !== $this->peg_FAILED) { |
1510 | $s5 = $this->peg_parse_(); |
1511 | if ($s5 !== $this->peg_FAILED) { |
1512 | $this->peg_reportedPos = $s0; |
1513 | $s1 = $this->peg_f21($s1, $s4); |
1514 | $s0 = $s1; |
1515 | } else { |
1516 | $this->peg_currPos = $s0; |
1517 | $s0 = $this->peg_FAILED; |
1518 | } |
1519 | } else { |
1520 | $this->peg_currPos = $s0; |
1521 | $s0 = $this->peg_FAILED; |
1522 | } |
1523 | } else { |
1524 | $this->peg_currPos = $s0; |
1525 | $s0 = $this->peg_FAILED; |
1526 | } |
1527 | } else { |
1528 | $this->peg_currPos = $s0; |
1529 | $s0 = $this->peg_FAILED; |
1530 | } |
1531 | } else { |
1532 | $this->peg_currPos = $s0; |
1533 | $s0 = $this->peg_FAILED; |
1534 | } |
1535 | if ($s0 === $this->peg_FAILED) { |
1536 | $s0 = $this->peg_currPos; |
1537 | $s1 = $this->peg_parsegeneric_func(); |
1538 | if ($s1 !== $this->peg_FAILED) { |
1539 | $this->peg_reportedPos = $this->peg_currPos; |
1540 | $s2 = $this->peg_f22($s1); |
1541 | if ($s2) { |
1542 | $s2 = null; |
1543 | } else { |
1544 | $s2 = $this->peg_FAILED; |
1545 | } |
1546 | if ($s2 !== $this->peg_FAILED) { |
1547 | $s3 = $this->peg_parse_(); |
1548 | if ($s3 !== $this->peg_FAILED) { |
1549 | $this->peg_reportedPos = $s0; |
1550 | $s1 = $this->peg_f23($s1); |
1551 | $s0 = $s1; |
1552 | } else { |
1553 | $this->peg_currPos = $s0; |
1554 | $s0 = $this->peg_FAILED; |
1555 | } |
1556 | } else { |
1557 | $this->peg_currPos = $s0; |
1558 | $s0 = $this->peg_FAILED; |
1559 | } |
1560 | } else { |
1561 | $this->peg_currPos = $s0; |
1562 | $s0 = $this->peg_FAILED; |
1563 | } |
1564 | if ($s0 === $this->peg_FAILED) { |
1565 | $s0 = $this->peg_currPos; |
1566 | $s1 = $this->peg_parsegeneric_func(); |
1567 | if ($s1 !== $this->peg_FAILED) { |
1568 | $this->peg_reportedPos = $this->peg_currPos; |
1569 | $s2 = $this->peg_f24($s1); |
1570 | if ($s2) { |
1571 | $s2 = null; |
1572 | } else { |
1573 | $s2 = $this->peg_FAILED; |
1574 | } |
1575 | if ($s2 !== $this->peg_FAILED) { |
1576 | $s3 = $this->peg_parse_(); |
1577 | if ($s3 !== $this->peg_FAILED) { |
1578 | $this->peg_reportedPos = $s0; |
1579 | $s1 = $this->peg_f25($s1); |
1580 | $s0 = $s1; |
1581 | } else { |
1582 | $this->peg_currPos = $s0; |
1583 | $s0 = $this->peg_FAILED; |
1584 | } |
1585 | } else { |
1586 | $this->peg_currPos = $s0; |
1587 | $s0 = $this->peg_FAILED; |
1588 | } |
1589 | } else { |
1590 | $this->peg_currPos = $s0; |
1591 | $s0 = $this->peg_FAILED; |
1592 | } |
1593 | if ($s0 === $this->peg_FAILED) { |
1594 | $s0 = $this->peg_currPos; |
1595 | $s1 = $this->peg_parseDELIMITER(); |
1596 | if ($s1 !== $this->peg_FAILED) { |
1597 | $this->peg_reportedPos = $s0; |
1598 | $s1 = $this->peg_f18($s1); |
1599 | } |
1600 | $s0 = $s1; |
1601 | if ($s0 === $this->peg_FAILED) { |
1602 | $s0 = $this->peg_currPos; |
1603 | $s1 = $this->peg_parseBIG(); |
1604 | if ($s1 !== $this->peg_FAILED) { |
1605 | $s2 = $this->peg_parseDELIMITER(); |
1606 | if ($s2 !== $this->peg_FAILED) { |
1607 | $this->peg_reportedPos = $s0; |
1608 | $s1 = $this->peg_f26($s1, $s2); |
1609 | $s0 = $s1; |
1610 | } else { |
1611 | $this->peg_currPos = $s0; |
1612 | $s0 = $this->peg_FAILED; |
1613 | } |
1614 | } else { |
1615 | $this->peg_currPos = $s0; |
1616 | $s0 = $this->peg_FAILED; |
1617 | } |
1618 | if ($s0 === $this->peg_FAILED) { |
1619 | $s0 = $this->peg_currPos; |
1620 | $s1 = $this->peg_parseBIG(); |
1621 | if ($s1 !== $this->peg_FAILED) { |
1622 | $s2 = $this->peg_parseSQ_CLOSE(); |
1623 | if ($s2 !== $this->peg_FAILED) { |
1624 | $this->peg_reportedPos = $s0; |
1625 | $s1 = $this->peg_f27($s1); |
1626 | $s0 = $s1; |
1627 | } else { |
1628 | $this->peg_currPos = $s0; |
1629 | $s0 = $this->peg_FAILED; |
1630 | } |
1631 | } else { |
1632 | $this->peg_currPos = $s0; |
1633 | $s0 = $this->peg_FAILED; |
1634 | } |
1635 | if ($s0 === $this->peg_FAILED) { |
1636 | $s0 = $this->peg_currPos; |
1637 | $s1 = $this->peg_parseleft(); |
1638 | if ($s1 !== $this->peg_FAILED) { |
1639 | $s2 = $this->peg_parseexpr(); |
1640 | if ($s2 !== $this->peg_FAILED) { |
1641 | $s3 = $this->peg_parseright(); |
1642 | if ($s3 !== $this->peg_FAILED) { |
1643 | $this->peg_reportedPos = $s0; |
1644 | $s1 = $this->peg_f28($s1, $s2, $s3); |
1645 | $s0 = $s1; |
1646 | } else { |
1647 | $this->peg_currPos = $s0; |
1648 | $s0 = $this->peg_FAILED; |
1649 | } |
1650 | } else { |
1651 | $this->peg_currPos = $s0; |
1652 | $s0 = $this->peg_FAILED; |
1653 | } |
1654 | } else { |
1655 | $this->peg_currPos = $s0; |
1656 | $s0 = $this->peg_FAILED; |
1657 | } |
1658 | if ($s0 === $this->peg_FAILED) { |
1659 | $s0 = $this->peg_currPos; |
1660 | $s1 = $this->peg_parseFUN_AR1opt(); |
1661 | if ($s1 !== $this->peg_FAILED) { |
1662 | $s2 = $this->peg_parseexpr_nosqc(); |
1663 | if ($s2 !== $this->peg_FAILED) { |
1664 | $s3 = $this->peg_parseSQ_CLOSE(); |
1665 | if ($s3 !== $this->peg_FAILED) { |
1666 | $s4 = $this->peg_parselit(); |
1667 | if ($s4 !== $this->peg_FAILED) { |
1668 | $this->peg_reportedPos = $s0; |
1669 | $s1 = $this->peg_f29($s1, $s2, $s4); |
1670 | $s0 = $s1; |
1671 | } else { |
1672 | $this->peg_currPos = $s0; |
1673 | $s0 = $this->peg_FAILED; |
1674 | } |
1675 | } else { |
1676 | $this->peg_currPos = $s0; |
1677 | $s0 = $this->peg_FAILED; |
1678 | } |
1679 | } else { |
1680 | $this->peg_currPos = $s0; |
1681 | $s0 = $this->peg_FAILED; |
1682 | } |
1683 | } else { |
1684 | $this->peg_currPos = $s0; |
1685 | $s0 = $this->peg_FAILED; |
1686 | } |
1687 | if ($s0 === $this->peg_FAILED) { |
1688 | $s0 = $this->peg_currPos; |
1689 | $s1 = $this->peg_parseFUN_AR1(); |
1690 | if ($s1 !== $this->peg_FAILED) { |
1691 | $s2 = $this->peg_parselit(); |
1692 | if ($s2 !== $this->peg_FAILED) { |
1693 | $this->peg_reportedPos = $s0; |
1694 | $s1 = $this->peg_f30($s1, $s2); |
1695 | $s0 = $s1; |
1696 | } else { |
1697 | $this->peg_currPos = $s0; |
1698 | $s0 = $this->peg_FAILED; |
1699 | } |
1700 | } else { |
1701 | $this->peg_currPos = $s0; |
1702 | $s0 = $this->peg_FAILED; |
1703 | } |
1704 | if ($s0 === $this->peg_FAILED) { |
1705 | $s0 = $this->peg_currPos; |
1706 | $s1 = $this->peg_parseFUN_AR1nb(); |
1707 | if ($s1 !== $this->peg_FAILED) { |
1708 | $s2 = $this->peg_parselit(); |
1709 | if ($s2 !== $this->peg_FAILED) { |
1710 | $this->peg_reportedPos = $s0; |
1711 | $s1 = $this->peg_f31($s1, $s2); |
1712 | $s0 = $s1; |
1713 | } else { |
1714 | $this->peg_currPos = $s0; |
1715 | $s0 = $this->peg_FAILED; |
1716 | } |
1717 | } else { |
1718 | $this->peg_currPos = $s0; |
1719 | $s0 = $this->peg_FAILED; |
1720 | } |
1721 | if ($s0 === $this->peg_FAILED) { |
1722 | $s0 = $this->peg_currPos; |
1723 | $s1 = $this->peg_parseFUN_MHCHEM(); |
1724 | if ($s1 !== $this->peg_FAILED) { |
1725 | $s2 = $this->peg_parsechem_lit(); |
1726 | if ($s2 !== $this->peg_FAILED) { |
1727 | $this->peg_reportedPos = $s0; |
1728 | $s1 = $this->peg_f32($s1, $s2); |
1729 | $s0 = $s1; |
1730 | } else { |
1731 | $this->peg_currPos = $s0; |
1732 | $s0 = $this->peg_FAILED; |
1733 | } |
1734 | } else { |
1735 | $this->peg_currPos = $s0; |
1736 | $s0 = $this->peg_FAILED; |
1737 | } |
1738 | if ($s0 === $this->peg_FAILED) { |
1739 | $s0 = $this->peg_currPos; |
1740 | $s1 = $this->peg_parseFUN_AR2(); |
1741 | if ($s1 !== $this->peg_FAILED) { |
1742 | $s2 = $this->peg_parselit(); |
1743 | if ($s2 !== $this->peg_FAILED) { |
1744 | $s3 = $this->peg_parselit(); |
1745 | if ($s3 !== $this->peg_FAILED) { |
1746 | $this->peg_reportedPos = $s0; |
1747 | $s1 = $this->peg_f33($s1, $s2, $s3); |
1748 | $s0 = $s1; |
1749 | } else { |
1750 | $this->peg_currPos = $s0; |
1751 | $s0 = $this->peg_FAILED; |
1752 | } |
1753 | } else { |
1754 | $this->peg_currPos = $s0; |
1755 | $s0 = $this->peg_FAILED; |
1756 | } |
1757 | } else { |
1758 | $this->peg_currPos = $s0; |
1759 | $s0 = $this->peg_FAILED; |
1760 | } |
1761 | if ($s0 === $this->peg_FAILED) { |
1762 | $s0 = $this->peg_currPos; |
1763 | $s1 = $this->peg_parseFUN_AR4_MHCHEM_TEXIFIED(); |
1764 | if ($s1 !== $this->peg_FAILED) { |
1765 | $s2 = $this->peg_parselit(); |
1766 | if ($s2 !== $this->peg_FAILED) { |
1767 | $s3 = $this->peg_parselit(); |
1768 | if ($s3 !== $this->peg_FAILED) { |
1769 | $s4 = $this->peg_parselit(); |
1770 | if ($s4 !== $this->peg_FAILED) { |
1771 | $s5 = $this->peg_parselit(); |
1772 | if ($s5 !== $this->peg_FAILED) { |
1773 | $this->peg_reportedPos = $s0; |
1774 | $s1 = $this->peg_f34($s1, $s2, $s3, $s4, $s5); |
1775 | $s0 = $s1; |
1776 | } else { |
1777 | $this->peg_currPos = $s0; |
1778 | $s0 = $this->peg_FAILED; |
1779 | } |
1780 | } else { |
1781 | $this->peg_currPos = $s0; |
1782 | $s0 = $this->peg_FAILED; |
1783 | } |
1784 | } else { |
1785 | $this->peg_currPos = $s0; |
1786 | $s0 = $this->peg_FAILED; |
1787 | } |
1788 | } else { |
1789 | $this->peg_currPos = $s0; |
1790 | $s0 = $this->peg_FAILED; |
1791 | } |
1792 | } else { |
1793 | $this->peg_currPos = $s0; |
1794 | $s0 = $this->peg_FAILED; |
1795 | } |
1796 | if ($s0 === $this->peg_FAILED) { |
1797 | $s0 = $this->peg_currPos; |
1798 | $s1 = $this->peg_parseFUN_AR2nb(); |
1799 | if ($s1 !== $this->peg_FAILED) { |
1800 | $s2 = $this->peg_parselit(); |
1801 | if ($s2 !== $this->peg_FAILED) { |
1802 | $s3 = $this->peg_parselit(); |
1803 | if ($s3 !== $this->peg_FAILED) { |
1804 | $this->peg_reportedPos = $s0; |
1805 | $s1 = $this->peg_f35($s1, $s2, $s3); |
1806 | $s0 = $s1; |
1807 | } else { |
1808 | $this->peg_currPos = $s0; |
1809 | $s0 = $this->peg_FAILED; |
1810 | } |
1811 | } else { |
1812 | $this->peg_currPos = $s0; |
1813 | $s0 = $this->peg_FAILED; |
1814 | } |
1815 | } else { |
1816 | $this->peg_currPos = $s0; |
1817 | $s0 = $this->peg_FAILED; |
1818 | } |
1819 | if ($s0 === $this->peg_FAILED) { |
1820 | $s0 = $this->peg_parseBOX(); |
1821 | if ($s0 === $this->peg_FAILED) { |
1822 | $s0 = $this->peg_currPos; |
1823 | $s1 = $this->peg_parseCURLY_OPEN(); |
1824 | if ($s1 !== $this->peg_FAILED) { |
1825 | $s2 = $this->peg_parseexpr(); |
1826 | if ($s2 !== $this->peg_FAILED) { |
1827 | $s3 = $this->peg_parseCURLY_CLOSE(); |
1828 | if ($s3 !== $this->peg_FAILED) { |
1829 | $this->peg_reportedPos = $s0; |
1830 | $s1 = $this->peg_f36($s2); |
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 | if ($s0 === $this->peg_FAILED) { |
1845 | $s0 = $this->peg_currPos; |
1846 | $s1 = $this->peg_parseCURLY_OPEN(); |
1847 | if ($s1 !== $this->peg_FAILED) { |
1848 | $s2 = $this->peg_parsene_expr(); |
1849 | if ($s2 !== $this->peg_FAILED) { |
1850 | $s3 = $this->peg_parseFUN_INFIX(); |
1851 | if ($s3 !== $this->peg_FAILED) { |
1852 | $s4 = $this->peg_parsene_expr(); |
1853 | if ($s4 !== $this->peg_FAILED) { |
1854 | $s5 = $this->peg_parseCURLY_CLOSE(); |
1855 | if ($s5 !== $this->peg_FAILED) { |
1856 | $this->peg_reportedPos = $s0; |
1857 | $s1 = $this->peg_f37($s2, $s3, $s4); |
1858 | $s0 = $s1; |
1859 | } else { |
1860 | $this->peg_currPos = $s0; |
1861 | $s0 = $this->peg_FAILED; |
1862 | } |
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 | } else { |
1876 | $this->peg_currPos = $s0; |
1877 | $s0 = $this->peg_FAILED; |
1878 | } |
1879 | if ($s0 === $this->peg_FAILED) { |
1880 | $s0 = $this->peg_currPos; |
1881 | $s1 = $this->peg_parseBEGIN_MATRIX(); |
1882 | if ($s1 !== $this->peg_FAILED) { |
1883 | $s2 = $this->peg_parsearray(); |
1884 | if ($s2 === $this->peg_FAILED) { |
1885 | $s2 = $this->peg_parsematrix(); |
1886 | } |
1887 | if ($s2 !== $this->peg_FAILED) { |
1888 | $s3 = $this->peg_parseEND_MATRIX(); |
1889 | if ($s3 !== $this->peg_FAILED) { |
1890 | $this->peg_reportedPos = $s0; |
1891 | $s1 = $this->peg_f38($s2); |
1892 | $s0 = $s1; |
1893 | } else { |
1894 | $this->peg_currPos = $s0; |
1895 | $s0 = $this->peg_FAILED; |
1896 | } |
1897 | } else { |
1898 | $this->peg_currPos = $s0; |
1899 | $s0 = $this->peg_FAILED; |
1900 | } |
1901 | } else { |
1902 | $this->peg_currPos = $s0; |
1903 | $s0 = $this->peg_FAILED; |
1904 | } |
1905 | if ($s0 === $this->peg_FAILED) { |
1906 | $s0 = $this->peg_currPos; |
1907 | $s1 = $this->peg_parseBEGIN_PMATRIX(); |
1908 | if ($s1 !== $this->peg_FAILED) { |
1909 | $s2 = $this->peg_parsearray(); |
1910 | if ($s2 === $this->peg_FAILED) { |
1911 | $s2 = $this->peg_parsematrix(); |
1912 | } |
1913 | if ($s2 !== $this->peg_FAILED) { |
1914 | $s3 = $this->peg_parseEND_PMATRIX(); |
1915 | if ($s3 !== $this->peg_FAILED) { |
1916 | $this->peg_reportedPos = $s0; |
1917 | $s1 = $this->peg_f39($s2); |
1918 | $s0 = $s1; |
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 | if ($s0 === $this->peg_FAILED) { |
1932 | $s0 = $this->peg_currPos; |
1933 | $s1 = $this->peg_parseBEGIN_BMATRIX(); |
1934 | if ($s1 !== $this->peg_FAILED) { |
1935 | $s2 = $this->peg_parsearray(); |
1936 | if ($s2 === $this->peg_FAILED) { |
1937 | $s2 = $this->peg_parsematrix(); |
1938 | } |
1939 | if ($s2 !== $this->peg_FAILED) { |
1940 | $s3 = $this->peg_parseEND_BMATRIX(); |
1941 | if ($s3 !== $this->peg_FAILED) { |
1942 | $this->peg_reportedPos = $s0; |
1943 | $s1 = $this->peg_f40($s2); |
1944 | $s0 = $s1; |
1945 | } else { |
1946 | $this->peg_currPos = $s0; |
1947 | $s0 = $this->peg_FAILED; |
1948 | } |
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 | if ($s0 === $this->peg_FAILED) { |
1958 | $s0 = $this->peg_currPos; |
1959 | $s1 = $this->peg_parseBEGIN_BBMATRIX(); |
1960 | if ($s1 !== $this->peg_FAILED) { |
1961 | $s2 = $this->peg_parsearray(); |
1962 | if ($s2 === $this->peg_FAILED) { |
1963 | $s2 = $this->peg_parsematrix(); |
1964 | } |
1965 | if ($s2 !== $this->peg_FAILED) { |
1966 | $s3 = $this->peg_parseEND_BBMATRIX(); |
1967 | if ($s3 !== $this->peg_FAILED) { |
1968 | $this->peg_reportedPos = $s0; |
1969 | $s1 = $this->peg_f41($s2); |
1970 | $s0 = $s1; |
1971 | } else { |
1972 | $this->peg_currPos = $s0; |
1973 | $s0 = $this->peg_FAILED; |
1974 | } |
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 | if ($s0 === $this->peg_FAILED) { |
1984 | $s0 = $this->peg_currPos; |
1985 | $s1 = $this->peg_parseBEGIN_VMATRIX(); |
1986 | if ($s1 !== $this->peg_FAILED) { |
1987 | $s2 = $this->peg_parsearray(); |
1988 | if ($s2 === $this->peg_FAILED) { |
1989 | $s2 = $this->peg_parsematrix(); |
1990 | } |
1991 | if ($s2 !== $this->peg_FAILED) { |
1992 | $s3 = $this->peg_parseEND_VMATRIX(); |
1993 | if ($s3 !== $this->peg_FAILED) { |
1994 | $this->peg_reportedPos = $s0; |
1995 | $s1 = $this->peg_f42($s2); |
1996 | $s0 = $s1; |
1997 | } else { |
1998 | $this->peg_currPos = $s0; |
1999 | $s0 = $this->peg_FAILED; |
2000 | } |
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 | if ($s0 === $this->peg_FAILED) { |
2010 | $s0 = $this->peg_currPos; |
2011 | $s1 = $this->peg_parseBEGIN_VVMATRIX(); |
2012 | if ($s1 !== $this->peg_FAILED) { |
2013 | $s2 = $this->peg_parsearray(); |
2014 | if ($s2 === $this->peg_FAILED) { |
2015 | $s2 = $this->peg_parsematrix(); |
2016 | } |
2017 | if ($s2 !== $this->peg_FAILED) { |
2018 | $s3 = $this->peg_parseEND_VVMATRIX(); |
2019 | if ($s3 !== $this->peg_FAILED) { |
2020 | $this->peg_reportedPos = $s0; |
2021 | $s1 = $this->peg_f43($s2); |
2022 | $s0 = $s1; |
2023 | } else { |
2024 | $this->peg_currPos = $s0; |
2025 | $s0 = $this->peg_FAILED; |
2026 | } |
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 | if ($s0 === $this->peg_FAILED) { |
2036 | $s0 = $this->peg_currPos; |
2037 | $s1 = $this->peg_parseBEGIN_ARRAY(); |
2038 | if ($s1 !== $this->peg_FAILED) { |
2039 | $s2 = $this->peg_parseopt_pos(); |
2040 | if ($s2 !== $this->peg_FAILED) { |
2041 | $s3 = $this->peg_parsearray(); |
2042 | if ($s3 !== $this->peg_FAILED) { |
2043 | $s4 = $this->peg_parseEND_ARRAY(); |
2044 | if ($s4 !== $this->peg_FAILED) { |
2045 | $this->peg_reportedPos = $s0; |
2046 | $s1 = $this->peg_f44($s3); |
2047 | $s0 = $s1; |
2048 | } else { |
2049 | $this->peg_currPos = $s0; |
2050 | $s0 = $this->peg_FAILED; |
2051 | } |
2052 | } else { |
2053 | $this->peg_currPos = $s0; |
2054 | $s0 = $this->peg_FAILED; |
2055 | } |
2056 | } else { |
2057 | $this->peg_currPos = $s0; |
2058 | $s0 = $this->peg_FAILED; |
2059 | } |
2060 | } else { |
2061 | $this->peg_currPos = $s0; |
2062 | $s0 = $this->peg_FAILED; |
2063 | } |
2064 | if ($s0 === $this->peg_FAILED) { |
2065 | $s0 = $this->peg_currPos; |
2066 | $s1 = $this->peg_parseBEGIN_ALIGN(); |
2067 | if ($s1 !== $this->peg_FAILED) { |
2068 | $s2 = $this->peg_parseopt_pos(); |
2069 | if ($s2 !== $this->peg_FAILED) { |
2070 | $s3 = $this->peg_parsematrix(); |
2071 | if ($s3 !== $this->peg_FAILED) { |
2072 | $s4 = $this->peg_parseEND_ALIGN(); |
2073 | if ($s4 !== $this->peg_FAILED) { |
2074 | $this->peg_reportedPos = $s0; |
2075 | $s1 = $this->peg_f45($s3); |
2076 | $s0 = $s1; |
2077 | } else { |
2078 | $this->peg_currPos = $s0; |
2079 | $s0 = $this->peg_FAILED; |
2080 | } |
2081 | } else { |
2082 | $this->peg_currPos = $s0; |
2083 | $s0 = $this->peg_FAILED; |
2084 | } |
2085 | } else { |
2086 | $this->peg_currPos = $s0; |
2087 | $s0 = $this->peg_FAILED; |
2088 | } |
2089 | } else { |
2090 | $this->peg_currPos = $s0; |
2091 | $s0 = $this->peg_FAILED; |
2092 | } |
2093 | if ($s0 === $this->peg_FAILED) { |
2094 | $s0 = $this->peg_currPos; |
2095 | $s1 = $this->peg_parseBEGIN_ALIGNED(); |
2096 | if ($s1 !== $this->peg_FAILED) { |
2097 | $s2 = $this->peg_parseopt_pos(); |
2098 | if ($s2 !== $this->peg_FAILED) { |
2099 | $s3 = $this->peg_parsematrix(); |
2100 | if ($s3 !== $this->peg_FAILED) { |
2101 | $s4 = $this->peg_parseEND_ALIGNED(); |
2102 | if ($s4 !== $this->peg_FAILED) { |
2103 | $this->peg_reportedPos = $s0; |
2104 | $s1 = $this->peg_f45($s3); |
2105 | $s0 = $s1; |
2106 | } else { |
2107 | $this->peg_currPos = $s0; |
2108 | $s0 = $this->peg_FAILED; |
2109 | } |
2110 | } else { |
2111 | $this->peg_currPos = $s0; |
2112 | $s0 = $this->peg_FAILED; |
2113 | } |
2114 | } else { |
2115 | $this->peg_currPos = $s0; |
2116 | $s0 = $this->peg_FAILED; |
2117 | } |
2118 | } else { |
2119 | $this->peg_currPos = $s0; |
2120 | $s0 = $this->peg_FAILED; |
2121 | } |
2122 | if ($s0 === $this->peg_FAILED) { |
2123 | $s0 = $this->peg_currPos; |
2124 | $s1 = $this->peg_parseBEGIN_ALIGNAT(); |
2125 | if ($s1 !== $this->peg_FAILED) { |
2126 | $s2 = $this->peg_parsealignat(); |
2127 | if ($s2 !== $this->peg_FAILED) { |
2128 | $s3 = $this->peg_parseEND_ALIGNAT(); |
2129 | if ($s3 !== $this->peg_FAILED) { |
2130 | $this->peg_reportedPos = $s0; |
2131 | $s1 = $this->peg_f46($s2); |
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 | if ($s0 === $this->peg_FAILED) { |
2146 | $s0 = $this->peg_currPos; |
2147 | $s1 = $this->peg_parseBEGIN_ALIGNEDAT(); |
2148 | if ($s1 !== $this->peg_FAILED) { |
2149 | $s2 = $this->peg_parsealignat(); |
2150 | if ($s2 !== $this->peg_FAILED) { |
2151 | $s3 = $this->peg_parseEND_ALIGNEDAT(); |
2152 | if ($s3 !== $this->peg_FAILED) { |
2153 | $this->peg_reportedPos = $s0; |
2154 | $s1 = $this->peg_f46($s2); |
2155 | $s0 = $s1; |
2156 | } else { |
2157 | $this->peg_currPos = $s0; |
2158 | $s0 = $this->peg_FAILED; |
2159 | } |
2160 | } else { |
2161 | $this->peg_currPos = $s0; |
2162 | $s0 = $this->peg_FAILED; |
2163 | } |
2164 | } else { |
2165 | $this->peg_currPos = $s0; |
2166 | $s0 = $this->peg_FAILED; |
2167 | } |
2168 | if ($s0 === $this->peg_FAILED) { |
2169 | $s0 = $this->peg_currPos; |
2170 | $s1 = $this->peg_parseBEGIN_SMALLMATRIX(); |
2171 | if ($s1 !== $this->peg_FAILED) { |
2172 | $s2 = $this->peg_parsearray(); |
2173 | if ($s2 === $this->peg_FAILED) { |
2174 | $s2 = $this->peg_parsematrix(); |
2175 | } |
2176 | if ($s2 !== $this->peg_FAILED) { |
2177 | $s3 = $this->peg_parseEND_SMALLMATRIX(); |
2178 | if ($s3 !== $this->peg_FAILED) { |
2179 | $this->peg_reportedPos = $s0; |
2180 | $s1 = $this->peg_f47($s2); |
2181 | $s0 = $s1; |
2182 | } else { |
2183 | $this->peg_currPos = $s0; |
2184 | $s0 = $this->peg_FAILED; |
2185 | } |
2186 | } else { |
2187 | $this->peg_currPos = $s0; |
2188 | $s0 = $this->peg_FAILED; |
2189 | } |
2190 | } else { |
2191 | $this->peg_currPos = $s0; |
2192 | $s0 = $this->peg_FAILED; |
2193 | } |
2194 | if ($s0 === $this->peg_FAILED) { |
2195 | $s0 = $this->peg_currPos; |
2196 | $s1 = $this->peg_parseBEGIN_CASES(); |
2197 | if ($s1 !== $this->peg_FAILED) { |
2198 | $s2 = $this->peg_parsematrix(); |
2199 | if ($s2 !== $this->peg_FAILED) { |
2200 | $s3 = $this->peg_parseEND_CASES(); |
2201 | if ($s3 !== $this->peg_FAILED) { |
2202 | $this->peg_reportedPos = $s0; |
2203 | $s1 = $this->peg_f48($s2); |
2204 | $s0 = $s1; |
2205 | } else { |
2206 | $this->peg_currPos = $s0; |
2207 | $s0 = $this->peg_FAILED; |
2208 | } |
2209 | } else { |
2210 | $this->peg_currPos = $s0; |
2211 | $s0 = $this->peg_FAILED; |
2212 | } |
2213 | } else { |
2214 | $this->peg_currPos = $s0; |
2215 | $s0 = $this->peg_FAILED; |
2216 | } |
2217 | if ($s0 === $this->peg_FAILED) { |
2218 | $s0 = $this->peg_currPos; |
2219 | if ($this->input_substr($this->peg_currPos, 7) === $this->peg_c9) { |
2220 | $s1 = $this->peg_c9; |
2221 | $this->peg_currPos += 7; |
2222 | } else { |
2223 | $s1 = $this->peg_FAILED; |
2224 | if ($this->peg_silentFails === 0) { |
2225 | $this->peg_fail($this->peg_c10); |
2226 | } |
2227 | } |
2228 | if ($s1 !== $this->peg_FAILED) { |
2229 | $s2 = array(); |
2230 | $s3 = $this->peg_parsealpha(); |
2231 | if ($s3 !== $this->peg_FAILED) { |
2232 | while ($s3 !== $this->peg_FAILED) { |
2233 | $s2[] = $s3; |
2234 | $s3 = $this->peg_parsealpha(); |
2235 | } |
2236 | } else { |
2237 | $s2 = $this->peg_FAILED; |
2238 | } |
2239 | if ($s2 !== $this->peg_FAILED) { |
2240 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c11) { |
2241 | $s3 = $this->peg_c11; |
2242 | $this->peg_currPos++; |
2243 | } else { |
2244 | $s3 = $this->peg_FAILED; |
2245 | if ($this->peg_silentFails === 0) { |
2246 | $this->peg_fail($this->peg_c12); |
2247 | } |
2248 | } |
2249 | if ($s3 !== $this->peg_FAILED) { |
2250 | $this->peg_reportedPos = $s0; |
2251 | $s1 = $this->peg_f49(); |
2252 | $s0 = $s1; |
2253 | } else { |
2254 | $this->peg_currPos = $s0; |
2255 | $s0 = $this->peg_FAILED; |
2256 | } |
2257 | } else { |
2258 | $this->peg_currPos = $s0; |
2259 | $s0 = $this->peg_FAILED; |
2260 | } |
2261 | } else { |
2262 | $this->peg_currPos = $s0; |
2263 | $s0 = $this->peg_FAILED; |
2264 | } |
2265 | if ($s0 === $this->peg_FAILED) { |
2266 | $s0 = $this->peg_currPos; |
2267 | $s1 = $this->peg_parsegeneric_func(); |
2268 | if ($s1 !== $this->peg_FAILED) { |
2269 | $this->peg_reportedPos = $this->peg_currPos; |
2270 | $s2 = $this->peg_f50($s1); |
2271 | if ($s2) { |
2272 | $s2 = null; |
2273 | } else { |
2274 | $s2 = $this->peg_FAILED; |
2275 | } |
2276 | if ($s2 !== $this->peg_FAILED) { |
2277 | $this->peg_reportedPos = $s0; |
2278 | $s1 = $this->peg_f51($s1); |
2279 | $s0 = $s1; |
2280 | } else { |
2281 | $this->peg_currPos = $s0; |
2282 | $s0 = $this->peg_FAILED; |
2283 | } |
2284 | } else { |
2285 | $this->peg_currPos = $s0; |
2286 | $s0 = $this->peg_FAILED; |
2287 | } |
2288 | } |
2289 | } |
2290 | } |
2291 | } |
2292 | } |
2293 | } |
2294 | } |
2295 | } |
2296 | } |
2297 | } |
2298 | } |
2299 | } |
2300 | } |
2301 | } |
2302 | } |
2303 | } |
2304 | } |
2305 | } |
2306 | } |
2307 | } |
2308 | } |
2309 | } |
2310 | } |
2311 | } |
2312 | } |
2313 | } |
2314 | } |
2315 | } |
2316 | } |
2317 | } |
2318 | } |
2319 | } |
2320 | |
2321 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
2322 | |
2323 | return $s0; |
2324 | } |
2325 | |
2326 | private function peg_parsearray() { |
2327 | |
2328 | $key = $this->peg_currPos * 126 + 20; |
2329 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
2330 | |
2331 | if ($cached) { |
2332 | $this->peg_currPos = $cached["nextPos"]; |
2333 | return $cached["result"]; |
2334 | } |
2335 | |
2336 | $s0 = $this->peg_currPos; |
2337 | $s1 = $this->peg_parsecolumn_spec(); |
2338 | if ($s1 !== $this->peg_FAILED) { |
2339 | $s2 = $this->peg_parsematrix(); |
2340 | if ($s2 !== $this->peg_FAILED) { |
2341 | $this->peg_reportedPos = $s0; |
2342 | $s1 = $this->peg_f52($s1, $s2); |
2343 | $s0 = $s1; |
2344 | } else { |
2345 | $this->peg_currPos = $s0; |
2346 | $s0 = $this->peg_FAILED; |
2347 | } |
2348 | } else { |
2349 | $this->peg_currPos = $s0; |
2350 | $s0 = $this->peg_FAILED; |
2351 | } |
2352 | |
2353 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
2354 | |
2355 | return $s0; |
2356 | } |
2357 | |
2358 | private function peg_parsealignat() { |
2359 | |
2360 | $key = $this->peg_currPos * 126 + 21; |
2361 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
2362 | |
2363 | if ($cached) { |
2364 | $this->peg_currPos = $cached["nextPos"]; |
2365 | return $cached["result"]; |
2366 | } |
2367 | |
2368 | $s0 = $this->peg_currPos; |
2369 | $s1 = $this->peg_parsealignat_spec(); |
2370 | if ($s1 !== $this->peg_FAILED) { |
2371 | $s2 = $this->peg_parsematrix(); |
2372 | if ($s2 !== $this->peg_FAILED) { |
2373 | $this->peg_reportedPos = $s0; |
2374 | $s1 = $this->peg_f53($s1, $s2); |
2375 | $s0 = $s1; |
2376 | } else { |
2377 | $this->peg_currPos = $s0; |
2378 | $s0 = $this->peg_FAILED; |
2379 | } |
2380 | } else { |
2381 | $this->peg_currPos = $s0; |
2382 | $s0 = $this->peg_FAILED; |
2383 | } |
2384 | |
2385 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
2386 | |
2387 | return $s0; |
2388 | } |
2389 | |
2390 | private function peg_parsematrix() { |
2391 | |
2392 | $key = $this->peg_currPos * 126 + 22; |
2393 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
2394 | |
2395 | if ($cached) { |
2396 | $this->peg_currPos = $cached["nextPos"]; |
2397 | return $cached["result"]; |
2398 | } |
2399 | |
2400 | $s0 = $this->peg_currPos; |
2401 | $s1 = $this->peg_parseline_start(); |
2402 | if ($s1 !== $this->peg_FAILED) { |
2403 | $s2 = $this->peg_currPos; |
2404 | $s3 = $this->peg_parseNEXT_ROW(); |
2405 | if ($s3 !== $this->peg_FAILED) { |
2406 | $s4 = $this->peg_parsematrix(); |
2407 | if ($s4 !== $this->peg_FAILED) { |
2408 | $this->peg_reportedPos = $s2; |
2409 | $s3 = $this->peg_f54($s1, $s4); |
2410 | $s2 = $s3; |
2411 | } else { |
2412 | $this->peg_currPos = $s2; |
2413 | $s2 = $this->peg_FAILED; |
2414 | } |
2415 | } else { |
2416 | $this->peg_currPos = $s2; |
2417 | $s2 = $this->peg_FAILED; |
2418 | } |
2419 | if ($s2 === $this->peg_FAILED) { |
2420 | $s2 = null; |
2421 | } |
2422 | if ($s2 !== $this->peg_FAILED) { |
2423 | $this->peg_reportedPos = $s0; |
2424 | $s1 = $this->peg_f55($s1, $s2); |
2425 | $s0 = $s1; |
2426 | } else { |
2427 | $this->peg_currPos = $s0; |
2428 | $s0 = $this->peg_FAILED; |
2429 | } |
2430 | } else { |
2431 | $this->peg_currPos = $s0; |
2432 | $s0 = $this->peg_FAILED; |
2433 | } |
2434 | |
2435 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
2436 | |
2437 | return $s0; |
2438 | } |
2439 | |
2440 | private function peg_parseline_start() { |
2441 | |
2442 | $key = $this->peg_currPos * 126 + 23; |
2443 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
2444 | |
2445 | if ($cached) { |
2446 | $this->peg_currPos = $cached["nextPos"]; |
2447 | return $cached["result"]; |
2448 | } |
2449 | |
2450 | $s0 = $this->peg_currPos; |
2451 | $s1 = $this->peg_parseHLINE(); |
2452 | if ($s1 !== $this->peg_FAILED) { |
2453 | $s2 = $this->peg_parseline_start(); |
2454 | if ($s2 !== $this->peg_FAILED) { |
2455 | $this->peg_reportedPos = $s0; |
2456 | $s1 = $this->peg_f56($s1, $s2); |
2457 | $s0 = $s1; |
2458 | } else { |
2459 | $this->peg_currPos = $s0; |
2460 | $s0 = $this->peg_FAILED; |
2461 | } |
2462 | } else { |
2463 | $this->peg_currPos = $s0; |
2464 | $s0 = $this->peg_FAILED; |
2465 | } |
2466 | if ($s0 === $this->peg_FAILED) { |
2467 | $s0 = $this->peg_parseline(); |
2468 | } |
2469 | |
2470 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
2471 | |
2472 | return $s0; |
2473 | } |
2474 | |
2475 | private function peg_parseline() { |
2476 | |
2477 | $key = $this->peg_currPos * 126 + 24; |
2478 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
2479 | |
2480 | if ($cached) { |
2481 | $this->peg_currPos = $cached["nextPos"]; |
2482 | return $cached["result"]; |
2483 | } |
2484 | |
2485 | $s0 = $this->peg_currPos; |
2486 | $s1 = $this->peg_parseexpr(); |
2487 | if ($s1 !== $this->peg_FAILED) { |
2488 | $s2 = $this->peg_currPos; |
2489 | $s3 = $this->peg_parseNEXT_CELL(); |
2490 | if ($s3 !== $this->peg_FAILED) { |
2491 | $s4 = $this->peg_parseline(); |
2492 | if ($s4 !== $this->peg_FAILED) { |
2493 | $this->peg_reportedPos = $s2; |
2494 | $s3 = $this->peg_f57($s1, $s4); |
2495 | $s2 = $s3; |
2496 | } else { |
2497 | $this->peg_currPos = $s2; |
2498 | $s2 = $this->peg_FAILED; |
2499 | } |
2500 | } else { |
2501 | $this->peg_currPos = $s2; |
2502 | $s2 = $this->peg_FAILED; |
2503 | } |
2504 | if ($s2 === $this->peg_FAILED) { |
2505 | $s2 = null; |
2506 | } |
2507 | if ($s2 !== $this->peg_FAILED) { |
2508 | $this->peg_reportedPos = $s0; |
2509 | $s1 = $this->peg_f58($s1, $s2); |
2510 | $s0 = $s1; |
2511 | } else { |
2512 | $this->peg_currPos = $s0; |
2513 | $s0 = $this->peg_FAILED; |
2514 | } |
2515 | } else { |
2516 | $this->peg_currPos = $s0; |
2517 | $s0 = $this->peg_FAILED; |
2518 | } |
2519 | |
2520 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
2521 | |
2522 | return $s0; |
2523 | } |
2524 | |
2525 | private function peg_parsecolumn_spec() { |
2526 | |
2527 | $key = $this->peg_currPos * 126 + 25; |
2528 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
2529 | |
2530 | if ($cached) { |
2531 | $this->peg_currPos = $cached["nextPos"]; |
2532 | return $cached["result"]; |
2533 | } |
2534 | |
2535 | $s0 = $this->peg_currPos; |
2536 | $s1 = $this->peg_parseCURLY_OPEN(); |
2537 | if ($s1 !== $this->peg_FAILED) { |
2538 | $s2 = $this->peg_currPos; |
2539 | $s3 = array(); |
2540 | $s4 = $this->peg_parseone_col(); |
2541 | if ($s4 !== $this->peg_FAILED) { |
2542 | while ($s4 !== $this->peg_FAILED) { |
2543 | $s3[] = $s4; |
2544 | $s4 = $this->peg_parseone_col(); |
2545 | } |
2546 | } else { |
2547 | $s3 = $this->peg_FAILED; |
2548 | } |
2549 | if ($s3 !== $this->peg_FAILED) { |
2550 | $this->peg_reportedPos = $s2; |
2551 | $s3 = $this->peg_f59(); |
2552 | } |
2553 | $s2 = $s3; |
2554 | if ($s2 !== $this->peg_FAILED) { |
2555 | $s3 = $this->peg_parseCURLY_CLOSE(); |
2556 | if ($s3 !== $this->peg_FAILED) { |
2557 | $this->peg_reportedPos = $s0; |
2558 | $s1 = $this->peg_f60($s2); |
2559 | $s0 = $s1; |
2560 | } else { |
2561 | $this->peg_currPos = $s0; |
2562 | $s0 = $this->peg_FAILED; |
2563 | } |
2564 | } else { |
2565 | $this->peg_currPos = $s0; |
2566 | $s0 = $this->peg_FAILED; |
2567 | } |
2568 | } else { |
2569 | $this->peg_currPos = $s0; |
2570 | $s0 = $this->peg_FAILED; |
2571 | } |
2572 | |
2573 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
2574 | |
2575 | return $s0; |
2576 | } |
2577 | |
2578 | private function peg_parseone_col() { |
2579 | |
2580 | $key = $this->peg_currPos * 126 + 26; |
2581 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
2582 | |
2583 | if ($cached) { |
2584 | $this->peg_currPos = $cached["nextPos"]; |
2585 | return $cached["result"]; |
2586 | } |
2587 | |
2588 | $s0 = $this->peg_currPos; |
2589 | if (peg_regex_test($this->peg_c13, $this->input_substr($this->peg_currPos, 1))) { |
2590 | $s1 = $this->input_substr($this->peg_currPos, 1); |
2591 | $this->peg_currPos++; |
2592 | } else { |
2593 | $s1 = $this->peg_FAILED; |
2594 | if ($this->peg_silentFails === 0) { |
2595 | $this->peg_fail($this->peg_c14); |
2596 | } |
2597 | } |
2598 | if ($s1 !== $this->peg_FAILED) { |
2599 | $s2 = $this->peg_parse_(); |
2600 | if ($s2 !== $this->peg_FAILED) { |
2601 | $s1 = array($s1, $s2); |
2602 | $s0 = $s1; |
2603 | } else { |
2604 | $this->peg_currPos = $s0; |
2605 | $s0 = $this->peg_FAILED; |
2606 | } |
2607 | } else { |
2608 | $this->peg_currPos = $s0; |
2609 | $s0 = $this->peg_FAILED; |
2610 | } |
2611 | if ($s0 === $this->peg_FAILED) { |
2612 | $s0 = $this->peg_currPos; |
2613 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c15) { |
2614 | $s1 = $this->peg_c15; |
2615 | $this->peg_currPos++; |
2616 | } else { |
2617 | $s1 = $this->peg_FAILED; |
2618 | if ($this->peg_silentFails === 0) { |
2619 | $this->peg_fail($this->peg_c16); |
2620 | } |
2621 | } |
2622 | if ($s1 !== $this->peg_FAILED) { |
2623 | $s2 = $this->peg_parseCURLY_OPEN(); |
2624 | if ($s2 !== $this->peg_FAILED) { |
2625 | $s3 = array(); |
2626 | $s4 = $this->peg_parseboxchars(); |
2627 | if ($s4 !== $this->peg_FAILED) { |
2628 | while ($s4 !== $this->peg_FAILED) { |
2629 | $s3[] = $s4; |
2630 | $s4 = $this->peg_parseboxchars(); |
2631 | } |
2632 | } else { |
2633 | $s3 = $this->peg_FAILED; |
2634 | } |
2635 | if ($s3 !== $this->peg_FAILED) { |
2636 | $s4 = $this->peg_parseCURLY_CLOSE(); |
2637 | if ($s4 !== $this->peg_FAILED) { |
2638 | $s1 = array($s1, $s2, $s3, $s4); |
2639 | $s0 = $s1; |
2640 | } else { |
2641 | $this->peg_currPos = $s0; |
2642 | $s0 = $this->peg_FAILED; |
2643 | } |
2644 | } else { |
2645 | $this->peg_currPos = $s0; |
2646 | $s0 = $this->peg_FAILED; |
2647 | } |
2648 | } else { |
2649 | $this->peg_currPos = $s0; |
2650 | $s0 = $this->peg_FAILED; |
2651 | } |
2652 | } else { |
2653 | $this->peg_currPos = $s0; |
2654 | $s0 = $this->peg_FAILED; |
2655 | } |
2656 | if ($s0 === $this->peg_FAILED) { |
2657 | $s0 = $this->peg_currPos; |
2658 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c17) { |
2659 | $s1 = $this->peg_c17; |
2660 | $this->peg_currPos++; |
2661 | } else { |
2662 | $s1 = $this->peg_FAILED; |
2663 | if ($this->peg_silentFails === 0) { |
2664 | $this->peg_fail($this->peg_c18); |
2665 | } |
2666 | } |
2667 | if ($s1 !== $this->peg_FAILED) { |
2668 | $s2 = $this->peg_parseCURLY_OPEN(); |
2669 | if ($s2 !== $this->peg_FAILED) { |
2670 | $s3 = array(); |
2671 | if (peg_regex_test($this->peg_c19, $this->input_substr($this->peg_currPos, 1))) { |
2672 | $s4 = $this->input_substr($this->peg_currPos, 1); |
2673 | $this->peg_currPos++; |
2674 | } else { |
2675 | $s4 = $this->peg_FAILED; |
2676 | if ($this->peg_silentFails === 0) { |
2677 | $this->peg_fail($this->peg_c20); |
2678 | } |
2679 | } |
2680 | if ($s4 !== $this->peg_FAILED) { |
2681 | while ($s4 !== $this->peg_FAILED) { |
2682 | $s3[] = $s4; |
2683 | if (peg_regex_test($this->peg_c19, $this->input_substr($this->peg_currPos, 1))) { |
2684 | $s4 = $this->input_substr($this->peg_currPos, 1); |
2685 | $this->peg_currPos++; |
2686 | } else { |
2687 | $s4 = $this->peg_FAILED; |
2688 | if ($this->peg_silentFails === 0) { |
2689 | $this->peg_fail($this->peg_c20); |
2690 | } |
2691 | } |
2692 | } |
2693 | } else { |
2694 | $s3 = $this->peg_FAILED; |
2695 | } |
2696 | if ($s3 !== $this->peg_FAILED) { |
2697 | $s4 = $this->peg_parse_(); |
2698 | if ($s4 !== $this->peg_FAILED) { |
2699 | $s5 = $this->peg_parseCURLY_CLOSE(); |
2700 | if ($s5 !== $this->peg_FAILED) { |
2701 | $s6 = $this->peg_parseone_col(); |
2702 | if ($s6 === $this->peg_FAILED) { |
2703 | $s6 = $this->peg_currPos; |
2704 | $s7 = $this->peg_parseCURLY_OPEN(); |
2705 | if ($s7 !== $this->peg_FAILED) { |
2706 | $s8 = array(); |
2707 | $s9 = $this->peg_parseone_col(); |
2708 | if ($s9 !== $this->peg_FAILED) { |
2709 | while ($s9 !== $this->peg_FAILED) { |
2710 | $s8[] = $s9; |
2711 | $s9 = $this->peg_parseone_col(); |
2712 | } |
2713 | } else { |
2714 | $s8 = $this->peg_FAILED; |
2715 | } |
2716 | if ($s8 !== $this->peg_FAILED) { |
2717 | $s9 = $this->peg_parseCURLY_CLOSE(); |
2718 | if ($s9 !== $this->peg_FAILED) { |
2719 | $s7 = array($s7, $s8, $s9); |
2720 | $s6 = $s7; |
2721 | } else { |
2722 | $this->peg_currPos = $s6; |
2723 | $s6 = $this->peg_FAILED; |
2724 | } |
2725 | } else { |
2726 | $this->peg_currPos = $s6; |
2727 | $s6 = $this->peg_FAILED; |
2728 | } |
2729 | } else { |
2730 | $this->peg_currPos = $s6; |
2731 | $s6 = $this->peg_FAILED; |
2732 | } |
2733 | } |
2734 | if ($s6 !== $this->peg_FAILED) { |
2735 | $s1 = array($s1, $s2, $s3, $s4, $s5, $s6); |
2736 | $s0 = $s1; |
2737 | } else { |
2738 | $this->peg_currPos = $s0; |
2739 | $s0 = $this->peg_FAILED; |
2740 | } |
2741 | } else { |
2742 | $this->peg_currPos = $s0; |
2743 | $s0 = $this->peg_FAILED; |
2744 | } |
2745 | } else { |
2746 | $this->peg_currPos = $s0; |
2747 | $s0 = $this->peg_FAILED; |
2748 | } |
2749 | } else { |
2750 | $this->peg_currPos = $s0; |
2751 | $s0 = $this->peg_FAILED; |
2752 | } |
2753 | } else { |
2754 | $this->peg_currPos = $s0; |
2755 | $s0 = $this->peg_FAILED; |
2756 | } |
2757 | } else { |
2758 | $this->peg_currPos = $s0; |
2759 | $s0 = $this->peg_FAILED; |
2760 | } |
2761 | if ($s0 === $this->peg_FAILED) { |
2762 | $s0 = $this->peg_currPos; |
2763 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c21) { |
2764 | $s1 = $this->peg_c21; |
2765 | $this->peg_currPos += 2; |
2766 | } else { |
2767 | $s1 = $this->peg_FAILED; |
2768 | if ($this->peg_silentFails === 0) { |
2769 | $this->peg_fail($this->peg_c22); |
2770 | } |
2771 | } |
2772 | if ($s1 !== $this->peg_FAILED) { |
2773 | $s2 = $this->peg_parse_(); |
2774 | if ($s2 !== $this->peg_FAILED) { |
2775 | $s1 = array($s1, $s2); |
2776 | $s0 = $s1; |
2777 | } else { |
2778 | $this->peg_currPos = $s0; |
2779 | $s0 = $this->peg_FAILED; |
2780 | } |
2781 | } else { |
2782 | $this->peg_currPos = $s0; |
2783 | $s0 = $this->peg_FAILED; |
2784 | } |
2785 | if ($s0 === $this->peg_FAILED) { |
2786 | $s0 = $this->peg_currPos; |
2787 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c23) { |
2788 | $s1 = $this->peg_c23; |
2789 | $this->peg_currPos++; |
2790 | } else { |
2791 | $s1 = $this->peg_FAILED; |
2792 | if ($this->peg_silentFails === 0) { |
2793 | $this->peg_fail($this->peg_c24); |
2794 | } |
2795 | } |
2796 | if ($s1 !== $this->peg_FAILED) { |
2797 | $s2 = $this->peg_parse_(); |
2798 | if ($s2 !== $this->peg_FAILED) { |
2799 | $s1 = array($s1, $s2); |
2800 | $s0 = $s1; |
2801 | } else { |
2802 | $this->peg_currPos = $s0; |
2803 | $s0 = $this->peg_FAILED; |
2804 | } |
2805 | } else { |
2806 | $this->peg_currPos = $s0; |
2807 | $s0 = $this->peg_FAILED; |
2808 | } |
2809 | if ($s0 === $this->peg_FAILED) { |
2810 | $s0 = $this->peg_currPos; |
2811 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c25) { |
2812 | $s1 = $this->peg_c25; |
2813 | $this->peg_currPos++; |
2814 | } else { |
2815 | $s1 = $this->peg_FAILED; |
2816 | if ($this->peg_silentFails === 0) { |
2817 | $this->peg_fail($this->peg_c26); |
2818 | } |
2819 | } |
2820 | if ($s1 !== $this->peg_FAILED) { |
2821 | $s2 = $this->peg_parse_(); |
2822 | if ($s2 !== $this->peg_FAILED) { |
2823 | $s3 = $this->peg_parseCURLY_OPEN(); |
2824 | if ($s3 !== $this->peg_FAILED) { |
2825 | $s4 = array(); |
2826 | $s5 = $this->peg_parseboxchars(); |
2827 | if ($s5 !== $this->peg_FAILED) { |
2828 | while ($s5 !== $this->peg_FAILED) { |
2829 | $s4[] = $s5; |
2830 | $s5 = $this->peg_parseboxchars(); |
2831 | } |
2832 | } else { |
2833 | $s4 = $this->peg_FAILED; |
2834 | } |
2835 | if ($s4 !== $this->peg_FAILED) { |
2836 | $s5 = $this->peg_parseCURLY_CLOSE(); |
2837 | if ($s5 !== $this->peg_FAILED) { |
2838 | $s1 = array($s1, $s2, $s3, $s4, $s5); |
2839 | $s0 = $s1; |
2840 | } else { |
2841 | $this->peg_currPos = $s0; |
2842 | $s0 = $this->peg_FAILED; |
2843 | } |
2844 | } else { |
2845 | $this->peg_currPos = $s0; |
2846 | $s0 = $this->peg_FAILED; |
2847 | } |
2848 | } else { |
2849 | $this->peg_currPos = $s0; |
2850 | $s0 = $this->peg_FAILED; |
2851 | } |
2852 | } else { |
2853 | $this->peg_currPos = $s0; |
2854 | $s0 = $this->peg_FAILED; |
2855 | } |
2856 | } else { |
2857 | $this->peg_currPos = $s0; |
2858 | $s0 = $this->peg_FAILED; |
2859 | } |
2860 | } |
2861 | } |
2862 | } |
2863 | } |
2864 | } |
2865 | |
2866 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
2867 | |
2868 | return $s0; |
2869 | } |
2870 | |
2871 | private function peg_parsealignat_spec() { |
2872 | |
2873 | $key = $this->peg_currPos * 126 + 27; |
2874 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
2875 | |
2876 | if ($cached) { |
2877 | $this->peg_currPos = $cached["nextPos"]; |
2878 | return $cached["result"]; |
2879 | } |
2880 | |
2881 | $s0 = $this->peg_currPos; |
2882 | $s1 = $this->peg_parseCURLY_OPEN(); |
2883 | if ($s1 !== $this->peg_FAILED) { |
2884 | $s2 = $this->peg_currPos; |
2885 | $s3 = array(); |
2886 | if (peg_regex_test($this->peg_c19, $this->input_substr($this->peg_currPos, 1))) { |
2887 | $s4 = $this->input_substr($this->peg_currPos, 1); |
2888 | $this->peg_currPos++; |
2889 | } else { |
2890 | $s4 = $this->peg_FAILED; |
2891 | if ($this->peg_silentFails === 0) { |
2892 | $this->peg_fail($this->peg_c20); |
2893 | } |
2894 | } |
2895 | if ($s4 !== $this->peg_FAILED) { |
2896 | while ($s4 !== $this->peg_FAILED) { |
2897 | $s3[] = $s4; |
2898 | if (peg_regex_test($this->peg_c19, $this->input_substr($this->peg_currPos, 1))) { |
2899 | $s4 = $this->input_substr($this->peg_currPos, 1); |
2900 | $this->peg_currPos++; |
2901 | } else { |
2902 | $s4 = $this->peg_FAILED; |
2903 | if ($this->peg_silentFails === 0) { |
2904 | $this->peg_fail($this->peg_c20); |
2905 | } |
2906 | } |
2907 | } |
2908 | } else { |
2909 | $s3 = $this->peg_FAILED; |
2910 | } |
2911 | if ($s3 !== $this->peg_FAILED) { |
2912 | $this->peg_reportedPos = $s2; |
2913 | $s3 = $this->peg_f59(); |
2914 | } |
2915 | $s2 = $s3; |
2916 | if ($s2 !== $this->peg_FAILED) { |
2917 | $s3 = $this->peg_parse_(); |
2918 | if ($s3 !== $this->peg_FAILED) { |
2919 | $s4 = $this->peg_parseCURLY_CLOSE(); |
2920 | if ($s4 !== $this->peg_FAILED) { |
2921 | $this->peg_reportedPos = $s0; |
2922 | $s1 = $this->peg_f61($s2); |
2923 | $s0 = $s1; |
2924 | } else { |
2925 | $this->peg_currPos = $s0; |
2926 | $s0 = $this->peg_FAILED; |
2927 | } |
2928 | } else { |
2929 | $this->peg_currPos = $s0; |
2930 | $s0 = $this->peg_FAILED; |
2931 | } |
2932 | } else { |
2933 | $this->peg_currPos = $s0; |
2934 | $s0 = $this->peg_FAILED; |
2935 | } |
2936 | } else { |
2937 | $this->peg_currPos = $s0; |
2938 | $s0 = $this->peg_FAILED; |
2939 | } |
2940 | |
2941 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
2942 | |
2943 | return $s0; |
2944 | } |
2945 | |
2946 | private function peg_parseopt_pos() { |
2947 | |
2948 | $key = $this->peg_currPos * 126 + 28; |
2949 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
2950 | |
2951 | if ($cached) { |
2952 | $this->peg_currPos = $cached["nextPos"]; |
2953 | return $cached["result"]; |
2954 | } |
2955 | |
2956 | $s0 = $this->peg_currPos; |
2957 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c5) { |
2958 | $s1 = $this->peg_c5; |
2959 | $this->peg_currPos++; |
2960 | } else { |
2961 | $s1 = $this->peg_FAILED; |
2962 | if ($this->peg_silentFails === 0) { |
2963 | $this->peg_fail($this->peg_c6); |
2964 | } |
2965 | } |
2966 | if ($s1 !== $this->peg_FAILED) { |
2967 | $s2 = $this->peg_parse_(); |
2968 | if ($s2 !== $this->peg_FAILED) { |
2969 | if (peg_regex_test($this->peg_c27, $this->input_substr($this->peg_currPos, 1))) { |
2970 | $s3 = $this->input_substr($this->peg_currPos, 1); |
2971 | $this->peg_currPos++; |
2972 | } else { |
2973 | $s3 = $this->peg_FAILED; |
2974 | if ($this->peg_silentFails === 0) { |
2975 | $this->peg_fail($this->peg_c28); |
2976 | } |
2977 | } |
2978 | if ($s3 !== $this->peg_FAILED) { |
2979 | $s4 = $this->peg_parse_(); |
2980 | if ($s4 !== $this->peg_FAILED) { |
2981 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c29) { |
2982 | $s5 = $this->peg_c29; |
2983 | $this->peg_currPos++; |
2984 | } else { |
2985 | $s5 = $this->peg_FAILED; |
2986 | if ($this->peg_silentFails === 0) { |
2987 | $this->peg_fail($this->peg_c30); |
2988 | } |
2989 | } |
2990 | if ($s5 !== $this->peg_FAILED) { |
2991 | $s6 = $this->peg_parse_(); |
2992 | if ($s6 !== $this->peg_FAILED) { |
2993 | $s1 = array($s1, $s2, $s3, $s4, $s5, $s6); |
2994 | $s0 = $s1; |
2995 | } else { |
2996 | $this->peg_currPos = $s0; |
2997 | $s0 = $this->peg_FAILED; |
2998 | } |
2999 | } else { |
3000 | $this->peg_currPos = $s0; |
3001 | $s0 = $this->peg_FAILED; |
3002 | } |
3003 | } else { |
3004 | $this->peg_currPos = $s0; |
3005 | $s0 = $this->peg_FAILED; |
3006 | } |
3007 | } else { |
3008 | $this->peg_currPos = $s0; |
3009 | $s0 = $this->peg_FAILED; |
3010 | } |
3011 | } else { |
3012 | $this->peg_currPos = $s0; |
3013 | $s0 = $this->peg_FAILED; |
3014 | } |
3015 | } else { |
3016 | $this->peg_currPos = $s0; |
3017 | $s0 = $this->peg_FAILED; |
3018 | } |
3019 | if ($s0 === $this->peg_FAILED) { |
3020 | $s0 = $this->peg_c2; |
3021 | } |
3022 | |
3023 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3024 | |
3025 | return $s0; |
3026 | } |
3027 | |
3028 | private function peg_parsechem_lit() { |
3029 | |
3030 | $key = $this->peg_currPos * 126 + 29; |
3031 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3032 | |
3033 | if ($cached) { |
3034 | $this->peg_currPos = $cached["nextPos"]; |
3035 | return $cached["result"]; |
3036 | } |
3037 | |
3038 | $s0 = $this->peg_currPos; |
3039 | $s1 = $this->peg_parseCURLY_OPEN(); |
3040 | if ($s1 !== $this->peg_FAILED) { |
3041 | $s2 = $this->peg_parsechem_sentence(); |
3042 | if ($s2 !== $this->peg_FAILED) { |
3043 | $s3 = $this->peg_parseCURLY_CLOSE(); |
3044 | if ($s3 !== $this->peg_FAILED) { |
3045 | $this->peg_reportedPos = $s0; |
3046 | $s1 = $this->peg_f36($s2); |
3047 | $s0 = $s1; |
3048 | } else { |
3049 | $this->peg_currPos = $s0; |
3050 | $s0 = $this->peg_FAILED; |
3051 | } |
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 | |
3061 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3062 | |
3063 | return $s0; |
3064 | } |
3065 | |
3066 | private function peg_parsechem_sentence() { |
3067 | |
3068 | $key = $this->peg_currPos * 126 + 30; |
3069 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3070 | |
3071 | if ($cached) { |
3072 | $this->peg_currPos = $cached["nextPos"]; |
3073 | return $cached["result"]; |
3074 | } |
3075 | |
3076 | $s0 = $this->peg_currPos; |
3077 | $s1 = $this->peg_parse_(); |
3078 | if ($s1 !== $this->peg_FAILED) { |
3079 | $s2 = $this->peg_parsechem_phrase(); |
3080 | if ($s2 !== $this->peg_FAILED) { |
3081 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c31) { |
3082 | $s3 = $this->peg_c31; |
3083 | $this->peg_currPos++; |
3084 | } else { |
3085 | $s3 = $this->peg_FAILED; |
3086 | if ($this->peg_silentFails === 0) { |
3087 | $this->peg_fail($this->peg_c32); |
3088 | } |
3089 | } |
3090 | if ($s3 !== $this->peg_FAILED) { |
3091 | $s4 = $this->peg_parsechem_sentence(); |
3092 | if ($s4 !== $this->peg_FAILED) { |
3093 | $this->peg_reportedPos = $s0; |
3094 | $s1 = $this->peg_f62($s2, $s4); |
3095 | $s0 = $s1; |
3096 | } else { |
3097 | $this->peg_currPos = $s0; |
3098 | $s0 = $this->peg_FAILED; |
3099 | } |
3100 | } else { |
3101 | $this->peg_currPos = $s0; |
3102 | $s0 = $this->peg_FAILED; |
3103 | } |
3104 | } else { |
3105 | $this->peg_currPos = $s0; |
3106 | $s0 = $this->peg_FAILED; |
3107 | } |
3108 | } else { |
3109 | $this->peg_currPos = $s0; |
3110 | $s0 = $this->peg_FAILED; |
3111 | } |
3112 | if ($s0 === $this->peg_FAILED) { |
3113 | $s0 = $this->peg_currPos; |
3114 | $s1 = $this->peg_parse_(); |
3115 | if ($s1 !== $this->peg_FAILED) { |
3116 | $s2 = $this->peg_parsechem_phrase(); |
3117 | if ($s2 !== $this->peg_FAILED) { |
3118 | $s3 = $this->peg_parse_(); |
3119 | if ($s3 !== $this->peg_FAILED) { |
3120 | $this->peg_reportedPos = $s0; |
3121 | $s1 = $this->peg_f63($s2); |
3122 | $s0 = $s1; |
3123 | } else { |
3124 | $this->peg_currPos = $s0; |
3125 | $s0 = $this->peg_FAILED; |
3126 | } |
3127 | } else { |
3128 | $this->peg_currPos = $s0; |
3129 | $s0 = $this->peg_FAILED; |
3130 | } |
3131 | } else { |
3132 | $this->peg_currPos = $s0; |
3133 | $s0 = $this->peg_FAILED; |
3134 | } |
3135 | } |
3136 | |
3137 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3138 | |
3139 | return $s0; |
3140 | } |
3141 | |
3142 | private function peg_parsechem_phrase() { |
3143 | |
3144 | $key = $this->peg_currPos * 126 + 31; |
3145 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3146 | |
3147 | if ($cached) { |
3148 | $this->peg_currPos = $cached["nextPos"]; |
3149 | return $cached["result"]; |
3150 | } |
3151 | |
3152 | $s0 = $this->peg_currPos; |
3153 | if ($this->input_substr($this->peg_currPos, 3) === $this->peg_c33) { |
3154 | $s1 = $this->peg_c33; |
3155 | $this->peg_currPos += 3; |
3156 | } else { |
3157 | $s1 = $this->peg_FAILED; |
3158 | if ($this->peg_silentFails === 0) { |
3159 | $this->peg_fail($this->peg_c34); |
3160 | } |
3161 | } |
3162 | if ($s1 !== $this->peg_FAILED) { |
3163 | $this->peg_reportedPos = $s0; |
3164 | $s1 = $this->peg_f64($s1); |
3165 | } |
3166 | $s0 = $s1; |
3167 | if ($s0 === $this->peg_FAILED) { |
3168 | $s0 = $this->peg_currPos; |
3169 | $s1 = $this->peg_parsechem_word(); |
3170 | if ($s1 !== $this->peg_FAILED) { |
3171 | $s2 = $this->peg_parseCHEM_SINGLE_MACRO(); |
3172 | if ($s2 !== $this->peg_FAILED) { |
3173 | $this->peg_reportedPos = $s0; |
3174 | $s1 = $this->peg_f65($s1, $s2); |
3175 | $s0 = $s1; |
3176 | } else { |
3177 | $this->peg_currPos = $s0; |
3178 | $s0 = $this->peg_FAILED; |
3179 | } |
3180 | } else { |
3181 | $this->peg_currPos = $s0; |
3182 | $s0 = $this->peg_FAILED; |
3183 | } |
3184 | if ($s0 === $this->peg_FAILED) { |
3185 | $s0 = $this->peg_currPos; |
3186 | $s1 = $this->peg_parsechem_word(); |
3187 | if ($s1 !== $this->peg_FAILED) { |
3188 | $this->peg_reportedPos = $s0; |
3189 | $s1 = $this->peg_f66($s1); |
3190 | } |
3191 | $s0 = $s1; |
3192 | if ($s0 === $this->peg_FAILED) { |
3193 | $s0 = $this->peg_currPos; |
3194 | $s1 = $this->peg_parseCHEM_SINGLE_MACRO(); |
3195 | if ($s1 !== $this->peg_FAILED) { |
3196 | $this->peg_reportedPos = $s0; |
3197 | $s1 = $this->peg_f64($s1); |
3198 | } |
3199 | $s0 = $s1; |
3200 | if ($s0 === $this->peg_FAILED) { |
3201 | $s0 = $this->peg_currPos; |
3202 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c35) { |
3203 | $s1 = $this->peg_c35; |
3204 | $this->peg_currPos++; |
3205 | } else { |
3206 | $s1 = $this->peg_FAILED; |
3207 | if ($this->peg_silentFails === 0) { |
3208 | $this->peg_fail($this->peg_c36); |
3209 | } |
3210 | } |
3211 | if ($s1 !== $this->peg_FAILED) { |
3212 | $this->peg_reportedPos = $s0; |
3213 | $s1 = $this->peg_f64($s1); |
3214 | } |
3215 | $s0 = $s1; |
3216 | } |
3217 | } |
3218 | } |
3219 | } |
3220 | |
3221 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3222 | |
3223 | return $s0; |
3224 | } |
3225 | |
3226 | private function peg_parsechem_word() { |
3227 | |
3228 | $key = $this->peg_currPos * 126 + 32; |
3229 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3230 | |
3231 | if ($cached) { |
3232 | $this->peg_currPos = $cached["nextPos"]; |
3233 | return $cached["result"]; |
3234 | } |
3235 | |
3236 | $s0 = $this->peg_currPos; |
3237 | $s1 = $this->peg_parsechem_char(); |
3238 | if ($s1 !== $this->peg_FAILED) { |
3239 | $s2 = $this->peg_parsechem_word_nt(); |
3240 | if ($s2 !== $this->peg_FAILED) { |
3241 | $this->peg_reportedPos = $s0; |
3242 | $s1 = $this->peg_f67($s1, $s2); |
3243 | $s0 = $s1; |
3244 | } else { |
3245 | $this->peg_currPos = $s0; |
3246 | $s0 = $this->peg_FAILED; |
3247 | } |
3248 | } else { |
3249 | $this->peg_currPos = $s0; |
3250 | $s0 = $this->peg_FAILED; |
3251 | } |
3252 | if ($s0 === $this->peg_FAILED) { |
3253 | $s0 = $this->peg_currPos; |
3254 | $s1 = $this->peg_parseCHEM_SINGLE_MACRO(); |
3255 | if ($s1 !== $this->peg_FAILED) { |
3256 | $s2 = $this->peg_parsechem_char_nl(); |
3257 | if ($s2 !== $this->peg_FAILED) { |
3258 | $s3 = $this->peg_parsechem_word_nt(); |
3259 | if ($s3 !== $this->peg_FAILED) { |
3260 | $this->peg_reportedPos = $s0; |
3261 | $s1 = $this->peg_f68($s1, $s2, $s3); |
3262 | $s0 = $s1; |
3263 | } else { |
3264 | $this->peg_currPos = $s0; |
3265 | $s0 = $this->peg_FAILED; |
3266 | } |
3267 | } else { |
3268 | $this->peg_currPos = $s0; |
3269 | $s0 = $this->peg_FAILED; |
3270 | } |
3271 | } else { |
3272 | $this->peg_currPos = $s0; |
3273 | $s0 = $this->peg_FAILED; |
3274 | } |
3275 | } |
3276 | |
3277 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3278 | |
3279 | return $s0; |
3280 | } |
3281 | |
3282 | private function peg_parsechem_word_nt() { |
3283 | |
3284 | $key = $this->peg_currPos * 126 + 33; |
3285 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3286 | |
3287 | if ($cached) { |
3288 | $this->peg_currPos = $cached["nextPos"]; |
3289 | return $cached["result"]; |
3290 | } |
3291 | |
3292 | $s0 = $this->peg_currPos; |
3293 | $s1 = $this->peg_parsechem_word(); |
3294 | if ($s1 !== $this->peg_FAILED) { |
3295 | $this->peg_reportedPos = $s0; |
3296 | $s1 = $this->peg_f66($s1); |
3297 | } |
3298 | $s0 = $s1; |
3299 | if ($s0 === $this->peg_FAILED) { |
3300 | $s0 = $this->peg_currPos; |
3301 | $s1 = $this->peg_c2; |
3302 | if ($s1 !== $this->peg_FAILED) { |
3303 | $this->peg_reportedPos = $s0; |
3304 | $s1 = $this->peg_f69(); |
3305 | } |
3306 | $s0 = $s1; |
3307 | } |
3308 | |
3309 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3310 | |
3311 | return $s0; |
3312 | } |
3313 | |
3314 | private function peg_parsechem_char() { |
3315 | |
3316 | $key = $this->peg_currPos * 126 + 34; |
3317 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3318 | |
3319 | if ($cached) { |
3320 | $this->peg_currPos = $cached["nextPos"]; |
3321 | return $cached["result"]; |
3322 | } |
3323 | |
3324 | $s0 = $this->peg_currPos; |
3325 | $s1 = $this->peg_parsechem_char_nl(); |
3326 | if ($s1 !== $this->peg_FAILED) { |
3327 | $this->peg_reportedPos = $s0; |
3328 | $s1 = $this->peg_f70($s1); |
3329 | } |
3330 | $s0 = $s1; |
3331 | if ($s0 === $this->peg_FAILED) { |
3332 | $s0 = $this->peg_currPos; |
3333 | $s1 = $this->peg_parseCHEM_LETTER(); |
3334 | if ($s1 !== $this->peg_FAILED) { |
3335 | $this->peg_reportedPos = $s0; |
3336 | $s1 = $this->peg_f71($s1); |
3337 | } |
3338 | $s0 = $s1; |
3339 | } |
3340 | |
3341 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3342 | |
3343 | return $s0; |
3344 | } |
3345 | |
3346 | private function peg_parsechem_char_nl() { |
3347 | |
3348 | $key = $this->peg_currPos * 126 + 35; |
3349 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3350 | |
3351 | if ($cached) { |
3352 | $this->peg_currPos = $cached["nextPos"]; |
3353 | return $cached["result"]; |
3354 | } |
3355 | |
3356 | $s0 = $this->peg_currPos; |
3357 | $s1 = $this->peg_parsechem_script(); |
3358 | if ($s1 !== $this->peg_FAILED) { |
3359 | $this->peg_reportedPos = $s0; |
3360 | $s1 = $this->peg_f70($s1); |
3361 | } |
3362 | $s0 = $s1; |
3363 | if ($s0 === $this->peg_FAILED) { |
3364 | $s0 = $this->peg_currPos; |
3365 | $s1 = $this->peg_parseCURLY_OPEN(); |
3366 | if ($s1 !== $this->peg_FAILED) { |
3367 | $s2 = $this->peg_parsechem_text(); |
3368 | if ($s2 !== $this->peg_FAILED) { |
3369 | $s3 = $this->peg_parseCURLY_CLOSE(); |
3370 | if ($s3 !== $this->peg_FAILED) { |
3371 | $this->peg_reportedPos = $s0; |
3372 | $s1 = $this->peg_f72($s2); |
3373 | $s0 = $s1; |
3374 | } else { |
3375 | $this->peg_currPos = $s0; |
3376 | $s0 = $this->peg_FAILED; |
3377 | } |
3378 | } else { |
3379 | $this->peg_currPos = $s0; |
3380 | $s0 = $this->peg_FAILED; |
3381 | } |
3382 | } else { |
3383 | $this->peg_currPos = $s0; |
3384 | $s0 = $this->peg_FAILED; |
3385 | } |
3386 | if ($s0 === $this->peg_FAILED) { |
3387 | $s0 = $this->peg_currPos; |
3388 | $s1 = $this->peg_parseBEGIN_MATH(); |
3389 | if ($s1 !== $this->peg_FAILED) { |
3390 | $s2 = $this->peg_parseexpr(); |
3391 | if ($s2 !== $this->peg_FAILED) { |
3392 | $s3 = $this->peg_parseEND_MATH(); |
3393 | if ($s3 !== $this->peg_FAILED) { |
3394 | $this->peg_reportedPos = $s0; |
3395 | $s1 = $this->peg_f73($s2); |
3396 | $s0 = $s1; |
3397 | } else { |
3398 | $this->peg_currPos = $s0; |
3399 | $s0 = $this->peg_FAILED; |
3400 | } |
3401 | } else { |
3402 | $this->peg_currPos = $s0; |
3403 | $s0 = $this->peg_FAILED; |
3404 | } |
3405 | } else { |
3406 | $this->peg_currPos = $s0; |
3407 | $s0 = $this->peg_FAILED; |
3408 | } |
3409 | if ($s0 === $this->peg_FAILED) { |
3410 | $s0 = $this->peg_currPos; |
3411 | $s1 = $this->peg_parseCHEM_BONDI(); |
3412 | if ($s1 !== $this->peg_FAILED) { |
3413 | $s2 = $this->peg_parsechem_bond(); |
3414 | if ($s2 !== $this->peg_FAILED) { |
3415 | $this->peg_reportedPos = $s0; |
3416 | $s1 = $this->peg_f30($s1, $s2); |
3417 | $s0 = $s1; |
3418 | } else { |
3419 | $this->peg_currPos = $s0; |
3420 | $s0 = $this->peg_FAILED; |
3421 | } |
3422 | } else { |
3423 | $this->peg_currPos = $s0; |
3424 | $s0 = $this->peg_FAILED; |
3425 | } |
3426 | if ($s0 === $this->peg_FAILED) { |
3427 | $s0 = $this->peg_currPos; |
3428 | $s1 = $this->peg_parsechem_macro(); |
3429 | if ($s1 !== $this->peg_FAILED) { |
3430 | $this->peg_reportedPos = $s0; |
3431 | $s1 = $this->peg_f66($s1); |
3432 | } |
3433 | $s0 = $s1; |
3434 | if ($s0 === $this->peg_FAILED) { |
3435 | $s0 = $this->peg_currPos; |
3436 | $s1 = $this->peg_parseCHEM_NONLETTER(); |
3437 | if ($s1 !== $this->peg_FAILED) { |
3438 | $this->peg_reportedPos = $s0; |
3439 | $s1 = $this->peg_f71($s1); |
3440 | } |
3441 | $s0 = $s1; |
3442 | } |
3443 | } |
3444 | } |
3445 | } |
3446 | } |
3447 | |
3448 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3449 | |
3450 | return $s0; |
3451 | } |
3452 | |
3453 | private function peg_parsechem_bond() { |
3454 | |
3455 | $key = $this->peg_currPos * 126 + 36; |
3456 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3457 | |
3458 | if ($cached) { |
3459 | $this->peg_currPos = $cached["nextPos"]; |
3460 | return $cached["result"]; |
3461 | } |
3462 | |
3463 | $s0 = $this->peg_currPos; |
3464 | $s1 = $this->peg_parseCURLY_OPEN(); |
3465 | if ($s1 !== $this->peg_FAILED) { |
3466 | $s2 = $this->peg_parseCHEM_BOND_TYPE(); |
3467 | if ($s2 !== $this->peg_FAILED) { |
3468 | $s3 = $this->peg_parseCURLY_CLOSE(); |
3469 | if ($s3 !== $this->peg_FAILED) { |
3470 | $this->peg_reportedPos = $s0; |
3471 | $s1 = $this->peg_f74($s2); |
3472 | $s0 = $s1; |
3473 | } else { |
3474 | $this->peg_currPos = $s0; |
3475 | $s0 = $this->peg_FAILED; |
3476 | } |
3477 | } else { |
3478 | $this->peg_currPos = $s0; |
3479 | $s0 = $this->peg_FAILED; |
3480 | } |
3481 | } else { |
3482 | $this->peg_currPos = $s0; |
3483 | $s0 = $this->peg_FAILED; |
3484 | } |
3485 | |
3486 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3487 | |
3488 | return $s0; |
3489 | } |
3490 | |
3491 | private function peg_parsechem_script() { |
3492 | |
3493 | $key = $this->peg_currPos * 126 + 37; |
3494 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3495 | |
3496 | if ($cached) { |
3497 | $this->peg_currPos = $cached["nextPos"]; |
3498 | return $cached["result"]; |
3499 | } |
3500 | |
3501 | $s0 = $this->peg_currPos; |
3502 | $s1 = $this->peg_parseCHEM_SUPERSUB(); |
3503 | if ($s1 !== $this->peg_FAILED) { |
3504 | $s2 = $this->peg_parseCHEM_SCRIPT_FOLLOW(); |
3505 | if ($s2 !== $this->peg_FAILED) { |
3506 | $this->peg_reportedPos = $s0; |
3507 | $s1 = $this->peg_f75($s1, $s2); |
3508 | $s0 = $s1; |
3509 | } else { |
3510 | $this->peg_currPos = $s0; |
3511 | $s0 = $this->peg_FAILED; |
3512 | } |
3513 | } else { |
3514 | $this->peg_currPos = $s0; |
3515 | $s0 = $this->peg_FAILED; |
3516 | } |
3517 | if ($s0 === $this->peg_FAILED) { |
3518 | $s0 = $this->peg_currPos; |
3519 | $s1 = $this->peg_parseCHEM_SUPERSUB(); |
3520 | if ($s1 !== $this->peg_FAILED) { |
3521 | $s2 = $this->peg_parsechem_lit(); |
3522 | if ($s2 !== $this->peg_FAILED) { |
3523 | $this->peg_reportedPos = $s0; |
3524 | $s1 = $this->peg_f76($s1, $s2); |
3525 | $s0 = $s1; |
3526 | } else { |
3527 | $this->peg_currPos = $s0; |
3528 | $s0 = $this->peg_FAILED; |
3529 | } |
3530 | } else { |
3531 | $this->peg_currPos = $s0; |
3532 | $s0 = $this->peg_FAILED; |
3533 | } |
3534 | if ($s0 === $this->peg_FAILED) { |
3535 | $s0 = $this->peg_currPos; |
3536 | $s1 = $this->peg_parseCHEM_SUPERSUB(); |
3537 | if ($s1 !== $this->peg_FAILED) { |
3538 | $s2 = $this->peg_parseBEGIN_MATH(); |
3539 | if ($s2 !== $this->peg_FAILED) { |
3540 | $s3 = $this->peg_parseexpr(); |
3541 | if ($s3 !== $this->peg_FAILED) { |
3542 | $s4 = $this->peg_parseEND_MATH(); |
3543 | if ($s4 !== $this->peg_FAILED) { |
3544 | $this->peg_reportedPos = $s0; |
3545 | $s1 = $this->peg_f77($s1, $s3); |
3546 | $s0 = $s1; |
3547 | } else { |
3548 | $this->peg_currPos = $s0; |
3549 | $s0 = $this->peg_FAILED; |
3550 | } |
3551 | } else { |
3552 | $this->peg_currPos = $s0; |
3553 | $s0 = $this->peg_FAILED; |
3554 | } |
3555 | } else { |
3556 | $this->peg_currPos = $s0; |
3557 | $s0 = $this->peg_FAILED; |
3558 | } |
3559 | } else { |
3560 | $this->peg_currPos = $s0; |
3561 | $s0 = $this->peg_FAILED; |
3562 | } |
3563 | } |
3564 | } |
3565 | |
3566 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3567 | |
3568 | return $s0; |
3569 | } |
3570 | |
3571 | private function peg_parsechem_macro() { |
3572 | |
3573 | $key = $this->peg_currPos * 126 + 38; |
3574 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3575 | |
3576 | if ($cached) { |
3577 | $this->peg_currPos = $cached["nextPos"]; |
3578 | return $cached["result"]; |
3579 | } |
3580 | |
3581 | $s0 = $this->peg_currPos; |
3582 | $s1 = $this->peg_parseCHEM_MACRO_2PU(); |
3583 | if ($s1 !== $this->peg_FAILED) { |
3584 | $s2 = $this->peg_parsechem_lit(); |
3585 | if ($s2 !== $this->peg_FAILED) { |
3586 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c37) { |
3587 | $s3 = $this->peg_c37; |
3588 | $this->peg_currPos++; |
3589 | } else { |
3590 | $s3 = $this->peg_FAILED; |
3591 | if ($this->peg_silentFails === 0) { |
3592 | $this->peg_fail($this->peg_c38); |
3593 | } |
3594 | } |
3595 | if ($s3 !== $this->peg_FAILED) { |
3596 | $s4 = $this->peg_parsechem_lit(); |
3597 | if ($s4 !== $this->peg_FAILED) { |
3598 | $this->peg_reportedPos = $s0; |
3599 | $s1 = $this->peg_f78($s1, $s2, $s4); |
3600 | $s0 = $s1; |
3601 | } else { |
3602 | $this->peg_currPos = $s0; |
3603 | $s0 = $this->peg_FAILED; |
3604 | } |
3605 | } else { |
3606 | $this->peg_currPos = $s0; |
3607 | $s0 = $this->peg_FAILED; |
3608 | } |
3609 | } else { |
3610 | $this->peg_currPos = $s0; |
3611 | $s0 = $this->peg_FAILED; |
3612 | } |
3613 | } else { |
3614 | $this->peg_currPos = $s0; |
3615 | $s0 = $this->peg_FAILED; |
3616 | } |
3617 | if ($s0 === $this->peg_FAILED) { |
3618 | $s0 = $this->peg_currPos; |
3619 | $s1 = $this->peg_parseCHEM_MACRO_2PC(); |
3620 | if ($s1 !== $this->peg_FAILED) { |
3621 | $s2 = $this->peg_parseCHEM_COLOR(); |
3622 | if ($s2 !== $this->peg_FAILED) { |
3623 | $s3 = $this->peg_parsechem_lit(); |
3624 | if ($s3 !== $this->peg_FAILED) { |
3625 | $this->peg_reportedPos = $s0; |
3626 | $s1 = $this->peg_f33($s1, $s2, $s3); |
3627 | $s0 = $s1; |
3628 | } else { |
3629 | $this->peg_currPos = $s0; |
3630 | $s0 = $this->peg_FAILED; |
3631 | } |
3632 | } else { |
3633 | $this->peg_currPos = $s0; |
3634 | $s0 = $this->peg_FAILED; |
3635 | } |
3636 | } else { |
3637 | $this->peg_currPos = $s0; |
3638 | $s0 = $this->peg_FAILED; |
3639 | } |
3640 | if ($s0 === $this->peg_FAILED) { |
3641 | $s0 = $this->peg_currPos; |
3642 | $s1 = $this->peg_parseCHEM_MACRO_2P(); |
3643 | if ($s1 !== $this->peg_FAILED) { |
3644 | $s2 = $this->peg_parsechem_lit(); |
3645 | if ($s2 !== $this->peg_FAILED) { |
3646 | $s3 = $this->peg_parsechem_lit(); |
3647 | if ($s3 !== $this->peg_FAILED) { |
3648 | $this->peg_reportedPos = $s0; |
3649 | $s1 = $this->peg_f33($s1, $s2, $s3); |
3650 | $s0 = $s1; |
3651 | } else { |
3652 | $this->peg_currPos = $s0; |
3653 | $s0 = $this->peg_FAILED; |
3654 | } |
3655 | } else { |
3656 | $this->peg_currPos = $s0; |
3657 | $s0 = $this->peg_FAILED; |
3658 | } |
3659 | } else { |
3660 | $this->peg_currPos = $s0; |
3661 | $s0 = $this->peg_FAILED; |
3662 | } |
3663 | if ($s0 === $this->peg_FAILED) { |
3664 | $s0 = $this->peg_currPos; |
3665 | $s1 = $this->peg_parseCHEM_MACRO_1P(); |
3666 | if ($s1 !== $this->peg_FAILED) { |
3667 | $s2 = $this->peg_parsechem_lit(); |
3668 | if ($s2 !== $this->peg_FAILED) { |
3669 | $this->peg_reportedPos = $s0; |
3670 | $s1 = $this->peg_f30($s1, $s2); |
3671 | $s0 = $s1; |
3672 | } else { |
3673 | $this->peg_currPos = $s0; |
3674 | $s0 = $this->peg_FAILED; |
3675 | } |
3676 | } else { |
3677 | $this->peg_currPos = $s0; |
3678 | $s0 = $this->peg_FAILED; |
3679 | } |
3680 | } |
3681 | } |
3682 | } |
3683 | |
3684 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3685 | |
3686 | return $s0; |
3687 | } |
3688 | |
3689 | private function peg_parsechem_text() { |
3690 | |
3691 | $key = $this->peg_currPos * 126 + 39; |
3692 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3693 | |
3694 | if ($cached) { |
3695 | $this->peg_currPos = $cached["nextPos"]; |
3696 | return $cached["result"]; |
3697 | } |
3698 | |
3699 | $s0 = $this->peg_currPos; |
3700 | $s1 = array(); |
3701 | $s2 = $this->peg_parseboxchars(); |
3702 | if ($s2 !== $this->peg_FAILED) { |
3703 | while ($s2 !== $this->peg_FAILED) { |
3704 | $s1[] = $s2; |
3705 | $s2 = $this->peg_parseboxchars(); |
3706 | } |
3707 | } else { |
3708 | $s1 = $this->peg_FAILED; |
3709 | } |
3710 | if ($s1 !== $this->peg_FAILED) { |
3711 | $this->peg_reportedPos = $s0; |
3712 | $s1 = $this->peg_f79($s1); |
3713 | } |
3714 | $s0 = $s1; |
3715 | |
3716 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3717 | |
3718 | return $s0; |
3719 | } |
3720 | |
3721 | private function peg_parseCHEM_COLOR() { |
3722 | |
3723 | $key = $this->peg_currPos * 126 + 40; |
3724 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3725 | |
3726 | if ($cached) { |
3727 | $this->peg_currPos = $cached["nextPos"]; |
3728 | return $cached["result"]; |
3729 | } |
3730 | |
3731 | $s0 = $this->peg_currPos; |
3732 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c39) { |
3733 | $s1 = $this->peg_c39; |
3734 | $this->peg_currPos++; |
3735 | } else { |
3736 | $s1 = $this->peg_FAILED; |
3737 | if ($this->peg_silentFails === 0) { |
3738 | $this->peg_fail($this->peg_c40); |
3739 | } |
3740 | } |
3741 | if ($s1 !== $this->peg_FAILED) { |
3742 | $s2 = $this->peg_parse_(); |
3743 | if ($s2 !== $this->peg_FAILED) { |
3744 | $s3 = array(); |
3745 | $s4 = $this->peg_parsealpha(); |
3746 | if ($s4 !== $this->peg_FAILED) { |
3747 | while ($s4 !== $this->peg_FAILED) { |
3748 | $s3[] = $s4; |
3749 | $s4 = $this->peg_parsealpha(); |
3750 | } |
3751 | } else { |
3752 | $s3 = $this->peg_FAILED; |
3753 | } |
3754 | if ($s3 !== $this->peg_FAILED) { |
3755 | $s4 = $this->peg_parse_(); |
3756 | if ($s4 !== $this->peg_FAILED) { |
3757 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c11) { |
3758 | $s5 = $this->peg_c11; |
3759 | $this->peg_currPos++; |
3760 | } else { |
3761 | $s5 = $this->peg_FAILED; |
3762 | if ($this->peg_silentFails === 0) { |
3763 | $this->peg_fail($this->peg_c12); |
3764 | } |
3765 | } |
3766 | if ($s5 !== $this->peg_FAILED) { |
3767 | $s6 = $this->peg_parse_(); |
3768 | if ($s6 !== $this->peg_FAILED) { |
3769 | $this->peg_reportedPos = $s0; |
3770 | $s1 = $this->peg_f80($s3); |
3771 | $s0 = $s1; |
3772 | } else { |
3773 | $this->peg_currPos = $s0; |
3774 | $s0 = $this->peg_FAILED; |
3775 | } |
3776 | } else { |
3777 | $this->peg_currPos = $s0; |
3778 | $s0 = $this->peg_FAILED; |
3779 | } |
3780 | } else { |
3781 | $this->peg_currPos = $s0; |
3782 | $s0 = $this->peg_FAILED; |
3783 | } |
3784 | } else { |
3785 | $this->peg_currPos = $s0; |
3786 | $s0 = $this->peg_FAILED; |
3787 | } |
3788 | } else { |
3789 | $this->peg_currPos = $s0; |
3790 | $s0 = $this->peg_FAILED; |
3791 | } |
3792 | } else { |
3793 | $this->peg_currPos = $s0; |
3794 | $s0 = $this->peg_FAILED; |
3795 | } |
3796 | |
3797 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3798 | |
3799 | return $s0; |
3800 | } |
3801 | |
3802 | private function peg_parsealpha() { |
3803 | |
3804 | $key = $this->peg_currPos * 126 + 41; |
3805 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3806 | |
3807 | if ($cached) { |
3808 | $this->peg_currPos = $cached["nextPos"]; |
3809 | return $cached["result"]; |
3810 | } |
3811 | |
3812 | if (peg_regex_test($this->peg_c41, $this->input_substr($this->peg_currPos, 1))) { |
3813 | $s0 = $this->input_substr($this->peg_currPos, 1); |
3814 | $this->peg_currPos++; |
3815 | } else { |
3816 | $s0 = $this->peg_FAILED; |
3817 | if ($this->peg_silentFails === 0) { |
3818 | $this->peg_fail($this->peg_c42); |
3819 | } |
3820 | } |
3821 | |
3822 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3823 | |
3824 | return $s0; |
3825 | } |
3826 | |
3827 | private function peg_parseliteral_id() { |
3828 | |
3829 | $key = $this->peg_currPos * 126 + 42; |
3830 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3831 | |
3832 | if ($cached) { |
3833 | $this->peg_currPos = $cached["nextPos"]; |
3834 | return $cached["result"]; |
3835 | } |
3836 | |
3837 | if (peg_regex_test($this->peg_c41, $this->input_substr($this->peg_currPos, 1))) { |
3838 | $s0 = $this->input_substr($this->peg_currPos, 1); |
3839 | $this->peg_currPos++; |
3840 | } else { |
3841 | $s0 = $this->peg_FAILED; |
3842 | if ($this->peg_silentFails === 0) { |
3843 | $this->peg_fail($this->peg_c42); |
3844 | } |
3845 | } |
3846 | |
3847 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3848 | |
3849 | return $s0; |
3850 | } |
3851 | |
3852 | private function peg_parseliteral_mn() { |
3853 | |
3854 | $key = $this->peg_currPos * 126 + 43; |
3855 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3856 | |
3857 | if ($cached) { |
3858 | $this->peg_currPos = $cached["nextPos"]; |
3859 | return $cached["result"]; |
3860 | } |
3861 | |
3862 | if (peg_regex_test($this->peg_c19, $this->input_substr($this->peg_currPos, 1))) { |
3863 | $s0 = $this->input_substr($this->peg_currPos, 1); |
3864 | $this->peg_currPos++; |
3865 | } else { |
3866 | $s0 = $this->peg_FAILED; |
3867 | if ($this->peg_silentFails === 0) { |
3868 | $this->peg_fail($this->peg_c20); |
3869 | } |
3870 | } |
3871 | |
3872 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3873 | |
3874 | return $s0; |
3875 | } |
3876 | |
3877 | private function peg_parseliteral_uf_lt() { |
3878 | |
3879 | $key = $this->peg_currPos * 126 + 44; |
3880 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3881 | |
3882 | if ($cached) { |
3883 | $this->peg_currPos = $cached["nextPos"]; |
3884 | return $cached["result"]; |
3885 | } |
3886 | |
3887 | if (peg_regex_test($this->peg_c43, $this->input_substr($this->peg_currPos, 1))) { |
3888 | $s0 = $this->input_substr($this->peg_currPos, 1); |
3889 | $this->peg_currPos++; |
3890 | } else { |
3891 | $s0 = $this->peg_FAILED; |
3892 | if ($this->peg_silentFails === 0) { |
3893 | $this->peg_fail($this->peg_c44); |
3894 | } |
3895 | } |
3896 | |
3897 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3898 | |
3899 | return $s0; |
3900 | } |
3901 | |
3902 | private function peg_parsedelimiter_uf_lt() { |
3903 | |
3904 | $key = $this->peg_currPos * 126 + 45; |
3905 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3906 | |
3907 | if ($cached) { |
3908 | $this->peg_currPos = $cached["nextPos"]; |
3909 | return $cached["result"]; |
3910 | } |
3911 | |
3912 | if (peg_regex_test($this->peg_c45, $this->input_substr($this->peg_currPos, 1))) { |
3913 | $s0 = $this->input_substr($this->peg_currPos, 1); |
3914 | $this->peg_currPos++; |
3915 | } else { |
3916 | $s0 = $this->peg_FAILED; |
3917 | if ($this->peg_silentFails === 0) { |
3918 | $this->peg_fail($this->peg_c46); |
3919 | } |
3920 | } |
3921 | |
3922 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3923 | |
3924 | return $s0; |
3925 | } |
3926 | |
3927 | private function peg_parseliteral_uf_op() { |
3928 | |
3929 | $key = $this->peg_currPos * 126 + 46; |
3930 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3931 | |
3932 | if ($cached) { |
3933 | $this->peg_currPos = $cached["nextPos"]; |
3934 | return $cached["result"]; |
3935 | } |
3936 | |
3937 | if (peg_regex_test($this->peg_c47, $this->input_substr($this->peg_currPos, 1))) { |
3938 | $s0 = $this->input_substr($this->peg_currPos, 1); |
3939 | $this->peg_currPos++; |
3940 | } else { |
3941 | $s0 = $this->peg_FAILED; |
3942 | if ($this->peg_silentFails === 0) { |
3943 | $this->peg_fail($this->peg_c48); |
3944 | } |
3945 | } |
3946 | |
3947 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3948 | |
3949 | return $s0; |
3950 | } |
3951 | |
3952 | private function peg_parsedelimiter_uf_op() { |
3953 | |
3954 | $key = $this->peg_currPos * 126 + 47; |
3955 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3956 | |
3957 | if ($cached) { |
3958 | $this->peg_currPos = $cached["nextPos"]; |
3959 | return $cached["result"]; |
3960 | } |
3961 | |
3962 | if (peg_regex_test($this->peg_c49, $this->input_substr($this->peg_currPos, 1))) { |
3963 | $s0 = $this->input_substr($this->peg_currPos, 1); |
3964 | $this->peg_currPos++; |
3965 | } else { |
3966 | $s0 = $this->peg_FAILED; |
3967 | if ($this->peg_silentFails === 0) { |
3968 | $this->peg_fail($this->peg_c50); |
3969 | } |
3970 | } |
3971 | |
3972 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
3973 | |
3974 | return $s0; |
3975 | } |
3976 | |
3977 | private function peg_parseboxchars() { |
3978 | |
3979 | $key = $this->peg_currPos * 126 + 48; |
3980 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
3981 | |
3982 | if ($cached) { |
3983 | $this->peg_currPos = $cached["nextPos"]; |
3984 | return $cached["result"]; |
3985 | } |
3986 | |
3987 | if (peg_regex_test($this->peg_c51, $this->input_substr($this->peg_currPos, 1))) { |
3988 | $s0 = $this->input_substr($this->peg_currPos, 1); |
3989 | $this->peg_currPos++; |
3990 | } else { |
3991 | $s0 = $this->peg_FAILED; |
3992 | if ($this->peg_silentFails === 0) { |
3993 | $this->peg_fail($this->peg_c52); |
3994 | } |
3995 | } |
3996 | if ($s0 === $this->peg_FAILED) { |
3997 | $s0 = $this->peg_currPos; |
3998 | if (peg_regex_test($this->peg_c53, $this->input_substr($this->peg_currPos, 1))) { |
3999 | $s1 = $this->input_substr($this->peg_currPos, 1); |
4000 | $this->peg_currPos++; |
4001 | } else { |
4002 | $s1 = $this->peg_FAILED; |
4003 | if ($this->peg_silentFails === 0) { |
4004 | $this->peg_fail($this->peg_c54); |
4005 | } |
4006 | } |
4007 | if ($s1 !== $this->peg_FAILED) { |
4008 | if (peg_regex_test($this->peg_c55, $this->input_substr($this->peg_currPos, 1))) { |
4009 | $s2 = $this->input_substr($this->peg_currPos, 1); |
4010 | $this->peg_currPos++; |
4011 | } else { |
4012 | $s2 = $this->peg_FAILED; |
4013 | if ($this->peg_silentFails === 0) { |
4014 | $this->peg_fail($this->peg_c56); |
4015 | } |
4016 | } |
4017 | if ($s2 !== $this->peg_FAILED) { |
4018 | $this->peg_reportedPos = $s0; |
4019 | $s1 = $this->peg_f81($s1, $s2); |
4020 | $s0 = $s1; |
4021 | } else { |
4022 | $this->peg_currPos = $s0; |
4023 | $s0 = $this->peg_FAILED; |
4024 | } |
4025 | } else { |
4026 | $this->peg_currPos = $s0; |
4027 | $s0 = $this->peg_FAILED; |
4028 | } |
4029 | } |
4030 | |
4031 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
4032 | |
4033 | return $s0; |
4034 | } |
4035 | |
4036 | private function peg_parseBOX() { |
4037 | |
4038 | $key = $this->peg_currPos * 126 + 49; |
4039 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
4040 | |
4041 | if ($cached) { |
4042 | $this->peg_currPos = $cached["nextPos"]; |
4043 | return $cached["result"]; |
4044 | } |
4045 | |
4046 | $s0 = $this->peg_currPos; |
4047 | $s1 = $this->peg_parsegeneric_func(); |
4048 | if ($s1 !== $this->peg_FAILED) { |
4049 | $this->peg_reportedPos = $this->peg_currPos; |
4050 | $s2 = $this->peg_f82($s1); |
4051 | if ($s2) { |
4052 | $s2 = null; |
4053 | } else { |
4054 | $s2 = $this->peg_FAILED; |
4055 | } |
4056 | if ($s2 !== $this->peg_FAILED) { |
4057 | $s3 = $this->peg_parse_(); |
4058 | if ($s3 !== $this->peg_FAILED) { |
4059 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c39) { |
4060 | $s4 = $this->peg_c39; |
4061 | $this->peg_currPos++; |
4062 | } else { |
4063 | $s4 = $this->peg_FAILED; |
4064 | if ($this->peg_silentFails === 0) { |
4065 | $this->peg_fail($this->peg_c40); |
4066 | } |
4067 | } |
4068 | if ($s4 !== $this->peg_FAILED) { |
4069 | $s5 = array(); |
4070 | $s6 = $this->peg_parseboxchars(); |
4071 | if ($s6 !== $this->peg_FAILED) { |
4072 | while ($s6 !== $this->peg_FAILED) { |
4073 | $s5[] = $s6; |
4074 | $s6 = $this->peg_parseboxchars(); |
4075 | } |
4076 | } else { |
4077 | $s5 = $this->peg_FAILED; |
4078 | } |
4079 | if ($s5 !== $this->peg_FAILED) { |
4080 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c11) { |
4081 | $s6 = $this->peg_c11; |
4082 | $this->peg_currPos++; |
4083 | } else { |
4084 | $s6 = $this->peg_FAILED; |
4085 | if ($this->peg_silentFails === 0) { |
4086 | $this->peg_fail($this->peg_c12); |
4087 | } |
4088 | } |
4089 | if ($s6 !== $this->peg_FAILED) { |
4090 | $s7 = $this->peg_parse_(); |
4091 | if ($s7 !== $this->peg_FAILED) { |
4092 | $this->peg_reportedPos = $s0; |
4093 | $s1 = $this->peg_f83($s1, $s5); |
4094 | $s0 = $s1; |
4095 | } else { |
4096 | $this->peg_currPos = $s0; |
4097 | $s0 = $this->peg_FAILED; |
4098 | } |
4099 | } else { |
4100 | $this->peg_currPos = $s0; |
4101 | $s0 = $this->peg_FAILED; |
4102 | } |
4103 | } else { |
4104 | $this->peg_currPos = $s0; |
4105 | $s0 = $this->peg_FAILED; |
4106 | } |
4107 | } else { |
4108 | $this->peg_currPos = $s0; |
4109 | $s0 = $this->peg_FAILED; |
4110 | } |
4111 | } else { |
4112 | $this->peg_currPos = $s0; |
4113 | $s0 = $this->peg_FAILED; |
4114 | } |
4115 | } else { |
4116 | $this->peg_currPos = $s0; |
4117 | $s0 = $this->peg_FAILED; |
4118 | } |
4119 | } else { |
4120 | $this->peg_currPos = $s0; |
4121 | $s0 = $this->peg_FAILED; |
4122 | } |
4123 | |
4124 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
4125 | |
4126 | return $s0; |
4127 | } |
4128 | |
4129 | private function peg_parseLITERAL() { |
4130 | |
4131 | $key = $this->peg_currPos * 126 + 50; |
4132 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
4133 | |
4134 | if ($cached) { |
4135 | $this->peg_currPos = $cached["nextPos"]; |
4136 | return $cached["result"]; |
4137 | } |
4138 | |
4139 | $s0 = $this->peg_currPos; |
4140 | $s1 = $this->peg_parseliteral_id(); |
4141 | if ($s1 === $this->peg_FAILED) { |
4142 | $s1 = $this->peg_parseliteral_mn(); |
4143 | if ($s1 === $this->peg_FAILED) { |
4144 | $s1 = $this->peg_parseliteral_uf_lt(); |
4145 | if ($s1 === $this->peg_FAILED) { |
4146 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c57) { |
4147 | $s1 = $this->peg_c57; |
4148 | $this->peg_currPos++; |
4149 | } else { |
4150 | $s1 = $this->peg_FAILED; |
4151 | if ($this->peg_silentFails === 0) { |
4152 | $this->peg_fail($this->peg_c58); |
4153 | } |
4154 | } |
4155 | if ($s1 === $this->peg_FAILED) { |
4156 | $s1 = $this->peg_parseliteral_uf_op(); |
4157 | } |
4158 | } |
4159 | } |
4160 | } |
4161 | if ($s1 !== $this->peg_FAILED) { |
4162 | $s2 = $this->peg_parse_(); |
4163 | if ($s2 !== $this->peg_FAILED) { |
4164 | $this->peg_reportedPos = $s0; |
4165 | $s1 = $this->peg_f84($s1); |
4166 | $s0 = $s1; |
4167 | } else { |
4168 | $this->peg_currPos = $s0; |
4169 | $s0 = $this->peg_FAILED; |
4170 | } |
4171 | } else { |
4172 | $this->peg_currPos = $s0; |
4173 | $s0 = $this->peg_FAILED; |
4174 | } |
4175 | if ($s0 === $this->peg_FAILED) { |
4176 | $s0 = $this->peg_currPos; |
4177 | $s1 = $this->peg_parsegeneric_func(); |
4178 | if ($s1 !== $this->peg_FAILED) { |
4179 | $this->peg_reportedPos = $this->peg_currPos; |
4180 | $s2 = $this->peg_f85($s1); |
4181 | if ($s2) { |
4182 | $s2 = null; |
4183 | } else { |
4184 | $s2 = $this->peg_FAILED; |
4185 | } |
4186 | if ($s2 !== $this->peg_FAILED) { |
4187 | $s3 = $this->peg_parse_(); |
4188 | if ($s3 !== $this->peg_FAILED) { |
4189 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c3) { |
4190 | $s4 = $this->peg_c3; |
4191 | $this->peg_currPos++; |
4192 | } else { |
4193 | $s4 = $this->peg_FAILED; |
4194 | if ($this->peg_silentFails === 0) { |
4195 | $this->peg_fail($this->peg_c4); |
4196 | } |
4197 | } |
4198 | if ($s4 === $this->peg_FAILED) { |
4199 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c5) { |
4200 | $s4 = $this->peg_c5; |
4201 | $this->peg_currPos++; |
4202 | } else { |
4203 | $s4 = $this->peg_FAILED; |
4204 | if ($this->peg_silentFails === 0) { |
4205 | $this->peg_fail($this->peg_c6); |
4206 | } |
4207 | } |
4208 | if ($s4 === $this->peg_FAILED) { |
4209 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c7) { |
4210 | $s4 = $this->peg_c7; |
4211 | $this->peg_currPos += 2; |
4212 | } else { |
4213 | $s4 = $this->peg_FAILED; |
4214 | if ($this->peg_silentFails === 0) { |
4215 | $this->peg_fail($this->peg_c8); |
4216 | } |
4217 | } |
4218 | if ($s4 === $this->peg_FAILED) { |
4219 | $s4 = $this->peg_currPos; |
4220 | $s5 = $this->peg_c2; |
4221 | if ($s5 !== $this->peg_FAILED) { |
4222 | $this->peg_reportedPos = $s4; |
4223 | $s5 = $this->peg_f20($s1); |
4224 | } |
4225 | $s4 = $s5; |
4226 | } |
4227 | } |
4228 | } |
4229 | if ($s4 !== $this->peg_FAILED) { |
4230 | $s5 = $this->peg_parse_(); |
4231 | if ($s5 !== $this->peg_FAILED) { |
4232 | $this->peg_reportedPos = $s0; |
4233 | $s1 = $this->peg_f86($s1, $s4); |
4234 | $s0 = $s1; |
4235 | } else { |
4236 | $this->peg_currPos = $s0; |
4237 | $s0 = $this->peg_FAILED; |
4238 | } |
4239 | } else { |
4240 | $this->peg_currPos = $s0; |
4241 | $s0 = $this->peg_FAILED; |
4242 | } |
4243 | } else { |
4244 | $this->peg_currPos = $s0; |
4245 | $s0 = $this->peg_FAILED; |
4246 | } |
4247 | } else { |
4248 | $this->peg_currPos = $s0; |
4249 | $s0 = $this->peg_FAILED; |
4250 | } |
4251 | } else { |
4252 | $this->peg_currPos = $s0; |
4253 | $s0 = $this->peg_FAILED; |
4254 | } |
4255 | if ($s0 === $this->peg_FAILED) { |
4256 | $s0 = $this->peg_currPos; |
4257 | $s1 = $this->peg_parsegeneric_func(); |
4258 | if ($s1 !== $this->peg_FAILED) { |
4259 | $this->peg_reportedPos = $this->peg_currPos; |
4260 | $s2 = $this->peg_f87($s1); |
4261 | if ($s2) { |
4262 | $s2 = null; |
4263 | } else { |
4264 | $s2 = $this->peg_FAILED; |
4265 | } |
4266 | if ($s2 !== $this->peg_FAILED) { |
4267 | $s3 = $this->peg_parse_(); |
4268 | if ($s3 !== $this->peg_FAILED) { |
4269 | $this->peg_reportedPos = $s0; |
4270 | $s1 = $this->peg_f88($s1); |
4271 | $s0 = $s1; |
4272 | } else { |
4273 | $this->peg_currPos = $s0; |
4274 | $s0 = $this->peg_FAILED; |
4275 | } |
4276 | } else { |
4277 | $this->peg_currPos = $s0; |
4278 | $s0 = $this->peg_FAILED; |
4279 | } |
4280 | } else { |
4281 | $this->peg_currPos = $s0; |
4282 | $s0 = $this->peg_FAILED; |
4283 | } |
4284 | if ($s0 === $this->peg_FAILED) { |
4285 | $s0 = $this->peg_currPos; |
4286 | $s1 = $this->peg_parsegeneric_func(); |
4287 | if ($s1 !== $this->peg_FAILED) { |
4288 | $this->peg_reportedPos = $this->peg_currPos; |
4289 | $s2 = $this->peg_f89($s1); |
4290 | if ($s2) { |
4291 | $s2 = null; |
4292 | } else { |
4293 | $s2 = $this->peg_FAILED; |
4294 | } |
4295 | if ($s2 !== $this->peg_FAILED) { |
4296 | $s3 = $this->peg_parse_(); |
4297 | if ($s3 !== $this->peg_FAILED) { |
4298 | $this->peg_reportedPos = $s0; |
4299 | $s1 = $this->peg_f90($s1); |
4300 | $s0 = $s1; |
4301 | } else { |
4302 | $this->peg_currPos = $s0; |
4303 | $s0 = $this->peg_FAILED; |
4304 | } |
4305 | } else { |
4306 | $this->peg_currPos = $s0; |
4307 | $s0 = $this->peg_FAILED; |
4308 | } |
4309 | } else { |
4310 | $this->peg_currPos = $s0; |
4311 | $s0 = $this->peg_FAILED; |
4312 | } |
4313 | if ($s0 === $this->peg_FAILED) { |
4314 | $s0 = $this->peg_currPos; |
4315 | $s1 = $this->peg_parsegeneric_func(); |
4316 | if ($s1 !== $this->peg_FAILED) { |
4317 | $this->peg_reportedPos = $this->peg_currPos; |
4318 | $s2 = $this->peg_f91($s1); |
4319 | if ($s2) { |
4320 | $s2 = null; |
4321 | } else { |
4322 | $s2 = $this->peg_FAILED; |
4323 | } |
4324 | if ($s2 !== $this->peg_FAILED) { |
4325 | $s3 = $this->peg_parse_(); |
4326 | if ($s3 !== $this->peg_FAILED) { |
4327 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c39) { |
4328 | $s4 = $this->peg_c39; |
4329 | $this->peg_currPos++; |
4330 | } else { |
4331 | $s4 = $this->peg_FAILED; |
4332 | if ($this->peg_silentFails === 0) { |
4333 | $this->peg_fail($this->peg_c40); |
4334 | } |
4335 | } |
4336 | if ($s4 !== $this->peg_FAILED) { |
4337 | $s5 = $this->peg_parsegeneric_func(); |
4338 | if ($s5 !== $this->peg_FAILED) { |
4339 | $this->peg_reportedPos = $this->peg_currPos; |
4340 | $s6 = $this->peg_f92($s1, $s5); |
4341 | if ($s6) { |
4342 | $s6 = null; |
4343 | } else { |
4344 | $s6 = $this->peg_FAILED; |
4345 | } |
4346 | if ($s6 !== $this->peg_FAILED) { |
4347 | $s7 = $this->peg_parse_(); |
4348 | if ($s7 !== $this->peg_FAILED) { |
4349 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c11) { |
4350 | $s8 = $this->peg_c11; |
4351 | $this->peg_currPos++; |
4352 | } else { |
4353 | $s8 = $this->peg_FAILED; |
4354 | if ($this->peg_silentFails === 0) { |
4355 | $this->peg_fail($this->peg_c12); |
4356 | } |
4357 | } |
4358 | if ($s8 !== $this->peg_FAILED) { |
4359 | $s9 = $this->peg_parse_(); |
4360 | if ($s9 !== $this->peg_FAILED) { |
4361 | $this->peg_reportedPos = $s0; |
4362 | $s1 = $this->peg_f93($s1, $s5); |
4363 | $s0 = $s1; |
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 | } else { |
4373 | $this->peg_currPos = $s0; |
4374 | $s0 = $this->peg_FAILED; |
4375 | } |
4376 | } else { |
4377 | $this->peg_currPos = $s0; |
4378 | $s0 = $this->peg_FAILED; |
4379 | } |
4380 | } else { |
4381 | $this->peg_currPos = $s0; |
4382 | $s0 = $this->peg_FAILED; |
4383 | } |
4384 | } else { |
4385 | $this->peg_currPos = $s0; |
4386 | $s0 = $this->peg_FAILED; |
4387 | } |
4388 | } else { |
4389 | $this->peg_currPos = $s0; |
4390 | $s0 = $this->peg_FAILED; |
4391 | } |
4392 | } else { |
4393 | $this->peg_currPos = $s0; |
4394 | $s0 = $this->peg_FAILED; |
4395 | } |
4396 | } else { |
4397 | $this->peg_currPos = $s0; |
4398 | $s0 = $this->peg_FAILED; |
4399 | } |
4400 | if ($s0 === $this->peg_FAILED) { |
4401 | $s0 = $this->peg_currPos; |
4402 | $s1 = $this->peg_parsegeneric_func(); |
4403 | if ($s1 !== $this->peg_FAILED) { |
4404 | $this->peg_reportedPos = $this->peg_currPos; |
4405 | $s2 = $this->peg_f94($s1); |
4406 | if ($s2) { |
4407 | $s2 = null; |
4408 | } else { |
4409 | $s2 = $this->peg_FAILED; |
4410 | } |
4411 | if ($s2 !== $this->peg_FAILED) { |
4412 | $s3 = $this->peg_parse_(); |
4413 | if ($s3 !== $this->peg_FAILED) { |
4414 | $this->peg_reportedPos = $s0; |
4415 | $s1 = $this->peg_f95($s1); |
4416 | $s0 = $s1; |
4417 | } else { |
4418 | $this->peg_currPos = $s0; |
4419 | $s0 = $this->peg_FAILED; |
4420 | } |
4421 | } else { |
4422 | $this->peg_currPos = $s0; |
4423 | $s0 = $this->peg_FAILED; |
4424 | } |
4425 | } else { |
4426 | $this->peg_currPos = $s0; |
4427 | $s0 = $this->peg_FAILED; |
4428 | } |
4429 | if ($s0 === $this->peg_FAILED) { |
4430 | $s0 = $this->peg_currPos; |
4431 | $s1 = $this->peg_parsegeneric_func(); |
4432 | if ($s1 !== $this->peg_FAILED) { |
4433 | $this->peg_reportedPos = $this->peg_currPos; |
4434 | $s2 = $this->peg_f96($s1); |
4435 | if ($s2) { |
4436 | $s2 = null; |
4437 | } else { |
4438 | $s2 = $this->peg_FAILED; |
4439 | } |
4440 | if ($s2 !== $this->peg_FAILED) { |
4441 | $s3 = $this->peg_parse_(); |
4442 | if ($s3 !== $this->peg_FAILED) { |
4443 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c39) { |
4444 | $s4 = $this->peg_c39; |
4445 | $this->peg_currPos++; |
4446 | } else { |
4447 | $s4 = $this->peg_FAILED; |
4448 | if ($this->peg_silentFails === 0) { |
4449 | $this->peg_fail($this->peg_c40); |
4450 | } |
4451 | } |
4452 | if ($s4 !== $this->peg_FAILED) { |
4453 | $s5 = $this->peg_parsegeneric_func(); |
4454 | if ($s5 !== $this->peg_FAILED) { |
4455 | $this->peg_reportedPos = $this->peg_currPos; |
4456 | $s6 = $this->peg_f97($s1, $s5); |
4457 | if ($s6) { |
4458 | $s6 = null; |
4459 | } else { |
4460 | $s6 = $this->peg_FAILED; |
4461 | } |
4462 | if ($s6 !== $this->peg_FAILED) { |
4463 | $s7 = $this->peg_parse_(); |
4464 | if ($s7 !== $this->peg_FAILED) { |
4465 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c11) { |
4466 | $s8 = $this->peg_c11; |
4467 | $this->peg_currPos++; |
4468 | } else { |
4469 | $s8 = $this->peg_FAILED; |
4470 | if ($this->peg_silentFails === 0) { |
4471 | $this->peg_fail($this->peg_c12); |
4472 | } |
4473 | } |
4474 | if ($s8 !== $this->peg_FAILED) { |
4475 | $s9 = $this->peg_parse_(); |
4476 | if ($s9 !== $this->peg_FAILED) { |
4477 | $this->peg_reportedPos = $s0; |
4478 | $s1 = $this->peg_f98($s1, $s5); |
4479 | $s0 = $s1; |
4480 | } else { |
4481 | $this->peg_currPos = $s0; |
4482 | $s0 = $this->peg_FAILED; |
4483 | } |
4484 | } else { |
4485 | $this->peg_currPos = $s0; |
4486 | $s0 = $this->peg_FAILED; |
4487 | } |
4488 | } else { |
4489 | $this->peg_currPos = $s0; |
4490 | $s0 = $this->peg_FAILED; |
4491 | } |
4492 | } else { |
4493 | $this->peg_currPos = $s0; |
4494 | $s0 = $this->peg_FAILED; |
4495 | } |
4496 | } else { |
4497 | $this->peg_currPos = $s0; |
4498 | $s0 = $this->peg_FAILED; |
4499 | } |
4500 | } else { |
4501 | $this->peg_currPos = $s0; |
4502 | $s0 = $this->peg_FAILED; |
4503 | } |
4504 | } else { |
4505 | $this->peg_currPos = $s0; |
4506 | $s0 = $this->peg_FAILED; |
4507 | } |
4508 | } else { |
4509 | $this->peg_currPos = $s0; |
4510 | $s0 = $this->peg_FAILED; |
4511 | } |
4512 | } else { |
4513 | $this->peg_currPos = $s0; |
4514 | $s0 = $this->peg_FAILED; |
4515 | } |
4516 | if ($s0 === $this->peg_FAILED) { |
4517 | $s0 = $this->peg_currPos; |
4518 | $s1 = $this->peg_parseCOLOR(); |
4519 | if ($s1 === $this->peg_FAILED) { |
4520 | $s1 = $this->peg_parseDEFINECOLOR(); |
4521 | } |
4522 | if ($s1 !== $this->peg_FAILED) { |
4523 | $this->peg_reportedPos = $s0; |
4524 | $s1 = $this->peg_f99($s1); |
4525 | } |
4526 | $s0 = $s1; |
4527 | if ($s0 === $this->peg_FAILED) { |
4528 | $s0 = $this->peg_currPos; |
4529 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c59) { |
4530 | $s1 = $this->peg_c59; |
4531 | $this->peg_currPos++; |
4532 | } else { |
4533 | $s1 = $this->peg_FAILED; |
4534 | if ($this->peg_silentFails === 0) { |
4535 | $this->peg_fail($this->peg_c60); |
4536 | } |
4537 | } |
4538 | if ($s1 !== $this->peg_FAILED) { |
4539 | if (peg_regex_test($this->peg_c61, $this->input_substr($this->peg_currPos, 1))) { |
4540 | $s2 = $this->input_substr($this->peg_currPos, 1); |
4541 | $this->peg_currPos++; |
4542 | } else { |
4543 | $s2 = $this->peg_FAILED; |
4544 | if ($this->peg_silentFails === 0) { |
4545 | $this->peg_fail($this->peg_c62); |
4546 | } |
4547 | } |
4548 | if ($s2 !== $this->peg_FAILED) { |
4549 | $s3 = $this->peg_parse_(); |
4550 | if ($s3 !== $this->peg_FAILED) { |
4551 | $this->peg_reportedPos = $s0; |
4552 | $s1 = $this->peg_f100($s2); |
4553 | $s0 = $s1; |
4554 | } else { |
4555 | $this->peg_currPos = $s0; |
4556 | $s0 = $this->peg_FAILED; |
4557 | } |
4558 | } else { |
4559 | $this->peg_currPos = $s0; |
4560 | $s0 = $this->peg_FAILED; |
4561 | } |
4562 | } else { |
4563 | $this->peg_currPos = $s0; |
4564 | $s0 = $this->peg_FAILED; |
4565 | } |
4566 | if ($s0 === $this->peg_FAILED) { |
4567 | $s0 = $this->peg_currPos; |
4568 | if (peg_regex_test($this->peg_c63, $this->input_substr($this->peg_currPos, 1))) { |
4569 | $s1 = $this->input_substr($this->peg_currPos, 1); |
4570 | $this->peg_currPos++; |
4571 | } else { |
4572 | $s1 = $this->peg_FAILED; |
4573 | if ($this->peg_silentFails === 0) { |
4574 | $this->peg_fail($this->peg_c64); |
4575 | } |
4576 | } |
4577 | if ($s1 !== $this->peg_FAILED) { |
4578 | $s2 = $this->peg_parse_(); |
4579 | if ($s2 !== $this->peg_FAILED) { |
4580 | $this->peg_reportedPos = $s0; |
4581 | $s1 = $this->peg_f84($s1); |
4582 | $s0 = $s1; |
4583 | } else { |
4584 | $this->peg_currPos = $s0; |
4585 | $s0 = $this->peg_FAILED; |
4586 | } |
4587 | } else { |
4588 | $this->peg_currPos = $s0; |
4589 | $s0 = $this->peg_FAILED; |
4590 | } |
4591 | if ($s0 === $this->peg_FAILED) { |
4592 | $s0 = $this->peg_currPos; |
4593 | if (peg_regex_test($this->peg_c65, $this->input_substr($this->peg_currPos, 1))) { |
4594 | $s1 = $this->input_substr($this->peg_currPos, 1); |
4595 | $this->peg_currPos++; |
4596 | } else { |
4597 | $s1 = $this->peg_FAILED; |
4598 | if ($this->peg_silentFails === 0) { |
4599 | $this->peg_fail($this->peg_c66); |
4600 | } |
4601 | } |
4602 | if ($s1 !== $this->peg_FAILED) { |
4603 | $s2 = $this->peg_parse_(); |
4604 | if ($s2 !== $this->peg_FAILED) { |
4605 | $this->peg_reportedPos = $s0; |
4606 | $s1 = $this->peg_f101($s1); |
4607 | $s0 = $s1; |
4608 | } else { |
4609 | $this->peg_currPos = $s0; |
4610 | $s0 = $this->peg_FAILED; |
4611 | } |
4612 | } else { |
4613 | $this->peg_currPos = $s0; |
4614 | $s0 = $this->peg_FAILED; |
4615 | } |
4616 | } |
4617 | } |
4618 | } |
4619 | } |
4620 | } |
4621 | } |
4622 | } |
4623 | } |
4624 | } |
4625 | } |
4626 | |
4627 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
4628 | |
4629 | return $s0; |
4630 | } |
4631 | |
4632 | private function peg_parseDELIMITER() { |
4633 | |
4634 | $key = $this->peg_currPos * 126 + 51; |
4635 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
4636 | |
4637 | if ($cached) { |
4638 | $this->peg_currPos = $cached["nextPos"]; |
4639 | return $cached["result"]; |
4640 | } |
4641 | |
4642 | $s0 = $this->peg_currPos; |
4643 | $s1 = $this->peg_parsedelimiter_uf_lt(); |
4644 | if ($s1 === $this->peg_FAILED) { |
4645 | $s1 = $this->peg_parsedelimiter_uf_op(); |
4646 | if ($s1 === $this->peg_FAILED) { |
4647 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c5) { |
4648 | $s1 = $this->peg_c5; |
4649 | $this->peg_currPos++; |
4650 | } else { |
4651 | $s1 = $this->peg_FAILED; |
4652 | if ($this->peg_silentFails === 0) { |
4653 | $this->peg_fail($this->peg_c6); |
4654 | } |
4655 | } |
4656 | } |
4657 | } |
4658 | if ($s1 !== $this->peg_FAILED) { |
4659 | $s2 = $this->peg_parse_(); |
4660 | if ($s2 !== $this->peg_FAILED) { |
4661 | $this->peg_reportedPos = $s0; |
4662 | $s1 = $this->peg_f84($s1); |
4663 | $s0 = $s1; |
4664 | } else { |
4665 | $this->peg_currPos = $s0; |
4666 | $s0 = $this->peg_FAILED; |
4667 | } |
4668 | } else { |
4669 | $this->peg_currPos = $s0; |
4670 | $s0 = $this->peg_FAILED; |
4671 | } |
4672 | if ($s0 === $this->peg_FAILED) { |
4673 | $s0 = $this->peg_currPos; |
4674 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c59) { |
4675 | $s1 = $this->peg_c59; |
4676 | $this->peg_currPos++; |
4677 | } else { |
4678 | $s1 = $this->peg_FAILED; |
4679 | if ($this->peg_silentFails === 0) { |
4680 | $this->peg_fail($this->peg_c60); |
4681 | } |
4682 | } |
4683 | if ($s1 !== $this->peg_FAILED) { |
4684 | if (peg_regex_test($this->peg_c67, $this->input_substr($this->peg_currPos, 1))) { |
4685 | $s2 = $this->input_substr($this->peg_currPos, 1); |
4686 | $this->peg_currPos++; |
4687 | } else { |
4688 | $s2 = $this->peg_FAILED; |
4689 | if ($this->peg_silentFails === 0) { |
4690 | $this->peg_fail($this->peg_c68); |
4691 | } |
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_f100($s2); |
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 | if ($s0 === $this->peg_FAILED) { |
4712 | $s0 = $this->peg_currPos; |
4713 | $s1 = $this->peg_parsegeneric_func(); |
4714 | if ($s1 !== $this->peg_FAILED) { |
4715 | $this->peg_reportedPos = $this->peg_currPos; |
4716 | $s2 = $this->peg_f102($s1); |
4717 | if ($s2) { |
4718 | $s2 = null; |
4719 | } else { |
4720 | $s2 = $this->peg_FAILED; |
4721 | } |
4722 | if ($s2 !== $this->peg_FAILED) { |
4723 | $s3 = $this->peg_parse_(); |
4724 | if ($s3 !== $this->peg_FAILED) { |
4725 | $this->peg_reportedPos = $s0; |
4726 | $s1 = $this->peg_f88($s1); |
4727 | $s0 = $s1; |
4728 | } else { |
4729 | $this->peg_currPos = $s0; |
4730 | $s0 = $this->peg_FAILED; |
4731 | } |
4732 | } else { |
4733 | $this->peg_currPos = $s0; |
4734 | $s0 = $this->peg_FAILED; |
4735 | } |
4736 | } else { |
4737 | $this->peg_currPos = $s0; |
4738 | $s0 = $this->peg_FAILED; |
4739 | } |
4740 | if ($s0 === $this->peg_FAILED) { |
4741 | $s0 = $this->peg_currPos; |
4742 | $s1 = $this->peg_parsegeneric_func(); |
4743 | if ($s1 !== $this->peg_FAILED) { |
4744 | $this->peg_reportedPos = $this->peg_currPos; |
4745 | $s2 = $this->peg_f103($s1); |
4746 | if ($s2) { |
4747 | $s2 = null; |
4748 | } else { |
4749 | $s2 = $this->peg_FAILED; |
4750 | } |
4751 | if ($s2 !== $this->peg_FAILED) { |
4752 | $s3 = $this->peg_parse_(); |
4753 | if ($s3 !== $this->peg_FAILED) { |
4754 | $this->peg_reportedPos = $s0; |
4755 | $s1 = $this->peg_f104($s1); |
4756 | $s0 = $s1; |
4757 | } else { |
4758 | $this->peg_currPos = $s0; |
4759 | $s0 = $this->peg_FAILED; |
4760 | } |
4761 | } else { |
4762 | $this->peg_currPos = $s0; |
4763 | $s0 = $this->peg_FAILED; |
4764 | } |
4765 | } else { |
4766 | $this->peg_currPos = $s0; |
4767 | $s0 = $this->peg_FAILED; |
4768 | } |
4769 | } |
4770 | } |
4771 | } |
4772 | |
4773 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
4774 | |
4775 | return $s0; |
4776 | } |
4777 | |
4778 | private function peg_parseFUN_AR1nb() { |
4779 | |
4780 | $key = $this->peg_currPos * 126 + 52; |
4781 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
4782 | |
4783 | if ($cached) { |
4784 | $this->peg_currPos = $cached["nextPos"]; |
4785 | return $cached["result"]; |
4786 | } |
4787 | |
4788 | $s0 = $this->peg_currPos; |
4789 | $s1 = $this->peg_parsegeneric_func(); |
4790 | if ($s1 !== $this->peg_FAILED) { |
4791 | $this->peg_reportedPos = $this->peg_currPos; |
4792 | $s2 = $this->peg_f105($s1); |
4793 | if ($s2) { |
4794 | $s2 = null; |
4795 | } else { |
4796 | $s2 = $this->peg_FAILED; |
4797 | } |
4798 | if ($s2 !== $this->peg_FAILED) { |
4799 | $s3 = $this->peg_parse_(); |
4800 | if ($s3 !== $this->peg_FAILED) { |
4801 | $this->peg_reportedPos = $s0; |
4802 | $s1 = $this->peg_f99($s1); |
4803 | $s0 = $s1; |
4804 | } else { |
4805 | $this->peg_currPos = $s0; |
4806 | $s0 = $this->peg_FAILED; |
4807 | } |
4808 | } else { |
4809 | $this->peg_currPos = $s0; |
4810 | $s0 = $this->peg_FAILED; |
4811 | } |
4812 | } else { |
4813 | $this->peg_currPos = $s0; |
4814 | $s0 = $this->peg_FAILED; |
4815 | } |
4816 | |
4817 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
4818 | |
4819 | return $s0; |
4820 | } |
4821 | |
4822 | private function peg_parseFUN_AR1opt() { |
4823 | |
4824 | $key = $this->peg_currPos * 126 + 53; |
4825 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
4826 | |
4827 | if ($cached) { |
4828 | $this->peg_currPos = $cached["nextPos"]; |
4829 | return $cached["result"]; |
4830 | } |
4831 | |
4832 | $s0 = $this->peg_currPos; |
4833 | $s1 = $this->peg_parsegeneric_func(); |
4834 | if ($s1 !== $this->peg_FAILED) { |
4835 | $this->peg_reportedPos = $this->peg_currPos; |
4836 | $s2 = $this->peg_f106($s1); |
4837 | if ($s2) { |
4838 | $s2 = null; |
4839 | } else { |
4840 | $s2 = $this->peg_FAILED; |
4841 | } |
4842 | if ($s2 !== $this->peg_FAILED) { |
4843 | $s3 = $this->peg_parse_(); |
4844 | if ($s3 !== $this->peg_FAILED) { |
4845 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c5) { |
4846 | $s4 = $this->peg_c5; |
4847 | $this->peg_currPos++; |
4848 | } else { |
4849 | $s4 = $this->peg_FAILED; |
4850 | if ($this->peg_silentFails === 0) { |
4851 | $this->peg_fail($this->peg_c6); |
4852 | } |
4853 | } |
4854 | if ($s4 !== $this->peg_FAILED) { |
4855 | $s5 = $this->peg_parse_(); |
4856 | if ($s5 !== $this->peg_FAILED) { |
4857 | $this->peg_reportedPos = $s0; |
4858 | $s1 = $this->peg_f99($s1); |
4859 | $s0 = $s1; |
4860 | } else { |
4861 | $this->peg_currPos = $s0; |
4862 | $s0 = $this->peg_FAILED; |
4863 | } |
4864 | } else { |
4865 | $this->peg_currPos = $s0; |
4866 | $s0 = $this->peg_FAILED; |
4867 | } |
4868 | } else { |
4869 | $this->peg_currPos = $s0; |
4870 | $s0 = $this->peg_FAILED; |
4871 | } |
4872 | } else { |
4873 | $this->peg_currPos = $s0; |
4874 | $s0 = $this->peg_FAILED; |
4875 | } |
4876 | } else { |
4877 | $this->peg_currPos = $s0; |
4878 | $s0 = $this->peg_FAILED; |
4879 | } |
4880 | |
4881 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
4882 | |
4883 | return $s0; |
4884 | } |
4885 | |
4886 | private function peg_parseNEXT_CELL() { |
4887 | |
4888 | $key = $this->peg_currPos * 126 + 54; |
4889 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
4890 | |
4891 | if ($cached) { |
4892 | $this->peg_currPos = $cached["nextPos"]; |
4893 | return $cached["result"]; |
4894 | } |
4895 | |
4896 | $s0 = $this->peg_currPos; |
4897 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c69) { |
4898 | $s1 = $this->peg_c69; |
4899 | $this->peg_currPos++; |
4900 | } else { |
4901 | $s1 = $this->peg_FAILED; |
4902 | if ($this->peg_silentFails === 0) { |
4903 | $this->peg_fail($this->peg_c70); |
4904 | } |
4905 | } |
4906 | if ($s1 !== $this->peg_FAILED) { |
4907 | $s2 = $this->peg_parse_(); |
4908 | if ($s2 !== $this->peg_FAILED) { |
4909 | $s1 = array($s1, $s2); |
4910 | $s0 = $s1; |
4911 | } else { |
4912 | $this->peg_currPos = $s0; |
4913 | $s0 = $this->peg_FAILED; |
4914 | } |
4915 | } else { |
4916 | $this->peg_currPos = $s0; |
4917 | $s0 = $this->peg_FAILED; |
4918 | } |
4919 | |
4920 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
4921 | |
4922 | return $s0; |
4923 | } |
4924 | |
4925 | private function peg_parseNEXT_ROW() { |
4926 | |
4927 | $key = $this->peg_currPos * 126 + 55; |
4928 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
4929 | |
4930 | if ($cached) { |
4931 | $this->peg_currPos = $cached["nextPos"]; |
4932 | return $cached["result"]; |
4933 | } |
4934 | |
4935 | $s0 = $this->peg_currPos; |
4936 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c71) { |
4937 | $s1 = $this->peg_c71; |
4938 | $this->peg_currPos += 2; |
4939 | } else { |
4940 | $s1 = $this->peg_FAILED; |
4941 | if ($this->peg_silentFails === 0) { |
4942 | $this->peg_fail($this->peg_c72); |
4943 | } |
4944 | } |
4945 | if ($s1 !== $this->peg_FAILED) { |
4946 | $s2 = $this->peg_parse_(); |
4947 | if ($s2 !== $this->peg_FAILED) { |
4948 | $s1 = array($s1, $s2); |
4949 | $s0 = $s1; |
4950 | } else { |
4951 | $this->peg_currPos = $s0; |
4952 | $s0 = $this->peg_FAILED; |
4953 | } |
4954 | } else { |
4955 | $this->peg_currPos = $s0; |
4956 | $s0 = $this->peg_FAILED; |
4957 | } |
4958 | |
4959 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
4960 | |
4961 | return $s0; |
4962 | } |
4963 | |
4964 | private function peg_parseBEGIN() { |
4965 | |
4966 | $key = $this->peg_currPos * 126 + 56; |
4967 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
4968 | |
4969 | if ($cached) { |
4970 | $this->peg_currPos = $cached["nextPos"]; |
4971 | return $cached["result"]; |
4972 | } |
4973 | |
4974 | $s0 = $this->peg_currPos; |
4975 | if ($this->input_substr($this->peg_currPos, 6) === $this->peg_c73) { |
4976 | $s1 = $this->peg_c73; |
4977 | $this->peg_currPos += 6; |
4978 | } else { |
4979 | $s1 = $this->peg_FAILED; |
4980 | if ($this->peg_silentFails === 0) { |
4981 | $this->peg_fail($this->peg_c74); |
4982 | } |
4983 | } |
4984 | if ($s1 !== $this->peg_FAILED) { |
4985 | $s2 = $this->peg_parse_(); |
4986 | if ($s2 !== $this->peg_FAILED) { |
4987 | $s1 = array($s1, $s2); |
4988 | $s0 = $s1; |
4989 | } else { |
4990 | $this->peg_currPos = $s0; |
4991 | $s0 = $this->peg_FAILED; |
4992 | } |
4993 | } else { |
4994 | $this->peg_currPos = $s0; |
4995 | $s0 = $this->peg_FAILED; |
4996 | } |
4997 | |
4998 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
4999 | |
5000 | return $s0; |
5001 | } |
5002 | |
5003 | private function peg_parseEND() { |
5004 | |
5005 | $key = $this->peg_currPos * 126 + 57; |
5006 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5007 | |
5008 | if ($cached) { |
5009 | $this->peg_currPos = $cached["nextPos"]; |
5010 | return $cached["result"]; |
5011 | } |
5012 | |
5013 | $s0 = $this->peg_currPos; |
5014 | if ($this->input_substr($this->peg_currPos, 4) === $this->peg_c75) { |
5015 | $s1 = $this->peg_c75; |
5016 | $this->peg_currPos += 4; |
5017 | } else { |
5018 | $s1 = $this->peg_FAILED; |
5019 | if ($this->peg_silentFails === 0) { |
5020 | $this->peg_fail($this->peg_c76); |
5021 | } |
5022 | } |
5023 | if ($s1 !== $this->peg_FAILED) { |
5024 | $s2 = $this->peg_parse_(); |
5025 | if ($s2 !== $this->peg_FAILED) { |
5026 | $s1 = array($s1, $s2); |
5027 | $s0 = $s1; |
5028 | } else { |
5029 | $this->peg_currPos = $s0; |
5030 | $s0 = $this->peg_FAILED; |
5031 | } |
5032 | } else { |
5033 | $this->peg_currPos = $s0; |
5034 | $s0 = $this->peg_FAILED; |
5035 | } |
5036 | |
5037 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5038 | |
5039 | return $s0; |
5040 | } |
5041 | |
5042 | private function peg_parseBEGIN_MATRIX() { |
5043 | |
5044 | $key = $this->peg_currPos * 126 + 58; |
5045 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5046 | |
5047 | if ($cached) { |
5048 | $this->peg_currPos = $cached["nextPos"]; |
5049 | return $cached["result"]; |
5050 | } |
5051 | |
5052 | $s0 = $this->peg_currPos; |
5053 | $s1 = $this->peg_parseBEGIN(); |
5054 | if ($s1 !== $this->peg_FAILED) { |
5055 | if ($this->input_substr($this->peg_currPos, 8) === $this->peg_c77) { |
5056 | $s2 = $this->peg_c77; |
5057 | $this->peg_currPos += 8; |
5058 | } else { |
5059 | $s2 = $this->peg_FAILED; |
5060 | if ($this->peg_silentFails === 0) { |
5061 | $this->peg_fail($this->peg_c78); |
5062 | } |
5063 | } |
5064 | if ($s2 !== $this->peg_FAILED) { |
5065 | $s3 = $this->peg_parse_(); |
5066 | if ($s3 !== $this->peg_FAILED) { |
5067 | $s1 = array($s1, $s2, $s3); |
5068 | $s0 = $s1; |
5069 | } else { |
5070 | $this->peg_currPos = $s0; |
5071 | $s0 = $this->peg_FAILED; |
5072 | } |
5073 | } else { |
5074 | $this->peg_currPos = $s0; |
5075 | $s0 = $this->peg_FAILED; |
5076 | } |
5077 | } else { |
5078 | $this->peg_currPos = $s0; |
5079 | $s0 = $this->peg_FAILED; |
5080 | } |
5081 | |
5082 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5083 | |
5084 | return $s0; |
5085 | } |
5086 | |
5087 | private function peg_parseEND_MATRIX() { |
5088 | |
5089 | $key = $this->peg_currPos * 126 + 59; |
5090 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5091 | |
5092 | if ($cached) { |
5093 | $this->peg_currPos = $cached["nextPos"]; |
5094 | return $cached["result"]; |
5095 | } |
5096 | |
5097 | $s0 = $this->peg_currPos; |
5098 | $s1 = $this->peg_parseEND(); |
5099 | if ($s1 !== $this->peg_FAILED) { |
5100 | if ($this->input_substr($this->peg_currPos, 8) === $this->peg_c77) { |
5101 | $s2 = $this->peg_c77; |
5102 | $this->peg_currPos += 8; |
5103 | } else { |
5104 | $s2 = $this->peg_FAILED; |
5105 | if ($this->peg_silentFails === 0) { |
5106 | $this->peg_fail($this->peg_c78); |
5107 | } |
5108 | } |
5109 | if ($s2 !== $this->peg_FAILED) { |
5110 | $s3 = $this->peg_parse_(); |
5111 | if ($s3 !== $this->peg_FAILED) { |
5112 | $s1 = array($s1, $s2, $s3); |
5113 | $s0 = $s1; |
5114 | } else { |
5115 | $this->peg_currPos = $s0; |
5116 | $s0 = $this->peg_FAILED; |
5117 | } |
5118 | } else { |
5119 | $this->peg_currPos = $s0; |
5120 | $s0 = $this->peg_FAILED; |
5121 | } |
5122 | } else { |
5123 | $this->peg_currPos = $s0; |
5124 | $s0 = $this->peg_FAILED; |
5125 | } |
5126 | |
5127 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5128 | |
5129 | return $s0; |
5130 | } |
5131 | |
5132 | private function peg_parseBEGIN_PMATRIX() { |
5133 | |
5134 | $key = $this->peg_currPos * 126 + 60; |
5135 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5136 | |
5137 | if ($cached) { |
5138 | $this->peg_currPos = $cached["nextPos"]; |
5139 | return $cached["result"]; |
5140 | } |
5141 | |
5142 | $s0 = $this->peg_currPos; |
5143 | $s1 = $this->peg_parseBEGIN(); |
5144 | if ($s1 !== $this->peg_FAILED) { |
5145 | if ($this->input_substr($this->peg_currPos, 9) === $this->peg_c79) { |
5146 | $s2 = $this->peg_c79; |
5147 | $this->peg_currPos += 9; |
5148 | } else { |
5149 | $s2 = $this->peg_FAILED; |
5150 | if ($this->peg_silentFails === 0) { |
5151 | $this->peg_fail($this->peg_c80); |
5152 | } |
5153 | } |
5154 | if ($s2 !== $this->peg_FAILED) { |
5155 | $s3 = $this->peg_parse_(); |
5156 | if ($s3 !== $this->peg_FAILED) { |
5157 | $s1 = array($s1, $s2, $s3); |
5158 | $s0 = $s1; |
5159 | } else { |
5160 | $this->peg_currPos = $s0; |
5161 | $s0 = $this->peg_FAILED; |
5162 | } |
5163 | } else { |
5164 | $this->peg_currPos = $s0; |
5165 | $s0 = $this->peg_FAILED; |
5166 | } |
5167 | } else { |
5168 | $this->peg_currPos = $s0; |
5169 | $s0 = $this->peg_FAILED; |
5170 | } |
5171 | |
5172 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5173 | |
5174 | return $s0; |
5175 | } |
5176 | |
5177 | private function peg_parseEND_PMATRIX() { |
5178 | |
5179 | $key = $this->peg_currPos * 126 + 61; |
5180 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5181 | |
5182 | if ($cached) { |
5183 | $this->peg_currPos = $cached["nextPos"]; |
5184 | return $cached["result"]; |
5185 | } |
5186 | |
5187 | $s0 = $this->peg_currPos; |
5188 | $s1 = $this->peg_parseEND(); |
5189 | if ($s1 !== $this->peg_FAILED) { |
5190 | if ($this->input_substr($this->peg_currPos, 9) === $this->peg_c79) { |
5191 | $s2 = $this->peg_c79; |
5192 | $this->peg_currPos += 9; |
5193 | } else { |
5194 | $s2 = $this->peg_FAILED; |
5195 | if ($this->peg_silentFails === 0) { |
5196 | $this->peg_fail($this->peg_c80); |
5197 | } |
5198 | } |
5199 | if ($s2 !== $this->peg_FAILED) { |
5200 | $s3 = $this->peg_parse_(); |
5201 | if ($s3 !== $this->peg_FAILED) { |
5202 | $s1 = array($s1, $s2, $s3); |
5203 | $s0 = $s1; |
5204 | } else { |
5205 | $this->peg_currPos = $s0; |
5206 | $s0 = $this->peg_FAILED; |
5207 | } |
5208 | } else { |
5209 | $this->peg_currPos = $s0; |
5210 | $s0 = $this->peg_FAILED; |
5211 | } |
5212 | } else { |
5213 | $this->peg_currPos = $s0; |
5214 | $s0 = $this->peg_FAILED; |
5215 | } |
5216 | |
5217 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5218 | |
5219 | return $s0; |
5220 | } |
5221 | |
5222 | private function peg_parseBEGIN_BMATRIX() { |
5223 | |
5224 | $key = $this->peg_currPos * 126 + 62; |
5225 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5226 | |
5227 | if ($cached) { |
5228 | $this->peg_currPos = $cached["nextPos"]; |
5229 | return $cached["result"]; |
5230 | } |
5231 | |
5232 | $s0 = $this->peg_currPos; |
5233 | $s1 = $this->peg_parseBEGIN(); |
5234 | if ($s1 !== $this->peg_FAILED) { |
5235 | if ($this->input_substr($this->peg_currPos, 9) === $this->peg_c81) { |
5236 | $s2 = $this->peg_c81; |
5237 | $this->peg_currPos += 9; |
5238 | } else { |
5239 | $s2 = $this->peg_FAILED; |
5240 | if ($this->peg_silentFails === 0) { |
5241 | $this->peg_fail($this->peg_c82); |
5242 | } |
5243 | } |
5244 | if ($s2 !== $this->peg_FAILED) { |
5245 | $s3 = $this->peg_parse_(); |
5246 | if ($s3 !== $this->peg_FAILED) { |
5247 | $s1 = array($s1, $s2, $s3); |
5248 | $s0 = $s1; |
5249 | } else { |
5250 | $this->peg_currPos = $s0; |
5251 | $s0 = $this->peg_FAILED; |
5252 | } |
5253 | } else { |
5254 | $this->peg_currPos = $s0; |
5255 | $s0 = $this->peg_FAILED; |
5256 | } |
5257 | } else { |
5258 | $this->peg_currPos = $s0; |
5259 | $s0 = $this->peg_FAILED; |
5260 | } |
5261 | |
5262 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5263 | |
5264 | return $s0; |
5265 | } |
5266 | |
5267 | private function peg_parseEND_BMATRIX() { |
5268 | |
5269 | $key = $this->peg_currPos * 126 + 63; |
5270 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5271 | |
5272 | if ($cached) { |
5273 | $this->peg_currPos = $cached["nextPos"]; |
5274 | return $cached["result"]; |
5275 | } |
5276 | |
5277 | $s0 = $this->peg_currPos; |
5278 | $s1 = $this->peg_parseEND(); |
5279 | if ($s1 !== $this->peg_FAILED) { |
5280 | if ($this->input_substr($this->peg_currPos, 9) === $this->peg_c81) { |
5281 | $s2 = $this->peg_c81; |
5282 | $this->peg_currPos += 9; |
5283 | } else { |
5284 | $s2 = $this->peg_FAILED; |
5285 | if ($this->peg_silentFails === 0) { |
5286 | $this->peg_fail($this->peg_c82); |
5287 | } |
5288 | } |
5289 | if ($s2 !== $this->peg_FAILED) { |
5290 | $s3 = $this->peg_parse_(); |
5291 | if ($s3 !== $this->peg_FAILED) { |
5292 | $s1 = array($s1, $s2, $s3); |
5293 | $s0 = $s1; |
5294 | } else { |
5295 | $this->peg_currPos = $s0; |
5296 | $s0 = $this->peg_FAILED; |
5297 | } |
5298 | } else { |
5299 | $this->peg_currPos = $s0; |
5300 | $s0 = $this->peg_FAILED; |
5301 | } |
5302 | } else { |
5303 | $this->peg_currPos = $s0; |
5304 | $s0 = $this->peg_FAILED; |
5305 | } |
5306 | |
5307 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5308 | |
5309 | return $s0; |
5310 | } |
5311 | |
5312 | private function peg_parseBEGIN_BBMATRIX() { |
5313 | |
5314 | $key = $this->peg_currPos * 126 + 64; |
5315 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5316 | |
5317 | if ($cached) { |
5318 | $this->peg_currPos = $cached["nextPos"]; |
5319 | return $cached["result"]; |
5320 | } |
5321 | |
5322 | $s0 = $this->peg_currPos; |
5323 | $s1 = $this->peg_parseBEGIN(); |
5324 | if ($s1 !== $this->peg_FAILED) { |
5325 | if ($this->input_substr($this->peg_currPos, 9) === $this->peg_c83) { |
5326 | $s2 = $this->peg_c83; |
5327 | $this->peg_currPos += 9; |
5328 | } else { |
5329 | $s2 = $this->peg_FAILED; |
5330 | if ($this->peg_silentFails === 0) { |
5331 | $this->peg_fail($this->peg_c84); |
5332 | } |
5333 | } |
5334 | if ($s2 !== $this->peg_FAILED) { |
5335 | $s3 = $this->peg_parse_(); |
5336 | if ($s3 !== $this->peg_FAILED) { |
5337 | $s1 = array($s1, $s2, $s3); |
5338 | $s0 = $s1; |
5339 | } else { |
5340 | $this->peg_currPos = $s0; |
5341 | $s0 = $this->peg_FAILED; |
5342 | } |
5343 | } else { |
5344 | $this->peg_currPos = $s0; |
5345 | $s0 = $this->peg_FAILED; |
5346 | } |
5347 | } else { |
5348 | $this->peg_currPos = $s0; |
5349 | $s0 = $this->peg_FAILED; |
5350 | } |
5351 | |
5352 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5353 | |
5354 | return $s0; |
5355 | } |
5356 | |
5357 | private function peg_parseEND_BBMATRIX() { |
5358 | |
5359 | $key = $this->peg_currPos * 126 + 65; |
5360 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5361 | |
5362 | if ($cached) { |
5363 | $this->peg_currPos = $cached["nextPos"]; |
5364 | return $cached["result"]; |
5365 | } |
5366 | |
5367 | $s0 = $this->peg_currPos; |
5368 | $s1 = $this->peg_parseEND(); |
5369 | if ($s1 !== $this->peg_FAILED) { |
5370 | if ($this->input_substr($this->peg_currPos, 9) === $this->peg_c83) { |
5371 | $s2 = $this->peg_c83; |
5372 | $this->peg_currPos += 9; |
5373 | } else { |
5374 | $s2 = $this->peg_FAILED; |
5375 | if ($this->peg_silentFails === 0) { |
5376 | $this->peg_fail($this->peg_c84); |
5377 | } |
5378 | } |
5379 | if ($s2 !== $this->peg_FAILED) { |
5380 | $s3 = $this->peg_parse_(); |
5381 | if ($s3 !== $this->peg_FAILED) { |
5382 | $s1 = array($s1, $s2, $s3); |
5383 | $s0 = $s1; |
5384 | } else { |
5385 | $this->peg_currPos = $s0; |
5386 | $s0 = $this->peg_FAILED; |
5387 | } |
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 | |
5397 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5398 | |
5399 | return $s0; |
5400 | } |
5401 | |
5402 | private function peg_parseBEGIN_VMATRIX() { |
5403 | |
5404 | $key = $this->peg_currPos * 126 + 66; |
5405 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5406 | |
5407 | if ($cached) { |
5408 | $this->peg_currPos = $cached["nextPos"]; |
5409 | return $cached["result"]; |
5410 | } |
5411 | |
5412 | $s0 = $this->peg_currPos; |
5413 | $s1 = $this->peg_parseBEGIN(); |
5414 | if ($s1 !== $this->peg_FAILED) { |
5415 | if ($this->input_substr($this->peg_currPos, 9) === $this->peg_c85) { |
5416 | $s2 = $this->peg_c85; |
5417 | $this->peg_currPos += 9; |
5418 | } else { |
5419 | $s2 = $this->peg_FAILED; |
5420 | if ($this->peg_silentFails === 0) { |
5421 | $this->peg_fail($this->peg_c86); |
5422 | } |
5423 | } |
5424 | if ($s2 !== $this->peg_FAILED) { |
5425 | $s3 = $this->peg_parse_(); |
5426 | if ($s3 !== $this->peg_FAILED) { |
5427 | $s1 = array($s1, $s2, $s3); |
5428 | $s0 = $s1; |
5429 | } else { |
5430 | $this->peg_currPos = $s0; |
5431 | $s0 = $this->peg_FAILED; |
5432 | } |
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 | |
5442 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5443 | |
5444 | return $s0; |
5445 | } |
5446 | |
5447 | private function peg_parseEND_VMATRIX() { |
5448 | |
5449 | $key = $this->peg_currPos * 126 + 67; |
5450 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5451 | |
5452 | if ($cached) { |
5453 | $this->peg_currPos = $cached["nextPos"]; |
5454 | return $cached["result"]; |
5455 | } |
5456 | |
5457 | $s0 = $this->peg_currPos; |
5458 | $s1 = $this->peg_parseEND(); |
5459 | if ($s1 !== $this->peg_FAILED) { |
5460 | if ($this->input_substr($this->peg_currPos, 9) === $this->peg_c85) { |
5461 | $s2 = $this->peg_c85; |
5462 | $this->peg_currPos += 9; |
5463 | } else { |
5464 | $s2 = $this->peg_FAILED; |
5465 | if ($this->peg_silentFails === 0) { |
5466 | $this->peg_fail($this->peg_c86); |
5467 | } |
5468 | } |
5469 | if ($s2 !== $this->peg_FAILED) { |
5470 | $s3 = $this->peg_parse_(); |
5471 | if ($s3 !== $this->peg_FAILED) { |
5472 | $s1 = array($s1, $s2, $s3); |
5473 | $s0 = $s1; |
5474 | } else { |
5475 | $this->peg_currPos = $s0; |
5476 | $s0 = $this->peg_FAILED; |
5477 | } |
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 | |
5487 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5488 | |
5489 | return $s0; |
5490 | } |
5491 | |
5492 | private function peg_parseBEGIN_VVMATRIX() { |
5493 | |
5494 | $key = $this->peg_currPos * 126 + 68; |
5495 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5496 | |
5497 | if ($cached) { |
5498 | $this->peg_currPos = $cached["nextPos"]; |
5499 | return $cached["result"]; |
5500 | } |
5501 | |
5502 | $s0 = $this->peg_currPos; |
5503 | $s1 = $this->peg_parseBEGIN(); |
5504 | if ($s1 !== $this->peg_FAILED) { |
5505 | if ($this->input_substr($this->peg_currPos, 9) === $this->peg_c87) { |
5506 | $s2 = $this->peg_c87; |
5507 | $this->peg_currPos += 9; |
5508 | } else { |
5509 | $s2 = $this->peg_FAILED; |
5510 | if ($this->peg_silentFails === 0) { |
5511 | $this->peg_fail($this->peg_c88); |
5512 | } |
5513 | } |
5514 | if ($s2 !== $this->peg_FAILED) { |
5515 | $s3 = $this->peg_parse_(); |
5516 | if ($s3 !== $this->peg_FAILED) { |
5517 | $s1 = array($s1, $s2, $s3); |
5518 | $s0 = $s1; |
5519 | } else { |
5520 | $this->peg_currPos = $s0; |
5521 | $s0 = $this->peg_FAILED; |
5522 | } |
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 | |
5532 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5533 | |
5534 | return $s0; |
5535 | } |
5536 | |
5537 | private function peg_parseEND_VVMATRIX() { |
5538 | |
5539 | $key = $this->peg_currPos * 126 + 69; |
5540 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5541 | |
5542 | if ($cached) { |
5543 | $this->peg_currPos = $cached["nextPos"]; |
5544 | return $cached["result"]; |
5545 | } |
5546 | |
5547 | $s0 = $this->peg_currPos; |
5548 | $s1 = $this->peg_parseEND(); |
5549 | if ($s1 !== $this->peg_FAILED) { |
5550 | if ($this->input_substr($this->peg_currPos, 9) === $this->peg_c87) { |
5551 | $s2 = $this->peg_c87; |
5552 | $this->peg_currPos += 9; |
5553 | } else { |
5554 | $s2 = $this->peg_FAILED; |
5555 | if ($this->peg_silentFails === 0) { |
5556 | $this->peg_fail($this->peg_c88); |
5557 | } |
5558 | } |
5559 | if ($s2 !== $this->peg_FAILED) { |
5560 | $s3 = $this->peg_parse_(); |
5561 | if ($s3 !== $this->peg_FAILED) { |
5562 | $s1 = array($s1, $s2, $s3); |
5563 | $s0 = $s1; |
5564 | } else { |
5565 | $this->peg_currPos = $s0; |
5566 | $s0 = $this->peg_FAILED; |
5567 | } |
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 | |
5577 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5578 | |
5579 | return $s0; |
5580 | } |
5581 | |
5582 | private function peg_parseBEGIN_ARRAY() { |
5583 | |
5584 | $key = $this->peg_currPos * 126 + 70; |
5585 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5586 | |
5587 | if ($cached) { |
5588 | $this->peg_currPos = $cached["nextPos"]; |
5589 | return $cached["result"]; |
5590 | } |
5591 | |
5592 | $s0 = $this->peg_currPos; |
5593 | $s1 = $this->peg_parseBEGIN(); |
5594 | if ($s1 !== $this->peg_FAILED) { |
5595 | if ($this->input_substr($this->peg_currPos, 7) === $this->peg_c89) { |
5596 | $s2 = $this->peg_c89; |
5597 | $this->peg_currPos += 7; |
5598 | } else { |
5599 | $s2 = $this->peg_FAILED; |
5600 | if ($this->peg_silentFails === 0) { |
5601 | $this->peg_fail($this->peg_c90); |
5602 | } |
5603 | } |
5604 | if ($s2 !== $this->peg_FAILED) { |
5605 | $s3 = $this->peg_parse_(); |
5606 | if ($s3 !== $this->peg_FAILED) { |
5607 | $s1 = array($s1, $s2, $s3); |
5608 | $s0 = $s1; |
5609 | } else { |
5610 | $this->peg_currPos = $s0; |
5611 | $s0 = $this->peg_FAILED; |
5612 | } |
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 | |
5622 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5623 | |
5624 | return $s0; |
5625 | } |
5626 | |
5627 | private function peg_parseEND_ARRAY() { |
5628 | |
5629 | $key = $this->peg_currPos * 126 + 71; |
5630 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5631 | |
5632 | if ($cached) { |
5633 | $this->peg_currPos = $cached["nextPos"]; |
5634 | return $cached["result"]; |
5635 | } |
5636 | |
5637 | $s0 = $this->peg_currPos; |
5638 | $s1 = $this->peg_parseEND(); |
5639 | if ($s1 !== $this->peg_FAILED) { |
5640 | if ($this->input_substr($this->peg_currPos, 7) === $this->peg_c89) { |
5641 | $s2 = $this->peg_c89; |
5642 | $this->peg_currPos += 7; |
5643 | } else { |
5644 | $s2 = $this->peg_FAILED; |
5645 | if ($this->peg_silentFails === 0) { |
5646 | $this->peg_fail($this->peg_c90); |
5647 | } |
5648 | } |
5649 | if ($s2 !== $this->peg_FAILED) { |
5650 | $s3 = $this->peg_parse_(); |
5651 | if ($s3 !== $this->peg_FAILED) { |
5652 | $s1 = array($s1, $s2, $s3); |
5653 | $s0 = $s1; |
5654 | } else { |
5655 | $this->peg_currPos = $s0; |
5656 | $s0 = $this->peg_FAILED; |
5657 | } |
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 | |
5667 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5668 | |
5669 | return $s0; |
5670 | } |
5671 | |
5672 | private function peg_parseBEGIN_ALIGN() { |
5673 | |
5674 | $key = $this->peg_currPos * 126 + 72; |
5675 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5676 | |
5677 | if ($cached) { |
5678 | $this->peg_currPos = $cached["nextPos"]; |
5679 | return $cached["result"]; |
5680 | } |
5681 | |
5682 | $s0 = $this->peg_currPos; |
5683 | $s1 = $this->peg_parseBEGIN(); |
5684 | if ($s1 !== $this->peg_FAILED) { |
5685 | if ($this->input_substr($this->peg_currPos, 7) === $this->peg_c91) { |
5686 | $s2 = $this->peg_c91; |
5687 | $this->peg_currPos += 7; |
5688 | } else { |
5689 | $s2 = $this->peg_FAILED; |
5690 | if ($this->peg_silentFails === 0) { |
5691 | $this->peg_fail($this->peg_c92); |
5692 | } |
5693 | } |
5694 | if ($s2 !== $this->peg_FAILED) { |
5695 | $s3 = $this->peg_parse_(); |
5696 | if ($s3 !== $this->peg_FAILED) { |
5697 | $s1 = array($s1, $s2, $s3); |
5698 | $s0 = $s1; |
5699 | } else { |
5700 | $this->peg_currPos = $s0; |
5701 | $s0 = $this->peg_FAILED; |
5702 | } |
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 | |
5712 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5713 | |
5714 | return $s0; |
5715 | } |
5716 | |
5717 | private function peg_parseEND_ALIGN() { |
5718 | |
5719 | $key = $this->peg_currPos * 126 + 73; |
5720 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5721 | |
5722 | if ($cached) { |
5723 | $this->peg_currPos = $cached["nextPos"]; |
5724 | return $cached["result"]; |
5725 | } |
5726 | |
5727 | $s0 = $this->peg_currPos; |
5728 | $s1 = $this->peg_parseEND(); |
5729 | if ($s1 !== $this->peg_FAILED) { |
5730 | if ($this->input_substr($this->peg_currPos, 7) === $this->peg_c91) { |
5731 | $s2 = $this->peg_c91; |
5732 | $this->peg_currPos += 7; |
5733 | } else { |
5734 | $s2 = $this->peg_FAILED; |
5735 | if ($this->peg_silentFails === 0) { |
5736 | $this->peg_fail($this->peg_c92); |
5737 | } |
5738 | } |
5739 | if ($s2 !== $this->peg_FAILED) { |
5740 | $s3 = $this->peg_parse_(); |
5741 | if ($s3 !== $this->peg_FAILED) { |
5742 | $s1 = array($s1, $s2, $s3); |
5743 | $s0 = $s1; |
5744 | } else { |
5745 | $this->peg_currPos = $s0; |
5746 | $s0 = $this->peg_FAILED; |
5747 | } |
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 | |
5757 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5758 | |
5759 | return $s0; |
5760 | } |
5761 | |
5762 | private function peg_parseBEGIN_ALIGNED() { |
5763 | |
5764 | $key = $this->peg_currPos * 126 + 74; |
5765 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5766 | |
5767 | if ($cached) { |
5768 | $this->peg_currPos = $cached["nextPos"]; |
5769 | return $cached["result"]; |
5770 | } |
5771 | |
5772 | $s0 = $this->peg_currPos; |
5773 | $s1 = $this->peg_parseBEGIN(); |
5774 | if ($s1 !== $this->peg_FAILED) { |
5775 | if ($this->input_substr($this->peg_currPos, 9) === $this->peg_c93) { |
5776 | $s2 = $this->peg_c93; |
5777 | $this->peg_currPos += 9; |
5778 | } else { |
5779 | $s2 = $this->peg_FAILED; |
5780 | if ($this->peg_silentFails === 0) { |
5781 | $this->peg_fail($this->peg_c94); |
5782 | } |
5783 | } |
5784 | if ($s2 !== $this->peg_FAILED) { |
5785 | $s3 = $this->peg_parse_(); |
5786 | if ($s3 !== $this->peg_FAILED) { |
5787 | $s1 = array($s1, $s2, $s3); |
5788 | $s0 = $s1; |
5789 | } else { |
5790 | $this->peg_currPos = $s0; |
5791 | $s0 = $this->peg_FAILED; |
5792 | } |
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 | |
5802 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5803 | |
5804 | return $s0; |
5805 | } |
5806 | |
5807 | private function peg_parseEND_ALIGNED() { |
5808 | |
5809 | $key = $this->peg_currPos * 126 + 75; |
5810 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5811 | |
5812 | if ($cached) { |
5813 | $this->peg_currPos = $cached["nextPos"]; |
5814 | return $cached["result"]; |
5815 | } |
5816 | |
5817 | $s0 = $this->peg_currPos; |
5818 | $s1 = $this->peg_parseEND(); |
5819 | if ($s1 !== $this->peg_FAILED) { |
5820 | if ($this->input_substr($this->peg_currPos, 9) === $this->peg_c93) { |
5821 | $s2 = $this->peg_c93; |
5822 | $this->peg_currPos += 9; |
5823 | } else { |
5824 | $s2 = $this->peg_FAILED; |
5825 | if ($this->peg_silentFails === 0) { |
5826 | $this->peg_fail($this->peg_c94); |
5827 | } |
5828 | } |
5829 | if ($s2 !== $this->peg_FAILED) { |
5830 | $s3 = $this->peg_parse_(); |
5831 | if ($s3 !== $this->peg_FAILED) { |
5832 | $s1 = array($s1, $s2, $s3); |
5833 | $s0 = $s1; |
5834 | } else { |
5835 | $this->peg_currPos = $s0; |
5836 | $s0 = $this->peg_FAILED; |
5837 | } |
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 | |
5847 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5848 | |
5849 | return $s0; |
5850 | } |
5851 | |
5852 | private function peg_parseBEGIN_ALIGNAT() { |
5853 | |
5854 | $key = $this->peg_currPos * 126 + 76; |
5855 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5856 | |
5857 | if ($cached) { |
5858 | $this->peg_currPos = $cached["nextPos"]; |
5859 | return $cached["result"]; |
5860 | } |
5861 | |
5862 | $s0 = $this->peg_currPos; |
5863 | $s1 = $this->peg_parseBEGIN(); |
5864 | if ($s1 !== $this->peg_FAILED) { |
5865 | if ($this->input_substr($this->peg_currPos, 9) === $this->peg_c95) { |
5866 | $s2 = $this->peg_c95; |
5867 | $this->peg_currPos += 9; |
5868 | } else { |
5869 | $s2 = $this->peg_FAILED; |
5870 | if ($this->peg_silentFails === 0) { |
5871 | $this->peg_fail($this->peg_c96); |
5872 | } |
5873 | } |
5874 | if ($s2 !== $this->peg_FAILED) { |
5875 | $s3 = $this->peg_parse_(); |
5876 | if ($s3 !== $this->peg_FAILED) { |
5877 | $s1 = array($s1, $s2, $s3); |
5878 | $s0 = $s1; |
5879 | } else { |
5880 | $this->peg_currPos = $s0; |
5881 | $s0 = $this->peg_FAILED; |
5882 | } |
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 | |
5892 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5893 | |
5894 | return $s0; |
5895 | } |
5896 | |
5897 | private function peg_parseEND_ALIGNAT() { |
5898 | |
5899 | $key = $this->peg_currPos * 126 + 77; |
5900 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5901 | |
5902 | if ($cached) { |
5903 | $this->peg_currPos = $cached["nextPos"]; |
5904 | return $cached["result"]; |
5905 | } |
5906 | |
5907 | $s0 = $this->peg_currPos; |
5908 | $s1 = $this->peg_parseEND(); |
5909 | if ($s1 !== $this->peg_FAILED) { |
5910 | if ($this->input_substr($this->peg_currPos, 9) === $this->peg_c95) { |
5911 | $s2 = $this->peg_c95; |
5912 | $this->peg_currPos += 9; |
5913 | } else { |
5914 | $s2 = $this->peg_FAILED; |
5915 | if ($this->peg_silentFails === 0) { |
5916 | $this->peg_fail($this->peg_c96); |
5917 | } |
5918 | } |
5919 | if ($s2 !== $this->peg_FAILED) { |
5920 | $s3 = $this->peg_parse_(); |
5921 | if ($s3 !== $this->peg_FAILED) { |
5922 | $s1 = array($s1, $s2, $s3); |
5923 | $s0 = $s1; |
5924 | } else { |
5925 | $this->peg_currPos = $s0; |
5926 | $s0 = $this->peg_FAILED; |
5927 | } |
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 | |
5937 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5938 | |
5939 | return $s0; |
5940 | } |
5941 | |
5942 | private function peg_parseBEGIN_ALIGNEDAT() { |
5943 | |
5944 | $key = $this->peg_currPos * 126 + 78; |
5945 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5946 | |
5947 | if ($cached) { |
5948 | $this->peg_currPos = $cached["nextPos"]; |
5949 | return $cached["result"]; |
5950 | } |
5951 | |
5952 | $s0 = $this->peg_currPos; |
5953 | $s1 = $this->peg_parseBEGIN(); |
5954 | if ($s1 !== $this->peg_FAILED) { |
5955 | if ($this->input_substr($this->peg_currPos, 11) === $this->peg_c97) { |
5956 | $s2 = $this->peg_c97; |
5957 | $this->peg_currPos += 11; |
5958 | } else { |
5959 | $s2 = $this->peg_FAILED; |
5960 | if ($this->peg_silentFails === 0) { |
5961 | $this->peg_fail($this->peg_c98); |
5962 | } |
5963 | } |
5964 | if ($s2 !== $this->peg_FAILED) { |
5965 | $s3 = $this->peg_parse_(); |
5966 | if ($s3 !== $this->peg_FAILED) { |
5967 | $s1 = array($s1, $s2, $s3); |
5968 | $s0 = $s1; |
5969 | } else { |
5970 | $this->peg_currPos = $s0; |
5971 | $s0 = $this->peg_FAILED; |
5972 | } |
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 | |
5982 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
5983 | |
5984 | return $s0; |
5985 | } |
5986 | |
5987 | private function peg_parseEND_ALIGNEDAT() { |
5988 | |
5989 | $key = $this->peg_currPos * 126 + 79; |
5990 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
5991 | |
5992 | if ($cached) { |
5993 | $this->peg_currPos = $cached["nextPos"]; |
5994 | return $cached["result"]; |
5995 | } |
5996 | |
5997 | $s0 = $this->peg_currPos; |
5998 | $s1 = $this->peg_parseEND(); |
5999 | if ($s1 !== $this->peg_FAILED) { |
6000 | if ($this->input_substr($this->peg_currPos, 11) === $this->peg_c97) { |
6001 | $s2 = $this->peg_c97; |
6002 | $this->peg_currPos += 11; |
6003 | } else { |
6004 | $s2 = $this->peg_FAILED; |
6005 | if ($this->peg_silentFails === 0) { |
6006 | $this->peg_fail($this->peg_c98); |
6007 | } |
6008 | } |
6009 | if ($s2 !== $this->peg_FAILED) { |
6010 | $s3 = $this->peg_parse_(); |
6011 | if ($s3 !== $this->peg_FAILED) { |
6012 | $s1 = array($s1, $s2, $s3); |
6013 | $s0 = $s1; |
6014 | } else { |
6015 | $this->peg_currPos = $s0; |
6016 | $s0 = $this->peg_FAILED; |
6017 | } |
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 | |
6027 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6028 | |
6029 | return $s0; |
6030 | } |
6031 | |
6032 | private function peg_parseBEGIN_SMALLMATRIX() { |
6033 | |
6034 | $key = $this->peg_currPos * 126 + 80; |
6035 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6036 | |
6037 | if ($cached) { |
6038 | $this->peg_currPos = $cached["nextPos"]; |
6039 | return $cached["result"]; |
6040 | } |
6041 | |
6042 | $s0 = $this->peg_currPos; |
6043 | $s1 = $this->peg_parseBEGIN(); |
6044 | if ($s1 !== $this->peg_FAILED) { |
6045 | if ($this->input_substr($this->peg_currPos, 13) === $this->peg_c99) { |
6046 | $s2 = $this->peg_c99; |
6047 | $this->peg_currPos += 13; |
6048 | } else { |
6049 | $s2 = $this->peg_FAILED; |
6050 | if ($this->peg_silentFails === 0) { |
6051 | $this->peg_fail($this->peg_c100); |
6052 | } |
6053 | } |
6054 | if ($s2 !== $this->peg_FAILED) { |
6055 | $s3 = $this->peg_parse_(); |
6056 | if ($s3 !== $this->peg_FAILED) { |
6057 | $s1 = array($s1, $s2, $s3); |
6058 | $s0 = $s1; |
6059 | } else { |
6060 | $this->peg_currPos = $s0; |
6061 | $s0 = $this->peg_FAILED; |
6062 | } |
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 | |
6072 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6073 | |
6074 | return $s0; |
6075 | } |
6076 | |
6077 | private function peg_parseEND_SMALLMATRIX() { |
6078 | |
6079 | $key = $this->peg_currPos * 126 + 81; |
6080 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6081 | |
6082 | if ($cached) { |
6083 | $this->peg_currPos = $cached["nextPos"]; |
6084 | return $cached["result"]; |
6085 | } |
6086 | |
6087 | $s0 = $this->peg_currPos; |
6088 | $s1 = $this->peg_parseEND(); |
6089 | if ($s1 !== $this->peg_FAILED) { |
6090 | if ($this->input_substr($this->peg_currPos, 13) === $this->peg_c99) { |
6091 | $s2 = $this->peg_c99; |
6092 | $this->peg_currPos += 13; |
6093 | } else { |
6094 | $s2 = $this->peg_FAILED; |
6095 | if ($this->peg_silentFails === 0) { |
6096 | $this->peg_fail($this->peg_c100); |
6097 | } |
6098 | } |
6099 | if ($s2 !== $this->peg_FAILED) { |
6100 | $s3 = $this->peg_parse_(); |
6101 | if ($s3 !== $this->peg_FAILED) { |
6102 | $s1 = array($s1, $s2, $s3); |
6103 | $s0 = $s1; |
6104 | } else { |
6105 | $this->peg_currPos = $s0; |
6106 | $s0 = $this->peg_FAILED; |
6107 | } |
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 | |
6117 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6118 | |
6119 | return $s0; |
6120 | } |
6121 | |
6122 | private function peg_parseBEGIN_CASES() { |
6123 | |
6124 | $key = $this->peg_currPos * 126 + 82; |
6125 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6126 | |
6127 | if ($cached) { |
6128 | $this->peg_currPos = $cached["nextPos"]; |
6129 | return $cached["result"]; |
6130 | } |
6131 | |
6132 | $s0 = $this->peg_currPos; |
6133 | $s1 = $this->peg_parseBEGIN(); |
6134 | if ($s1 !== $this->peg_FAILED) { |
6135 | if ($this->input_substr($this->peg_currPos, 7) === $this->peg_c101) { |
6136 | $s2 = $this->peg_c101; |
6137 | $this->peg_currPos += 7; |
6138 | } else { |
6139 | $s2 = $this->peg_FAILED; |
6140 | if ($this->peg_silentFails === 0) { |
6141 | $this->peg_fail($this->peg_c102); |
6142 | } |
6143 | } |
6144 | if ($s2 !== $this->peg_FAILED) { |
6145 | $s3 = $this->peg_parse_(); |
6146 | if ($s3 !== $this->peg_FAILED) { |
6147 | $s1 = array($s1, $s2, $s3); |
6148 | $s0 = $s1; |
6149 | } else { |
6150 | $this->peg_currPos = $s0; |
6151 | $s0 = $this->peg_FAILED; |
6152 | } |
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 | |
6162 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6163 | |
6164 | return $s0; |
6165 | } |
6166 | |
6167 | private function peg_parseEND_CASES() { |
6168 | |
6169 | $key = $this->peg_currPos * 126 + 83; |
6170 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6171 | |
6172 | if ($cached) { |
6173 | $this->peg_currPos = $cached["nextPos"]; |
6174 | return $cached["result"]; |
6175 | } |
6176 | |
6177 | $s0 = $this->peg_currPos; |
6178 | $s1 = $this->peg_parseEND(); |
6179 | if ($s1 !== $this->peg_FAILED) { |
6180 | if ($this->input_substr($this->peg_currPos, 7) === $this->peg_c101) { |
6181 | $s2 = $this->peg_c101; |
6182 | $this->peg_currPos += 7; |
6183 | } else { |
6184 | $s2 = $this->peg_FAILED; |
6185 | if ($this->peg_silentFails === 0) { |
6186 | $this->peg_fail($this->peg_c102); |
6187 | } |
6188 | } |
6189 | if ($s2 !== $this->peg_FAILED) { |
6190 | $s3 = $this->peg_parse_(); |
6191 | if ($s3 !== $this->peg_FAILED) { |
6192 | $s1 = array($s1, $s2, $s3); |
6193 | $s0 = $s1; |
6194 | } else { |
6195 | $this->peg_currPos = $s0; |
6196 | $s0 = $this->peg_FAILED; |
6197 | } |
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 | |
6207 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6208 | |
6209 | return $s0; |
6210 | } |
6211 | |
6212 | private function peg_parseSQ_CLOSE() { |
6213 | |
6214 | $key = $this->peg_currPos * 126 + 84; |
6215 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6216 | |
6217 | if ($cached) { |
6218 | $this->peg_currPos = $cached["nextPos"]; |
6219 | return $cached["result"]; |
6220 | } |
6221 | |
6222 | $s0 = $this->peg_currPos; |
6223 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c29) { |
6224 | $s1 = $this->peg_c29; |
6225 | $this->peg_currPos++; |
6226 | } else { |
6227 | $s1 = $this->peg_FAILED; |
6228 | if ($this->peg_silentFails === 0) { |
6229 | $this->peg_fail($this->peg_c30); |
6230 | } |
6231 | } |
6232 | if ($s1 !== $this->peg_FAILED) { |
6233 | $s2 = $this->peg_parse_(); |
6234 | if ($s2 !== $this->peg_FAILED) { |
6235 | $s1 = array($s1, $s2); |
6236 | $s0 = $s1; |
6237 | } else { |
6238 | $this->peg_currPos = $s0; |
6239 | $s0 = $this->peg_FAILED; |
6240 | } |
6241 | } else { |
6242 | $this->peg_currPos = $s0; |
6243 | $s0 = $this->peg_FAILED; |
6244 | } |
6245 | |
6246 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6247 | |
6248 | return $s0; |
6249 | } |
6250 | |
6251 | private function peg_parseCURLY_OPEN() { |
6252 | |
6253 | $key = $this->peg_currPos * 126 + 85; |
6254 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6255 | |
6256 | if ($cached) { |
6257 | $this->peg_currPos = $cached["nextPos"]; |
6258 | return $cached["result"]; |
6259 | } |
6260 | |
6261 | $s0 = $this->peg_currPos; |
6262 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c39) { |
6263 | $s1 = $this->peg_c39; |
6264 | $this->peg_currPos++; |
6265 | } else { |
6266 | $s1 = $this->peg_FAILED; |
6267 | if ($this->peg_silentFails === 0) { |
6268 | $this->peg_fail($this->peg_c40); |
6269 | } |
6270 | } |
6271 | if ($s1 !== $this->peg_FAILED) { |
6272 | $s2 = $this->peg_parse_(); |
6273 | if ($s2 !== $this->peg_FAILED) { |
6274 | $s1 = array($s1, $s2); |
6275 | $s0 = $s1; |
6276 | } else { |
6277 | $this->peg_currPos = $s0; |
6278 | $s0 = $this->peg_FAILED; |
6279 | } |
6280 | } else { |
6281 | $this->peg_currPos = $s0; |
6282 | $s0 = $this->peg_FAILED; |
6283 | } |
6284 | |
6285 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6286 | |
6287 | return $s0; |
6288 | } |
6289 | |
6290 | private function peg_parseCURLY_CLOSE() { |
6291 | |
6292 | $key = $this->peg_currPos * 126 + 86; |
6293 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6294 | |
6295 | if ($cached) { |
6296 | $this->peg_currPos = $cached["nextPos"]; |
6297 | return $cached["result"]; |
6298 | } |
6299 | |
6300 | $s0 = $this->peg_currPos; |
6301 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c11) { |
6302 | $s1 = $this->peg_c11; |
6303 | $this->peg_currPos++; |
6304 | } else { |
6305 | $s1 = $this->peg_FAILED; |
6306 | if ($this->peg_silentFails === 0) { |
6307 | $this->peg_fail($this->peg_c12); |
6308 | } |
6309 | } |
6310 | if ($s1 !== $this->peg_FAILED) { |
6311 | $s2 = $this->peg_parse_(); |
6312 | if ($s2 !== $this->peg_FAILED) { |
6313 | $s1 = array($s1, $s2); |
6314 | $s0 = $s1; |
6315 | } else { |
6316 | $this->peg_currPos = $s0; |
6317 | $s0 = $this->peg_FAILED; |
6318 | } |
6319 | } else { |
6320 | $this->peg_currPos = $s0; |
6321 | $s0 = $this->peg_FAILED; |
6322 | } |
6323 | |
6324 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6325 | |
6326 | return $s0; |
6327 | } |
6328 | |
6329 | private function peg_parseSUP() { |
6330 | |
6331 | $key = $this->peg_currPos * 126 + 87; |
6332 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6333 | |
6334 | if ($cached) { |
6335 | $this->peg_currPos = $cached["nextPos"]; |
6336 | return $cached["result"]; |
6337 | } |
6338 | |
6339 | $s0 = $this->peg_currPos; |
6340 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c35) { |
6341 | $s1 = $this->peg_c35; |
6342 | $this->peg_currPos++; |
6343 | } else { |
6344 | $s1 = $this->peg_FAILED; |
6345 | if ($this->peg_silentFails === 0) { |
6346 | $this->peg_fail($this->peg_c36); |
6347 | } |
6348 | } |
6349 | if ($s1 !== $this->peg_FAILED) { |
6350 | $s2 = $this->peg_parse_(); |
6351 | if ($s2 !== $this->peg_FAILED) { |
6352 | $s1 = array($s1, $s2); |
6353 | $s0 = $s1; |
6354 | } else { |
6355 | $this->peg_currPos = $s0; |
6356 | $s0 = $this->peg_FAILED; |
6357 | } |
6358 | } else { |
6359 | $this->peg_currPos = $s0; |
6360 | $s0 = $this->peg_FAILED; |
6361 | } |
6362 | |
6363 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6364 | |
6365 | return $s0; |
6366 | } |
6367 | |
6368 | private function peg_parseSUB() { |
6369 | |
6370 | $key = $this->peg_currPos * 126 + 88; |
6371 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6372 | |
6373 | if ($cached) { |
6374 | $this->peg_currPos = $cached["nextPos"]; |
6375 | return $cached["result"]; |
6376 | } |
6377 | |
6378 | $s0 = $this->peg_currPos; |
6379 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c37) { |
6380 | $s1 = $this->peg_c37; |
6381 | $this->peg_currPos++; |
6382 | } else { |
6383 | $s1 = $this->peg_FAILED; |
6384 | if ($this->peg_silentFails === 0) { |
6385 | $this->peg_fail($this->peg_c38); |
6386 | } |
6387 | } |
6388 | if ($s1 !== $this->peg_FAILED) { |
6389 | $s2 = $this->peg_parse_(); |
6390 | if ($s2 !== $this->peg_FAILED) { |
6391 | $s1 = array($s1, $s2); |
6392 | $s0 = $s1; |
6393 | } else { |
6394 | $this->peg_currPos = $s0; |
6395 | $s0 = $this->peg_FAILED; |
6396 | } |
6397 | } else { |
6398 | $this->peg_currPos = $s0; |
6399 | $s0 = $this->peg_FAILED; |
6400 | } |
6401 | |
6402 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6403 | |
6404 | return $s0; |
6405 | } |
6406 | |
6407 | private function peg_parsegeneric_func() { |
6408 | |
6409 | $key = $this->peg_currPos * 126 + 89; |
6410 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6411 | |
6412 | if ($cached) { |
6413 | $this->peg_currPos = $cached["nextPos"]; |
6414 | return $cached["result"]; |
6415 | } |
6416 | |
6417 | $s0 = $this->peg_currPos; |
6418 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c59) { |
6419 | $s1 = $this->peg_c59; |
6420 | $this->peg_currPos++; |
6421 | } else { |
6422 | $s1 = $this->peg_FAILED; |
6423 | if ($this->peg_silentFails === 0) { |
6424 | $this->peg_fail($this->peg_c60); |
6425 | } |
6426 | } |
6427 | if ($s1 !== $this->peg_FAILED) { |
6428 | $s2 = array(); |
6429 | $s3 = $this->peg_parsealpha(); |
6430 | if ($s3 !== $this->peg_FAILED) { |
6431 | while ($s3 !== $this->peg_FAILED) { |
6432 | $s2[] = $s3; |
6433 | $s3 = $this->peg_parsealpha(); |
6434 | } |
6435 | } else { |
6436 | $s2 = $this->peg_FAILED; |
6437 | } |
6438 | if ($s2 !== $this->peg_FAILED) { |
6439 | $this->peg_reportedPos = $s0; |
6440 | $s1 = $this->peg_f59(); |
6441 | $s0 = $s1; |
6442 | } else { |
6443 | $this->peg_currPos = $s0; |
6444 | $s0 = $this->peg_FAILED; |
6445 | } |
6446 | } else { |
6447 | $this->peg_currPos = $s0; |
6448 | $s0 = $this->peg_FAILED; |
6449 | } |
6450 | |
6451 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6452 | |
6453 | return $s0; |
6454 | } |
6455 | |
6456 | private function peg_parseBIG() { |
6457 | |
6458 | $key = $this->peg_currPos * 126 + 90; |
6459 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6460 | |
6461 | if ($cached) { |
6462 | $this->peg_currPos = $cached["nextPos"]; |
6463 | return $cached["result"]; |
6464 | } |
6465 | |
6466 | $s0 = $this->peg_currPos; |
6467 | $s1 = $this->peg_parsegeneric_func(); |
6468 | if ($s1 !== $this->peg_FAILED) { |
6469 | $this->peg_reportedPos = $this->peg_currPos; |
6470 | $s2 = $this->peg_f107($s1); |
6471 | if ($s2) { |
6472 | $s2 = null; |
6473 | } else { |
6474 | $s2 = $this->peg_FAILED; |
6475 | } |
6476 | if ($s2 !== $this->peg_FAILED) { |
6477 | $s3 = $this->peg_parse_(); |
6478 | if ($s3 !== $this->peg_FAILED) { |
6479 | $this->peg_reportedPos = $s0; |
6480 | $s1 = $this->peg_f99($s1); |
6481 | $s0 = $s1; |
6482 | } else { |
6483 | $this->peg_currPos = $s0; |
6484 | $s0 = $this->peg_FAILED; |
6485 | } |
6486 | } else { |
6487 | $this->peg_currPos = $s0; |
6488 | $s0 = $this->peg_FAILED; |
6489 | } |
6490 | } else { |
6491 | $this->peg_currPos = $s0; |
6492 | $s0 = $this->peg_FAILED; |
6493 | } |
6494 | |
6495 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6496 | |
6497 | return $s0; |
6498 | } |
6499 | |
6500 | private function peg_parseFUN_AR1() { |
6501 | |
6502 | $key = $this->peg_currPos * 126 + 91; |
6503 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6504 | |
6505 | if ($cached) { |
6506 | $this->peg_currPos = $cached["nextPos"]; |
6507 | return $cached["result"]; |
6508 | } |
6509 | |
6510 | $s0 = $this->peg_currPos; |
6511 | $s1 = $this->peg_parsegeneric_func(); |
6512 | if ($s1 !== $this->peg_FAILED) { |
6513 | $this->peg_reportedPos = $this->peg_currPos; |
6514 | $s2 = $this->peg_f108($s1); |
6515 | if ($s2) { |
6516 | $s2 = null; |
6517 | } else { |
6518 | $s2 = $this->peg_FAILED; |
6519 | } |
6520 | if ($s2 !== $this->peg_FAILED) { |
6521 | $s3 = $this->peg_parse_(); |
6522 | if ($s3 !== $this->peg_FAILED) { |
6523 | $this->peg_reportedPos = $s0; |
6524 | $s1 = $this->peg_f99($s1); |
6525 | $s0 = $s1; |
6526 | } else { |
6527 | $this->peg_currPos = $s0; |
6528 | $s0 = $this->peg_FAILED; |
6529 | } |
6530 | } else { |
6531 | $this->peg_currPos = $s0; |
6532 | $s0 = $this->peg_FAILED; |
6533 | } |
6534 | } else { |
6535 | $this->peg_currPos = $s0; |
6536 | $s0 = $this->peg_FAILED; |
6537 | } |
6538 | if ($s0 === $this->peg_FAILED) { |
6539 | $s0 = $this->peg_currPos; |
6540 | $s1 = $this->peg_parsegeneric_func(); |
6541 | if ($s1 !== $this->peg_FAILED) { |
6542 | $this->peg_reportedPos = $this->peg_currPos; |
6543 | $s2 = $this->peg_f109($s1); |
6544 | if ($s2) { |
6545 | $s2 = null; |
6546 | } else { |
6547 | $s2 = $this->peg_FAILED; |
6548 | } |
6549 | if ($s2 !== $this->peg_FAILED) { |
6550 | $s3 = $this->peg_parse_(); |
6551 | if ($s3 !== $this->peg_FAILED) { |
6552 | $this->peg_reportedPos = $s0; |
6553 | $s1 = $this->peg_f99($s1); |
6554 | $s0 = $s1; |
6555 | } else { |
6556 | $this->peg_currPos = $s0; |
6557 | $s0 = $this->peg_FAILED; |
6558 | } |
6559 | } else { |
6560 | $this->peg_currPos = $s0; |
6561 | $s0 = $this->peg_FAILED; |
6562 | } |
6563 | } else { |
6564 | $this->peg_currPos = $s0; |
6565 | $s0 = $this->peg_FAILED; |
6566 | } |
6567 | if ($s0 === $this->peg_FAILED) { |
6568 | $s0 = $this->peg_currPos; |
6569 | $s1 = $this->peg_parsegeneric_func(); |
6570 | if ($s1 !== $this->peg_FAILED) { |
6571 | $this->peg_reportedPos = $this->peg_currPos; |
6572 | $s2 = $this->peg_f110($s1); |
6573 | if ($s2) { |
6574 | $s2 = null; |
6575 | } else { |
6576 | $s2 = $this->peg_FAILED; |
6577 | } |
6578 | if ($s2 !== $this->peg_FAILED) { |
6579 | $s3 = $this->peg_parse_(); |
6580 | if ($s3 !== $this->peg_FAILED) { |
6581 | $this->peg_reportedPos = $s0; |
6582 | $s1 = $this->peg_f111($s1); |
6583 | $s0 = $s1; |
6584 | } else { |
6585 | $this->peg_currPos = $s0; |
6586 | $s0 = $this->peg_FAILED; |
6587 | } |
6588 | } else { |
6589 | $this->peg_currPos = $s0; |
6590 | $s0 = $this->peg_FAILED; |
6591 | } |
6592 | } else { |
6593 | $this->peg_currPos = $s0; |
6594 | $s0 = $this->peg_FAILED; |
6595 | } |
6596 | } |
6597 | } |
6598 | |
6599 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6600 | |
6601 | return $s0; |
6602 | } |
6603 | |
6604 | private function peg_parseFUN_MHCHEM() { |
6605 | |
6606 | $key = $this->peg_currPos * 126 + 92; |
6607 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6608 | |
6609 | if ($cached) { |
6610 | $this->peg_currPos = $cached["nextPos"]; |
6611 | return $cached["result"]; |
6612 | } |
6613 | |
6614 | $s0 = $this->peg_currPos; |
6615 | $s1 = $this->peg_parsegeneric_func(); |
6616 | if ($s1 !== $this->peg_FAILED) { |
6617 | $this->peg_reportedPos = $this->peg_currPos; |
6618 | $s2 = $this->peg_f112($s1); |
6619 | if ($s2) { |
6620 | $s2 = null; |
6621 | } else { |
6622 | $s2 = $this->peg_FAILED; |
6623 | } |
6624 | if ($s2 !== $this->peg_FAILED) { |
6625 | $s3 = $this->peg_parse_(); |
6626 | if ($s3 !== $this->peg_FAILED) { |
6627 | $this->peg_reportedPos = $s0; |
6628 | $s1 = $this->peg_f99($s1); |
6629 | $s0 = $s1; |
6630 | } else { |
6631 | $this->peg_currPos = $s0; |
6632 | $s0 = $this->peg_FAILED; |
6633 | } |
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_parseFUN_AR2() { |
6649 | |
6650 | $key = $this->peg_currPos * 126 + 93; |
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 | $s1 = $this->peg_parsegeneric_func(); |
6660 | if ($s1 !== $this->peg_FAILED) { |
6661 | $this->peg_reportedPos = $this->peg_currPos; |
6662 | $s2 = $this->peg_f113($s1); |
6663 | if ($s2) { |
6664 | $s2 = null; |
6665 | } else { |
6666 | $s2 = $this->peg_FAILED; |
6667 | } |
6668 | if ($s2 !== $this->peg_FAILED) { |
6669 | $s3 = $this->peg_parse_(); |
6670 | if ($s3 !== $this->peg_FAILED) { |
6671 | $this->peg_reportedPos = $s0; |
6672 | $s1 = $this->peg_f99($s1); |
6673 | $s0 = $s1; |
6674 | } else { |
6675 | $this->peg_currPos = $s0; |
6676 | $s0 = $this->peg_FAILED; |
6677 | } |
6678 | } else { |
6679 | $this->peg_currPos = $s0; |
6680 | $s0 = $this->peg_FAILED; |
6681 | } |
6682 | } else { |
6683 | $this->peg_currPos = $s0; |
6684 | $s0 = $this->peg_FAILED; |
6685 | } |
6686 | |
6687 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6688 | |
6689 | return $s0; |
6690 | } |
6691 | |
6692 | private function peg_parseFUN_AR4_MHCHEM_TEXIFIED() { |
6693 | |
6694 | $key = $this->peg_currPos * 126 + 94; |
6695 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6696 | |
6697 | if ($cached) { |
6698 | $this->peg_currPos = $cached["nextPos"]; |
6699 | return $cached["result"]; |
6700 | } |
6701 | |
6702 | $s0 = $this->peg_currPos; |
6703 | $s1 = $this->peg_parsegeneric_func(); |
6704 | if ($s1 !== $this->peg_FAILED) { |
6705 | $this->peg_reportedPos = $this->peg_currPos; |
6706 | $s2 = $this->peg_f114($s1); |
6707 | if ($s2) { |
6708 | $s2 = null; |
6709 | } else { |
6710 | $s2 = $this->peg_FAILED; |
6711 | } |
6712 | if ($s2 !== $this->peg_FAILED) { |
6713 | $s3 = $this->peg_parse_(); |
6714 | if ($s3 !== $this->peg_FAILED) { |
6715 | $this->peg_reportedPos = $s0; |
6716 | $s1 = $this->peg_f99($s1); |
6717 | $s0 = $s1; |
6718 | } else { |
6719 | $this->peg_currPos = $s0; |
6720 | $s0 = $this->peg_FAILED; |
6721 | } |
6722 | } else { |
6723 | $this->peg_currPos = $s0; |
6724 | $s0 = $this->peg_FAILED; |
6725 | } |
6726 | } else { |
6727 | $this->peg_currPos = $s0; |
6728 | $s0 = $this->peg_FAILED; |
6729 | } |
6730 | |
6731 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6732 | |
6733 | return $s0; |
6734 | } |
6735 | |
6736 | private function peg_parseFUN_INFIX() { |
6737 | |
6738 | $key = $this->peg_currPos * 126 + 95; |
6739 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6740 | |
6741 | if ($cached) { |
6742 | $this->peg_currPos = $cached["nextPos"]; |
6743 | return $cached["result"]; |
6744 | } |
6745 | |
6746 | $s0 = $this->peg_currPos; |
6747 | $s1 = $this->peg_parsegeneric_func(); |
6748 | if ($s1 !== $this->peg_FAILED) { |
6749 | $this->peg_reportedPos = $this->peg_currPos; |
6750 | $s2 = $this->peg_f115($s1); |
6751 | if ($s2) { |
6752 | $s2 = null; |
6753 | } else { |
6754 | $s2 = $this->peg_FAILED; |
6755 | } |
6756 | if ($s2 !== $this->peg_FAILED) { |
6757 | $s3 = $this->peg_parse_(); |
6758 | if ($s3 !== $this->peg_FAILED) { |
6759 | $this->peg_reportedPos = $s0; |
6760 | $s1 = $this->peg_f99($s1); |
6761 | $s0 = $s1; |
6762 | } else { |
6763 | $this->peg_currPos = $s0; |
6764 | $s0 = $this->peg_FAILED; |
6765 | } |
6766 | } else { |
6767 | $this->peg_currPos = $s0; |
6768 | $s0 = $this->peg_FAILED; |
6769 | } |
6770 | } else { |
6771 | $this->peg_currPos = $s0; |
6772 | $s0 = $this->peg_FAILED; |
6773 | } |
6774 | |
6775 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6776 | |
6777 | return $s0; |
6778 | } |
6779 | |
6780 | private function peg_parseDECLh() { |
6781 | |
6782 | $key = $this->peg_currPos * 126 + 96; |
6783 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6784 | |
6785 | if ($cached) { |
6786 | $this->peg_currPos = $cached["nextPos"]; |
6787 | return $cached["result"]; |
6788 | } |
6789 | |
6790 | $s0 = $this->peg_currPos; |
6791 | $s1 = $this->peg_parsegeneric_func(); |
6792 | if ($s1 !== $this->peg_FAILED) { |
6793 | $this->peg_reportedPos = $this->peg_currPos; |
6794 | $s2 = $this->peg_f116($s1); |
6795 | if ($s2) { |
6796 | $s2 = null; |
6797 | } else { |
6798 | $s2 = $this->peg_FAILED; |
6799 | } |
6800 | if ($s2 !== $this->peg_FAILED) { |
6801 | $s3 = $this->peg_parse_(); |
6802 | if ($s3 !== $this->peg_FAILED) { |
6803 | $this->peg_reportedPos = $s0; |
6804 | $s1 = $this->peg_f117($s1); |
6805 | $s0 = $s1; |
6806 | } else { |
6807 | $this->peg_currPos = $s0; |
6808 | $s0 = $this->peg_FAILED; |
6809 | } |
6810 | } else { |
6811 | $this->peg_currPos = $s0; |
6812 | $s0 = $this->peg_FAILED; |
6813 | } |
6814 | } else { |
6815 | $this->peg_currPos = $s0; |
6816 | $s0 = $this->peg_FAILED; |
6817 | } |
6818 | |
6819 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6820 | |
6821 | return $s0; |
6822 | } |
6823 | |
6824 | private function peg_parseFUN_AR2nb() { |
6825 | |
6826 | $key = $this->peg_currPos * 126 + 97; |
6827 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6828 | |
6829 | if ($cached) { |
6830 | $this->peg_currPos = $cached["nextPos"]; |
6831 | return $cached["result"]; |
6832 | } |
6833 | |
6834 | $s0 = $this->peg_currPos; |
6835 | $s1 = $this->peg_parsegeneric_func(); |
6836 | if ($s1 !== $this->peg_FAILED) { |
6837 | $this->peg_reportedPos = $this->peg_currPos; |
6838 | $s2 = $this->peg_f118($s1); |
6839 | if ($s2) { |
6840 | $s2 = null; |
6841 | } else { |
6842 | $s2 = $this->peg_FAILED; |
6843 | } |
6844 | if ($s2 !== $this->peg_FAILED) { |
6845 | $s3 = $this->peg_parse_(); |
6846 | if ($s3 !== $this->peg_FAILED) { |
6847 | $this->peg_reportedPos = $s0; |
6848 | $s1 = $this->peg_f99($s1); |
6849 | $s0 = $s1; |
6850 | } else { |
6851 | $this->peg_currPos = $s0; |
6852 | $s0 = $this->peg_FAILED; |
6853 | } |
6854 | } else { |
6855 | $this->peg_currPos = $s0; |
6856 | $s0 = $this->peg_FAILED; |
6857 | } |
6858 | } else { |
6859 | $this->peg_currPos = $s0; |
6860 | $s0 = $this->peg_FAILED; |
6861 | } |
6862 | |
6863 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6864 | |
6865 | return $s0; |
6866 | } |
6867 | |
6868 | private function peg_parseLEFTI() { |
6869 | |
6870 | $key = $this->peg_currPos * 126 + 98; |
6871 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6872 | |
6873 | if ($cached) { |
6874 | $this->peg_currPos = $cached["nextPos"]; |
6875 | return $cached["result"]; |
6876 | } |
6877 | |
6878 | $s0 = $this->peg_currPos; |
6879 | $s1 = $this->peg_parsegeneric_func(); |
6880 | if ($s1 !== $this->peg_FAILED) { |
6881 | $this->peg_reportedPos = $this->peg_currPos; |
6882 | $s2 = $this->peg_f119($s1); |
6883 | if ($s2) { |
6884 | $s2 = null; |
6885 | } else { |
6886 | $s2 = $this->peg_FAILED; |
6887 | } |
6888 | if ($s2 !== $this->peg_FAILED) { |
6889 | $s3 = $this->peg_parse_(); |
6890 | if ($s3 !== $this->peg_FAILED) { |
6891 | $s1 = array($s1, $s2, $s3); |
6892 | $s0 = $s1; |
6893 | } else { |
6894 | $this->peg_currPos = $s0; |
6895 | $s0 = $this->peg_FAILED; |
6896 | } |
6897 | } else { |
6898 | $this->peg_currPos = $s0; |
6899 | $s0 = $this->peg_FAILED; |
6900 | } |
6901 | } else { |
6902 | $this->peg_currPos = $s0; |
6903 | $s0 = $this->peg_FAILED; |
6904 | } |
6905 | |
6906 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6907 | |
6908 | return $s0; |
6909 | } |
6910 | |
6911 | private function peg_parseRIGHTI() { |
6912 | |
6913 | $key = $this->peg_currPos * 126 + 99; |
6914 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6915 | |
6916 | if ($cached) { |
6917 | $this->peg_currPos = $cached["nextPos"]; |
6918 | return $cached["result"]; |
6919 | } |
6920 | |
6921 | $s0 = $this->peg_currPos; |
6922 | $s1 = $this->peg_parsegeneric_func(); |
6923 | if ($s1 !== $this->peg_FAILED) { |
6924 | $this->peg_reportedPos = $this->peg_currPos; |
6925 | $s2 = $this->peg_f120($s1); |
6926 | if ($s2) { |
6927 | $s2 = null; |
6928 | } else { |
6929 | $s2 = $this->peg_FAILED; |
6930 | } |
6931 | if ($s2 !== $this->peg_FAILED) { |
6932 | $s3 = $this->peg_parse_(); |
6933 | if ($s3 !== $this->peg_FAILED) { |
6934 | $s1 = array($s1, $s2, $s3); |
6935 | $s0 = $s1; |
6936 | } else { |
6937 | $this->peg_currPos = $s0; |
6938 | $s0 = $this->peg_FAILED; |
6939 | } |
6940 | } else { |
6941 | $this->peg_currPos = $s0; |
6942 | $s0 = $this->peg_FAILED; |
6943 | } |
6944 | } else { |
6945 | $this->peg_currPos = $s0; |
6946 | $s0 = $this->peg_FAILED; |
6947 | } |
6948 | |
6949 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6950 | |
6951 | return $s0; |
6952 | } |
6953 | |
6954 | private function peg_parseHLINE() { |
6955 | |
6956 | $key = $this->peg_currPos * 126 + 100; |
6957 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
6958 | |
6959 | if ($cached) { |
6960 | $this->peg_currPos = $cached["nextPos"]; |
6961 | return $cached["result"]; |
6962 | } |
6963 | |
6964 | $s0 = $this->peg_currPos; |
6965 | $s1 = $this->peg_parsegeneric_func(); |
6966 | if ($s1 !== $this->peg_FAILED) { |
6967 | $this->peg_reportedPos = $this->peg_currPos; |
6968 | $s2 = $this->peg_f121($s1); |
6969 | if ($s2) { |
6970 | $s2 = null; |
6971 | } else { |
6972 | $s2 = $this->peg_FAILED; |
6973 | } |
6974 | if ($s2 !== $this->peg_FAILED) { |
6975 | $s3 = $this->peg_parse_(); |
6976 | if ($s3 !== $this->peg_FAILED) { |
6977 | $this->peg_reportedPos = $s0; |
6978 | $s1 = $this->peg_f99($s1); |
6979 | $s0 = $s1; |
6980 | } else { |
6981 | $this->peg_currPos = $s0; |
6982 | $s0 = $this->peg_FAILED; |
6983 | } |
6984 | } else { |
6985 | $this->peg_currPos = $s0; |
6986 | $s0 = $this->peg_FAILED; |
6987 | } |
6988 | } else { |
6989 | $this->peg_currPos = $s0; |
6990 | $s0 = $this->peg_FAILED; |
6991 | } |
6992 | |
6993 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
6994 | |
6995 | return $s0; |
6996 | } |
6997 | |
6998 | private function peg_parseCOLOR() { |
6999 | |
7000 | $key = $this->peg_currPos * 126 + 101; |
7001 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
7002 | |
7003 | if ($cached) { |
7004 | $this->peg_currPos = $cached["nextPos"]; |
7005 | return $cached["result"]; |
7006 | } |
7007 | |
7008 | $s0 = $this->peg_currPos; |
7009 | $s1 = $this->peg_parsegeneric_func(); |
7010 | if ($s1 !== $this->peg_FAILED) { |
7011 | $this->peg_reportedPos = $this->peg_currPos; |
7012 | $s2 = $this->peg_f122($s1); |
7013 | if ($s2) { |
7014 | $s2 = null; |
7015 | } else { |
7016 | $s2 = $this->peg_FAILED; |
7017 | } |
7018 | if ($s2 !== $this->peg_FAILED) { |
7019 | $s3 = $this->peg_parse_(); |
7020 | if ($s3 !== $this->peg_FAILED) { |
7021 | $s4 = $this->peg_parseCOLOR_SPEC(); |
7022 | if ($s4 !== $this->peg_FAILED) { |
7023 | $this->peg_reportedPos = $s0; |
7024 | $s1 = $this->peg_f123($s1, $s4); |
7025 | $s0 = $s1; |
7026 | } else { |
7027 | $this->peg_currPos = $s0; |
7028 | $s0 = $this->peg_FAILED; |
7029 | } |
7030 | } else { |
7031 | $this->peg_currPos = $s0; |
7032 | $s0 = $this->peg_FAILED; |
7033 | } |
7034 | } else { |
7035 | $this->peg_currPos = $s0; |
7036 | $s0 = $this->peg_FAILED; |
7037 | } |
7038 | } else { |
7039 | $this->peg_currPos = $s0; |
7040 | $s0 = $this->peg_FAILED; |
7041 | } |
7042 | |
7043 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
7044 | |
7045 | return $s0; |
7046 | } |
7047 | |
7048 | private function peg_parseDEFINECOLOR() { |
7049 | |
7050 | $key = $this->peg_currPos * 126 + 102; |
7051 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
7052 | |
7053 | if ($cached) { |
7054 | $this->peg_currPos = $cached["nextPos"]; |
7055 | return $cached["result"]; |
7056 | } |
7057 | |
7058 | $s0 = $this->peg_currPos; |
7059 | $s1 = $this->peg_parsegeneric_func(); |
7060 | if ($s1 !== $this->peg_FAILED) { |
7061 | $this->peg_reportedPos = $this->peg_currPos; |
7062 | $s2 = $this->peg_f124($s1); |
7063 | if ($s2) { |
7064 | $s2 = null; |
7065 | } else { |
7066 | $s2 = $this->peg_FAILED; |
7067 | } |
7068 | if ($s2 !== $this->peg_FAILED) { |
7069 | $s3 = $this->peg_parse_(); |
7070 | if ($s3 !== $this->peg_FAILED) { |
7071 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c39) { |
7072 | $s4 = $this->peg_c39; |
7073 | $this->peg_currPos++; |
7074 | } else { |
7075 | $s4 = $this->peg_FAILED; |
7076 | if ($this->peg_silentFails === 0) { |
7077 | $this->peg_fail($this->peg_c40); |
7078 | } |
7079 | } |
7080 | if ($s4 !== $this->peg_FAILED) { |
7081 | $s5 = $this->peg_parse_(); |
7082 | if ($s5 !== $this->peg_FAILED) { |
7083 | $s6 = array(); |
7084 | $s7 = $this->peg_parsealpha(); |
7085 | if ($s7 !== $this->peg_FAILED) { |
7086 | while ($s7 !== $this->peg_FAILED) { |
7087 | $s6[] = $s7; |
7088 | $s7 = $this->peg_parsealpha(); |
7089 | } |
7090 | } else { |
7091 | $s6 = $this->peg_FAILED; |
7092 | } |
7093 | if ($s6 !== $this->peg_FAILED) { |
7094 | $s7 = $this->peg_parse_(); |
7095 | if ($s7 !== $this->peg_FAILED) { |
7096 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c11) { |
7097 | $s8 = $this->peg_c11; |
7098 | $this->peg_currPos++; |
7099 | } else { |
7100 | $s8 = $this->peg_FAILED; |
7101 | if ($this->peg_silentFails === 0) { |
7102 | $this->peg_fail($this->peg_c12); |
7103 | } |
7104 | } |
7105 | if ($s8 !== $this->peg_FAILED) { |
7106 | $s9 = $this->peg_parse_(); |
7107 | if ($s9 !== $this->peg_FAILED) { |
7108 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c39) { |
7109 | $s10 = $this->peg_c39; |
7110 | $this->peg_currPos++; |
7111 | } else { |
7112 | $s10 = $this->peg_FAILED; |
7113 | if ($this->peg_silentFails === 0) { |
7114 | $this->peg_fail($this->peg_c40); |
7115 | } |
7116 | } |
7117 | if ($s10 !== $this->peg_FAILED) { |
7118 | $s11 = $this->peg_parse_(); |
7119 | if ($s11 !== $this->peg_FAILED) { |
7120 | $s12 = $this->peg_currPos; |
7121 | if (mb_strtolower($this->input_substr($this->peg_currPos, 5), "UTF-8") === $this->peg_c103) { |
7122 | $s13 = $this->input_substr($this->peg_currPos, 5); |
7123 | $this->peg_currPos += 5; |
7124 | } else { |
7125 | $s13 = $this->peg_FAILED; |
7126 | if ($this->peg_silentFails === 0) { |
7127 | $this->peg_fail($this->peg_c104); |
7128 | } |
7129 | } |
7130 | if ($s13 !== $this->peg_FAILED) { |
7131 | $s14 = $this->peg_parse_(); |
7132 | if ($s14 !== $this->peg_FAILED) { |
7133 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c11) { |
7134 | $s15 = $this->peg_c11; |
7135 | $this->peg_currPos++; |
7136 | } else { |
7137 | $s15 = $this->peg_FAILED; |
7138 | if ($this->peg_silentFails === 0) { |
7139 | $this->peg_fail($this->peg_c12); |
7140 | } |
7141 | } |
7142 | if ($s15 !== $this->peg_FAILED) { |
7143 | $s16 = $this->peg_parse_(); |
7144 | if ($s16 !== $this->peg_FAILED) { |
7145 | $s17 = $this->peg_parseCOLOR_SPEC_NAMED(); |
7146 | if ($s17 !== $this->peg_FAILED) { |
7147 | $this->peg_reportedPos = $s12; |
7148 | $s13 = $this->peg_f125($s1, $s6, $s17); |
7149 | $s12 = $s13; |
7150 | } else { |
7151 | $this->peg_currPos = $s12; |
7152 | $s12 = $this->peg_FAILED; |
7153 | } |
7154 | } else { |
7155 | $this->peg_currPos = $s12; |
7156 | $s12 = $this->peg_FAILED; |
7157 | } |
7158 | } else { |
7159 | $this->peg_currPos = $s12; |
7160 | $s12 = $this->peg_FAILED; |
7161 | } |
7162 | } else { |
7163 | $this->peg_currPos = $s12; |
7164 | $s12 = $this->peg_FAILED; |
7165 | } |
7166 | } else { |
7167 | $this->peg_currPos = $s12; |
7168 | $s12 = $this->peg_FAILED; |
7169 | } |
7170 | if ($s12 === $this->peg_FAILED) { |
7171 | $s12 = $this->peg_currPos; |
7172 | if (mb_strtolower($this->input_substr($this->peg_currPos, 4), "UTF-8") === $this->peg_c105) { |
7173 | $s13 = $this->input_substr($this->peg_currPos, 4); |
7174 | $this->peg_currPos += 4; |
7175 | } else { |
7176 | $s13 = $this->peg_FAILED; |
7177 | if ($this->peg_silentFails === 0) { |
7178 | $this->peg_fail($this->peg_c106); |
7179 | } |
7180 | } |
7181 | if ($s13 !== $this->peg_FAILED) { |
7182 | $s14 = $this->peg_parse_(); |
7183 | if ($s14 !== $this->peg_FAILED) { |
7184 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c11) { |
7185 | $s15 = $this->peg_c11; |
7186 | $this->peg_currPos++; |
7187 | } else { |
7188 | $s15 = $this->peg_FAILED; |
7189 | if ($this->peg_silentFails === 0) { |
7190 | $this->peg_fail($this->peg_c12); |
7191 | } |
7192 | } |
7193 | if ($s15 !== $this->peg_FAILED) { |
7194 | $s16 = $this->peg_parse_(); |
7195 | if ($s16 !== $this->peg_FAILED) { |
7196 | $s17 = $this->peg_parseCOLOR_SPEC_GRAY(); |
7197 | if ($s17 !== $this->peg_FAILED) { |
7198 | $this->peg_reportedPos = $s12; |
7199 | $s13 = $this->peg_f126($s1, $s6, $s17); |
7200 | $s12 = $s13; |
7201 | } else { |
7202 | $this->peg_currPos = $s12; |
7203 | $s12 = $this->peg_FAILED; |
7204 | } |
7205 | } else { |
7206 | $this->peg_currPos = $s12; |
7207 | $s12 = $this->peg_FAILED; |
7208 | } |
7209 | } else { |
7210 | $this->peg_currPos = $s12; |
7211 | $s12 = $this->peg_FAILED; |
7212 | } |
7213 | } else { |
7214 | $this->peg_currPos = $s12; |
7215 | $s12 = $this->peg_FAILED; |
7216 | } |
7217 | } else { |
7218 | $this->peg_currPos = $s12; |
7219 | $s12 = $this->peg_FAILED; |
7220 | } |
7221 | if ($s12 === $this->peg_FAILED) { |
7222 | $s12 = $this->peg_currPos; |
7223 | if ($this->input_substr($this->peg_currPos, 3) === $this->peg_c107) { |
7224 | $s13 = $this->peg_c107; |
7225 | $this->peg_currPos += 3; |
7226 | } else { |
7227 | $s13 = $this->peg_FAILED; |
7228 | if ($this->peg_silentFails === 0) { |
7229 | $this->peg_fail($this->peg_c108); |
7230 | } |
7231 | } |
7232 | if ($s13 !== $this->peg_FAILED) { |
7233 | $s14 = $this->peg_parse_(); |
7234 | if ($s14 !== $this->peg_FAILED) { |
7235 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c11) { |
7236 | $s15 = $this->peg_c11; |
7237 | $this->peg_currPos++; |
7238 | } else { |
7239 | $s15 = $this->peg_FAILED; |
7240 | if ($this->peg_silentFails === 0) { |
7241 | $this->peg_fail($this->peg_c12); |
7242 | } |
7243 | } |
7244 | if ($s15 !== $this->peg_FAILED) { |
7245 | $s16 = $this->peg_parse_(); |
7246 | if ($s16 !== $this->peg_FAILED) { |
7247 | $s17 = $this->peg_parseCOLOR_SPEC_rgb(); |
7248 | if ($s17 !== $this->peg_FAILED) { |
7249 | $this->peg_reportedPos = $s12; |
7250 | $s13 = $this->peg_f127($s1, $s6, $s17); |
7251 | $s12 = $s13; |
7252 | } else { |
7253 | $this->peg_currPos = $s12; |
7254 | $s12 = $this->peg_FAILED; |
7255 | } |
7256 | } else { |
7257 | $this->peg_currPos = $s12; |
7258 | $s12 = $this->peg_FAILED; |
7259 | } |
7260 | } else { |
7261 | $this->peg_currPos = $s12; |
7262 | $s12 = $this->peg_FAILED; |
7263 | } |
7264 | } else { |
7265 | $this->peg_currPos = $s12; |
7266 | $s12 = $this->peg_FAILED; |
7267 | } |
7268 | } else { |
7269 | $this->peg_currPos = $s12; |
7270 | $s12 = $this->peg_FAILED; |
7271 | } |
7272 | if ($s12 === $this->peg_FAILED) { |
7273 | $s12 = $this->peg_currPos; |
7274 | if ($this->input_substr($this->peg_currPos, 3) === $this->peg_c109) { |
7275 | $s13 = $this->peg_c109; |
7276 | $this->peg_currPos += 3; |
7277 | } else { |
7278 | $s13 = $this->peg_FAILED; |
7279 | if ($this->peg_silentFails === 0) { |
7280 | $this->peg_fail($this->peg_c110); |
7281 | } |
7282 | } |
7283 | if ($s13 !== $this->peg_FAILED) { |
7284 | $s14 = $this->peg_parse_(); |
7285 | if ($s14 !== $this->peg_FAILED) { |
7286 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c11) { |
7287 | $s15 = $this->peg_c11; |
7288 | $this->peg_currPos++; |
7289 | } else { |
7290 | $s15 = $this->peg_FAILED; |
7291 | if ($this->peg_silentFails === 0) { |
7292 | $this->peg_fail($this->peg_c12); |
7293 | } |
7294 | } |
7295 | if ($s15 !== $this->peg_FAILED) { |
7296 | $s16 = $this->peg_parse_(); |
7297 | if ($s16 !== $this->peg_FAILED) { |
7298 | $s17 = $this->peg_parseCOLOR_SPEC_RGBI(); |
7299 | if ($s17 !== $this->peg_FAILED) { |
7300 | $this->peg_reportedPos = $s12; |
7301 | $s13 = $this->peg_f127($s1, $s6, $s17); |
7302 | $s12 = $s13; |
7303 | } else { |
7304 | $this->peg_currPos = $s12; |
7305 | $s12 = $this->peg_FAILED; |
7306 | } |
7307 | } else { |
7308 | $this->peg_currPos = $s12; |
7309 | $s12 = $this->peg_FAILED; |
7310 | } |
7311 | } else { |
7312 | $this->peg_currPos = $s12; |
7313 | $s12 = $this->peg_FAILED; |
7314 | } |
7315 | } else { |
7316 | $this->peg_currPos = $s12; |
7317 | $s12 = $this->peg_FAILED; |
7318 | } |
7319 | } else { |
7320 | $this->peg_currPos = $s12; |
7321 | $s12 = $this->peg_FAILED; |
7322 | } |
7323 | if ($s12 === $this->peg_FAILED) { |
7324 | $s12 = $this->peg_currPos; |
7325 | if (mb_strtolower($this->input_substr($this->peg_currPos, 4), "UTF-8") === $this->peg_c111) { |
7326 | $s13 = $this->input_substr($this->peg_currPos, 4); |
7327 | $this->peg_currPos += 4; |
7328 | } else { |
7329 | $s13 = $this->peg_FAILED; |
7330 | if ($this->peg_silentFails === 0) { |
7331 | $this->peg_fail($this->peg_c112); |
7332 | } |
7333 | } |
7334 | if ($s13 !== $this->peg_FAILED) { |
7335 | $s14 = $this->peg_parse_(); |
7336 | if ($s14 !== $this->peg_FAILED) { |
7337 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c11) { |
7338 | $s15 = $this->peg_c11; |
7339 | $this->peg_currPos++; |
7340 | } else { |
7341 | $s15 = $this->peg_FAILED; |
7342 | if ($this->peg_silentFails === 0) { |
7343 | $this->peg_fail($this->peg_c12); |
7344 | } |
7345 | } |
7346 | if ($s15 !== $this->peg_FAILED) { |
7347 | $s16 = $this->peg_parse_(); |
7348 | if ($s16 !== $this->peg_FAILED) { |
7349 | $s17 = $this->peg_parseCOLOR_SPEC_CMYK(); |
7350 | if ($s17 !== $this->peg_FAILED) { |
7351 | $this->peg_reportedPos = $s12; |
7352 | $s13 = $this->peg_f128($s1, $s6, $s17); |
7353 | $s12 = $s13; |
7354 | } else { |
7355 | $this->peg_currPos = $s12; |
7356 | $s12 = $this->peg_FAILED; |
7357 | } |
7358 | } else { |
7359 | $this->peg_currPos = $s12; |
7360 | $s12 = $this->peg_FAILED; |
7361 | } |
7362 | } else { |
7363 | $this->peg_currPos = $s12; |
7364 | $s12 = $this->peg_FAILED; |
7365 | } |
7366 | } else { |
7367 | $this->peg_currPos = $s12; |
7368 | $s12 = $this->peg_FAILED; |
7369 | } |
7370 | } else { |
7371 | $this->peg_currPos = $s12; |
7372 | $s12 = $this->peg_FAILED; |
7373 | } |
7374 | } |
7375 | } |
7376 | } |
7377 | } |
7378 | if ($s12 !== $this->peg_FAILED) { |
7379 | $this->peg_reportedPos = $s0; |
7380 | $s1 = $this->peg_f129($s1, $s6, $s12); |
7381 | $s0 = $s1; |
7382 | } else { |
7383 | $this->peg_currPos = $s0; |
7384 | $s0 = $this->peg_FAILED; |
7385 | } |
7386 | } else { |
7387 | $this->peg_currPos = $s0; |
7388 | $s0 = $this->peg_FAILED; |
7389 | } |
7390 | } else { |
7391 | $this->peg_currPos = $s0; |
7392 | $s0 = $this->peg_FAILED; |
7393 | } |
7394 | } else { |
7395 | $this->peg_currPos = $s0; |
7396 | $s0 = $this->peg_FAILED; |
7397 | } |
7398 | } else { |
7399 | $this->peg_currPos = $s0; |
7400 | $s0 = $this->peg_FAILED; |
7401 | } |
7402 | } else { |
7403 | $this->peg_currPos = $s0; |
7404 | $s0 = $this->peg_FAILED; |
7405 | } |
7406 | } else { |
7407 | $this->peg_currPos = $s0; |
7408 | $s0 = $this->peg_FAILED; |
7409 | } |
7410 | } else { |
7411 | $this->peg_currPos = $s0; |
7412 | $s0 = $this->peg_FAILED; |
7413 | } |
7414 | } else { |
7415 | $this->peg_currPos = $s0; |
7416 | $s0 = $this->peg_FAILED; |
7417 | } |
7418 | } else { |
7419 | $this->peg_currPos = $s0; |
7420 | $s0 = $this->peg_FAILED; |
7421 | } |
7422 | } else { |
7423 | $this->peg_currPos = $s0; |
7424 | $s0 = $this->peg_FAILED; |
7425 | } |
7426 | } else { |
7427 | $this->peg_currPos = $s0; |
7428 | $s0 = $this->peg_FAILED; |
7429 | } |
7430 | |
7431 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
7432 | |
7433 | return $s0; |
7434 | } |
7435 | |
7436 | private function peg_parseCOLOR_SPEC() { |
7437 | |
7438 | $key = $this->peg_currPos * 126 + 103; |
7439 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
7440 | |
7441 | if ($cached) { |
7442 | $this->peg_currPos = $cached["nextPos"]; |
7443 | return $cached["result"]; |
7444 | } |
7445 | |
7446 | $s0 = $this->peg_parseCOLOR_SPEC_NAMED(); |
7447 | if ($s0 === $this->peg_FAILED) { |
7448 | $s0 = $this->peg_currPos; |
7449 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c5) { |
7450 | $s1 = $this->peg_c5; |
7451 | $this->peg_currPos++; |
7452 | } else { |
7453 | $s1 = $this->peg_FAILED; |
7454 | if ($this->peg_silentFails === 0) { |
7455 | $this->peg_fail($this->peg_c6); |
7456 | } |
7457 | } |
7458 | if ($s1 !== $this->peg_FAILED) { |
7459 | $s2 = $this->peg_parse_(); |
7460 | if ($s2 !== $this->peg_FAILED) { |
7461 | if (mb_strtolower($this->input_substr($this->peg_currPos, 5), "UTF-8") === $this->peg_c103) { |
7462 | $s3 = $this->input_substr($this->peg_currPos, 5); |
7463 | $this->peg_currPos += 5; |
7464 | } else { |
7465 | $s3 = $this->peg_FAILED; |
7466 | if ($this->peg_silentFails === 0) { |
7467 | $this->peg_fail($this->peg_c104); |
7468 | } |
7469 | } |
7470 | if ($s3 !== $this->peg_FAILED) { |
7471 | $s4 = $this->peg_parse_(); |
7472 | if ($s4 !== $this->peg_FAILED) { |
7473 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c29) { |
7474 | $s5 = $this->peg_c29; |
7475 | $this->peg_currPos++; |
7476 | } else { |
7477 | $s5 = $this->peg_FAILED; |
7478 | if ($this->peg_silentFails === 0) { |
7479 | $this->peg_fail($this->peg_c30); |
7480 | } |
7481 | } |
7482 | if ($s5 !== $this->peg_FAILED) { |
7483 | $s6 = $this->peg_parse_(); |
7484 | if ($s6 !== $this->peg_FAILED) { |
7485 | $s7 = $this->peg_parseCOLOR_SPEC_NAMED(); |
7486 | if ($s7 !== $this->peg_FAILED) { |
7487 | $this->peg_reportedPos = $s0; |
7488 | $s1 = $this->peg_f130($s7); |
7489 | $s0 = $s1; |
7490 | } else { |
7491 | $this->peg_currPos = $s0; |
7492 | $s0 = $this->peg_FAILED; |
7493 | } |
7494 | } else { |
7495 | $this->peg_currPos = $s0; |
7496 | $s0 = $this->peg_FAILED; |
7497 | } |
7498 | } else { |
7499 | $this->peg_currPos = $s0; |
7500 | $s0 = $this->peg_FAILED; |
7501 | } |
7502 | } else { |
7503 | $this->peg_currPos = $s0; |
7504 | $s0 = $this->peg_FAILED; |
7505 | } |
7506 | } else { |
7507 | $this->peg_currPos = $s0; |
7508 | $s0 = $this->peg_FAILED; |
7509 | } |
7510 | } else { |
7511 | $this->peg_currPos = $s0; |
7512 | $s0 = $this->peg_FAILED; |
7513 | } |
7514 | } else { |
7515 | $this->peg_currPos = $s0; |
7516 | $s0 = $this->peg_FAILED; |
7517 | } |
7518 | if ($s0 === $this->peg_FAILED) { |
7519 | $s0 = $this->peg_currPos; |
7520 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c5) { |
7521 | $s1 = $this->peg_c5; |
7522 | $this->peg_currPos++; |
7523 | } else { |
7524 | $s1 = $this->peg_FAILED; |
7525 | if ($this->peg_silentFails === 0) { |
7526 | $this->peg_fail($this->peg_c6); |
7527 | } |
7528 | } |
7529 | if ($s1 !== $this->peg_FAILED) { |
7530 | $s2 = $this->peg_parse_(); |
7531 | if ($s2 !== $this->peg_FAILED) { |
7532 | if (mb_strtolower($this->input_substr($this->peg_currPos, 4), "UTF-8") === $this->peg_c105) { |
7533 | $s3 = $this->input_substr($this->peg_currPos, 4); |
7534 | $this->peg_currPos += 4; |
7535 | } else { |
7536 | $s3 = $this->peg_FAILED; |
7537 | if ($this->peg_silentFails === 0) { |
7538 | $this->peg_fail($this->peg_c106); |
7539 | } |
7540 | } |
7541 | if ($s3 !== $this->peg_FAILED) { |
7542 | $s4 = $this->peg_parse_(); |
7543 | if ($s4 !== $this->peg_FAILED) { |
7544 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c29) { |
7545 | $s5 = $this->peg_c29; |
7546 | $this->peg_currPos++; |
7547 | } else { |
7548 | $s5 = $this->peg_FAILED; |
7549 | if ($this->peg_silentFails === 0) { |
7550 | $this->peg_fail($this->peg_c30); |
7551 | } |
7552 | } |
7553 | if ($s5 !== $this->peg_FAILED) { |
7554 | $s6 = $this->peg_parse_(); |
7555 | if ($s6 !== $this->peg_FAILED) { |
7556 | $s7 = $this->peg_parseCOLOR_SPEC_GRAY(); |
7557 | if ($s7 !== $this->peg_FAILED) { |
7558 | $this->peg_reportedPos = $s0; |
7559 | $s1 = $this->peg_f131($s7); |
7560 | $s0 = $s1; |
7561 | } else { |
7562 | $this->peg_currPos = $s0; |
7563 | $s0 = $this->peg_FAILED; |
7564 | } |
7565 | } else { |
7566 | $this->peg_currPos = $s0; |
7567 | $s0 = $this->peg_FAILED; |
7568 | } |
7569 | } else { |
7570 | $this->peg_currPos = $s0; |
7571 | $s0 = $this->peg_FAILED; |
7572 | } |
7573 | } else { |
7574 | $this->peg_currPos = $s0; |
7575 | $s0 = $this->peg_FAILED; |
7576 | } |
7577 | } else { |
7578 | $this->peg_currPos = $s0; |
7579 | $s0 = $this->peg_FAILED; |
7580 | } |
7581 | } else { |
7582 | $this->peg_currPos = $s0; |
7583 | $s0 = $this->peg_FAILED; |
7584 | } |
7585 | } else { |
7586 | $this->peg_currPos = $s0; |
7587 | $s0 = $this->peg_FAILED; |
7588 | } |
7589 | if ($s0 === $this->peg_FAILED) { |
7590 | $s0 = $this->peg_currPos; |
7591 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c5) { |
7592 | $s1 = $this->peg_c5; |
7593 | $this->peg_currPos++; |
7594 | } else { |
7595 | $s1 = $this->peg_FAILED; |
7596 | if ($this->peg_silentFails === 0) { |
7597 | $this->peg_fail($this->peg_c6); |
7598 | } |
7599 | } |
7600 | if ($s1 !== $this->peg_FAILED) { |
7601 | $s2 = $this->peg_parse_(); |
7602 | if ($s2 !== $this->peg_FAILED) { |
7603 | if ($this->input_substr($this->peg_currPos, 3) === $this->peg_c107) { |
7604 | $s3 = $this->peg_c107; |
7605 | $this->peg_currPos += 3; |
7606 | } else { |
7607 | $s3 = $this->peg_FAILED; |
7608 | if ($this->peg_silentFails === 0) { |
7609 | $this->peg_fail($this->peg_c108); |
7610 | } |
7611 | } |
7612 | if ($s3 !== $this->peg_FAILED) { |
7613 | $s4 = $this->peg_parse_(); |
7614 | if ($s4 !== $this->peg_FAILED) { |
7615 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c29) { |
7616 | $s5 = $this->peg_c29; |
7617 | $this->peg_currPos++; |
7618 | } else { |
7619 | $s5 = $this->peg_FAILED; |
7620 | if ($this->peg_silentFails === 0) { |
7621 | $this->peg_fail($this->peg_c30); |
7622 | } |
7623 | } |
7624 | if ($s5 !== $this->peg_FAILED) { |
7625 | $s6 = $this->peg_parse_(); |
7626 | if ($s6 !== $this->peg_FAILED) { |
7627 | $s7 = $this->peg_parseCOLOR_SPEC_rgb(); |
7628 | if ($s7 !== $this->peg_FAILED) { |
7629 | $this->peg_reportedPos = $s0; |
7630 | $s1 = $this->peg_f132($s7); |
7631 | $s0 = $s1; |
7632 | } else { |
7633 | $this->peg_currPos = $s0; |
7634 | $s0 = $this->peg_FAILED; |
7635 | } |
7636 | } else { |
7637 | $this->peg_currPos = $s0; |
7638 | $s0 = $this->peg_FAILED; |
7639 | } |
7640 | } else { |
7641 | $this->peg_currPos = $s0; |
7642 | $s0 = $this->peg_FAILED; |
7643 | } |
7644 | } else { |
7645 | $this->peg_currPos = $s0; |
7646 | $s0 = $this->peg_FAILED; |
7647 | } |
7648 | } else { |
7649 | $this->peg_currPos = $s0; |
7650 | $s0 = $this->peg_FAILED; |
7651 | } |
7652 | } else { |
7653 | $this->peg_currPos = $s0; |
7654 | $s0 = $this->peg_FAILED; |
7655 | } |
7656 | } else { |
7657 | $this->peg_currPos = $s0; |
7658 | $s0 = $this->peg_FAILED; |
7659 | } |
7660 | if ($s0 === $this->peg_FAILED) { |
7661 | $s0 = $this->peg_currPos; |
7662 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c5) { |
7663 | $s1 = $this->peg_c5; |
7664 | $this->peg_currPos++; |
7665 | } else { |
7666 | $s1 = $this->peg_FAILED; |
7667 | if ($this->peg_silentFails === 0) { |
7668 | $this->peg_fail($this->peg_c6); |
7669 | } |
7670 | } |
7671 | if ($s1 !== $this->peg_FAILED) { |
7672 | $s2 = $this->peg_parse_(); |
7673 | if ($s2 !== $this->peg_FAILED) { |
7674 | if ($this->input_substr($this->peg_currPos, 3) === $this->peg_c109) { |
7675 | $s3 = $this->peg_c109; |
7676 | $this->peg_currPos += 3; |
7677 | } else { |
7678 | $s3 = $this->peg_FAILED; |
7679 | if ($this->peg_silentFails === 0) { |
7680 | $this->peg_fail($this->peg_c110); |
7681 | } |
7682 | } |
7683 | if ($s3 !== $this->peg_FAILED) { |
7684 | $s4 = $this->peg_parse_(); |
7685 | if ($s4 !== $this->peg_FAILED) { |
7686 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c29) { |
7687 | $s5 = $this->peg_c29; |
7688 | $this->peg_currPos++; |
7689 | } else { |
7690 | $s5 = $this->peg_FAILED; |
7691 | if ($this->peg_silentFails === 0) { |
7692 | $this->peg_fail($this->peg_c30); |
7693 | } |
7694 | } |
7695 | if ($s5 !== $this->peg_FAILED) { |
7696 | $s6 = $this->peg_parse_(); |
7697 | if ($s6 !== $this->peg_FAILED) { |
7698 | $s7 = $this->peg_parseCOLOR_SPEC_RGBI(); |
7699 | if ($s7 !== $this->peg_FAILED) { |
7700 | $this->peg_reportedPos = $s0; |
7701 | $s1 = $this->peg_f132($s7); |
7702 | $s0 = $s1; |
7703 | } else { |
7704 | $this->peg_currPos = $s0; |
7705 | $s0 = $this->peg_FAILED; |
7706 | } |
7707 | } else { |
7708 | $this->peg_currPos = $s0; |
7709 | $s0 = $this->peg_FAILED; |
7710 | } |
7711 | } else { |
7712 | $this->peg_currPos = $s0; |
7713 | $s0 = $this->peg_FAILED; |
7714 | } |
7715 | } else { |
7716 | $this->peg_currPos = $s0; |
7717 | $s0 = $this->peg_FAILED; |
7718 | } |
7719 | } else { |
7720 | $this->peg_currPos = $s0; |
7721 | $s0 = $this->peg_FAILED; |
7722 | } |
7723 | } else { |
7724 | $this->peg_currPos = $s0; |
7725 | $s0 = $this->peg_FAILED; |
7726 | } |
7727 | } else { |
7728 | $this->peg_currPos = $s0; |
7729 | $s0 = $this->peg_FAILED; |
7730 | } |
7731 | if ($s0 === $this->peg_FAILED) { |
7732 | $s0 = $this->peg_currPos; |
7733 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c5) { |
7734 | $s1 = $this->peg_c5; |
7735 | $this->peg_currPos++; |
7736 | } else { |
7737 | $s1 = $this->peg_FAILED; |
7738 | if ($this->peg_silentFails === 0) { |
7739 | $this->peg_fail($this->peg_c6); |
7740 | } |
7741 | } |
7742 | if ($s1 !== $this->peg_FAILED) { |
7743 | $s2 = $this->peg_parse_(); |
7744 | if ($s2 !== $this->peg_FAILED) { |
7745 | if (mb_strtolower($this->input_substr($this->peg_currPos, 4), "UTF-8") === $this->peg_c111) { |
7746 | $s3 = $this->input_substr($this->peg_currPos, 4); |
7747 | $this->peg_currPos += 4; |
7748 | } else { |
7749 | $s3 = $this->peg_FAILED; |
7750 | if ($this->peg_silentFails === 0) { |
7751 | $this->peg_fail($this->peg_c112); |
7752 | } |
7753 | } |
7754 | if ($s3 !== $this->peg_FAILED) { |
7755 | $s4 = $this->peg_parse_(); |
7756 | if ($s4 !== $this->peg_FAILED) { |
7757 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c29) { |
7758 | $s5 = $this->peg_c29; |
7759 | $this->peg_currPos++; |
7760 | } else { |
7761 | $s5 = $this->peg_FAILED; |
7762 | if ($this->peg_silentFails === 0) { |
7763 | $this->peg_fail($this->peg_c30); |
7764 | } |
7765 | } |
7766 | if ($s5 !== $this->peg_FAILED) { |
7767 | $s6 = $this->peg_parse_(); |
7768 | if ($s6 !== $this->peg_FAILED) { |
7769 | $s7 = $this->peg_parseCOLOR_SPEC_CMYK(); |
7770 | if ($s7 !== $this->peg_FAILED) { |
7771 | $this->peg_reportedPos = $s0; |
7772 | $s1 = $this->peg_f133($s7); |
7773 | $s0 = $s1; |
7774 | } else { |
7775 | $this->peg_currPos = $s0; |
7776 | $s0 = $this->peg_FAILED; |
7777 | } |
7778 | } else { |
7779 | $this->peg_currPos = $s0; |
7780 | $s0 = $this->peg_FAILED; |
7781 | } |
7782 | } else { |
7783 | $this->peg_currPos = $s0; |
7784 | $s0 = $this->peg_FAILED; |
7785 | } |
7786 | } else { |
7787 | $this->peg_currPos = $s0; |
7788 | $s0 = $this->peg_FAILED; |
7789 | } |
7790 | } else { |
7791 | $this->peg_currPos = $s0; |
7792 | $s0 = $this->peg_FAILED; |
7793 | } |
7794 | } else { |
7795 | $this->peg_currPos = $s0; |
7796 | $s0 = $this->peg_FAILED; |
7797 | } |
7798 | } else { |
7799 | $this->peg_currPos = $s0; |
7800 | $s0 = $this->peg_FAILED; |
7801 | } |
7802 | } |
7803 | } |
7804 | } |
7805 | } |
7806 | } |
7807 | |
7808 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
7809 | |
7810 | return $s0; |
7811 | } |
7812 | |
7813 | private function peg_parseCOLOR_SPEC_NAMED() { |
7814 | |
7815 | $key = $this->peg_currPos * 126 + 104; |
7816 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
7817 | |
7818 | if ($cached) { |
7819 | $this->peg_currPos = $cached["nextPos"]; |
7820 | return $cached["result"]; |
7821 | } |
7822 | |
7823 | $s0 = $this->peg_currPos; |
7824 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c39) { |
7825 | $s1 = $this->peg_c39; |
7826 | $this->peg_currPos++; |
7827 | } else { |
7828 | $s1 = $this->peg_FAILED; |
7829 | if ($this->peg_silentFails === 0) { |
7830 | $this->peg_fail($this->peg_c40); |
7831 | } |
7832 | } |
7833 | if ($s1 !== $this->peg_FAILED) { |
7834 | $s2 = $this->peg_parse_(); |
7835 | if ($s2 !== $this->peg_FAILED) { |
7836 | $s3 = array(); |
7837 | $s4 = $this->peg_parsealpha(); |
7838 | if ($s4 !== $this->peg_FAILED) { |
7839 | while ($s4 !== $this->peg_FAILED) { |
7840 | $s3[] = $s4; |
7841 | $s4 = $this->peg_parsealpha(); |
7842 | } |
7843 | } else { |
7844 | $s3 = $this->peg_FAILED; |
7845 | } |
7846 | if ($s3 !== $this->peg_FAILED) { |
7847 | $s4 = $this->peg_parse_(); |
7848 | if ($s4 !== $this->peg_FAILED) { |
7849 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c11) { |
7850 | $s5 = $this->peg_c11; |
7851 | $this->peg_currPos++; |
7852 | } else { |
7853 | $s5 = $this->peg_FAILED; |
7854 | if ($this->peg_silentFails === 0) { |
7855 | $this->peg_fail($this->peg_c12); |
7856 | } |
7857 | } |
7858 | if ($s5 !== $this->peg_FAILED) { |
7859 | $s6 = $this->peg_parse_(); |
7860 | if ($s6 !== $this->peg_FAILED) { |
7861 | $this->peg_reportedPos = $s0; |
7862 | $s1 = $this->peg_f134($s3); |
7863 | $s0 = $s1; |
7864 | } else { |
7865 | $this->peg_currPos = $s0; |
7866 | $s0 = $this->peg_FAILED; |
7867 | } |
7868 | } else { |
7869 | $this->peg_currPos = $s0; |
7870 | $s0 = $this->peg_FAILED; |
7871 | } |
7872 | } else { |
7873 | $this->peg_currPos = $s0; |
7874 | $s0 = $this->peg_FAILED; |
7875 | } |
7876 | } else { |
7877 | $this->peg_currPos = $s0; |
7878 | $s0 = $this->peg_FAILED; |
7879 | } |
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 | |
7889 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
7890 | |
7891 | return $s0; |
7892 | } |
7893 | |
7894 | private function peg_parseCOLOR_SPEC_GRAY() { |
7895 | |
7896 | $key = $this->peg_currPos * 126 + 105; |
7897 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
7898 | |
7899 | if ($cached) { |
7900 | $this->peg_currPos = $cached["nextPos"]; |
7901 | return $cached["result"]; |
7902 | } |
7903 | |
7904 | $s0 = $this->peg_currPos; |
7905 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c39) { |
7906 | $s1 = $this->peg_c39; |
7907 | $this->peg_currPos++; |
7908 | } else { |
7909 | $s1 = $this->peg_FAILED; |
7910 | if ($this->peg_silentFails === 0) { |
7911 | $this->peg_fail($this->peg_c40); |
7912 | } |
7913 | } |
7914 | if ($s1 !== $this->peg_FAILED) { |
7915 | $s2 = $this->peg_parse_(); |
7916 | if ($s2 !== $this->peg_FAILED) { |
7917 | $s3 = array(); |
7918 | $s4 = $this->peg_parseCNUM(); |
7919 | if ($s4 !== $this->peg_FAILED) { |
7920 | while ($s4 !== $this->peg_FAILED) { |
7921 | $s3[] = $s4; |
7922 | $s4 = $this->peg_parseCNUM(); |
7923 | } |
7924 | } else { |
7925 | $s3 = $this->peg_FAILED; |
7926 | } |
7927 | if ($s3 !== $this->peg_FAILED) { |
7928 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c11) { |
7929 | $s4 = $this->peg_c11; |
7930 | $this->peg_currPos++; |
7931 | } else { |
7932 | $s4 = $this->peg_FAILED; |
7933 | if ($this->peg_silentFails === 0) { |
7934 | $this->peg_fail($this->peg_c12); |
7935 | } |
7936 | } |
7937 | if ($s4 !== $this->peg_FAILED) { |
7938 | $this->peg_reportedPos = $s0; |
7939 | $s1 = $this->peg_f135($s3); |
7940 | $s0 = $s1; |
7941 | } else { |
7942 | $this->peg_currPos = $s0; |
7943 | $s0 = $this->peg_FAILED; |
7944 | } |
7945 | } else { |
7946 | $this->peg_currPos = $s0; |
7947 | $s0 = $this->peg_FAILED; |
7948 | } |
7949 | } else { |
7950 | $this->peg_currPos = $s0; |
7951 | $s0 = $this->peg_FAILED; |
7952 | } |
7953 | } else { |
7954 | $this->peg_currPos = $s0; |
7955 | $s0 = $this->peg_FAILED; |
7956 | } |
7957 | |
7958 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
7959 | |
7960 | return $s0; |
7961 | } |
7962 | |
7963 | private function peg_parseCOLOR_SPEC_rgb() { |
7964 | |
7965 | $key = $this->peg_currPos * 126 + 106; |
7966 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
7967 | |
7968 | if ($cached) { |
7969 | $this->peg_currPos = $cached["nextPos"]; |
7970 | return $cached["result"]; |
7971 | } |
7972 | |
7973 | $s0 = $this->peg_currPos; |
7974 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c39) { |
7975 | $s1 = $this->peg_c39; |
7976 | $this->peg_currPos++; |
7977 | } else { |
7978 | $s1 = $this->peg_FAILED; |
7979 | if ($this->peg_silentFails === 0) { |
7980 | $this->peg_fail($this->peg_c40); |
7981 | } |
7982 | } |
7983 | if ($s1 !== $this->peg_FAILED) { |
7984 | $s2 = $this->peg_parse_(); |
7985 | if ($s2 !== $this->peg_FAILED) { |
7986 | $s3 = $this->peg_parseCNUM(); |
7987 | if ($s3 !== $this->peg_FAILED) { |
7988 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c113) { |
7989 | $s4 = $this->peg_c113; |
7990 | $this->peg_currPos++; |
7991 | } else { |
7992 | $s4 = $this->peg_FAILED; |
7993 | if ($this->peg_silentFails === 0) { |
7994 | $this->peg_fail($this->peg_c114); |
7995 | } |
7996 | } |
7997 | if ($s4 !== $this->peg_FAILED) { |
7998 | $s5 = $this->peg_parse_(); |
7999 | if ($s5 !== $this->peg_FAILED) { |
8000 | $s6 = $this->peg_parseCNUM(); |
8001 | if ($s6 !== $this->peg_FAILED) { |
8002 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c113) { |
8003 | $s7 = $this->peg_c113; |
8004 | $this->peg_currPos++; |
8005 | } else { |
8006 | $s7 = $this->peg_FAILED; |
8007 | if ($this->peg_silentFails === 0) { |
8008 | $this->peg_fail($this->peg_c114); |
8009 | } |
8010 | } |
8011 | if ($s7 !== $this->peg_FAILED) { |
8012 | $s8 = $this->peg_parse_(); |
8013 | if ($s8 !== $this->peg_FAILED) { |
8014 | $s9 = $this->peg_parseCNUM(); |
8015 | if ($s9 !== $this->peg_FAILED) { |
8016 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c11) { |
8017 | $s10 = $this->peg_c11; |
8018 | $this->peg_currPos++; |
8019 | } else { |
8020 | $s10 = $this->peg_FAILED; |
8021 | if ($this->peg_silentFails === 0) { |
8022 | $this->peg_fail($this->peg_c12); |
8023 | } |
8024 | } |
8025 | if ($s10 !== $this->peg_FAILED) { |
8026 | $s11 = $this->peg_parse_(); |
8027 | if ($s11 !== $this->peg_FAILED) { |
8028 | $this->peg_reportedPos = $s0; |
8029 | $s1 = $this->peg_f136($s3, $s6, $s9); |
8030 | $s0 = $s1; |
8031 | } else { |
8032 | $this->peg_currPos = $s0; |
8033 | $s0 = $this->peg_FAILED; |
8034 | } |
8035 | } else { |
8036 | $this->peg_currPos = $s0; |
8037 | $s0 = $this->peg_FAILED; |
8038 | } |
8039 | } else { |
8040 | $this->peg_currPos = $s0; |
8041 | $s0 = $this->peg_FAILED; |
8042 | } |
8043 | } else { |
8044 | $this->peg_currPos = $s0; |
8045 | $s0 = $this->peg_FAILED; |
8046 | } |
8047 | } else { |
8048 | $this->peg_currPos = $s0; |
8049 | $s0 = $this->peg_FAILED; |
8050 | } |
8051 | } else { |
8052 | $this->peg_currPos = $s0; |
8053 | $s0 = $this->peg_FAILED; |
8054 | } |
8055 | } else { |
8056 | $this->peg_currPos = $s0; |
8057 | $s0 = $this->peg_FAILED; |
8058 | } |
8059 | } else { |
8060 | $this->peg_currPos = $s0; |
8061 | $s0 = $this->peg_FAILED; |
8062 | } |
8063 | } else { |
8064 | $this->peg_currPos = $s0; |
8065 | $s0 = $this->peg_FAILED; |
8066 | } |
8067 | } else { |
8068 | $this->peg_currPos = $s0; |
8069 | $s0 = $this->peg_FAILED; |
8070 | } |
8071 | } else { |
8072 | $this->peg_currPos = $s0; |
8073 | $s0 = $this->peg_FAILED; |
8074 | } |
8075 | |
8076 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
8077 | |
8078 | return $s0; |
8079 | } |
8080 | |
8081 | private function peg_parseCOLOR_SPEC_RGBI() { |
8082 | |
8083 | $key = $this->peg_currPos * 126 + 107; |
8084 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
8085 | |
8086 | if ($cached) { |
8087 | $this->peg_currPos = $cached["nextPos"]; |
8088 | return $cached["result"]; |
8089 | } |
8090 | |
8091 | $s0 = $this->peg_currPos; |
8092 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c39) { |
8093 | $s1 = $this->peg_c39; |
8094 | $this->peg_currPos++; |
8095 | } else { |
8096 | $s1 = $this->peg_FAILED; |
8097 | if ($this->peg_silentFails === 0) { |
8098 | $this->peg_fail($this->peg_c40); |
8099 | } |
8100 | } |
8101 | if ($s1 !== $this->peg_FAILED) { |
8102 | $s2 = $this->peg_parse_(); |
8103 | if ($s2 !== $this->peg_FAILED) { |
8104 | $s3 = $this->peg_parseCNUM255(); |
8105 | if ($s3 !== $this->peg_FAILED) { |
8106 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c113) { |
8107 | $s4 = $this->peg_c113; |
8108 | $this->peg_currPos++; |
8109 | } else { |
8110 | $s4 = $this->peg_FAILED; |
8111 | if ($this->peg_silentFails === 0) { |
8112 | $this->peg_fail($this->peg_c114); |
8113 | } |
8114 | } |
8115 | if ($s4 !== $this->peg_FAILED) { |
8116 | $s5 = $this->peg_parse_(); |
8117 | if ($s5 !== $this->peg_FAILED) { |
8118 | $s6 = $this->peg_parseCNUM255(); |
8119 | if ($s6 !== $this->peg_FAILED) { |
8120 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c113) { |
8121 | $s7 = $this->peg_c113; |
8122 | $this->peg_currPos++; |
8123 | } else { |
8124 | $s7 = $this->peg_FAILED; |
8125 | if ($this->peg_silentFails === 0) { |
8126 | $this->peg_fail($this->peg_c114); |
8127 | } |
8128 | } |
8129 | if ($s7 !== $this->peg_FAILED) { |
8130 | $s8 = $this->peg_parse_(); |
8131 | if ($s8 !== $this->peg_FAILED) { |
8132 | $s9 = $this->peg_parseCNUM255(); |
8133 | if ($s9 !== $this->peg_FAILED) { |
8134 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c11) { |
8135 | $s10 = $this->peg_c11; |
8136 | $this->peg_currPos++; |
8137 | } else { |
8138 | $s10 = $this->peg_FAILED; |
8139 | if ($this->peg_silentFails === 0) { |
8140 | $this->peg_fail($this->peg_c12); |
8141 | } |
8142 | } |
8143 | if ($s10 !== $this->peg_FAILED) { |
8144 | $s11 = $this->peg_parse_(); |
8145 | if ($s11 !== $this->peg_FAILED) { |
8146 | $this->peg_reportedPos = $s0; |
8147 | $s1 = $this->peg_f136($s3, $s6, $s9); |
8148 | $s0 = $s1; |
8149 | } else { |
8150 | $this->peg_currPos = $s0; |
8151 | $s0 = $this->peg_FAILED; |
8152 | } |
8153 | } else { |
8154 | $this->peg_currPos = $s0; |
8155 | $s0 = $this->peg_FAILED; |
8156 | } |
8157 | } else { |
8158 | $this->peg_currPos = $s0; |
8159 | $s0 = $this->peg_FAILED; |
8160 | } |
8161 | } else { |
8162 | $this->peg_currPos = $s0; |
8163 | $s0 = $this->peg_FAILED; |
8164 | } |
8165 | } else { |
8166 | $this->peg_currPos = $s0; |
8167 | $s0 = $this->peg_FAILED; |
8168 | } |
8169 | } else { |
8170 | $this->peg_currPos = $s0; |
8171 | $s0 = $this->peg_FAILED; |
8172 | } |
8173 | } else { |
8174 | $this->peg_currPos = $s0; |
8175 | $s0 = $this->peg_FAILED; |
8176 | } |
8177 | } else { |
8178 | $this->peg_currPos = $s0; |
8179 | $s0 = $this->peg_FAILED; |
8180 | } |
8181 | } else { |
8182 | $this->peg_currPos = $s0; |
8183 | $s0 = $this->peg_FAILED; |
8184 | } |
8185 | } else { |
8186 | $this->peg_currPos = $s0; |
8187 | $s0 = $this->peg_FAILED; |
8188 | } |
8189 | } else { |
8190 | $this->peg_currPos = $s0; |
8191 | $s0 = $this->peg_FAILED; |
8192 | } |
8193 | |
8194 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
8195 | |
8196 | return $s0; |
8197 | } |
8198 | |
8199 | private function peg_parseCOLOR_SPEC_CMYK() { |
8200 | |
8201 | $key = $this->peg_currPos * 126 + 108; |
8202 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
8203 | |
8204 | if ($cached) { |
8205 | $this->peg_currPos = $cached["nextPos"]; |
8206 | return $cached["result"]; |
8207 | } |
8208 | |
8209 | $s0 = $this->peg_currPos; |
8210 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c39) { |
8211 | $s1 = $this->peg_c39; |
8212 | $this->peg_currPos++; |
8213 | } else { |
8214 | $s1 = $this->peg_FAILED; |
8215 | if ($this->peg_silentFails === 0) { |
8216 | $this->peg_fail($this->peg_c40); |
8217 | } |
8218 | } |
8219 | if ($s1 !== $this->peg_FAILED) { |
8220 | $s2 = $this->peg_parse_(); |
8221 | if ($s2 !== $this->peg_FAILED) { |
8222 | $s3 = $this->peg_parseCNUM(); |
8223 | if ($s3 !== $this->peg_FAILED) { |
8224 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c113) { |
8225 | $s4 = $this->peg_c113; |
8226 | $this->peg_currPos++; |
8227 | } else { |
8228 | $s4 = $this->peg_FAILED; |
8229 | if ($this->peg_silentFails === 0) { |
8230 | $this->peg_fail($this->peg_c114); |
8231 | } |
8232 | } |
8233 | if ($s4 !== $this->peg_FAILED) { |
8234 | $s5 = $this->peg_parse_(); |
8235 | if ($s5 !== $this->peg_FAILED) { |
8236 | $s6 = $this->peg_parseCNUM(); |
8237 | if ($s6 !== $this->peg_FAILED) { |
8238 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c113) { |
8239 | $s7 = $this->peg_c113; |
8240 | $this->peg_currPos++; |
8241 | } else { |
8242 | $s7 = $this->peg_FAILED; |
8243 | if ($this->peg_silentFails === 0) { |
8244 | $this->peg_fail($this->peg_c114); |
8245 | } |
8246 | } |
8247 | if ($s7 !== $this->peg_FAILED) { |
8248 | $s8 = $this->peg_parse_(); |
8249 | if ($s8 !== $this->peg_FAILED) { |
8250 | $s9 = $this->peg_parseCNUM(); |
8251 | if ($s9 !== $this->peg_FAILED) { |
8252 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c113) { |
8253 | $s10 = $this->peg_c113; |
8254 | $this->peg_currPos++; |
8255 | } else { |
8256 | $s10 = $this->peg_FAILED; |
8257 | if ($this->peg_silentFails === 0) { |
8258 | $this->peg_fail($this->peg_c114); |
8259 | } |
8260 | } |
8261 | if ($s10 !== $this->peg_FAILED) { |
8262 | $s11 = $this->peg_parse_(); |
8263 | if ($s11 !== $this->peg_FAILED) { |
8264 | $s12 = $this->peg_parseCNUM(); |
8265 | if ($s12 !== $this->peg_FAILED) { |
8266 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c11) { |
8267 | $s13 = $this->peg_c11; |
8268 | $this->peg_currPos++; |
8269 | } else { |
8270 | $s13 = $this->peg_FAILED; |
8271 | if ($this->peg_silentFails === 0) { |
8272 | $this->peg_fail($this->peg_c12); |
8273 | } |
8274 | } |
8275 | if ($s13 !== $this->peg_FAILED) { |
8276 | $s14 = $this->peg_parse_(); |
8277 | if ($s14 !== $this->peg_FAILED) { |
8278 | $this->peg_reportedPos = $s0; |
8279 | $s1 = $this->peg_f137($s3, $s6, $s9, $s12); |
8280 | $s0 = $s1; |
8281 | } else { |
8282 | $this->peg_currPos = $s0; |
8283 | $s0 = $this->peg_FAILED; |
8284 | } |
8285 | } else { |
8286 | $this->peg_currPos = $s0; |
8287 | $s0 = $this->peg_FAILED; |
8288 | } |
8289 | } else { |
8290 | $this->peg_currPos = $s0; |
8291 | $s0 = $this->peg_FAILED; |
8292 | } |
8293 | } else { |
8294 | $this->peg_currPos = $s0; |
8295 | $s0 = $this->peg_FAILED; |
8296 | } |
8297 | } else { |
8298 | $this->peg_currPos = $s0; |
8299 | $s0 = $this->peg_FAILED; |
8300 | } |
8301 | } else { |
8302 | $this->peg_currPos = $s0; |
8303 | $s0 = $this->peg_FAILED; |
8304 | } |
8305 | } else { |
8306 | $this->peg_currPos = $s0; |
8307 | $s0 = $this->peg_FAILED; |
8308 | } |
8309 | } else { |
8310 | $this->peg_currPos = $s0; |
8311 | $s0 = $this->peg_FAILED; |
8312 | } |
8313 | } else { |
8314 | $this->peg_currPos = $s0; |
8315 | $s0 = $this->peg_FAILED; |
8316 | } |
8317 | } else { |
8318 | $this->peg_currPos = $s0; |
8319 | $s0 = $this->peg_FAILED; |
8320 | } |
8321 | } else { |
8322 | $this->peg_currPos = $s0; |
8323 | $s0 = $this->peg_FAILED; |
8324 | } |
8325 | } else { |
8326 | $this->peg_currPos = $s0; |
8327 | $s0 = $this->peg_FAILED; |
8328 | } |
8329 | } else { |
8330 | $this->peg_currPos = $s0; |
8331 | $s0 = $this->peg_FAILED; |
8332 | } |
8333 | } else { |
8334 | $this->peg_currPos = $s0; |
8335 | $s0 = $this->peg_FAILED; |
8336 | } |
8337 | |
8338 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
8339 | |
8340 | return $s0; |
8341 | } |
8342 | |
8343 | private function peg_parseCNUM255() { |
8344 | |
8345 | $key = $this->peg_currPos * 126 + 109; |
8346 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
8347 | |
8348 | if ($cached) { |
8349 | $this->peg_currPos = $cached["nextPos"]; |
8350 | return $cached["result"]; |
8351 | } |
8352 | |
8353 | $s0 = $this->peg_currPos; |
8354 | $s1 = $this->peg_currPos; |
8355 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c115) { |
8356 | $s2 = $this->peg_c115; |
8357 | $this->peg_currPos++; |
8358 | } else { |
8359 | $s2 = $this->peg_FAILED; |
8360 | if ($this->peg_silentFails === 0) { |
8361 | $this->peg_fail($this->peg_c116); |
8362 | } |
8363 | } |
8364 | if ($s2 === $this->peg_FAILED) { |
8365 | $s2 = $this->peg_currPos; |
8366 | if (peg_regex_test($this->peg_c117, $this->input_substr($this->peg_currPos, 1))) { |
8367 | $s3 = $this->input_substr($this->peg_currPos, 1); |
8368 | $this->peg_currPos++; |
8369 | } else { |
8370 | $s3 = $this->peg_FAILED; |
8371 | if ($this->peg_silentFails === 0) { |
8372 | $this->peg_fail($this->peg_c118); |
8373 | } |
8374 | } |
8375 | if ($s3 !== $this->peg_FAILED) { |
8376 | $s4 = $this->peg_currPos; |
8377 | if (peg_regex_test($this->peg_c19, $this->input_substr($this->peg_currPos, 1))) { |
8378 | $s5 = $this->input_substr($this->peg_currPos, 1); |
8379 | $this->peg_currPos++; |
8380 | } else { |
8381 | $s5 = $this->peg_FAILED; |
8382 | if ($this->peg_silentFails === 0) { |
8383 | $this->peg_fail($this->peg_c20); |
8384 | } |
8385 | } |
8386 | if ($s5 !== $this->peg_FAILED) { |
8387 | if (peg_regex_test($this->peg_c19, $this->input_substr($this->peg_currPos, 1))) { |
8388 | $s6 = $this->input_substr($this->peg_currPos, 1); |
8389 | $this->peg_currPos++; |
8390 | } else { |
8391 | $s6 = $this->peg_FAILED; |
8392 | if ($this->peg_silentFails === 0) { |
8393 | $this->peg_fail($this->peg_c20); |
8394 | } |
8395 | } |
8396 | if ($s6 === $this->peg_FAILED) { |
8397 | $s6 = null; |
8398 | } |
8399 | if ($s6 !== $this->peg_FAILED) { |
8400 | $s5 = array($s5, $s6); |
8401 | $s4 = $s5; |
8402 | } else { |
8403 | $this->peg_currPos = $s4; |
8404 | $s4 = $this->peg_FAILED; |
8405 | } |
8406 | } else { |
8407 | $this->peg_currPos = $s4; |
8408 | $s4 = $this->peg_FAILED; |
8409 | } |
8410 | if ($s4 === $this->peg_FAILED) { |
8411 | $s4 = null; |
8412 | } |
8413 | if ($s4 !== $this->peg_FAILED) { |
8414 | $s3 = array($s3, $s4); |
8415 | $s2 = $s3; |
8416 | } else { |
8417 | $this->peg_currPos = $s2; |
8418 | $s2 = $this->peg_FAILED; |
8419 | } |
8420 | } else { |
8421 | $this->peg_currPos = $s2; |
8422 | $s2 = $this->peg_FAILED; |
8423 | } |
8424 | } |
8425 | if ($s2 !== $this->peg_FAILED) { |
8426 | $s1 = $this->input_substr($s1, $this->peg_currPos - $s1); |
8427 | } else { |
8428 | $s1 = $s2; |
8429 | } |
8430 | if ($s1 !== $this->peg_FAILED) { |
8431 | $this->peg_reportedPos = $this->peg_currPos; |
8432 | $s2 = $this->peg_f138($s1); |
8433 | if ($s2) { |
8434 | $s2 = null; |
8435 | } else { |
8436 | $s2 = $this->peg_FAILED; |
8437 | } |
8438 | if ($s2 !== $this->peg_FAILED) { |
8439 | $s3 = $this->peg_parse_(); |
8440 | if ($s3 !== $this->peg_FAILED) { |
8441 | $this->peg_reportedPos = $s0; |
8442 | $s1 = $this->peg_f139($s1); |
8443 | $s0 = $s1; |
8444 | } else { |
8445 | $this->peg_currPos = $s0; |
8446 | $s0 = $this->peg_FAILED; |
8447 | } |
8448 | } else { |
8449 | $this->peg_currPos = $s0; |
8450 | $s0 = $this->peg_FAILED; |
8451 | } |
8452 | } else { |
8453 | $this->peg_currPos = $s0; |
8454 | $s0 = $this->peg_FAILED; |
8455 | } |
8456 | |
8457 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
8458 | |
8459 | return $s0; |
8460 | } |
8461 | |
8462 | private function peg_parseCNUM() { |
8463 | |
8464 | $key = $this->peg_currPos * 126 + 110; |
8465 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
8466 | |
8467 | if ($cached) { |
8468 | $this->peg_currPos = $cached["nextPos"]; |
8469 | return $cached["result"]; |
8470 | } |
8471 | |
8472 | $s0 = $this->peg_currPos; |
8473 | $s1 = $this->peg_currPos; |
8474 | $s2 = $this->peg_currPos; |
8475 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c115) { |
8476 | $s3 = $this->peg_c115; |
8477 | $this->peg_currPos++; |
8478 | } else { |
8479 | $s3 = $this->peg_FAILED; |
8480 | if ($this->peg_silentFails === 0) { |
8481 | $this->peg_fail($this->peg_c116); |
8482 | } |
8483 | } |
8484 | if ($s3 === $this->peg_FAILED) { |
8485 | $s3 = null; |
8486 | } |
8487 | if ($s3 !== $this->peg_FAILED) { |
8488 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c119) { |
8489 | $s4 = $this->peg_c119; |
8490 | $this->peg_currPos++; |
8491 | } else { |
8492 | $s4 = $this->peg_FAILED; |
8493 | if ($this->peg_silentFails === 0) { |
8494 | $this->peg_fail($this->peg_c120); |
8495 | } |
8496 | } |
8497 | if ($s4 !== $this->peg_FAILED) { |
8498 | $s5 = array(); |
8499 | if (peg_regex_test($this->peg_c19, $this->input_substr($this->peg_currPos, 1))) { |
8500 | $s6 = $this->input_substr($this->peg_currPos, 1); |
8501 | $this->peg_currPos++; |
8502 | } else { |
8503 | $s6 = $this->peg_FAILED; |
8504 | if ($this->peg_silentFails === 0) { |
8505 | $this->peg_fail($this->peg_c20); |
8506 | } |
8507 | } |
8508 | if ($s6 !== $this->peg_FAILED) { |
8509 | while ($s6 !== $this->peg_FAILED) { |
8510 | $s5[] = $s6; |
8511 | if (peg_regex_test($this->peg_c19, $this->input_substr($this->peg_currPos, 1))) { |
8512 | $s6 = $this->input_substr($this->peg_currPos, 1); |
8513 | $this->peg_currPos++; |
8514 | } else { |
8515 | $s6 = $this->peg_FAILED; |
8516 | if ($this->peg_silentFails === 0) { |
8517 | $this->peg_fail($this->peg_c20); |
8518 | } |
8519 | } |
8520 | } |
8521 | } else { |
8522 | $s5 = $this->peg_FAILED; |
8523 | } |
8524 | if ($s5 !== $this->peg_FAILED) { |
8525 | $s3 = array($s3, $s4, $s5); |
8526 | $s2 = $s3; |
8527 | } else { |
8528 | $this->peg_currPos = $s2; |
8529 | $s2 = $this->peg_FAILED; |
8530 | } |
8531 | } else { |
8532 | $this->peg_currPos = $s2; |
8533 | $s2 = $this->peg_FAILED; |
8534 | } |
8535 | } else { |
8536 | $this->peg_currPos = $s2; |
8537 | $s2 = $this->peg_FAILED; |
8538 | } |
8539 | if ($s2 !== $this->peg_FAILED) { |
8540 | $s1 = $this->input_substr($s1, $this->peg_currPos - $s1); |
8541 | } else { |
8542 | $s1 = $s2; |
8543 | } |
8544 | if ($s1 !== $this->peg_FAILED) { |
8545 | $s2 = $this->peg_parse_(); |
8546 | if ($s2 !== $this->peg_FAILED) { |
8547 | $this->peg_reportedPos = $s0; |
8548 | $s1 = $this->peg_f140($s1); |
8549 | $s0 = $s1; |
8550 | } else { |
8551 | $this->peg_currPos = $s0; |
8552 | $s0 = $this->peg_FAILED; |
8553 | } |
8554 | } else { |
8555 | $this->peg_currPos = $s0; |
8556 | $s0 = $this->peg_FAILED; |
8557 | } |
8558 | if ($s0 === $this->peg_FAILED) { |
8559 | $s0 = $this->peg_currPos; |
8560 | $s1 = $this->peg_currPos; |
8561 | $s2 = $this->peg_currPos; |
8562 | if (peg_regex_test($this->peg_c121, $this->input_substr($this->peg_currPos, 1))) { |
8563 | $s3 = $this->input_substr($this->peg_currPos, 1); |
8564 | $this->peg_currPos++; |
8565 | } else { |
8566 | $s3 = $this->peg_FAILED; |
8567 | if ($this->peg_silentFails === 0) { |
8568 | $this->peg_fail($this->peg_c122); |
8569 | } |
8570 | } |
8571 | if ($s3 !== $this->peg_FAILED) { |
8572 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c119) { |
8573 | $s4 = $this->peg_c119; |
8574 | $this->peg_currPos++; |
8575 | } else { |
8576 | $s4 = $this->peg_FAILED; |
8577 | if ($this->peg_silentFails === 0) { |
8578 | $this->peg_fail($this->peg_c120); |
8579 | } |
8580 | } |
8581 | if ($s4 === $this->peg_FAILED) { |
8582 | $s4 = null; |
8583 | } |
8584 | if ($s4 !== $this->peg_FAILED) { |
8585 | $s3 = array($s3, $s4); |
8586 | $s2 = $s3; |
8587 | } else { |
8588 | $this->peg_currPos = $s2; |
8589 | $s2 = $this->peg_FAILED; |
8590 | } |
8591 | } else { |
8592 | $this->peg_currPos = $s2; |
8593 | $s2 = $this->peg_FAILED; |
8594 | } |
8595 | if ($s2 !== $this->peg_FAILED) { |
8596 | $s1 = $this->input_substr($s1, $this->peg_currPos - $s1); |
8597 | } else { |
8598 | $s1 = $s2; |
8599 | } |
8600 | if ($s1 !== $this->peg_FAILED) { |
8601 | $s2 = $this->peg_parse_(); |
8602 | if ($s2 !== $this->peg_FAILED) { |
8603 | $this->peg_reportedPos = $s0; |
8604 | $s1 = $this->peg_f140($s1); |
8605 | $s0 = $s1; |
8606 | } else { |
8607 | $this->peg_currPos = $s0; |
8608 | $s0 = $this->peg_FAILED; |
8609 | } |
8610 | } else { |
8611 | $this->peg_currPos = $s0; |
8612 | $s0 = $this->peg_FAILED; |
8613 | } |
8614 | } |
8615 | |
8616 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
8617 | |
8618 | return $s0; |
8619 | } |
8620 | |
8621 | private function peg_parseCHEM_SINGLE_MACRO() { |
8622 | |
8623 | $key = $this->peg_currPos * 126 + 111; |
8624 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
8625 | |
8626 | if ($cached) { |
8627 | $this->peg_currPos = $cached["nextPos"]; |
8628 | return $cached["result"]; |
8629 | } |
8630 | |
8631 | $s0 = $this->peg_currPos; |
8632 | $s1 = $this->peg_parsegeneric_func(); |
8633 | if ($s1 !== $this->peg_FAILED) { |
8634 | $this->peg_reportedPos = $this->peg_currPos; |
8635 | $s2 = $this->peg_f141($s1); |
8636 | if ($s2) { |
8637 | $s2 = null; |
8638 | } else { |
8639 | $s2 = $this->peg_FAILED; |
8640 | } |
8641 | if ($s2 !== $this->peg_FAILED) { |
8642 | $this->peg_reportedPos = $s0; |
8643 | $s1 = $this->peg_f99($s1); |
8644 | $s0 = $s1; |
8645 | } else { |
8646 | $this->peg_currPos = $s0; |
8647 | $s0 = $this->peg_FAILED; |
8648 | } |
8649 | } else { |
8650 | $this->peg_currPos = $s0; |
8651 | $s0 = $this->peg_FAILED; |
8652 | } |
8653 | if ($s0 === $this->peg_FAILED) { |
8654 | $s0 = $this->peg_currPos; |
8655 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c59) { |
8656 | $s1 = $this->peg_c59; |
8657 | $this->peg_currPos++; |
8658 | } else { |
8659 | $s1 = $this->peg_FAILED; |
8660 | if ($this->peg_silentFails === 0) { |
8661 | $this->peg_fail($this->peg_c60); |
8662 | } |
8663 | } |
8664 | if ($s1 !== $this->peg_FAILED) { |
8665 | if (peg_regex_test($this->peg_c61, $this->input_substr($this->peg_currPos, 1))) { |
8666 | $s2 = $this->input_substr($this->peg_currPos, 1); |
8667 | $this->peg_currPos++; |
8668 | } else { |
8669 | $s2 = $this->peg_FAILED; |
8670 | if ($this->peg_silentFails === 0) { |
8671 | $this->peg_fail($this->peg_c62); |
8672 | } |
8673 | } |
8674 | if ($s2 !== $this->peg_FAILED) { |
8675 | $this->peg_reportedPos = $s0; |
8676 | $s1 = $this->peg_f100($s2); |
8677 | $s0 = $s1; |
8678 | } else { |
8679 | $this->peg_currPos = $s0; |
8680 | $s0 = $this->peg_FAILED; |
8681 | } |
8682 | } else { |
8683 | $this->peg_currPos = $s0; |
8684 | $s0 = $this->peg_FAILED; |
8685 | } |
8686 | } |
8687 | |
8688 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
8689 | |
8690 | return $s0; |
8691 | } |
8692 | |
8693 | private function peg_parseCHEM_BONDI() { |
8694 | |
8695 | $key = $this->peg_currPos * 126 + 112; |
8696 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
8697 | |
8698 | if ($cached) { |
8699 | $this->peg_currPos = $cached["nextPos"]; |
8700 | return $cached["result"]; |
8701 | } |
8702 | |
8703 | $s0 = $this->peg_currPos; |
8704 | $s1 = $this->peg_parsegeneric_func(); |
8705 | if ($s1 !== $this->peg_FAILED) { |
8706 | $this->peg_reportedPos = $this->peg_currPos; |
8707 | $s2 = $this->peg_f142($s1); |
8708 | if ($s2) { |
8709 | $s2 = null; |
8710 | } else { |
8711 | $s2 = $this->peg_FAILED; |
8712 | } |
8713 | if ($s2 !== $this->peg_FAILED) { |
8714 | $s3 = $this->peg_parse_(); |
8715 | if ($s3 !== $this->peg_FAILED) { |
8716 | $this->peg_reportedPos = $s0; |
8717 | $s1 = $this->peg_f99($s1); |
8718 | $s0 = $s1; |
8719 | } else { |
8720 | $this->peg_currPos = $s0; |
8721 | $s0 = $this->peg_FAILED; |
8722 | } |
8723 | } else { |
8724 | $this->peg_currPos = $s0; |
8725 | $s0 = $this->peg_FAILED; |
8726 | } |
8727 | } else { |
8728 | $this->peg_currPos = $s0; |
8729 | $s0 = $this->peg_FAILED; |
8730 | } |
8731 | |
8732 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
8733 | |
8734 | return $s0; |
8735 | } |
8736 | |
8737 | private function peg_parseCHEM_MACRO_1P() { |
8738 | |
8739 | $key = $this->peg_currPos * 126 + 113; |
8740 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
8741 | |
8742 | if ($cached) { |
8743 | $this->peg_currPos = $cached["nextPos"]; |
8744 | return $cached["result"]; |
8745 | } |
8746 | |
8747 | $s0 = $this->peg_currPos; |
8748 | $s1 = $this->peg_parsegeneric_func(); |
8749 | if ($s1 !== $this->peg_FAILED) { |
8750 | $this->peg_reportedPos = $this->peg_currPos; |
8751 | $s2 = $this->peg_f143($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_f99($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_parseCHEM_MACRO_2P() { |
8782 | |
8783 | $key = $this->peg_currPos * 126 + 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_parsegeneric_func(); |
8793 | if ($s1 !== $this->peg_FAILED) { |
8794 | $this->peg_reportedPos = $this->peg_currPos; |
8795 | $s2 = $this->peg_f144($s1); |
8796 | if ($s2) { |
8797 | $s2 = null; |
8798 | } else { |
8799 | $s2 = $this->peg_FAILED; |
8800 | } |
8801 | if ($s2 !== $this->peg_FAILED) { |
8802 | $s3 = $this->peg_parse_(); |
8803 | if ($s3 !== $this->peg_FAILED) { |
8804 | $this->peg_reportedPos = $s0; |
8805 | $s1 = $this->peg_f99($s1); |
8806 | $s0 = $s1; |
8807 | } else { |
8808 | $this->peg_currPos = $s0; |
8809 | $s0 = $this->peg_FAILED; |
8810 | } |
8811 | } else { |
8812 | $this->peg_currPos = $s0; |
8813 | $s0 = $this->peg_FAILED; |
8814 | } |
8815 | } else { |
8816 | $this->peg_currPos = $s0; |
8817 | $s0 = $this->peg_FAILED; |
8818 | } |
8819 | |
8820 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
8821 | |
8822 | return $s0; |
8823 | } |
8824 | |
8825 | private function peg_parseCHEM_MACRO_2PU() { |
8826 | |
8827 | $key = $this->peg_currPos * 126 + 115; |
8828 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
8829 | |
8830 | if ($cached) { |
8831 | $this->peg_currPos = $cached["nextPos"]; |
8832 | return $cached["result"]; |
8833 | } |
8834 | |
8835 | $s0 = $this->peg_currPos; |
8836 | $s1 = $this->peg_parsegeneric_func(); |
8837 | if ($s1 !== $this->peg_FAILED) { |
8838 | $this->peg_reportedPos = $this->peg_currPos; |
8839 | $s2 = $this->peg_f145($s1); |
8840 | if ($s2) { |
8841 | $s2 = null; |
8842 | } else { |
8843 | $s2 = $this->peg_FAILED; |
8844 | } |
8845 | if ($s2 !== $this->peg_FAILED) { |
8846 | $s3 = $this->peg_parse_(); |
8847 | if ($s3 !== $this->peg_FAILED) { |
8848 | $this->peg_reportedPos = $s0; |
8849 | $s1 = $this->peg_f99($s1); |
8850 | $s0 = $s1; |
8851 | } else { |
8852 | $this->peg_currPos = $s0; |
8853 | $s0 = $this->peg_FAILED; |
8854 | } |
8855 | } else { |
8856 | $this->peg_currPos = $s0; |
8857 | $s0 = $this->peg_FAILED; |
8858 | } |
8859 | } else { |
8860 | $this->peg_currPos = $s0; |
8861 | $s0 = $this->peg_FAILED; |
8862 | } |
8863 | |
8864 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
8865 | |
8866 | return $s0; |
8867 | } |
8868 | |
8869 | private function peg_parseCHEM_MACRO_2PC() { |
8870 | |
8871 | $key = $this->peg_currPos * 126 + 116; |
8872 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
8873 | |
8874 | if ($cached) { |
8875 | $this->peg_currPos = $cached["nextPos"]; |
8876 | return $cached["result"]; |
8877 | } |
8878 | |
8879 | $s0 = $this->peg_currPos; |
8880 | $s1 = $this->peg_parsegeneric_func(); |
8881 | if ($s1 !== $this->peg_FAILED) { |
8882 | $this->peg_reportedPos = $this->peg_currPos; |
8883 | $s2 = $this->peg_f146($s1); |
8884 | if ($s2) { |
8885 | $s2 = null; |
8886 | } else { |
8887 | $s2 = $this->peg_FAILED; |
8888 | } |
8889 | if ($s2 !== $this->peg_FAILED) { |
8890 | $s3 = $this->peg_parse_(); |
8891 | if ($s3 !== $this->peg_FAILED) { |
8892 | $this->peg_reportedPos = $s0; |
8893 | $s1 = $this->peg_f99($s1); |
8894 | $s0 = $s1; |
8895 | } else { |
8896 | $this->peg_currPos = $s0; |
8897 | $s0 = $this->peg_FAILED; |
8898 | } |
8899 | } else { |
8900 | $this->peg_currPos = $s0; |
8901 | $s0 = $this->peg_FAILED; |
8902 | } |
8903 | } else { |
8904 | $this->peg_currPos = $s0; |
8905 | $s0 = $this->peg_FAILED; |
8906 | } |
8907 | |
8908 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
8909 | |
8910 | return $s0; |
8911 | } |
8912 | |
8913 | private function peg_parseCHEM_SCRIPT_FOLLOW() { |
8914 | |
8915 | $key = $this->peg_currPos * 126 + 117; |
8916 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
8917 | |
8918 | if ($cached) { |
8919 | $this->peg_currPos = $cached["nextPos"]; |
8920 | return $cached["result"]; |
8921 | } |
8922 | |
8923 | $s0 = $this->peg_parseliteral_mn(); |
8924 | if ($s0 === $this->peg_FAILED) { |
8925 | $s0 = $this->peg_parseliteral_id(); |
8926 | if ($s0 === $this->peg_FAILED) { |
8927 | if (peg_regex_test($this->peg_c123, $this->input_substr($this->peg_currPos, 1))) { |
8928 | $s0 = $this->input_substr($this->peg_currPos, 1); |
8929 | $this->peg_currPos++; |
8930 | } else { |
8931 | $s0 = $this->peg_FAILED; |
8932 | if ($this->peg_silentFails === 0) { |
8933 | $this->peg_fail($this->peg_c124); |
8934 | } |
8935 | } |
8936 | } |
8937 | } |
8938 | |
8939 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
8940 | |
8941 | return $s0; |
8942 | } |
8943 | |
8944 | private function peg_parseCHEM_SUPERSUB() { |
8945 | |
8946 | $key = $this->peg_currPos * 126 + 118; |
8947 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
8948 | |
8949 | if ($cached) { |
8950 | $this->peg_currPos = $cached["nextPos"]; |
8951 | return $cached["result"]; |
8952 | } |
8953 | |
8954 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c37) { |
8955 | $s0 = $this->peg_c37; |
8956 | $this->peg_currPos++; |
8957 | } else { |
8958 | $s0 = $this->peg_FAILED; |
8959 | if ($this->peg_silentFails === 0) { |
8960 | $this->peg_fail($this->peg_c38); |
8961 | } |
8962 | } |
8963 | if ($s0 === $this->peg_FAILED) { |
8964 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c35) { |
8965 | $s0 = $this->peg_c35; |
8966 | $this->peg_currPos++; |
8967 | } else { |
8968 | $s0 = $this->peg_FAILED; |
8969 | if ($this->peg_silentFails === 0) { |
8970 | $this->peg_fail($this->peg_c36); |
8971 | } |
8972 | } |
8973 | } |
8974 | |
8975 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
8976 | |
8977 | return $s0; |
8978 | } |
8979 | |
8980 | private function peg_parseCHEM_BOND_TYPE() { |
8981 | |
8982 | $key = $this->peg_currPos * 126 + 119; |
8983 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
8984 | |
8985 | if ($cached) { |
8986 | $this->peg_currPos = $cached["nextPos"]; |
8987 | return $cached["result"]; |
8988 | } |
8989 | |
8990 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c125) { |
8991 | $s0 = $this->peg_c125; |
8992 | $this->peg_currPos++; |
8993 | } else { |
8994 | $s0 = $this->peg_FAILED; |
8995 | if ($this->peg_silentFails === 0) { |
8996 | $this->peg_fail($this->peg_c126); |
8997 | } |
8998 | } |
8999 | if ($s0 === $this->peg_FAILED) { |
9000 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c127) { |
9001 | $s0 = $this->peg_c127; |
9002 | $this->peg_currPos++; |
9003 | } else { |
9004 | $s0 = $this->peg_FAILED; |
9005 | if ($this->peg_silentFails === 0) { |
9006 | $this->peg_fail($this->peg_c128); |
9007 | } |
9008 | } |
9009 | if ($s0 === $this->peg_FAILED) { |
9010 | if ($this->input_substr($this->peg_currPos, 3) === $this->peg_c129) { |
9011 | $s0 = $this->peg_c129; |
9012 | $this->peg_currPos += 3; |
9013 | } else { |
9014 | $s0 = $this->peg_FAILED; |
9015 | if ($this->peg_silentFails === 0) { |
9016 | $this->peg_fail($this->peg_c130); |
9017 | } |
9018 | } |
9019 | if ($s0 === $this->peg_FAILED) { |
9020 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c131) { |
9021 | $s0 = $this->peg_c131; |
9022 | $this->peg_currPos += 2; |
9023 | } else { |
9024 | $s0 = $this->peg_FAILED; |
9025 | if ($this->peg_silentFails === 0) { |
9026 | $this->peg_fail($this->peg_c132); |
9027 | } |
9028 | } |
9029 | if ($s0 === $this->peg_FAILED) { |
9030 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c133) { |
9031 | $s0 = $this->peg_c133; |
9032 | $this->peg_currPos += 2; |
9033 | } else { |
9034 | $s0 = $this->peg_FAILED; |
9035 | if ($this->peg_silentFails === 0) { |
9036 | $this->peg_fail($this->peg_c134); |
9037 | } |
9038 | } |
9039 | if ($s0 === $this->peg_FAILED) { |
9040 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c135) { |
9041 | $s0 = $this->peg_c135; |
9042 | $this->peg_currPos++; |
9043 | } else { |
9044 | $s0 = $this->peg_FAILED; |
9045 | if ($this->peg_silentFails === 0) { |
9046 | $this->peg_fail($this->peg_c136); |
9047 | } |
9048 | } |
9049 | if ($s0 === $this->peg_FAILED) { |
9050 | if ($this->input_substr($this->peg_currPos, 3) === $this->peg_c137) { |
9051 | $s0 = $this->peg_c137; |
9052 | $this->peg_currPos += 3; |
9053 | } else { |
9054 | $s0 = $this->peg_FAILED; |
9055 | if ($this->peg_silentFails === 0) { |
9056 | $this->peg_fail($this->peg_c138); |
9057 | } |
9058 | } |
9059 | if ($s0 === $this->peg_FAILED) { |
9060 | if ($this->input_substr($this->peg_currPos, 4) === $this->peg_c139) { |
9061 | $s0 = $this->peg_c139; |
9062 | $this->peg_currPos += 4; |
9063 | } else { |
9064 | $s0 = $this->peg_FAILED; |
9065 | if ($this->peg_silentFails === 0) { |
9066 | $this->peg_fail($this->peg_c140); |
9067 | } |
9068 | } |
9069 | if ($s0 === $this->peg_FAILED) { |
9070 | if ($this->input_substr($this->peg_currPos, 3) === $this->peg_c141) { |
9071 | $s0 = $this->peg_c141; |
9072 | $this->peg_currPos += 3; |
9073 | } else { |
9074 | $s0 = $this->peg_FAILED; |
9075 | if ($this->peg_silentFails === 0) { |
9076 | $this->peg_fail($this->peg_c142); |
9077 | } |
9078 | } |
9079 | if ($s0 === $this->peg_FAILED) { |
9080 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c143) { |
9081 | $s0 = $this->peg_c143; |
9082 | $this->peg_currPos += 2; |
9083 | } else { |
9084 | $s0 = $this->peg_FAILED; |
9085 | if ($this->peg_silentFails === 0) { |
9086 | $this->peg_fail($this->peg_c144); |
9087 | } |
9088 | } |
9089 | if ($s0 === $this->peg_FAILED) { |
9090 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c145) { |
9091 | $s0 = $this->peg_c145; |
9092 | $this->peg_currPos += 2; |
9093 | } else { |
9094 | $s0 = $this->peg_FAILED; |
9095 | if ($this->peg_silentFails === 0) { |
9096 | $this->peg_fail($this->peg_c146); |
9097 | } |
9098 | } |
9099 | if ($s0 === $this->peg_FAILED) { |
9100 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c57) { |
9101 | $s0 = $this->peg_c57; |
9102 | $this->peg_currPos++; |
9103 | } else { |
9104 | $s0 = $this->peg_FAILED; |
9105 | if ($this->peg_silentFails === 0) { |
9106 | $this->peg_fail($this->peg_c58); |
9107 | } |
9108 | } |
9109 | if ($s0 === $this->peg_FAILED) { |
9110 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c147) { |
9111 | $s0 = $this->peg_c147; |
9112 | $this->peg_currPos++; |
9113 | } else { |
9114 | $s0 = $this->peg_FAILED; |
9115 | if ($this->peg_silentFails === 0) { |
9116 | $this->peg_fail($this->peg_c148); |
9117 | } |
9118 | } |
9119 | if ($s0 === $this->peg_FAILED) { |
9120 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c149) { |
9121 | $s0 = $this->peg_c149; |
9122 | $this->peg_currPos++; |
9123 | } else { |
9124 | $s0 = $this->peg_FAILED; |
9125 | if ($this->peg_silentFails === 0) { |
9126 | $this->peg_fail($this->peg_c150); |
9127 | } |
9128 | } |
9129 | if ($s0 === $this->peg_FAILED) { |
9130 | if ($this->input_substr($this->peg_currPos, 1) === $this->peg_c151) { |
9131 | $s0 = $this->peg_c151; |
9132 | $this->peg_currPos++; |
9133 | } else { |
9134 | $s0 = $this->peg_FAILED; |
9135 | if ($this->peg_silentFails === 0) { |
9136 | $this->peg_fail($this->peg_c152); |
9137 | } |
9138 | } |
9139 | } |
9140 | } |
9141 | } |
9142 | } |
9143 | } |
9144 | } |
9145 | } |
9146 | } |
9147 | } |
9148 | } |
9149 | } |
9150 | } |
9151 | } |
9152 | } |
9153 | |
9154 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
9155 | |
9156 | return $s0; |
9157 | } |
9158 | |
9159 | private function peg_parseBEGIN_MATH() { |
9160 | |
9161 | $key = $this->peg_currPos * 126 + 120; |
9162 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
9163 | |
9164 | if ($cached) { |
9165 | $this->peg_currPos = $cached["nextPos"]; |
9166 | return $cached["result"]; |
9167 | } |
9168 | |
9169 | $s0 = $this->peg_currPos; |
9170 | $s1 = $this->peg_parseBEGIN(); |
9171 | if ($s1 !== $this->peg_FAILED) { |
9172 | if ($this->input_substr($this->peg_currPos, 6) === $this->peg_c153) { |
9173 | $s2 = $this->peg_c153; |
9174 | $this->peg_currPos += 6; |
9175 | } else { |
9176 | $s2 = $this->peg_FAILED; |
9177 | if ($this->peg_silentFails === 0) { |
9178 | $this->peg_fail($this->peg_c154); |
9179 | } |
9180 | } |
9181 | if ($s2 !== $this->peg_FAILED) { |
9182 | $s3 = $this->peg_parse_(); |
9183 | if ($s3 !== $this->peg_FAILED) { |
9184 | $s1 = array($s1, $s2, $s3); |
9185 | $s0 = $s1; |
9186 | } else { |
9187 | $this->peg_currPos = $s0; |
9188 | $s0 = $this->peg_FAILED; |
9189 | } |
9190 | } else { |
9191 | $this->peg_currPos = $s0; |
9192 | $s0 = $this->peg_FAILED; |
9193 | } |
9194 | } else { |
9195 | $this->peg_currPos = $s0; |
9196 | $s0 = $this->peg_FAILED; |
9197 | } |
9198 | |
9199 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
9200 | |
9201 | return $s0; |
9202 | } |
9203 | |
9204 | private function peg_parseEND_MATH() { |
9205 | |
9206 | $key = $this->peg_currPos * 126 + 121; |
9207 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
9208 | |
9209 | if ($cached) { |
9210 | $this->peg_currPos = $cached["nextPos"]; |
9211 | return $cached["result"]; |
9212 | } |
9213 | |
9214 | $s0 = $this->peg_currPos; |
9215 | $s1 = $this->peg_parseEND(); |
9216 | if ($s1 !== $this->peg_FAILED) { |
9217 | if ($this->input_substr($this->peg_currPos, 6) === $this->peg_c153) { |
9218 | $s2 = $this->peg_c153; |
9219 | $this->peg_currPos += 6; |
9220 | } else { |
9221 | $s2 = $this->peg_FAILED; |
9222 | if ($this->peg_silentFails === 0) { |
9223 | $this->peg_fail($this->peg_c154); |
9224 | } |
9225 | } |
9226 | if ($s2 !== $this->peg_FAILED) { |
9227 | $s3 = $this->peg_parse_(); |
9228 | if ($s3 !== $this->peg_FAILED) { |
9229 | $s1 = array($s1, $s2, $s3); |
9230 | $s0 = $s1; |
9231 | } else { |
9232 | $this->peg_currPos = $s0; |
9233 | $s0 = $this->peg_FAILED; |
9234 | } |
9235 | } else { |
9236 | $this->peg_currPos = $s0; |
9237 | $s0 = $this->peg_FAILED; |
9238 | } |
9239 | } else { |
9240 | $this->peg_currPos = $s0; |
9241 | $s0 = $this->peg_FAILED; |
9242 | } |
9243 | |
9244 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
9245 | |
9246 | return $s0; |
9247 | } |
9248 | |
9249 | private function peg_parseCHEM_LETTER() { |
9250 | |
9251 | $key = $this->peg_currPos * 126 + 122; |
9252 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
9253 | |
9254 | if ($cached) { |
9255 | $this->peg_currPos = $cached["nextPos"]; |
9256 | return $cached["result"]; |
9257 | } |
9258 | |
9259 | if (peg_regex_test($this->peg_c41, $this->input_substr($this->peg_currPos, 1))) { |
9260 | $s0 = $this->input_substr($this->peg_currPos, 1); |
9261 | $this->peg_currPos++; |
9262 | } else { |
9263 | $s0 = $this->peg_FAILED; |
9264 | if ($this->peg_silentFails === 0) { |
9265 | $this->peg_fail($this->peg_c42); |
9266 | } |
9267 | } |
9268 | |
9269 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
9270 | |
9271 | return $s0; |
9272 | } |
9273 | |
9274 | private function peg_parseCHEM_NONLETTER() { |
9275 | |
9276 | $key = $this->peg_currPos * 126 + 123; |
9277 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
9278 | |
9279 | if ($cached) { |
9280 | $this->peg_currPos = $cached["nextPos"]; |
9281 | return $cached["result"]; |
9282 | } |
9283 | |
9284 | $s0 = $this->peg_currPos; |
9285 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c7) { |
9286 | $s1 = $this->peg_c7; |
9287 | $this->peg_currPos += 2; |
9288 | } else { |
9289 | $s1 = $this->peg_FAILED; |
9290 | if ($this->peg_silentFails === 0) { |
9291 | $this->peg_fail($this->peg_c8); |
9292 | } |
9293 | } |
9294 | if ($s1 !== $this->peg_FAILED) { |
9295 | $this->peg_reportedPos = $s0; |
9296 | $s1 = $this->peg_f84($s1); |
9297 | } |
9298 | $s0 = $s1; |
9299 | if ($s0 === $this->peg_FAILED) { |
9300 | $s0 = $this->peg_currPos; |
9301 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c155) { |
9302 | $s1 = $this->peg_c155; |
9303 | $this->peg_currPos += 2; |
9304 | } else { |
9305 | $s1 = $this->peg_FAILED; |
9306 | if ($this->peg_silentFails === 0) { |
9307 | $this->peg_fail($this->peg_c156); |
9308 | } |
9309 | } |
9310 | if ($s1 !== $this->peg_FAILED) { |
9311 | $this->peg_reportedPos = $s0; |
9312 | $s1 = $this->peg_f84($s1); |
9313 | } |
9314 | $s0 = $s1; |
9315 | if ($s0 === $this->peg_FAILED) { |
9316 | $s0 = $this->peg_currPos; |
9317 | if ($this->input_substr($this->peg_currPos, 2) === $this->peg_c71) { |
9318 | $s1 = $this->peg_c71; |
9319 | $this->peg_currPos += 2; |
9320 | } else { |
9321 | $s1 = $this->peg_FAILED; |
9322 | if ($this->peg_silentFails === 0) { |
9323 | $this->peg_fail($this->peg_c72); |
9324 | } |
9325 | } |
9326 | if ($s1 !== $this->peg_FAILED) { |
9327 | $this->peg_reportedPos = $s0; |
9328 | $s1 = $this->peg_f84($s1); |
9329 | } |
9330 | $s0 = $s1; |
9331 | if ($s0 === $this->peg_FAILED) { |
9332 | $s0 = $this->peg_currPos; |
9333 | if (peg_regex_test($this->peg_c157, $this->input_substr($this->peg_currPos, 1))) { |
9334 | $s1 = $this->input_substr($this->peg_currPos, 1); |
9335 | $this->peg_currPos++; |
9336 | } else { |
9337 | $s1 = $this->peg_FAILED; |
9338 | if ($this->peg_silentFails === 0) { |
9339 | $this->peg_fail($this->peg_c158); |
9340 | } |
9341 | } |
9342 | if ($s1 !== $this->peg_FAILED) { |
9343 | $this->peg_reportedPos = $s0; |
9344 | $s1 = $this->peg_f84($s1); |
9345 | } |
9346 | $s0 = $s1; |
9347 | if ($s0 === $this->peg_FAILED) { |
9348 | $s0 = $this->peg_currPos; |
9349 | $s1 = $this->peg_parseliteral_mn(); |
9350 | if ($s1 !== $this->peg_FAILED) { |
9351 | $this->peg_reportedPos = $s0; |
9352 | $s1 = $this->peg_f84($s1); |
9353 | } |
9354 | $s0 = $s1; |
9355 | if ($s0 === $this->peg_FAILED) { |
9356 | $s0 = $this->peg_currPos; |
9357 | $s1 = $this->peg_parseCURLY_OPEN(); |
9358 | if ($s1 !== $this->peg_FAILED) { |
9359 | $s2 = $this->peg_parseCURLY_CLOSE(); |
9360 | if ($s2 !== $this->peg_FAILED) { |
9361 | $this->peg_reportedPos = $s0; |
9362 | $s1 = $this->peg_f147(); |
9363 | $s0 = $s1; |
9364 | } else { |
9365 | $this->peg_currPos = $s0; |
9366 | $s0 = $this->peg_FAILED; |
9367 | } |
9368 | } else { |
9369 | $this->peg_currPos = $s0; |
9370 | $s0 = $this->peg_FAILED; |
9371 | } |
9372 | } |
9373 | } |
9374 | } |
9375 | } |
9376 | } |
9377 | |
9378 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
9379 | |
9380 | return $s0; |
9381 | } |
9382 | |
9383 | private function peg_parseimpossible() { |
9384 | |
9385 | $key = $this->peg_currPos * 126 + 124; |
9386 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
9387 | |
9388 | if ($cached) { |
9389 | $this->peg_currPos = $cached["nextPos"]; |
9390 | return $cached["result"]; |
9391 | } |
9392 | |
9393 | $this->peg_reportedPos = $this->peg_currPos; |
9394 | $s0 = $this->peg_f148(); |
9395 | if ($s0) { |
9396 | $s0 = null; |
9397 | } else { |
9398 | $s0 = $this->peg_FAILED; |
9399 | } |
9400 | |
9401 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
9402 | |
9403 | return $s0; |
9404 | } |
9405 | |
9406 | private function peg_parseEOF() { |
9407 | |
9408 | $key = $this->peg_currPos * 126 + 125; |
9409 | $cached = isset($this->peg_cache[$key]) ? $this->peg_cache[$key] : null; |
9410 | |
9411 | if ($cached) { |
9412 | $this->peg_currPos = $cached["nextPos"]; |
9413 | return $cached["result"]; |
9414 | } |
9415 | |
9416 | $this->peg_reportedPos = $this->peg_currPos; |
9417 | $s0 = $this->peg_f149(); |
9418 | if ($s0) { |
9419 | $s0 = null; |
9420 | } else { |
9421 | $s0 = $this->peg_FAILED; |
9422 | } |
9423 | |
9424 | $this->peg_cache[$key] = array ("nextPos" => $this->peg_currPos, "result" => $s0 ); |
9425 | |
9426 | return $s0; |
9427 | } |
9428 | |
9429 | public function parse($input) { |
9430 | $arguments = func_get_args(); |
9431 | $options = count($arguments) > 1 ? $arguments[1] : array(); |
9432 | $this->cleanup_state(); |
9433 | |
9434 | if (is_array($input)) { |
9435 | $this->input = $input; |
9436 | } else { |
9437 | preg_match_all("/./us", $input, $match); |
9438 | $this->input = $match[0]; |
9439 | } |
9440 | $this->input_length = count($this->input); |
9441 | |
9442 | $old_regex_encoding = mb_regex_encoding(); |
9443 | mb_regex_encoding("UTF-8"); |
9444 | |
9445 | $this->peg_FAILED = new \stdClass; |
9446 | $this->peg_c0 = "/^[ \\t\\n\\r]/"; |
9447 | $this->peg_c1 = array( "type" => "class", "value" => "[ \t\n\r]", "description" => "[ \t\n\r]" ); |
9448 | $this->peg_c2 = ""; |
9449 | $this->peg_c3 = "("; |
9450 | $this->peg_c4 = array( "type" => "literal", "value" => "(", "description" => "\"(\"" ); |
9451 | $this->peg_c5 = "["; |
9452 | $this->peg_c6 = array( "type" => "literal", "value" => "[", "description" => "\"[\"" ); |
9453 | $this->peg_c7 = "\\{"; |
9454 | $this->peg_c8 = array( "type" => "literal", "value" => "\\{", "description" => "\"\\\\{\"" ); |
9455 | $this->peg_c9 = "\\begin{"; |
9456 | $this->peg_c10 = array( "type" => "literal", "value" => "\\begin{", "description" => "\"\\\\begin{\"" ); |
9457 | $this->peg_c11 = "}"; |
9458 | $this->peg_c12 = array( "type" => "literal", "value" => "}", "description" => "\"}\"" ); |
9459 | $this->peg_c13 = "/^[lrc]/"; |
9460 | $this->peg_c14 = array( "type" => "class", "value" => "[lrc]", "description" => "[lrc]" ); |
9461 | $this->peg_c15 = "p"; |
9462 | $this->peg_c16 = array( "type" => "literal", "value" => "p", "description" => "\"p\"" ); |
9463 | $this->peg_c17 = "*"; |
9464 | $this->peg_c18 = array( "type" => "literal", "value" => "*", "description" => "\"*\"" ); |
9465 | $this->peg_c19 = "/^[0-9]/"; |
9466 | $this->peg_c20 = array( "type" => "class", "value" => "[0-9]", "description" => "[0-9]" ); |
9467 | $this->peg_c21 = "||"; |
9468 | $this->peg_c22 = array( "type" => "literal", "value" => "||", "description" => "\"||\"" ); |
9469 | $this->peg_c23 = "|"; |
9470 | $this->peg_c24 = array( "type" => "literal", "value" => "|", "description" => "\"|\"" ); |
9471 | $this->peg_c25 = "@"; |
9472 | $this->peg_c26 = array( "type" => "literal", "value" => "@", "description" => "\"@\"" ); |
9473 | $this->peg_c27 = "/^[tcb]/"; |
9474 | $this->peg_c28 = array( "type" => "class", "value" => "[tcb]", "description" => "[tcb]" ); |
9475 | $this->peg_c29 = "]"; |
9476 | $this->peg_c30 = array( "type" => "literal", "value" => "]", "description" => "\"]\"" ); |
9477 | $this->peg_c31 = " "; |
9478 | $this->peg_c32 = array( "type" => "literal", "value" => " ", "description" => "\" \"" ); |
9479 | $this->peg_c33 = "(^)"; |
9480 | $this->peg_c34 = array( "type" => "literal", "value" => "(^)", "description" => "\"(^)\"" ); |
9481 | $this->peg_c35 = "^"; |
9482 | $this->peg_c36 = array( "type" => "literal", "value" => "^", "description" => "\"^\"" ); |
9483 | $this->peg_c37 = "_"; |
9484 | $this->peg_c38 = array( "type" => "literal", "value" => "_", "description" => "\"_\"" ); |
9485 | $this->peg_c39 = "{"; |
9486 | $this->peg_c40 = array( "type" => "literal", "value" => "{", "description" => "\"{\"" ); |
9487 | $this->peg_c41 = "/^[a-zA-Z]/"; |
9488 | $this->peg_c42 = array( "type" => "class", "value" => "[a-zA-Z]", "description" => "[a-zA-Z]" ); |
9489 | $this->peg_c43 = "/^[,:;?!']/"; |
9490 | $this->peg_c44 = array( "type" => "class", "value" => "[,:;?!']", "description" => "[,:;?!']" ); |
9491 | $this->peg_c45 = "/^[\\(\\).]/"; |
9492 | $this->peg_c46 = array( "type" => "class", "value" => "[().]", "description" => "[().]" ); |
9493 | $this->peg_c47 = "/^[-+*=]/"; |
9494 | $this->peg_c48 = array( "type" => "class", "value" => "[-+*=]", "description" => "[-+*=]" ); |
9495 | $this->peg_c49 = "/^[\\/|]/"; |
9496 | $this->peg_c50 = array( "type" => "class", "value" => "[/|]", "description" => "[/|]" ); |
9497 | $this->peg_c51 = "/^[-0-9a-zA-Z+*,=\\(\\):\\/;?.!'` \\[\\]\\[\\x{0080}-\\x{D7FF}\\]\\[\\x{E000}-\\x{FFFF}\\]]/"; |
9498 | $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}]]" ); |
9499 | $this->peg_c53 = "/^[\\x{D800}-\\x{DBFF}]/"; |
9500 | $this->peg_c54 = array( "type" => "class", "value" => "[\x{D800}-\x{DBFF}]", "description" => "[\x{D800}-\x{DBFF}]" ); |
9501 | $this->peg_c55 = "/^[\\x{DC00}-\\x{DFFF}]/"; |
9502 | $this->peg_c56 = array( "type" => "class", "value" => "[\x{DC00}-\x{DFFF}]", "description" => "[\x{DC00}-\x{DFFF}]" ); |
9503 | $this->peg_c57 = "-"; |
9504 | $this->peg_c58 = array( "type" => "literal", "value" => "-", "description" => "\"-\"" ); |
9505 | $this->peg_c59 = "\\"; |
9506 | $this->peg_c60 = array( "type" => "literal", "value" => "\\", "description" => "\"\\\\\"" ); |
9507 | $this->peg_c61 = "/^[, ;!_#%\\\$&]/"; |
9508 | $this->peg_c62 = array( "type" => "class", "value" => "[, ;!_#%\$&]", "description" => "[, ;!_#%\$&]" ); |
9509 | $this->peg_c63 = "/^[><~]/"; |
9510 | $this->peg_c64 = array( "type" => "class", "value" => "[><~]", "description" => "[><~]" ); |
9511 | $this->peg_c65 = "/^[%\\\$]/"; |
9512 | $this->peg_c66 = array( "type" => "class", "value" => "[%\$]", "description" => "[%\$]" ); |
9513 | $this->peg_c67 = "/^[{}|]/"; |
9514 | $this->peg_c68 = array( "type" => "class", "value" => "[{}|]", "description" => "[{}|]" ); |
9515 | $this->peg_c69 = "&"; |
9516 | $this->peg_c70 = array( "type" => "literal", "value" => "&", "description" => "\"&\"" ); |
9517 | $this->peg_c71 = "\\\\"; |
9518 | $this->peg_c72 = array( "type" => "literal", "value" => "\\\\", "description" => "\"\\\\\\\\\"" ); |
9519 | $this->peg_c73 = "\\begin"; |
9520 | $this->peg_c74 = array( "type" => "literal", "value" => "\\begin", "description" => "\"\\\\begin\"" ); |
9521 | $this->peg_c75 = "\\end"; |
9522 | $this->peg_c76 = array( "type" => "literal", "value" => "\\end", "description" => "\"\\\\end\"" ); |
9523 | $this->peg_c77 = "{matrix}"; |
9524 | $this->peg_c78 = array( "type" => "literal", "value" => "{matrix}", "description" => "\"{matrix}\"" ); |
9525 | $this->peg_c79 = "{pmatrix}"; |
9526 | $this->peg_c80 = array( "type" => "literal", "value" => "{pmatrix}", "description" => "\"{pmatrix}\"" ); |
9527 | $this->peg_c81 = "{bmatrix}"; |
9528 | $this->peg_c82 = array( "type" => "literal", "value" => "{bmatrix}", "description" => "\"{bmatrix}\"" ); |
9529 | $this->peg_c83 = "{Bmatrix}"; |
9530 | $this->peg_c84 = array( "type" => "literal", "value" => "{Bmatrix}", "description" => "\"{Bmatrix}\"" ); |
9531 | $this->peg_c85 = "{vmatrix}"; |
9532 | $this->peg_c86 = array( "type" => "literal", "value" => "{vmatrix}", "description" => "\"{vmatrix}\"" ); |
9533 | $this->peg_c87 = "{Vmatrix}"; |
9534 | $this->peg_c88 = array( "type" => "literal", "value" => "{Vmatrix}", "description" => "\"{Vmatrix}\"" ); |
9535 | $this->peg_c89 = "{array}"; |
9536 | $this->peg_c90 = array( "type" => "literal", "value" => "{array}", "description" => "\"{array}\"" ); |
9537 | $this->peg_c91 = "{align}"; |
9538 | $this->peg_c92 = array( "type" => "literal", "value" => "{align}", "description" => "\"{align}\"" ); |
9539 | $this->peg_c93 = "{aligned}"; |
9540 | $this->peg_c94 = array( "type" => "literal", "value" => "{aligned}", "description" => "\"{aligned}\"" ); |
9541 | $this->peg_c95 = "{alignat}"; |
9542 | $this->peg_c96 = array( "type" => "literal", "value" => "{alignat}", "description" => "\"{alignat}\"" ); |
9543 | $this->peg_c97 = "{alignedat}"; |
9544 | $this->peg_c98 = array( "type" => "literal", "value" => "{alignedat}", "description" => "\"{alignedat}\"" ); |
9545 | $this->peg_c99 = "{smallmatrix}"; |
9546 | $this->peg_c100 = array( "type" => "literal", "value" => "{smallmatrix}", "description" => "\"{smallmatrix}\"" ); |
9547 | $this->peg_c101 = "{cases}"; |
9548 | $this->peg_c102 = array( "type" => "literal", "value" => "{cases}", "description" => "\"{cases}\"" ); |
9549 | $this->peg_c103 = "named"; |
9550 | $this->peg_c104 = array( "type" => "literal", "value" => "named", "description" => "\"named\"" ); |
9551 | $this->peg_c105 = "gray"; |
9552 | $this->peg_c106 = array( "type" => "literal", "value" => "gray", "description" => "\"gray\"" ); |
9553 | $this->peg_c107 = "rgb"; |
9554 | $this->peg_c108 = array( "type" => "literal", "value" => "rgb", "description" => "\"rgb\"" ); |
9555 | $this->peg_c109 = "RGB"; |
9556 | $this->peg_c110 = array( "type" => "literal", "value" => "RGB", "description" => "\"RGB\"" ); |
9557 | $this->peg_c111 = "cmyk"; |
9558 | $this->peg_c112 = array( "type" => "literal", "value" => "cmyk", "description" => "\"cmyk\"" ); |
9559 | $this->peg_c113 = ","; |
9560 | $this->peg_c114 = array( "type" => "literal", "value" => ",", "description" => "\",\"" ); |
9561 | $this->peg_c115 = "0"; |
9562 | $this->peg_c116 = array( "type" => "literal", "value" => "0", "description" => "\"0\"" ); |
9563 | $this->peg_c117 = "/^[1-9]/"; |
9564 | $this->peg_c118 = array( "type" => "class", "value" => "[1-9]", "description" => "[1-9]" ); |
9565 | $this->peg_c119 = "."; |
9566 | $this->peg_c120 = array( "type" => "literal", "value" => ".", "description" => "\".\"" ); |
9567 | $this->peg_c121 = "/^[01]/"; |
9568 | $this->peg_c122 = array( "type" => "class", "value" => "[01]", "description" => "[01]" ); |
9569 | $this->peg_c123 = "/^[+-.*']/"; |
9570 | $this->peg_c124 = array( "type" => "class", "value" => "[+-.*']", "description" => "[+-.*']" ); |
9571 | $this->peg_c125 = "="; |
9572 | $this->peg_c126 = array( "type" => "literal", "value" => "=", "description" => "\"=\"" ); |
9573 | $this->peg_c127 = "#"; |
9574 | $this->peg_c128 = array( "type" => "literal", "value" => "#", "description" => "\"#\"" ); |
9575 | $this->peg_c129 = "~--"; |
9576 | $this->peg_c130 = array( "type" => "literal", "value" => "~--", "description" => "\"~--\"" ); |
9577 | $this->peg_c131 = "~-"; |
9578 | $this->peg_c132 = array( "type" => "literal", "value" => "~-", "description" => "\"~-\"" ); |
9579 | $this->peg_c133 = "~="; |
9580 | $this->peg_c134 = array( "type" => "literal", "value" => "~=", "description" => "\"~=\"" ); |
9581 | $this->peg_c135 = "~"; |
9582 | $this->peg_c136 = array( "type" => "literal", "value" => "~", "description" => "\"~\"" ); |
9583 | $this->peg_c137 = "-~-"; |
9584 | $this->peg_c138 = array( "type" => "literal", "value" => "-~-", "description" => "\"-~-\"" ); |
9585 | $this->peg_c139 = "...."; |
9586 | $this->peg_c140 = array( "type" => "literal", "value" => "....", "description" => "\"....\"" ); |
9587 | $this->peg_c141 = "..."; |
9588 | $this->peg_c142 = array( "type" => "literal", "value" => "...", "description" => "\"...\"" ); |
9589 | $this->peg_c143 = "<-"; |
9590 | $this->peg_c144 = array( "type" => "literal", "value" => "<-", "description" => "\"<-\"" ); |
9591 | $this->peg_c145 = "->"; |
9592 | $this->peg_c146 = array( "type" => "literal", "value" => "->", "description" => "\"->\"" ); |
9593 | $this->peg_c147 = "1"; |
9594 | $this->peg_c148 = array( "type" => "literal", "value" => "1", "description" => "\"1\"" ); |
9595 | $this->peg_c149 = "2"; |
9596 | $this->peg_c150 = array( "type" => "literal", "value" => "2", "description" => "\"2\"" ); |
9597 | $this->peg_c151 = "3"; |
9598 | $this->peg_c152 = array( "type" => "literal", "value" => "3", "description" => "\"3\"" ); |
9599 | $this->peg_c153 = "{math}"; |
9600 | $this->peg_c154 = array( "type" => "literal", "value" => "{math}", "description" => "\"{math}\"" ); |
9601 | $this->peg_c155 = "\\}"; |
9602 | $this->peg_c156 = array( "type" => "literal", "value" => "\\}", "description" => "\"\\\\}\"" ); |
9603 | $this->peg_c157 = "/^[+-=#\\(\\).,;\\/*<>|@&'\\[\\]]/"; |
9604 | $this->peg_c158 = array( "type" => "class", "value" => "[+-=#().,;/*<>|@&'[]]", "description" => "[+-=#().,;/*<>|@&'[]]" ); |
9605 | |
9606 | $peg_startRuleFunctions = array( 'start' => array($this, "peg_parsestart") ); |
9607 | $peg_startRuleFunction = array($this, "peg_parsestart"); |
9608 | if (isset($options["startRule"])) { |
9609 | if (!(isset($peg_startRuleFunctions[$options["startRule"]]))) { |
9610 | throw new \Exception("Can't start parsing from rule \"" . $options["startRule"] . "\"."); |
9611 | } |
9612 | |
9613 | $peg_startRuleFunction = $peg_startRuleFunctions[$options["startRule"]]; |
9614 | } |
9615 | |
9616 | /* BEGIN initializer code */ |
9617 | |
9618 | $this->tu = TexUtil::getInstance(); |
9619 | |
9620 | # get reference of the options for usage in functions. |
9621 | |
9622 | |
9623 | # get reference of the options for usage in functions. |
9624 | $this->options = ParserUtil::createOptions($options); |
9625 | |
9626 | |
9627 | /* END initializer code */ |
9628 | |
9629 | $peg_result = call_user_func($peg_startRuleFunction); |
9630 | |
9631 | $this->peg_cache = array(); |
9632 | |
9633 | mb_regex_encoding($old_regex_encoding); |
9634 | |
9635 | if ($peg_result !== $this->peg_FAILED && $this->peg_currPos === $this->input_length) { |
9636 | $this->cleanup_state(); // Free up memory |
9637 | return $peg_result; |
9638 | } else { |
9639 | if ($peg_result !== $this->peg_FAILED && $this->peg_currPos < $this->input_length) { |
9640 | $this->peg_fail(array("type" => "end", "description" => "end of input" )); |
9641 | } |
9642 | |
9643 | $exception = $this->peg_buildException(null, $this->peg_maxFailExpected, $this->peg_maxFailPos); |
9644 | $this->cleanup_state(); // Free up memory |
9645 | throw $exception; |
9646 | } |
9647 | } |
9648 | |
9649 | }; |