@mfdaves/okf-mcp 0.9.0 → 0.12.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +69 -0
- package/README.md +176 -19
- package/bin/okf-mcp.js +6 -1
- package/okf/okf-mcp/policies/authoring-safety.md +11 -1
- package/package.json +17 -5
- package/server.json +2 -2
- package/src/assets.js +165 -73
- package/src/authoring/candidates.js +391 -0
- package/src/authoring/git-preflight.js +225 -0
- package/src/authoring/git-publish.js +776 -0
- package/src/authoring/live.js +789 -0
- package/src/authoring/paths.js +112 -0
- package/src/authoring/policy-hook.js +221 -0
- package/src/authoring/proposal-policy.js +137 -0
- package/src/authoring/receipts.js +329 -0
- package/src/authoring/render.js +38 -0
- package/src/authoring/shared.js +75 -0
- package/src/authoring/staging.js +216 -0
- package/src/authoring.js +386 -287
- package/src/cache/files.js +147 -0
- package/src/cache/lock.js +201 -0
- package/src/cache/paths.js +197 -0
- package/src/cache/store.js +703 -0
- package/src/catalog-text.js +19 -0
- package/src/cli.js +184 -151
- package/src/computation.js +99 -61
- package/src/context/assemble.js +567 -0
- package/src/context/cli-options.js +88 -0
- package/src/context/score.js +234 -0
- package/src/context/sections.js +274 -0
- package/src/embed/interface.js +160 -0
- package/src/embed/openai.js +715 -0
- package/src/embed/prepare.js +182 -0
- package/src/embed/units.js +96 -0
- package/src/git-source.js +112 -52
- package/src/graph.js +95 -37
- package/src/http-server.js +36 -17
- package/src/index.js +15 -0
- package/src/indexer/assemble.js +566 -0
- package/src/indexer/build.js +290 -0
- package/src/indexer/cache.js +81 -0
- package/src/indexer/edges.js +430 -0
- package/src/indexer/index.js +44 -0
- package/src/indexer/paths.js +178 -0
- package/src/indexer/resolve.js +282 -0
- package/src/indexer/update.js +720 -0
- package/src/indexer.js +3 -1068
- package/src/live-authoring.js +4 -2329
- package/src/markdown.js +21 -16
- package/src/mcp/registry.js +328 -0
- package/src/mcp/resources.js +45 -0
- package/src/mcp/server.js +472 -0
- package/src/mcp/tools/catalog.js +244 -0
- package/src/mcp/tools/computation.js +83 -0
- package/src/mcp/tools/context.js +133 -0
- package/src/mcp/tools/graph.js +167 -0
- package/src/mcp/tools/live-authoring.js +316 -0
- package/src/mcp/tools/migration.js +86 -0
- package/src/mcp/tools/producers.js +79 -0
- package/src/mcp/tools/proposals.js +213 -0
- package/src/mcp/tools/provenance.js +87 -0
- package/src/mcp/tools/remote.js +79 -0
- package/src/mcp/tools/search.js +242 -0
- package/src/mcp-server.js +3 -1611
- package/src/migration.js +431 -253
- package/src/parser.js +245 -130
- package/src/plugins.js +71 -48
- package/src/policy/write-policy.js +713 -0
- package/src/producer-publisher.js +195 -77
- package/src/producers.js +265 -101
- package/src/project.js +277 -93
- package/src/remote.js +96 -61
- package/src/search/cli-options.js +107 -0
- package/src/search/confidence.js +61 -0
- package/src/search/dense.js +304 -0
- package/src/search/embedding-cli.js +57 -0
- package/src/search/embedding-config.js +217 -0
- package/src/search/fusion.js +249 -0
- package/src/search/hybrid.js +526 -0
- package/src/search/languages.js +200 -0
- package/src/search/lexical.js +695 -0
- package/src/search/query.js +620 -0
- package/src/search/stem/among.js +43 -0
- package/src/search/stem/base-stemmer.js +311 -0
- package/src/search/stem/en-regions.js +456 -0
- package/src/search/stem/en-suffixes.js +664 -0
- package/src/search/stem/en-tables.js +176 -0
- package/src/search/stem/en.js +238 -0
- package/src/search/stem/it-regions.js +459 -0
- package/src/search/stem/it-suffixes.js +471 -0
- package/src/search/stem/it-tables.js +257 -0
- package/src/search/stem/it.js +155 -0
- package/src/search-index.js +2 -81
- package/src/search.js +2 -252
- package/src/store.js +134 -81
- package/src/v02.js +301 -105
- package/src/validation.js +24 -20
|
@@ -0,0 +1,664 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) AXA Group Operations Spain S.A.
|
|
3
|
+
*
|
|
4
|
+
* Permission is hereby granted, free of charge, to any person obtaining
|
|
5
|
+
* a copy of this software and associated documentation files (the
|
|
6
|
+
* "Software"), to deal in the Software without restriction, including
|
|
7
|
+
* without limitation the rights to use, copy, modify, merge, publish,
|
|
8
|
+
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
9
|
+
* permit persons to whom the Software is furnished to do so, subject to
|
|
10
|
+
* the following conditions:
|
|
11
|
+
*
|
|
12
|
+
* The above copyright notice and this permission notice shall be
|
|
13
|
+
* included in all copies or substantial portions of the Software.
|
|
14
|
+
*
|
|
15
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
16
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
17
|
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
18
|
+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
19
|
+
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
20
|
+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
21
|
+
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
// Provenance: derived from @nlpjs/lang-en-min 4.26.1, src/stemmer-en.js (MIT,
|
|
25
|
+
// header above), itself generated by the Snowball compiler from the
|
|
26
|
+
// Snowball English (Porter2) stemming algorithm; this file holds the suffix removal steps.
|
|
27
|
+
// Mechanical changes only (scripts/vendor-stemmers.js): the class is split
|
|
28
|
+
// by routine group to stay under the 800-line cap, local requires replace
|
|
29
|
+
// @nlpjs/core, no container or tokenizer plumbing, strict equality,
|
|
30
|
+
// block-scoped and const declarations, labels renamed apart from their
|
|
31
|
+
// guard variables, Biome formatting. test/stem-parity.test.js pins zero
|
|
32
|
+
// disagreements with the upstream package.
|
|
33
|
+
"use strict";
|
|
34
|
+
const tables = require("./en-tables");
|
|
35
|
+
|
|
36
|
+
module.exports = {
|
|
37
|
+
r_Step_1a() {
|
|
38
|
+
let among_var;
|
|
39
|
+
let v_2;
|
|
40
|
+
// (, line 58
|
|
41
|
+
// try, line 59
|
|
42
|
+
const v_1 = this.limit - this.cursor;
|
|
43
|
+
let lab0 = true;
|
|
44
|
+
label0: while (lab0 === true) {
|
|
45
|
+
lab0 = false;
|
|
46
|
+
// (, line 59
|
|
47
|
+
// [, line 60
|
|
48
|
+
this.ket = this.cursor;
|
|
49
|
+
// substring, line 60
|
|
50
|
+
among_var = this.find_among_b(tables.a_1, 3);
|
|
51
|
+
if (among_var === 0) {
|
|
52
|
+
this.cursor = this.limit - v_1;
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
// ], line 60
|
|
56
|
+
this.bra = this.cursor;
|
|
57
|
+
switch (among_var) {
|
|
58
|
+
case 0:
|
|
59
|
+
this.cursor = this.limit - v_1;
|
|
60
|
+
break label0;
|
|
61
|
+
case 1:
|
|
62
|
+
// (, line 62
|
|
63
|
+
// delete, line 62
|
|
64
|
+
if (!this.slice_del()) {
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
// [, line 65
|
|
71
|
+
this.ket = this.cursor;
|
|
72
|
+
// substring, line 65
|
|
73
|
+
among_var = this.find_among_b(tables.a_2, 6);
|
|
74
|
+
if (among_var === 0) {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
// ], line 65
|
|
78
|
+
this.bra = this.cursor;
|
|
79
|
+
switch (among_var) {
|
|
80
|
+
case 0:
|
|
81
|
+
return false;
|
|
82
|
+
case 1:
|
|
83
|
+
// (, line 66
|
|
84
|
+
// <-, line 66
|
|
85
|
+
if (!this.slice_from("ss")) {
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
break;
|
|
89
|
+
case 2: {
|
|
90
|
+
// (, line 68
|
|
91
|
+
// or, line 68
|
|
92
|
+
let lab1 = true;
|
|
93
|
+
label1: while (lab1 === true) {
|
|
94
|
+
lab1 = false;
|
|
95
|
+
v_2 = this.limit - this.cursor;
|
|
96
|
+
let lab2 = true;
|
|
97
|
+
while (lab2 === true) {
|
|
98
|
+
lab2 = false;
|
|
99
|
+
// (, line 68
|
|
100
|
+
// hop, line 68
|
|
101
|
+
{
|
|
102
|
+
const c = this.cursor - 2;
|
|
103
|
+
if (this.limit_backward > c || c > this.limit) {
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
this.cursor = c;
|
|
107
|
+
}
|
|
108
|
+
// <-, line 68
|
|
109
|
+
if (!this.slice_from("i")) {
|
|
110
|
+
return false;
|
|
111
|
+
}
|
|
112
|
+
break label1;
|
|
113
|
+
}
|
|
114
|
+
this.cursor = this.limit - v_2;
|
|
115
|
+
// <-, line 68
|
|
116
|
+
if (!this.slice_from("ie")) {
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
case 3:
|
|
123
|
+
// (, line 69
|
|
124
|
+
// next, line 69
|
|
125
|
+
if (this.cursor <= this.limit_backward) {
|
|
126
|
+
return false;
|
|
127
|
+
}
|
|
128
|
+
this.cursor--;
|
|
129
|
+
// gopast, line 69
|
|
130
|
+
golab3: while (true) {
|
|
131
|
+
let lab4 = true;
|
|
132
|
+
while (lab4 === true) {
|
|
133
|
+
lab4 = false;
|
|
134
|
+
if (!this.in_grouping_b(tables.g_v, 97, 121)) {
|
|
135
|
+
break;
|
|
136
|
+
}
|
|
137
|
+
break golab3;
|
|
138
|
+
}
|
|
139
|
+
if (this.cursor <= this.limit_backward) {
|
|
140
|
+
return false;
|
|
141
|
+
}
|
|
142
|
+
this.cursor--;
|
|
143
|
+
}
|
|
144
|
+
// delete, line 69
|
|
145
|
+
if (!this.slice_del()) {
|
|
146
|
+
return false;
|
|
147
|
+
}
|
|
148
|
+
break;
|
|
149
|
+
}
|
|
150
|
+
return true;
|
|
151
|
+
},
|
|
152
|
+
|
|
153
|
+
r_Step_1b() {
|
|
154
|
+
let among_var;
|
|
155
|
+
let v_1;
|
|
156
|
+
let v_3;
|
|
157
|
+
let v_4;
|
|
158
|
+
// (, line 74
|
|
159
|
+
// [, line 75
|
|
160
|
+
this.ket = this.cursor;
|
|
161
|
+
// substring, line 75
|
|
162
|
+
among_var = this.find_among_b(tables.a_4, 6);
|
|
163
|
+
if (among_var === 0) {
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
166
|
+
// ], line 75
|
|
167
|
+
this.bra = this.cursor;
|
|
168
|
+
switch (among_var) {
|
|
169
|
+
case 0:
|
|
170
|
+
return false;
|
|
171
|
+
case 1:
|
|
172
|
+
// (, line 77
|
|
173
|
+
// call R1, line 77
|
|
174
|
+
if (!this.r_R1()) {
|
|
175
|
+
return false;
|
|
176
|
+
}
|
|
177
|
+
// <-, line 77
|
|
178
|
+
if (!this.slice_from("ee")) {
|
|
179
|
+
return false;
|
|
180
|
+
}
|
|
181
|
+
break;
|
|
182
|
+
case 2:
|
|
183
|
+
// (, line 79
|
|
184
|
+
// test, line 80
|
|
185
|
+
v_1 = this.limit - this.cursor;
|
|
186
|
+
// gopast, line 80
|
|
187
|
+
golab0: while (true) {
|
|
188
|
+
let lab1 = true;
|
|
189
|
+
while (lab1 === true) {
|
|
190
|
+
lab1 = false;
|
|
191
|
+
if (!this.in_grouping_b(tables.g_v, 97, 121)) {
|
|
192
|
+
break;
|
|
193
|
+
}
|
|
194
|
+
break golab0;
|
|
195
|
+
}
|
|
196
|
+
if (this.cursor <= this.limit_backward) {
|
|
197
|
+
return false;
|
|
198
|
+
}
|
|
199
|
+
this.cursor--;
|
|
200
|
+
}
|
|
201
|
+
this.cursor = this.limit - v_1;
|
|
202
|
+
// delete, line 80
|
|
203
|
+
if (!this.slice_del()) {
|
|
204
|
+
return false;
|
|
205
|
+
}
|
|
206
|
+
// test, line 81
|
|
207
|
+
v_3 = this.limit - this.cursor;
|
|
208
|
+
// substring, line 81
|
|
209
|
+
among_var = this.find_among_b(tables.a_3, 13);
|
|
210
|
+
if (among_var === 0) {
|
|
211
|
+
return false;
|
|
212
|
+
}
|
|
213
|
+
this.cursor = this.limit - v_3;
|
|
214
|
+
switch (among_var) {
|
|
215
|
+
case 0:
|
|
216
|
+
return false;
|
|
217
|
+
case 1:
|
|
218
|
+
// (, line 83
|
|
219
|
+
// <+, line 83
|
|
220
|
+
{
|
|
221
|
+
const c = this.cursor;
|
|
222
|
+
this.insert(this.cursor, this.cursor, "e");
|
|
223
|
+
this.cursor = c;
|
|
224
|
+
}
|
|
225
|
+
break;
|
|
226
|
+
case 2:
|
|
227
|
+
// (, line 86
|
|
228
|
+
// [, line 86
|
|
229
|
+
this.ket = this.cursor;
|
|
230
|
+
// next, line 86
|
|
231
|
+
if (this.cursor <= this.limit_backward) {
|
|
232
|
+
return false;
|
|
233
|
+
}
|
|
234
|
+
this.cursor--;
|
|
235
|
+
// ], line 86
|
|
236
|
+
this.bra = this.cursor;
|
|
237
|
+
// delete, line 86
|
|
238
|
+
if (!this.slice_del()) {
|
|
239
|
+
return false;
|
|
240
|
+
}
|
|
241
|
+
break;
|
|
242
|
+
case 3:
|
|
243
|
+
// (, line 87
|
|
244
|
+
// atmark, line 87
|
|
245
|
+
if (this.cursor !== this.I_p1) {
|
|
246
|
+
return false;
|
|
247
|
+
}
|
|
248
|
+
// test, line 87
|
|
249
|
+
v_4 = this.limit - this.cursor;
|
|
250
|
+
// call shortv, line 87
|
|
251
|
+
if (!this.r_shortv()) {
|
|
252
|
+
return false;
|
|
253
|
+
}
|
|
254
|
+
this.cursor = this.limit - v_4;
|
|
255
|
+
// <+, line 87
|
|
256
|
+
{
|
|
257
|
+
const c = this.cursor;
|
|
258
|
+
this.insert(this.cursor, this.cursor, "e");
|
|
259
|
+
this.cursor = c;
|
|
260
|
+
}
|
|
261
|
+
break;
|
|
262
|
+
}
|
|
263
|
+
break;
|
|
264
|
+
}
|
|
265
|
+
return true;
|
|
266
|
+
},
|
|
267
|
+
|
|
268
|
+
r_Step_1c() {
|
|
269
|
+
let v_1;
|
|
270
|
+
let v_2;
|
|
271
|
+
// (, line 93
|
|
272
|
+
// [, line 94
|
|
273
|
+
this.ket = this.cursor;
|
|
274
|
+
// or, line 94
|
|
275
|
+
let lab0 = true;
|
|
276
|
+
label0: while (lab0 === true) {
|
|
277
|
+
lab0 = false;
|
|
278
|
+
v_1 = this.limit - this.cursor;
|
|
279
|
+
let lab1 = true;
|
|
280
|
+
while (lab1 === true) {
|
|
281
|
+
lab1 = false;
|
|
282
|
+
// literal, line 94
|
|
283
|
+
if (!this.eq_s_b("y")) {
|
|
284
|
+
break;
|
|
285
|
+
}
|
|
286
|
+
break label0;
|
|
287
|
+
}
|
|
288
|
+
this.cursor = this.limit - v_1;
|
|
289
|
+
// literal, line 94
|
|
290
|
+
if (!this.eq_s_b("Y")) {
|
|
291
|
+
return false;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
// ], line 94
|
|
295
|
+
this.bra = this.cursor;
|
|
296
|
+
if (!this.out_grouping_b(tables.g_v, 97, 121)) {
|
|
297
|
+
return false;
|
|
298
|
+
}
|
|
299
|
+
// not, line 95
|
|
300
|
+
{
|
|
301
|
+
v_2 = this.limit - this.cursor;
|
|
302
|
+
let lab2 = true;
|
|
303
|
+
while (lab2 === true) {
|
|
304
|
+
lab2 = false;
|
|
305
|
+
// atlimit, line 95
|
|
306
|
+
if (this.cursor > this.limit_backward) {
|
|
307
|
+
break;
|
|
308
|
+
}
|
|
309
|
+
return false;
|
|
310
|
+
}
|
|
311
|
+
this.cursor = this.limit - v_2;
|
|
312
|
+
}
|
|
313
|
+
// <-, line 96
|
|
314
|
+
if (!this.slice_from("i")) {
|
|
315
|
+
return false;
|
|
316
|
+
}
|
|
317
|
+
return true;
|
|
318
|
+
},
|
|
319
|
+
|
|
320
|
+
r_Step_2() {
|
|
321
|
+
// (, line 99
|
|
322
|
+
// [, line 100
|
|
323
|
+
this.ket = this.cursor;
|
|
324
|
+
// substring, line 100
|
|
325
|
+
const among_var = this.find_among_b(tables.a_5, 24);
|
|
326
|
+
if (among_var === 0) {
|
|
327
|
+
return false;
|
|
328
|
+
}
|
|
329
|
+
// ], line 100
|
|
330
|
+
this.bra = this.cursor;
|
|
331
|
+
// call R1, line 100
|
|
332
|
+
if (!this.r_R1()) {
|
|
333
|
+
return false;
|
|
334
|
+
}
|
|
335
|
+
switch (among_var) {
|
|
336
|
+
case 0:
|
|
337
|
+
return false;
|
|
338
|
+
case 1:
|
|
339
|
+
// (, line 101
|
|
340
|
+
// <-, line 101
|
|
341
|
+
if (!this.slice_from("tion")) {
|
|
342
|
+
return false;
|
|
343
|
+
}
|
|
344
|
+
break;
|
|
345
|
+
case 2:
|
|
346
|
+
// (, line 102
|
|
347
|
+
// <-, line 102
|
|
348
|
+
if (!this.slice_from("ence")) {
|
|
349
|
+
return false;
|
|
350
|
+
}
|
|
351
|
+
break;
|
|
352
|
+
case 3:
|
|
353
|
+
// (, line 103
|
|
354
|
+
// <-, line 103
|
|
355
|
+
if (!this.slice_from("ance")) {
|
|
356
|
+
return false;
|
|
357
|
+
}
|
|
358
|
+
break;
|
|
359
|
+
case 4:
|
|
360
|
+
// (, line 104
|
|
361
|
+
// <-, line 104
|
|
362
|
+
if (!this.slice_from("able")) {
|
|
363
|
+
return false;
|
|
364
|
+
}
|
|
365
|
+
break;
|
|
366
|
+
case 5:
|
|
367
|
+
// (, line 105
|
|
368
|
+
// <-, line 105
|
|
369
|
+
if (!this.slice_from("ent")) {
|
|
370
|
+
return false;
|
|
371
|
+
}
|
|
372
|
+
break;
|
|
373
|
+
case 6:
|
|
374
|
+
// (, line 107
|
|
375
|
+
// <-, line 107
|
|
376
|
+
if (!this.slice_from("ize")) {
|
|
377
|
+
return false;
|
|
378
|
+
}
|
|
379
|
+
break;
|
|
380
|
+
case 7:
|
|
381
|
+
// (, line 109
|
|
382
|
+
// <-, line 109
|
|
383
|
+
if (!this.slice_from("ate")) {
|
|
384
|
+
return false;
|
|
385
|
+
}
|
|
386
|
+
break;
|
|
387
|
+
case 8:
|
|
388
|
+
// (, line 111
|
|
389
|
+
// <-, line 111
|
|
390
|
+
if (!this.slice_from("al")) {
|
|
391
|
+
return false;
|
|
392
|
+
}
|
|
393
|
+
break;
|
|
394
|
+
case 9:
|
|
395
|
+
// (, line 112
|
|
396
|
+
// <-, line 112
|
|
397
|
+
if (!this.slice_from("ful")) {
|
|
398
|
+
return false;
|
|
399
|
+
}
|
|
400
|
+
break;
|
|
401
|
+
case 10:
|
|
402
|
+
// (, line 114
|
|
403
|
+
// <-, line 114
|
|
404
|
+
if (!this.slice_from("ous")) {
|
|
405
|
+
return false;
|
|
406
|
+
}
|
|
407
|
+
break;
|
|
408
|
+
case 11:
|
|
409
|
+
// (, line 116
|
|
410
|
+
// <-, line 116
|
|
411
|
+
if (!this.slice_from("ive")) {
|
|
412
|
+
return false;
|
|
413
|
+
}
|
|
414
|
+
break;
|
|
415
|
+
case 12:
|
|
416
|
+
// (, line 118
|
|
417
|
+
// <-, line 118
|
|
418
|
+
if (!this.slice_from("ble")) {
|
|
419
|
+
return false;
|
|
420
|
+
}
|
|
421
|
+
break;
|
|
422
|
+
case 13:
|
|
423
|
+
// (, line 119
|
|
424
|
+
// literal, line 119
|
|
425
|
+
if (!this.eq_s_b("l")) {
|
|
426
|
+
return false;
|
|
427
|
+
}
|
|
428
|
+
// <-, line 119
|
|
429
|
+
if (!this.slice_from("og")) {
|
|
430
|
+
return false;
|
|
431
|
+
}
|
|
432
|
+
break;
|
|
433
|
+
case 14:
|
|
434
|
+
// (, line 120
|
|
435
|
+
// <-, line 120
|
|
436
|
+
if (!this.slice_from("ful")) {
|
|
437
|
+
return false;
|
|
438
|
+
}
|
|
439
|
+
break;
|
|
440
|
+
case 15:
|
|
441
|
+
// (, line 121
|
|
442
|
+
// <-, line 121
|
|
443
|
+
if (!this.slice_from("less")) {
|
|
444
|
+
return false;
|
|
445
|
+
}
|
|
446
|
+
break;
|
|
447
|
+
case 16:
|
|
448
|
+
// (, line 122
|
|
449
|
+
if (!this.in_grouping_b(tables.g_valid_LI, 99, 116)) {
|
|
450
|
+
return false;
|
|
451
|
+
}
|
|
452
|
+
// delete, line 122
|
|
453
|
+
if (!this.slice_del()) {
|
|
454
|
+
return false;
|
|
455
|
+
}
|
|
456
|
+
break;
|
|
457
|
+
}
|
|
458
|
+
return true;
|
|
459
|
+
},
|
|
460
|
+
|
|
461
|
+
r_Step_3() {
|
|
462
|
+
// (, line 126
|
|
463
|
+
// [, line 127
|
|
464
|
+
this.ket = this.cursor;
|
|
465
|
+
// substring, line 127
|
|
466
|
+
const among_var = this.find_among_b(tables.a_6, 9);
|
|
467
|
+
if (among_var === 0) {
|
|
468
|
+
return false;
|
|
469
|
+
}
|
|
470
|
+
// ], line 127
|
|
471
|
+
this.bra = this.cursor;
|
|
472
|
+
// call R1, line 127
|
|
473
|
+
if (!this.r_R1()) {
|
|
474
|
+
return false;
|
|
475
|
+
}
|
|
476
|
+
switch (among_var) {
|
|
477
|
+
case 0:
|
|
478
|
+
return false;
|
|
479
|
+
case 1:
|
|
480
|
+
// (, line 128
|
|
481
|
+
// <-, line 128
|
|
482
|
+
if (!this.slice_from("tion")) {
|
|
483
|
+
return false;
|
|
484
|
+
}
|
|
485
|
+
break;
|
|
486
|
+
case 2:
|
|
487
|
+
// (, line 129
|
|
488
|
+
// <-, line 129
|
|
489
|
+
if (!this.slice_from("ate")) {
|
|
490
|
+
return false;
|
|
491
|
+
}
|
|
492
|
+
break;
|
|
493
|
+
case 3:
|
|
494
|
+
// (, line 130
|
|
495
|
+
// <-, line 130
|
|
496
|
+
if (!this.slice_from("al")) {
|
|
497
|
+
return false;
|
|
498
|
+
}
|
|
499
|
+
break;
|
|
500
|
+
case 4:
|
|
501
|
+
// (, line 132
|
|
502
|
+
// <-, line 132
|
|
503
|
+
if (!this.slice_from("ic")) {
|
|
504
|
+
return false;
|
|
505
|
+
}
|
|
506
|
+
break;
|
|
507
|
+
case 5:
|
|
508
|
+
// (, line 134
|
|
509
|
+
// delete, line 134
|
|
510
|
+
if (!this.slice_del()) {
|
|
511
|
+
return false;
|
|
512
|
+
}
|
|
513
|
+
break;
|
|
514
|
+
case 6:
|
|
515
|
+
// (, line 136
|
|
516
|
+
// call R2, line 136
|
|
517
|
+
if (!this.r_R2()) {
|
|
518
|
+
return false;
|
|
519
|
+
}
|
|
520
|
+
// delete, line 136
|
|
521
|
+
if (!this.slice_del()) {
|
|
522
|
+
return false;
|
|
523
|
+
}
|
|
524
|
+
break;
|
|
525
|
+
}
|
|
526
|
+
return true;
|
|
527
|
+
},
|
|
528
|
+
|
|
529
|
+
r_Step_4() {
|
|
530
|
+
let v_1;
|
|
531
|
+
// (, line 140
|
|
532
|
+
// [, line 141
|
|
533
|
+
this.ket = this.cursor;
|
|
534
|
+
// substring, line 141
|
|
535
|
+
const among_var = this.find_among_b(tables.a_7, 18);
|
|
536
|
+
if (among_var === 0) {
|
|
537
|
+
return false;
|
|
538
|
+
}
|
|
539
|
+
// ], line 141
|
|
540
|
+
this.bra = this.cursor;
|
|
541
|
+
// call R2, line 141
|
|
542
|
+
if (!this.r_R2()) {
|
|
543
|
+
return false;
|
|
544
|
+
}
|
|
545
|
+
switch (among_var) {
|
|
546
|
+
case 0:
|
|
547
|
+
return false;
|
|
548
|
+
case 1:
|
|
549
|
+
// (, line 144
|
|
550
|
+
// delete, line 144
|
|
551
|
+
if (!this.slice_del()) {
|
|
552
|
+
return false;
|
|
553
|
+
}
|
|
554
|
+
break;
|
|
555
|
+
case 2: {
|
|
556
|
+
// (, line 145
|
|
557
|
+
// or, line 145
|
|
558
|
+
let lab0 = true;
|
|
559
|
+
label0: while (lab0 === true) {
|
|
560
|
+
lab0 = false;
|
|
561
|
+
v_1 = this.limit - this.cursor;
|
|
562
|
+
let lab1 = true;
|
|
563
|
+
while (lab1 === true) {
|
|
564
|
+
lab1 = false;
|
|
565
|
+
// literal, line 145
|
|
566
|
+
if (!this.eq_s_b("s")) {
|
|
567
|
+
break;
|
|
568
|
+
}
|
|
569
|
+
break label0;
|
|
570
|
+
}
|
|
571
|
+
this.cursor = this.limit - v_1;
|
|
572
|
+
// literal, line 145
|
|
573
|
+
if (!this.eq_s_b("t")) {
|
|
574
|
+
return false;
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
// delete, line 145
|
|
578
|
+
if (!this.slice_del()) {
|
|
579
|
+
return false;
|
|
580
|
+
}
|
|
581
|
+
break;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
return true;
|
|
585
|
+
},
|
|
586
|
+
|
|
587
|
+
r_Step_5() {
|
|
588
|
+
let v_1;
|
|
589
|
+
let v_2;
|
|
590
|
+
// (, line 149
|
|
591
|
+
// [, line 150
|
|
592
|
+
this.ket = this.cursor;
|
|
593
|
+
// substring, line 150
|
|
594
|
+
const among_var = this.find_among_b(tables.a_8, 2);
|
|
595
|
+
if (among_var === 0) {
|
|
596
|
+
return false;
|
|
597
|
+
}
|
|
598
|
+
// ], line 150
|
|
599
|
+
this.bra = this.cursor;
|
|
600
|
+
switch (among_var) {
|
|
601
|
+
case 0:
|
|
602
|
+
return false;
|
|
603
|
+
case 1: {
|
|
604
|
+
// (, line 151
|
|
605
|
+
// or, line 151
|
|
606
|
+
let lab0 = true;
|
|
607
|
+
label0: while (lab0 === true) {
|
|
608
|
+
lab0 = false;
|
|
609
|
+
v_1 = this.limit - this.cursor;
|
|
610
|
+
let lab1 = true;
|
|
611
|
+
while (lab1 === true) {
|
|
612
|
+
lab1 = false;
|
|
613
|
+
// call R2, line 151
|
|
614
|
+
if (!this.r_R2()) {
|
|
615
|
+
break;
|
|
616
|
+
}
|
|
617
|
+
break label0;
|
|
618
|
+
}
|
|
619
|
+
this.cursor = this.limit - v_1;
|
|
620
|
+
// (, line 151
|
|
621
|
+
// call R1, line 151
|
|
622
|
+
if (!this.r_R1()) {
|
|
623
|
+
return false;
|
|
624
|
+
}
|
|
625
|
+
// not, line 151
|
|
626
|
+
{
|
|
627
|
+
v_2 = this.limit - this.cursor;
|
|
628
|
+
let lab2 = true;
|
|
629
|
+
while (lab2 === true) {
|
|
630
|
+
lab2 = false;
|
|
631
|
+
// call shortv, line 151
|
|
632
|
+
if (!this.r_shortv()) {
|
|
633
|
+
break;
|
|
634
|
+
}
|
|
635
|
+
return false;
|
|
636
|
+
}
|
|
637
|
+
this.cursor = this.limit - v_2;
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
// delete, line 151
|
|
641
|
+
if (!this.slice_del()) {
|
|
642
|
+
return false;
|
|
643
|
+
}
|
|
644
|
+
break;
|
|
645
|
+
}
|
|
646
|
+
case 2:
|
|
647
|
+
// (, line 152
|
|
648
|
+
// call R2, line 152
|
|
649
|
+
if (!this.r_R2()) {
|
|
650
|
+
return false;
|
|
651
|
+
}
|
|
652
|
+
// literal, line 152
|
|
653
|
+
if (!this.eq_s_b("l")) {
|
|
654
|
+
return false;
|
|
655
|
+
}
|
|
656
|
+
// delete, line 152
|
|
657
|
+
if (!this.slice_del()) {
|
|
658
|
+
return false;
|
|
659
|
+
}
|
|
660
|
+
break;
|
|
661
|
+
}
|
|
662
|
+
return true;
|
|
663
|
+
},
|
|
664
|
+
};
|